<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Suffering from a permanent case of code rage</description><title>0xabad1dea</title><generator>Tumblr (3.0; @abad1dea)</generator><link>http://abad1dea.tumblr.com/</link><item><title>O tumblr, my tumblr, the delightful romp is done
The board approved e’ry point, your future has been...</title><description>&lt;p&gt;O tumblr, my tumblr, the delightful romp is done&lt;br/&gt;
The board approved e’ry point, your future has been won&lt;br/&gt;
Gods dammit&lt;br/&gt;
#poem&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/50830993530</link><guid>http://abad1dea.tumblr.com/post/50830993530</guid><pubDate>Sun, 19 May 2013 12:57:07 -0400</pubDate><category>poem</category><category>yahoo</category><category>yahoo!</category></item><item><title>I chipped again

https://soundcloud.com/0xabad1dea/</title><description>&lt;iframe class="tumblr_audio_player tumblr_audio_player_50630314509" src="http://abad1dea.tumblr.com/post/50630314509/audio_player_iframe/abad1dea/tumblr_mmxcc5Rofy1rns7xo?audio_file=http%3A%2F%2Fwww.tumblr.com%2Faudio_file%2Fabad1dea%2F50630314509%2Ftumblr_mmxcc5Rofy1rns7xo" frameborder="0" allowtransparency="true" scrolling="no" width="500" height="85"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I chipped again&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soundcloud.com/0xabad1dea/"&gt;https://soundcloud.com/0xabad1dea/&lt;/a&gt;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/50630314509</link><guid>http://abad1dea.tumblr.com/post/50630314509</guid><pubDate>Thu, 16 May 2013 23:57:41 -0400</pubDate><category>chiptune</category><category>nes</category><category>nintendo</category><category>2a03</category></item><item><title>Hey, people who camp tags to send inflammatory trolls to women and allies:

Go screw your 3D...</title><description>&lt;p&gt;Hey, people who camp tags to send inflammatory trolls to women and allies:&lt;/p&gt;

&lt;p&gt;Go screw your 3D simulated sex partner, I&amp;#8217;m fabulous&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/a06a41cf67f6f89113d11e9af5a604e9/tumblr_inline_mlwe1lxfYT1qz4rgp.gif" alt=""/&gt;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/48985808128</link><guid>http://abad1dea.tumblr.com/post/48985808128</guid><pubDate>Sat, 27 Apr 2013 01:03:57 -0400</pubDate><category>feminism</category><category>mansplaining</category></item><item><title>Mansplained</title><description>&lt;p&gt;I was informed by the Mansplaining Brigade tonight that &amp;#8220;man&amp;#8221; is not a gendered word in the English language.&lt;/p&gt;

&lt;p&gt;Great, so your mother is a man then? Lesbianism is man-on-man love? Don&amp;#8217;t you dare say &amp;#8220;well obviously I only meant &lt;em&gt;sometimes&lt;/em&gt;&amp;#8221;. I&amp;#8217;m not psychic; your use of &amp;#8220;man&amp;#8221; doesn&amp;#8217;t come with a little tag that says &amp;#8220;oh, obviously I mean women too, I just couldn&amp;#8217;t be bothered to say so.&amp;#8221;&lt;/p&gt;

&lt;p&gt;These people (&lt;em&gt;certain&lt;/em&gt; people, not everyone) just can&amp;#8217;t get over the idea that a woman might want to be referred to as a &amp;#8220;craftswoman&amp;#8221; or a &amp;#8220;craftsperson&amp;#8221; or an &amp;#8220;artisan&amp;#8221; or pretty much anything but &amp;#8220;craftsman&amp;#8221;; they think that&amp;#8217;s really weird and unreasonable that she doesn&amp;#8217;t want to be systematically misgendered and her identity covered up with a tarp because it doesn&amp;#8217;t fit the stereotype.&lt;/p&gt;

&lt;p&gt;One person even told me unironically that the -man suffix denotes species in such words. So we don&amp;#8217;t get confused with craftsoctopi I guess. They want me to &amp;#8220;disassociate&amp;#8221; the word &amp;#8220;man&amp;#8221; from, uh, men.&lt;/p&gt;

&lt;p&gt;The idea that the word &amp;#8220;craftsman&amp;#8221; was chosen by a sexist culture to describe a field of employment women were usually barred from, and this has changed because we&amp;#8217;re no longer blatantly sexist to the core, seems to elude these people&amp;#8230; or the idea that academic centers with the power to influence language standards are historically all-male and many to this day remain predominantly male. Our culture historically categorizes &amp;#8220;men&amp;#8221; as &amp;#8220;us&amp;#8221; and &amp;#8220;women&amp;#8221; as &amp;#8220;them&amp;#8221;, the other. As a result, we have a language that is systematically male-biased (despite no longer being a &lt;em&gt;grammatically gendered&lt;/em&gt; language like Spanish) and people are often not even consciously aware of it.&lt;/p&gt;

&lt;p&gt;Best excuse: it&amp;#8217;s too cumbersome to acknowledge other genders! Ah, the good old days, when men were men and women were men because that&amp;#8217;s shorter to write.&lt;/p&gt;

&lt;p&gt;Believe it or not, this started when I linked &lt;a href="http://techcompaniesthatonlyhiremen.tumblr.com/"&gt;http://techcompaniesthatonlyhiremen.tumblr.com/&lt;/a&gt; which points out that job listings frequently use gendered language, because people &lt;em&gt;assume&lt;/em&gt; the applicants will be male, because of the self-perpetuating culture of sexism which is only slowly eroding. Imagine flipping all of those gendered pronouns to she, her, lady, etc. People would flip out or find it incredibly weird and uncomfortable.&lt;/p&gt;

&lt;p&gt;Thanks to everyone who &amp;#8220;gets it&amp;#8221; -  whether or not they totally agree with me, as I certainly don&amp;#8217;t expect everyone to. Gender deletion is &lt;em&gt;the very face of sexism&lt;/em&gt; whether it&amp;#8217;s intentional or not. Referring to me with words that have a male connotation sends the message that my gender is so &lt;em&gt;abnormal&lt;/em&gt; that words fail you. It paints the picture that you&amp;#8217;re just going to pretend I&amp;#8217;m a guy and hope my weird, strange gender goes away. Is that what you&amp;#8217;re consciously thinking? Probably not - but that&amp;#8217;s the underlying process that causes such things.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m so freaking sick of people who tell me to gender-neutralize my online identity because the pink and sparkles are &amp;#8220;weird&amp;#8221; or because I&amp;#8217;d &amp;#8220;have an easier time fitting in.&amp;#8221; (Pink isn&amp;#8217;t even my favorite color. I just resort to using it in an attempt to not be assumed male.) Hey, genius, &lt;em&gt;I&amp;#8217;m objectively a girl.&lt;/em&gt; If that freaks you out, it&amp;#8217;s &lt;em&gt;your&lt;/em&gt; failure to deal with observed reality that there are women who do things you associate with men.&lt;/p&gt;

&lt;p&gt;See also &lt;a href="http://www.cs.virginia.edu/~evans/cs655/readings/purity.html"&gt;http://www.cs.virginia.edu/~evans/cs655/readings/purity.html&lt;/a&gt; for another, more clever, take on this.&lt;/p&gt;

&lt;p&gt;Mansplainers who want me to know that everything I just wrote is stupid and I&amp;#8217;m a whiny bitch, please take a ticket for the next train to hell.&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/48983346748</link><guid>http://abad1dea.tumblr.com/post/48983346748</guid><pubDate>Sat, 27 Apr 2013 00:22:30 -0400</pubDate><category>gender</category><category>feminism</category><category>mansplaining</category><category>rant</category><category>tumblritis</category></item><item><title>Thoughts on the Boston Lockdown from the edge</title><description>&lt;p&gt;A lot of people are angry, upset, or worried about the &amp;#8220;Boston Lockdown&amp;#8221; as a sign that Freedom Is Over. One thing almost &lt;em&gt;all&lt;/em&gt; of these people have in common is not having been in Boston at the time. I work in information security and I&amp;#8217;m involved with the privacy scene; I understand there&amp;#8217;s a &lt;em&gt;lot&lt;/em&gt; going on in America to be worried about. I&amp;#8217;m writing this to try and explain that the police acted in good faith, they did the best job they could, and this was not, as it may have appeared from the outside, some sort of martial law terrorizing the citizenry.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m a resident of the Boston suburbs, who also works in the suburbs, and I occasionally make forays into the city proper. My family is from the greater Boston area, going back to the Irish immigration wave and to the Pilgrims. On Monday, when the bombs went off, I was working from home and happened to have Twitter open - I found out within seconds. After watching long enough to get confirmation from multiple sources, I sent a company-wide email to plan on &lt;em&gt;not&lt;/em&gt; taking the trains home. I was listening to the police radio and knew they believed there to be more bombs. The fact that they turned out to not be explosive was itself immaterial; when a terror attack has been initiated, you &lt;em&gt;hope&lt;/em&gt; your adversaries are incompetent amateurs, but act under the assumption they&amp;#8217;re sick, twisted, and prepared to do the unthinkable.&lt;/p&gt;

&lt;p&gt;During this time, it was clear from the police scanner that their #1 concern was getting everyone to safety and reuniting families. They remained quite calm and professional. I cheered when they broadcasted that every single one of roughly a hundred and eighty victims had arrived at a medical treatment center, about an hour into the incident.&lt;/p&gt;

&lt;p&gt;Later that night, I hitched a ride with my boss to the heart of the city to set up for a conference called Source Boston which was to begin Tuesday at noon. The only remarkable thing about this trip was that hotel staff asked our names and checked our bags before allowing us past the lobby. Let me emphasize: this was not the police, this was private security inside a private building, and we could have refused and simply not entered the hotel. So far as I know, only the crime scene itself and portions of the subway system were under any special protection at this time.&lt;/p&gt;

&lt;p&gt;Tuesday was an uneventful span of speculation. There were more police out and about than typical, particularly on the transit system, but no-one I met seemed to feel afraid or threatened. Someone who was speaking at the conference had their flight cancelled and couldn&amp;#8217;t make it in time&amp;#8230; but that was the only effect it had on us. Wednesday dragged on with rumors, only rumors. On Thursday morning there was a very strong presence of police and military with assault rifles, because the President was coming. I suspected, just as they did, that if the terrorists were planning on striking again, now was the time. We are very predictable in holding these sorts of high-profile ceremonies, so it was possible that bombing the memorial to break our national heart was the goal all along.&lt;/p&gt;

&lt;p&gt;The President came and went without any disaster striking. Thursday night, the FBI published their official photos of the suspects, two quite ordinary-looking young men who would never be worth a second glance anywhere in Boston. This area is very international, you know - it teems with exchange students and well-educated immigrants and people who came here for a new chance at life. Every time I go to the grocery store I see families from all over the world, many apparently Muslim. The idea of being threatened by Muslims in general is absurd and I condemn anyone who assaulted or harassed someone because they appeared to be Muslim. (In a twist that upset &lt;em&gt;everyone&amp;#8217;s&lt;/em&gt; pet theory, the suspects turned out to be both white Americans &lt;em&gt;and&lt;/em&gt; Muslims, though as I write this, no stated motive is available.)&lt;/p&gt;

&lt;p&gt;The convention formally ended Thursday evening and most attendees dispersed to the winds, but a few of us were planning on staying late. Our car was parked out by Alewife Station somewhere and our friend was going to give us a ride from the hotel to the station when we were ready to go. Once again, I happened to be checking Twitter (I do that a lot) when the first reports of a shooting at MIT surfaced. No-one assumed it was the bombers: it&amp;#8217;s a city, random shootings will happen. What people &lt;em&gt;did&lt;/em&gt; express was frustration with stupid freaking criminals having the &lt;em&gt;disrespect&lt;/em&gt; to cause a scene in the middle of an investigation. At this point, some of my local MIT friends ragequit Twitter and went to bed. They didn&amp;#8217;t want to deal with the stress of murder on their campus on top of the stress of the terror investigation.&lt;/p&gt;

&lt;p&gt;It was the point at which news of grenades hit Twitter that suddenly everything came into focus. A frenzy of attempts to confirm that it was in fact a detonation and not some random city noise was settled when people I knew and trusted said they heard several small explosions from their house. I went around and told everyone still chilling at the conference not to leave the hotel, because some nutjob who may or not be a marathon bomber was armed and dangerous and running around with nothing to lose. Mainstream media was in bed; we only had the radio and eyewitnesses over social media. We (the waking Twitter population) by and large understood that this was not 100% reliable. Boston is not much of an after-midnight city to begin with, so there was hardly anyone on the streets to worry about. I remember seeing a pizza delivery truck rolling by well after the violence in progress had been declared to be the bombers making their getaway. I hope they got a nice tip.&lt;/p&gt;

&lt;p&gt;Several of us ended up getting a few rooms at two in the morning and crashing instead of going home, since it was abundantly clear that the remaining bomber was armed and dangerous. Boston is a surprisingly small area, incredibly dense and mazelike, and much more easily navigated by bike or on foot than with cars. Staying inside if you have the option is not cowardice or foolishness in such a situation, it&amp;#8217;s practical. The bombers had already murdered one person, shot up another, and kidnapped someone before kicking them out of their own car. The younger one was so panicked that he had run over his own brother&amp;#8217;s body trying to get away from the cops. It&amp;#8217;s completely irresponsible to be outside and make yourself a target for hostage-taking by a desperate terrorist unless you have a truly compelling reason.&lt;/p&gt;

&lt;p&gt;I took a sleeping pill because there were sirens everywhere; I have a good ear for them. The last thing I remember is that my manager, who lives in Watertown, was barricaded inside his house by the police to keep him from being taken hostage. To my understanding the police communicated with him and this was by consent. A widespread misconception I saw on Twitter is that SWAT teams were running around and breaking into people&amp;#8217;s houses and ransacking them. I haven&amp;#8217;t seen a single report of this from a local! The worst I heard is that they opened exterior basement doors and sheds. They &lt;em&gt;knocked&lt;/em&gt; on doors and asked if people would &lt;em&gt;like&lt;/em&gt; their houses checked. It&amp;#8217;s not like the police assumed anyone was &lt;em&gt;deliberately&lt;/em&gt; sheltering the terrorist. Now, I am not going to make a blanket statement that not one single breach of respect happened. Thousands of people were involved, there was probably at least one. Just let me emphasize: the police made &lt;em&gt;every effort&lt;/em&gt; to not screw this up and not terrorize people. The documented &lt;a href="http://bostonherald.com/news_opinion/columnists/margery_eagan/2013/04/eagan_watertown_residents_feel_brunt_of_search"&gt;incidents&lt;/a&gt; make sense in context: there was unambiguously an armed and dangerous maniac somewhere in Watertown. &lt;em&gt;Some&lt;/em&gt; police forces we shall not name would probably have racked up seven or eight civilian shootings and burned down a couple houses. While it&amp;#8217;s really quite pathetic that we&amp;#8217;re pleasantly surprised when this &lt;em&gt;doesn&amp;#8217;t&lt;/em&gt; happen, well, it didn&amp;#8217;t happen. Hooray.&lt;/p&gt;

&lt;p&gt;I woke up at 11am on Friday and my first action was to post on Twitter asking what I needed to know before I got out of bed. The answer?: &amp;#8220;Don&amp;#8217;t bother, go back to sleep. They&amp;#8217;re still looking for him and everything&amp;#8217;s closed.&amp;#8221; It became clear that something called &amp;#8220;shelter in place&amp;#8221; was going on. This is the &amp;#8220;lockdown&amp;#8221; everyone heard about. Let me emphasize this very clearly: this was NOT a lockdown in the classical sense. People were on the sidewalks. Cars were on the streets. Just not very many. No cops or soldiers were running around bothering people outside of the immediate vicinity of Watertown. The idea that the entire city shut down simply isn&amp;#8217;t true. Restaurants and shops and other assorted businesses were mostly closed, but this was by choice of the operators to heed the call to do so. It was, by and large, a surprise holiday; the park near the hotel was actually quite crowded.&lt;/p&gt;

&lt;p&gt;The hotel kindly allowed us to delay checkout, and mid-afternoon we were able to find a taxi driver willing to take us all the way to Alewife Station, which itself was completely closed. Our car was severely overdue on the parking time limit, and this will probably be the only time in our lives we escape the watchful eye of the meter police. We actually passed through a corner of Watertown on the way home, which was alive and well.&lt;/p&gt;

&lt;p&gt;A lot of people are concerned about the cost to the city of Boston that the lockdown incurred. Two points: first, we have severe weather incidents every year with similar effects on business, and our economy doesn&amp;#8217;t collapse; second, pretty much every single last person in the greater Boston area would &lt;em&gt;personally&lt;/em&gt; sign the check paid out of our taxes to see the marathon bombers taken off the streets. We &lt;em&gt;wanted&lt;/em&gt; this. We &lt;em&gt;wanted&lt;/em&gt; to facilitate the investigation and we &lt;em&gt;wanted&lt;/em&gt; those prepared to deal with an armed terrorist checking the hidey-holes in our neighborhoods, which was exactly where Suspect #2 was found. It is better that the trained negotiators handled it than the private citizens, because let me tell you, the city is filled with people who wouldn&amp;#8217;t have hesitated to beat him to death with their bare tattooed hands, and it is important for both human rights and for the investigation that he was taken alive. I regret that the older brother has died but, fittingly, it seems to have been the younger brother&amp;#8217;s fault anyway.&lt;/p&gt;

&lt;p&gt;Some people feel that Boston has failed to &amp;#8220;refuse to be terrorized.&amp;#8221; Let me make something clear: being cautious during an ongoing terror attack (even a relatively small one such as this) is not a shameful thing, it&amp;#8217;s common sense. &amp;#8220;Being terrorized&amp;#8221; would be if we cancelled next year&amp;#8217;s marathon. There&amp;#8217;s not a snowball&amp;#8217;s chance in hell of that happening. &amp;#8220;Being terrorized&amp;#8221; would be if we ceased to be a welcoming home for people from all over the world. That had better not happen, and I don&amp;#8217;t think it will.&lt;/p&gt;

&lt;p&gt;Incidents where a few people die and many are injured happen all the time even in America - the Texas explosion seems timed by fate to remind us of this. It&amp;#8217;s true, we don&amp;#8217;t make it an issue for every single person in a city every time three or four people are murdered. In this case, the people of Boston &lt;em&gt;chose&lt;/em&gt; to make it their issue. This attack was extremely personal. We responded in kind. This was not a city driven by fear. This was a city driven by a keen and righteous fury. We absolutely &lt;em&gt;will not tolerate&lt;/em&gt; anyone attacking the heart of our culture. We&amp;#8217;re not worried about the monetary cost of bringing everything to a screeching halt to make sure there is no possibility of escape. There are a lot of Bostonians, we can keep this up longer than our handful of cowardly enemies can.&lt;/p&gt;

&lt;p&gt;Finally, those of you who watched from a distance: thank you for your attention, your concern, and your outpouring of support. However, if you are worried that this was &amp;#8220;normalization of the police state,&amp;#8221; let me assure you there was nothing &amp;#8220;normal&amp;#8221; about this. Our governor is not signing some sort of order to turn Boston into a rights-free zone on account of two kids with a pressure cooker. I know it&amp;#8217;s freaky to see photos of armed troops in an American neighborhood, but that&amp;#8217;s just it - it&amp;#8217;s freaky. It&amp;#8217;s unusual. There was a very specific reason for it and the locals wanted them there and they&amp;#8217;ve packed up because the mission is over. I know we in infosec are paid to be paranoid but thinking that this was a &amp;#8220;dry run&amp;#8221; for some sort of coup is a little over the top even for us.&lt;/p&gt;

&lt;p&gt;Now is a good time to reflect on the fact that in some parts of the world, none of this would have seemed remarkable. There are entire countries worn down by constant petty terrorism. Dozens of innocent people have died in bombings abroad &lt;em&gt;during this investigation.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I think Boston&amp;#8217;s reaction is a key component of &lt;em&gt;keeping&lt;/em&gt; it unusual in our country. &lt;em&gt;Zero tolerance for terrorism.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is the city which would not be cowed by the wrath of an empire. We won that war. We will not be cowed by you, Tamerlan and Dzhokhar Tsarnaev, and we will be victorious over hatred, fear, and senseless violence.&lt;/p&gt;

&lt;p&gt;Boston is my ancestral home. I came back after living far away for half of my life. I&amp;#8217;m so glad I did.&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/48488539386</link><guid>http://abad1dea.tumblr.com/post/48488539386</guid><pubDate>Sat, 20 Apr 2013 22:13:00 -0400</pubDate><category>boston</category><category>bombing</category><category>marathon</category><category>lockdown</category></item><item><title>Ported one of my orchestra songs to chiptune</title><description>&lt;iframe class="tumblr_audio_player tumblr_audio_player_48470190598" src="http://abad1dea.tumblr.com/post/48470190598/audio_player_iframe/abad1dea/tumblr_mlkpuqjLmz1rns7xo?audio_file=http%3A%2F%2Fwww.tumblr.com%2Faudio_file%2Fabad1dea%2F48470190598%2Ftumblr_mlkpuqjLmz1rns7xo" frameborder="0" allowtransparency="true" scrolling="no" width="500" height="85"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Ported one of my orchestra songs to chiptune&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/48470190598</link><guid>http://abad1dea.tumblr.com/post/48470190598</guid><pubDate>Sat, 20 Apr 2013 17:47:14 -0400</pubDate><category>chiptune</category><category>nes</category><category>2a03</category></item><item><title>I woke up and wrote another chiptune - this is the themesong of...</title><description>&lt;iframe class="tumblr_audio_player tumblr_audio_player_47882766187" src="http://abad1dea.tumblr.com/post/47882766187/audio_player_iframe/abad1dea/tumblr_ml7igqsNXX1rns7xo?audio_file=http%3A%2F%2Fwww.tumblr.com%2Faudio_file%2Fabad1dea%2F47882766187%2Ftumblr_ml7igqsNXX1rns7xo" frameborder="0" allowtransparency="true" scrolling="no" width="500" height="85"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I woke up and wrote another chiptune - this is the themesong of a bookish teenage boy, he needs another themesong for hero mode though.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soundcloud.com/0xabad1dea/"&gt;https://soundcloud.com/0xabad1dea/&lt;/a&gt;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/47882766187</link><guid>http://abad1dea.tumblr.com/post/47882766187</guid><pubDate>Sat, 13 Apr 2013 14:38:49 -0400</pubDate><category>chiptune</category><category>nes</category><category>2a03</category></item><item><title>Abadidea's Guide To Internet Arguing</title><description>&lt;ol&gt;&lt;li&gt;&lt;p&gt;Not everyone on the internet is an adult. This cannot be emphasized enough. Someone who seems incredibly dumb or ignorant may actually just be thirteen years old.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not everyone on the internet speaks English as their native language. Misunderstandings happen. Grammatical mistakes happen. Difficulty expressing themselves does not automatically make someone dumb.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;People come from many countries with many political systems and a different idea of what &amp;#8220;normal&amp;#8221; is. Don&amp;#8217;t project your beliefs as &amp;#8220;normal&amp;#8221; even if you strongly believe they are &amp;#8220;right.&amp;#8221;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Before you get upset with someone, consider how much you have in common vs. the size of what you disagree over. Don&amp;#8217;t create internal disorder in your cause over minor things.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lead with a compliment. If you really can&amp;#8217;t think of one, there&amp;#8217;s a good chance you need to back off.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do not accuse the other person of being &amp;#8220;completely horrible&amp;#8221; based on one stance which is a hot issue with you. From their point of view, you&amp;#8217;re ignoring the vast number of ways they&amp;#8217;re indisputably not horrible and they&amp;#8217;ll dismiss you as too extreme. Most people are &lt;em&gt;trying&lt;/em&gt; to be good people; give them the benefit of the doubt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take other people&amp;#8217;s complaints about you into consideration. Some are wrong. Some are dead on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Be rigorous in avoiding the clear-cut logical fallacies. Annotate your intent if you play around with them. Call out people who fall into them. If you&amp;#8217;re relying on one, recheck your beliefs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While we&amp;#8217;re on that subject, stop getting the definitions of &amp;#8220;ad hominem&amp;#8221; and &amp;#8220;straw man&amp;#8221; wrong. Sometimes an insult is just an insult. Sometimes speculation is just speculation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don&amp;#8217;t confuse people who deliberately spread misinformation with those who fall for it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No-one has the time to be an expert in every subject. Don&amp;#8217;t be condescending to the innocently ignorant and don&amp;#8217;t tell a genuine expert their business just because you have a Strong Opinion on something you&amp;#8217;re only casually familiar with.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Graciously accept being corrected. Better ex-wrong than wrong.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The other person is probably not as angry or rude as they sound in your head.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Intent matters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Behavior matters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Context matters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It&amp;#8217;s not &amp;#8220;just the internet.&amp;#8221; This is the excuse of the dishonest troll.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No matter what you do, some people really are just willfully ignorant, hateful, prejudiced, and awful. Your #1 most important job is to not be one of them.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;</description><link>http://abad1dea.tumblr.com/post/47698644683</link><guid>http://abad1dea.tumblr.com/post/47698644683</guid><pubDate>Thu, 11 Apr 2013 09:19:52 -0400</pubDate></item><item><title>Did you know I make classic RPG-style chiptunes? I do, or try at...</title><description>&lt;iframe class="tumblr_audio_player tumblr_audio_player_47247681543" src="http://abad1dea.tumblr.com/post/47247681543/audio_player_iframe/abad1dea/tumblr_mkte1rXEZk1rns7xo?audio_file=http%3A%2F%2Fwww.tumblr.com%2Faudio_file%2Fabad1dea%2F47247681543%2Ftumblr_mkte1rXEZk1rns7xo" frameborder="0" allowtransparency="true" scrolling="no" width="500" height="85"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Did you know I make classic RPG-style chiptunes? I do, or try at least; I’m still learning. Unfortunately this one compressed a little weirdly.  &lt;a href="https://soundcloud.com/0xabad1dea"&gt;https://soundcloud.com/0xabad1dea&lt;/a&gt;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/47247681543</link><guid>http://abad1dea.tumblr.com/post/47247681543</guid><pubDate>Fri, 05 Apr 2013 23:37:00 -0400</pubDate><category>chiptune</category></item><item><title>Concerning the nature of a woman of computer science</title><description>&lt;p&gt;A long-form response to &lt;a href="https://twitter.com/i0n1c/status/319193895453986816"&gt;Ionic&lt;/a&gt;, who, in essence, has found woman&amp;#8217;s dedication lacking, if she submits so few papers in comparison to her fellows of the masculine gender.&lt;/p&gt;

&lt;p&gt;Mr. Ionic (or Mr. Esser, if you prefer) I am writing this because we have exceeded the capabilities of Twitter to contain our disagreement, opening the dam a hundred and forty little symbols of mutual anger at a time, never enough to wash each other off our piers of certainty. You are welcome to reply in kind, and so we may have a war, a true and proper war, where the best weapons are brought out and carefully aimed. I hope you will forgive me in having an advantage I did not ask for: English is the language of my infancy, whereas you had to earn its secrets the long and toilsome way. My ability to make the most deft use of this language shall probably always exceed yours, no matter the effort – and while the same is true concerning you and your mastery of German, political reality suggests my luck was better. I do not &lt;em&gt;need&lt;/em&gt; another language to pursue my passions. You do.&lt;/p&gt;

&lt;p&gt;I bring this up not to make a mockery of nationality, but to suggest that just as I may, in the arrogance of innocent advantage, forget that not everyone is an English bard, so too might anyone not know the full measure of what circumstance has given them. I do not know what it is like to be a German-speaker or a Mandarin-speaker or a Hindi-speaker plying the sciences dominated by English, having to first overcome the barrier of language to participate as an equal. You do not know what it is like to be a woman in the very same circumstance: that the intellectual industries present a man with some barriers, and a woman all these and a few more, and some higher. Surely you and I can both point to this or that little detail, in which woman has the advantage over man, but when one backs up and weighs them fairly they are not equal compensation. I doubt you would wish to forget German in exchange for a perfect English, however, and I would not wish to depart from womanhood. Both of these are matters of who we truly are, desirable in and of themselves, not because of the luck of advantage.&lt;/p&gt;

&lt;p&gt;I do not know in detail the chapters of your life, the circumstances peculiar to you rising to a certain renown in our field, but I do know that your intellectual prowess is quite real and readily evident. No-one now contests this, though surely there was a time when you were yet unknown. However, I would venture that while you were proving yourself to the public, no-one ever accused you of presenting the work of your hypothetical wife, nor discussed whether you were truly a man as you claimed, or in actuality a woman in disguise. Does that not sound absurd? This, however, is woman&amp;#8217;s task: first to leap the barrier of competence, the same as you, then to leap the barrier of proving that she is, in fact, the same person who is found competent. For years I toiled to learn the craft under accusations of not being a woman, because there are no women in our field, because anyone who claims to be is not a woman&amp;#8230;, or else I was a harlot, preying on the hearts of innocent boys and falsifying my abilities (perhaps having a boy write my exploits for me) to string along their affection. To what end? I cannot imagine.&lt;/p&gt;

&lt;p&gt;So far as I have known their motivations, strangers said these things to me because they were unable to separate their sexual orientation towards women from perceiving women as fellow sojourners seeking knowledge. Our field is noted for being the bay in which the socially &lt;em&gt;different&lt;/em&gt; come to drop anchor, and I believe much of it was spoken not on account of deliberate vitriol, but out of fear and anxiety. I am also anxious – I am a shipwreck upon the shoals of social competence. I also experience sexual attraction towards men in this industry, certain ones at least. Hence it is not attraction itself that I find troublesome, nor the social blunders which we all commit; rather, it is a willingness to take refuge in their excess, and let womankind, measuring half the blood of our existence, be the casualty of the community&amp;#8217;s peace. This is the very folly that you promote, complaining that our kind brings trouble on our wings, swooping in to crow and blather and retreating to brood in our nests of contempt for your gender. Consider rather that we are scratched by ten thousand thorns, none lethal but each painful, and at some point there are too many little cuts bleeding out our dignity. We protest, and are told that we complain of one thorn, whichever pricked us last. No-one&amp;#8217;s path is free of thorns, but some begin within the briars of presumption and must fight their way out. They reach the road bleeding; others, more fortunate, suppose them to have foolishly done this to themselves.&lt;/p&gt;

&lt;p&gt;This is the root of what I have been trying to express to you: in any time, in any place, there are those who must struggle &lt;em&gt;more&lt;/em&gt; than others to claim their honor. Each of us must be vigilant against supposing that our good fortune is so readily seized by all who would have use of it.&lt;/p&gt;

&lt;p&gt;If two percent of your submitted papers are written by women, Mr. Esser, there may be a larger force at work than a simple lack of desire of half of humankind to pursue research and burn away long hours of their life in study. This I have done, and shall continue to do, but for years I was faced at every turn by those who would have me surrender. Few people of any gender, any nationality or religion or whatever division you prefer, could pursue a career that did not want them for so long. I say this not to praise myself, for I am so useless at other endeavors that I would not know what else to do. Rather, I say this to cast light on the host of minds whose curiosity and desire were stamped out by the boot of callousness before their passion could be truly ignited. This is the systematic bias of which women try to tell you: we are chipped away from the moment our eyes open with tools of degradation and condescension. A hundred years ago, to be a girl was to be told &amp;#8220;no.&amp;#8221; Now, I admit, things are a little better: to be a girl is to be told &amp;#8220;it is possible, but you will suffer.&amp;#8221;&lt;/p&gt;

&lt;p&gt;This very day, I was told by a man that I should be glad to suffer, that my suffering is my glory.&lt;/p&gt;

&lt;p&gt;No, my work is my glory. I am not here to suffer on your account. I intend to tell tomorrow&amp;#8217;s daughters &amp;#8220;yes,&amp;#8221; as do many men who have given pause to consider whether they are perpetuating the problem or fighting back against it. I would advise you either help or get out of our way.&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/47109006765</link><guid>http://abad1dea.tumblr.com/post/47109006765</guid><pubDate>Thu, 04 Apr 2013 10:40:12 -0400</pubDate><category>rant</category><category>ionic</category><category>dorian</category><category>corinthian</category><category>congrats for reading the tags</category></item><item><title>Some (self-righteous?) stuff I thought of while playing video games</title><description>&lt;p&gt;Men fear women will reject them, women fear they won&amp;#8217;t be allowed to say no&lt;/p&gt;

&lt;p&gt;Straight people fear being made uncomfortable by gays, gay people fear they won&amp;#8217;t be allowed to love&lt;/p&gt;

&lt;p&gt;Cisgendered people fear being fooled, transgendered people fear they won&amp;#8217;t be allowed to be honest&lt;/p&gt;

&lt;p&gt;The rich fear the poor won&amp;#8217;t work hard enough, the poor fear they won&amp;#8217;t be allowed to work at all&lt;/p&gt;

&lt;p&gt;The ethnic majority fears the minority will cause trouble, the minority fears they won&amp;#8217;t be allowed to live&lt;/p&gt;

&lt;p&gt;Everyone has something to be afraid of&lt;/p&gt;

&lt;p&gt;But some people fear&lt;/p&gt;

&lt;p&gt;Others becoming less afraid&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/45952760193</link><guid>http://abad1dea.tumblr.com/post/45952760193</guid><pubDate>Thu, 21 Mar 2013 20:31:00 -0400</pubDate></item><item><title>Ethics of One Girl In-Particular </title><description>&lt;p&gt;A philosopher is one who takes many words to state what all people know, or even better, to state what sounds profound but no-one actually understands. I am not a philosopher. I value a terseness of style, and a blunt attitude towards those who mark papers, which has never been valued in their halls. Philosophers also have an interest in systems which they purport to solve everything, to leave no more questions, to lay out absolute rules which create a closed system for the problems of life they will consider. This is no different from the physicist who considers all objects to be spherical and without friction. This is the reality only found in notebooks and classrooms. It functions only in the broadest of terms. It does not describe the reality in which we operate as conscious minds, but only a simplified imitation of it, made finite in its complications so that we may grapple with it, and suppose we have conquered.&lt;/p&gt;

&lt;p&gt;I am so foolish, so prideful, as to add to ten thousand years of written philosophies my own little ideas, born of youthfulness and a life complicated not by war or famine but by intellectual matters. I am using the following definitions in this undertaking: first, that a &amp;#8220;rational mind&amp;#8221; is the remarkable but imperfect organ of sensory gathering and decision-making which forms the core of an acting entity, a &amp;#8220;person&amp;#8221;; that &amp;#8220;emotion&amp;#8221; and &amp;#8220;pain&amp;#8221; are the experience of the rational mind mapping its desires to physical sensations, with the latter being inherently negative; that &amp;#8220;good&amp;#8221; and &amp;#8220;evil&amp;#8221; are the judgements of the person by which we reflect on whether a desire should actually be carried out; and last, that &amp;#8220;ethics&amp;#8221; or &amp;#8220;morality&amp;#8221; is the practice of extending good and evil outside one&amp;#8217;s own mind and taking into account what is good or evil for others. I shall take it for granted that the typical person desires to continue existing, to experience positive emotions, to interact with other people, and to avoid pain. These are the founding principles of &amp;#8220;good.&amp;#8221;&lt;/p&gt;

&lt;p&gt;I reject the idea that there is any one system of ethics which can guarantee the morally superior outcome in all possible situations. The universe does not conform to our wishes to live in a just-so story. I also reject the notion that morality does not matter and does not profit a person to pursue. We must &lt;em&gt;try&lt;/em&gt; to be good to one another, even if we are sometimes unsure of the very definition of goodness. We must struggle in the face of a universe which was not structured around our wants and needs. We cannot achieve perfection but we may approach it, even as the pole of perfection itself may drift. Without trying, however, we &lt;em&gt;will&lt;/em&gt; suffer, individually and collectively, because the universe does not care if it causes us pain or sorrow or loneliness. The universe is a slow dance of obliteration. We can fight the universe. We can hold back the tide of nothingness with walls built from the strength of our reason and our desire to exist. We can band together and say, &amp;#8220;we are greater than you, stones and seas and suns and vast empty spaces, for no matter how small we are, we are &lt;em&gt;alive&lt;/em&gt;, and we defy you.&amp;#8221;&lt;/p&gt;

&lt;p&gt;Morality is the means by which we cease to be merely an odd lump of material and become something that not only &lt;em&gt;wants&lt;/em&gt; to exist but &lt;em&gt;deserves&lt;/em&gt; to. Everything, truly &lt;em&gt;everything&lt;/em&gt; that shall ever matter, relies on our ability to pursue goodness effectively, to secure our collective future before we destroy one another with selfish actions. With imperfect minds in an imperfect world, how are we to achieve this? How can we decide what is good?&lt;/p&gt;

&lt;p&gt;The key to moral judgement, I believe, is not intuition or rules but rather the pursuit of knowledge; both of the general nature of the world, and of the circumstances specific to a person&amp;#8217;s life. It is the responsibility of every person to be as well-informed as is possible in their time and place. If they work harm out of willful ignorance, they have worked evil. Of course, some people are deprived of education by circumstance; sometimes decisions must be made immediately; or information may even be maliciously withheld. Though unfortunate, it is not a fault to have made the &amp;#8220;wrong&amp;#8221; choice because of an inability to have complete knowledge of the situation. The fault may lie with persons who, through action or inaction, prevented relevant knowledge from being available, or there may not be anyone at all who could have improved the outcome. Who can argue with the tectonic plates, that they should not destroy our cities? Who can command the geologists to discover the inner workings of the earth before the next quake, that we might avert it? They are trying. Their minds are finite. They may one day succeed, and much good will come of it, but it is no &lt;em&gt;fault&lt;/em&gt; of our great thinkers that they have not yet cured nature&amp;#8217;s temper.&lt;/p&gt;

&lt;p&gt;The means of &lt;em&gt;measuring&lt;/em&gt; the morality of actions is, I believe, by correlation to &lt;em&gt;dignity&lt;/em&gt;: a property which all people, and to a lesser extent the animals and even some inanimate objects, possess. It is, of course, difficult to define, changing with context and circumstance. Dignity, so far as it concerns people, is the state of being in which a person feels that their future is safe, that they have membership in their community, and that they have the ability to practice their beliefs of what makes a good life. It is the enabler of a person&amp;#8217;s goodness, and people &lt;em&gt;need&lt;/em&gt; some semblance of it to maintain harmony with one another. Deprived of it, a person will most likely do whatever is necessary to restore it, even resorting to actions they would typically consider evil. The loss of dignity engenders fear, anger, jealousy and resentment. Hence, much evil can be averted by an effort to value the dignity of every person. It is better to forgive and assist those who work harm out of desperation than to condemn and humiliate them, which only worsens the very condition which caused them to first work harm.&lt;/p&gt;

&lt;p&gt;Dignity is not quite the same as happiness; we cannot change that unhappy things will happen even if every human being were to behave in an ethical manner at all times. Happiness is awakening to your smiling child. Dignity is performing funeral rites for your child according to your custom. Happiness is financial success; dignity is being assured that society will be willing to help you when times are hard. Happiness is good health; dignity is recognizing when it is time to let someone you love end their suffering. Happiness is the greatest good, but it often is not within our control. Dignity, however, is the product of how people treat other people.&lt;/p&gt;

&lt;p&gt;Animals, to various extents, approach the human level of intelligence, and so too do they have variable rights to dignity accordingly; to torture or frighten them in caprice, to starve them or leave them to die when they are easily mended, is evil in proportion to their ability to reason and to act emotively, and to their instinct for self-preservation. It is not evil, I believe, to meet with violence an animal that would harm a human, nor to startle a wolf that a hare may escape; but here truly you see what I mean that there sometimes is no perfectly good and moral answer. I value the predator and I value the prey. The carnivore is not evil for doing what it must to live, but a perfect world would not contain carnivores. Various religions have constructed elaborate fantasies about the cause of predation, and promises that in the coming end of suffering, the lions shall graze in the meadows. The cold truth is that unthinking, unemotional happenstance constructed a horrible system in which thinking, feeling minds must exist. It is possible that we may be able to engineer a means to alleviate this, to sate ourselves and our animal cohabitants with false flesh, so that the moral mind trumps over the ever-craving body. What then of overpopulation? What then of this and that? The imperfect world howls and threatens. There is no right answer.&lt;/p&gt;

&lt;p&gt;Even a mere object, I believe, can possess a certain sort of dignity, for objects can be valued by minds for more than the mere sum of their materials. That which expresses or signifies the experience of the rational mind – a diary, a statue, an ancient tree in the town square – carries a portion of the dignity of every person who put thought or emotion into it, and should be treated with proportional respect. To burn a book is to set fire to a rational mind&amp;#8217;s projection onto material reality, which was created specifically so that the thoughts would outlast the mind itself. Attempting to deliberately destroy the record of a mind is, I think, evil, a sort of intellectual murder. We should value every mind&amp;#8217;s marks on the world, no matter how insignificant that person seems to have been. We have in our collective care the art of the earliest peoples, inscribed thousands upon thousands of years ago in their places of refuge, their places of triumph. This art is nothing except a discoloration upon a rock face depicting the simplest of shapes, but the preservation of this art is the preservation of human dignity itself.&lt;/p&gt;

&lt;p&gt;The building blocks of morality, then, are to avoid depriving others of dignity, to pursue preserving or enhancing it, and to recognize one&amp;#8217;s own right to a dignified existence. The means of discernment is to use our rational minds to make informed decisions which take into account circumstances outside of ourselves, to be eager to share knowledge and to debate and reason with one another. Disagreement is inevitable. Conflict between cultures and philosophies is inevitable. We human beings are not so many billions of identical machines, which reach the same conclusions from the same observations. We are &lt;em&gt;people&lt;/em&gt;, who love and hate each other and work and play and spend years caught up in mundane concerns and suddenly we look up at the boundless night swollen with burning, dying stars and think –&lt;/p&gt;

&lt;p&gt;– We are alive. We are rational minds. What we do &lt;em&gt;matters&lt;/em&gt;. We don&amp;#8217;t always do what&amp;#8217;s right, but we are &lt;em&gt;trying&lt;/em&gt;, we are improving, we are discovering our own potential. We are flawed, we are finite, we are &lt;em&gt;magnificent.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is my morality, to treasure and respect the intellect and its creations, to treat myself and others with dignity, and to accept that I may not always be happy. I do not believe in theism, beholden to the arbitrary demands of an arbitrary authority. I do not believe in nihilism, that our miraculously improbable existence is ultimately meaningless. I believe that we, the rational minds, have awoken on this little world around a modest star, and we have this chance, this amazing, fantastically lucky chance, to take everything we see in this beautiful universe and make it &lt;em&gt;better&lt;/em&gt;, including ourselves. We are hungry, violent, frightened little creatures. Morality is the means of being better than that. It&amp;#8217;s not perfect, but it is &lt;em&gt;good.&lt;/em&gt;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/45673647701</link><guid>http://abad1dea.tumblr.com/post/45673647701</guid><pubDate>Mon, 18 Mar 2013 10:36:38 -0400</pubDate><category>Ethics</category><category>morality</category><category>philosophy</category><category>you should base your life on things you read on tumblr</category></item><item><title>How to destroy tumblr</title><description>&lt;p&gt;I have devised a means by which the tumblr community can be utterly imploded in recursive, fractal confusion &lt;/p&gt;

&lt;p&gt;Write a novel or comic book which features quirky, angst-ridden teens who are highly shippable in many combinations &lt;/p&gt;

&lt;p&gt;Title the work &amp;#8220;Trigger Warning: Spoiler Alert&amp;#8221;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/45516726390</link><guid>http://abad1dea.tumblr.com/post/45516726390</guid><pubDate>Sat, 16 Mar 2013 14:54:30 -0400</pubDate><category>trigger warning</category><category>spoiler alert</category><category>If you're offended I would venture that's the point</category></item><item><title>Inquiry into the cause of my own insanity</title><description>&lt;p&gt;&lt;p class="p1"&gt;I have often been described as confusing, but in one sense, I can explain myself very easily: I am a child. In my mind and my heart, I am still small and wide-eyed, vexed by a world that is absurd in its pretensions, and all I want is to be left to the works of my whimsy. I am brilliant, possessed of a startling genius that expresses itself in fits and tempests, and always, for so long as my memory reaches, infuriated by a failure to impress my mind upon the pale reality that surrounds it. My mind composes the symphony, but my ears cannot find the chords. My mind knows well the shape, but my hands cannot render the pen strokes. I know every pebble and fern of ten thousand imagined vistas, but the &lt;span class="s1"&gt;&lt;em&gt;words&lt;/em&gt;&lt;/span&gt;, the letters and symbols which pile up on page after page of an increasingly frustrated attempt to create a record of my fleeting thoughts, inevitably drive me to destroy the whole effort out of disappointment in myself. All in one moment, I hate that I am four-and-twenty and have not completed any enduring work of art, and still dread that I am expected to occupy myself with trite endeavors for another fifty years yet.&lt;/p&gt;
&lt;p class="p1"&gt;At some point, my young mind was turned towards the inner workings of computers, and while I dearly wish it had been several years sooner, I cannot change the circumstances of the past. I was told that I would never find success here as I had failed or nearly failed every mathematics course I was subjected to. Nevertheless, I discovered for myself the peculiar talent of &lt;span class="s1"&gt;&lt;em&gt;reasoning&lt;/em&gt;&lt;/span&gt; about computation: I possess the ability to construct the model of a program in my mind, as it relates to the machine rather than as to human language, and discover what the original programmer did not realize they had written. People, it turns out, are very bad at expressing &lt;span class="s1"&gt;&lt;em&gt;precisely&lt;/em&gt;&lt;/span&gt; what they mean, as they trust to the common sense of other people, and to the fact that the analogue nature of the world around us does not demand much precision. Every computer program ever executed which expresses any real complexity has been burdened with errors, oversights, and simple failures of the human to think in accord with the machine. My talent is not that of the programmer – there are many good programmers in the world, and I do not count myself highly among them – but that of the machine&amp;#8217;s advocate. I find errors. I find what kills the machine or enslaves it to the wrong path of execution. I pursue endlessly the cause of &lt;span class="s1"&gt;&lt;em&gt;how&lt;/em&gt;&lt;/span&gt; these errors happen and &lt;span class="s1"&gt;&lt;em&gt;why&lt;/em&gt;&lt;/span&gt; they must be remedied and prevented. As always, I cannot articulate as well as I would like. Having thought a great deal about the matter, I suppose that I “see” the labyrinthian structure of code much as a person who has never known sight is aware of the geometry and texture of a familiar room. I can connect the constraints of one function to another and see where they are not congruent, compromising the integrity of the entire program and the data it operates upon.&lt;/p&gt;
&lt;p class="p1"&gt;I am, then, a hacker.&lt;/p&gt;
&lt;p class="p1"&gt;This makes me a valuable person in a computerized world, and there are several means of making a career of this, not all of which are ethical. Some are unambiguously wicked. I resent society, however, for laying these pressures of &lt;span class="s1"&gt;&lt;em&gt;money&lt;/em&gt;&lt;/span&gt; on me, and this is where my childish nature shines clearly. Someone, please, take care of me, and keep the howling wind of adulthood from disturbing my dreams. I shall craft such gems of knowledge for you! Left to my craft, I shall eventually be without peer.&lt;/p&gt;
&lt;p class="p1"&gt;I suffer endlessly from anxiety, fear, and from my thoughts simply blanking under pressure, so that I forcibly forget my own reality to pursue my intellectual delights. I realize this is no way for an adult to behave. I am not depressed, as so many readily assume. I was once, several years ago, when I felt ugly and unlovable and unsuccessful. That passed; I am &lt;span class="s1"&gt;&lt;em&gt;happy&lt;/em&gt;&lt;/span&gt;, at least when the demons of responsibility are not pounding at the door, demanding I cede to their demands, and the tide of panic rises in me until I can no longer breathe and I close my eyes and think of an interesting problem I wish to solve and suddenly it is five hours later and solved. The demons pound on the door again, having waited patiently for the fit to pass.&lt;/p&gt;
&lt;p class="p1"&gt;I will abridge the root causes: a religion that forbade my mind to inquire beyond the veil in the temple, and which shamed my body for being of the wrong half of humankind, the so-called weaker and more foolish half, the half which was a mistake of God if we were only allowed to ascribe to God mistakes. Contradictions between what I was told by those I trusted and what I observed in the uncensored world drove me nearly to madness. It is a simple matter of literal fact, of course, that not even ten thousand years ago, the one true god created a new world and fashioned statues of clay and breathed life into them; a talking snake dissuaded these golems from obedience, and the very soil of the earth was poisoned in retaliation; and eventually this god destroyed the entire face of the world out of anger, save for one family of refugees in a wooden boat, so on and so forth. But he is the god of love, and – oh never you mind. It hardly matters.&lt;/p&gt;
&lt;p class="p1"&gt;It is easy for some people to accept these tales as literal and it will neither bother them nor particularly inform how they live. I have known many people who are intelligent but passively accepting of whatever the culture of happenstance has told them. My own mind, however, was nearly torn asunder. I found no comfort in the tales of Heaven. I wept, alone in the dark, for the billions of souls in eternal torment, convicted of the crime of not pleading to the right god to absolve them of inherited evil. I was made to believe by smiling and well-meaning teachers that God was so unspeakably sadistic that he would not intervene in this, the cause of justice as large as existence itself, and if a person I had ever known perished without salvation, it was &lt;span class="s1"&gt;&lt;em&gt;my fault&lt;/em&gt;&lt;/span&gt; personally that they were now in Hell. I several times nearly had breakdowns when I would go out in public and consider how many of the men, women, and children I saw were doomed to eternal torment. I believe this is why my mind blanks out when I am anxious. The only way I could cope with the cruel and twisted theology I believed to be true was to suppress all thoughts of it and &lt;span class="s1"&gt;&lt;em&gt;act&lt;/em&gt;&lt;/span&gt; as though it weren&amp;#8217;t true.&lt;/p&gt;
&lt;p class="p1"&gt;I now understand that this was never true, and find great comfort in the sciences of biology, geology, and astronomy, which answer honestly the questions my teachers dismissed as Satan&amp;#8217;s trickery. That does not, however, mean that I am free from the shackles of extremist religion. I was young – very young. I can no more purge this theology from myself than I can forget how to read. I will live with this forever, this anxious fear of injustice, this aching sense of being separate from those around me, and most of all, the unspoken horror of something bad happening to someone else and it&amp;#8217;s &lt;span class="s1"&gt;&lt;em&gt;my fault.&lt;/em&gt;&lt;/span&gt; This is the undercurrent of my dreams. I do not sleep in peace.&lt;/p&gt;
&lt;p class="p1"&gt;These obsessions manifest through all the most trivial and mundane matters. I barely, just barely, made it through university. I would find myself unable to finish, or even start, assignments for reasons I could not name. I was mechanically capable of them, but I was paralyzed with dread drawn up from the well of my fear. That well has not run dry. I now seriously doubt my own ability to maintain employment. But I must! How will I eat! And thus the dread blooms, its tendrils choking me. It affects every aspect of my existence that is not a purely intellectual pursuit.&lt;/p&gt;
&lt;p class="p1"&gt;I am a hacker. I want to break things. I want to fix things. Like many other hackers, I am insane, each of us for our own reasons. I want to live well. I want to pursue justice. I want to rejoice in knowledge. I want to be at peace.&lt;/p&gt;
&lt;p class="p1"&gt;What am I to do?&lt;/p&gt;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/44491003193</link><guid>http://abad1dea.tumblr.com/post/44491003193</guid><pubDate>Sun, 03 Mar 2013 17:28:36 -0500</pubDate></item><item><title>Kuaiyong: the short version</title><description>&lt;p&gt;It&amp;#8217;s 4am, hi! Scratch that, 4:30.&lt;/p&gt;

&lt;p&gt;I promised I would put something on tumblr. I won&amp;#8217;t share my speculations on the exact cause until Apple has taken a whack at it, but @chpwn @tapbot_paul and I have sent them a report on our attempt to reverse engineer kuaiyong&amp;#8217;s DRM circumvention for iOS. It appears they own a few dozen iTunes user accounts and buy the apps for these accounts. They then write something over USB which fools the iDevice into passively accepting signed apps which belong to these accounts as if they belong to the account which owns that iDevice. Apple engineers certainly know a lot more about their own USB protocol and DRM system than I do, so hopefully the details we sent them will help them quickly narrow down the exact problem.&lt;/p&gt;

&lt;p&gt;As for the question of whether kuiayong is &amp;#8220;safe&amp;#8221;: I have not seen any deliberately user-hostile code in what it installed; it&amp;#8217;s just mildly allergic to debuggers. However, it has an open-ended update system and a EULA that clearly states they can do anything they want at any time. If you go on their site they have another EULA that says they reserve the right to force ads and charge money in the future. (I autotranslated all of this but the intent is clear.) Additionally, the User ID forging technique seems to be a bit glitchy, as many pirates have reported strange problems with the App Store after using kuaiyong. On top of that, you can be sure that someone will come out with unambiguously user-hostile imitationware, so don&amp;#8217;t just go around installing whatever. Same advice as always.&lt;/p&gt;

&lt;p&gt;And just to crush your hopes, no, I don&amp;#8217;t think this is a jailbreak vector. It only works with things that are properly signed. This means no random malware and no cydia. Sorry! :)&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;0xabad1dea&lt;/li&gt;
&lt;/ul&gt;</description><link>http://abad1dea.tumblr.com/post/39556388225</link><guid>http://abad1dea.tumblr.com/post/39556388225</guid><pubDate>Thu, 03 Jan 2013 04:40:17 -0500</pubDate></item><item><title>New blog about the wonderment that is PHP</title><description>&lt;p&gt;After spending some time wading through the comment section of the PHP manual, this was born.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://phpmanualmasterpieces.tumblr.com/"&gt;http://phpmanualmasterpieces.tumblr.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow for all the bitter black-hearted programmer rage you can handle&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/32988211626</link><guid>http://abad1dea.tumblr.com/post/32988211626</guid><pubDate>Sat, 06 Oct 2012 00:31:08 -0400</pubDate></item><item><title>Our Enemy the Optimizer</title><description>&lt;p&gt;(If you are viewing this post in dashboard mode, please &lt;a href="http://abad1dea.tumblr.com/post/28815774245/our-enemy-the-optimizer"&gt;direct view&lt;/a&gt; so that the syntax highlighting loads correctly. Darn tumblrisms.)&lt;/p&gt;

&lt;p&gt;The optimizer is the root of all compiler evil. It complicates binary analysis of every kind. It throws out context and sensibility to save an opcode here, a cycle there, and seems to gleefully cackle at the idea of the poor, confused reverse engineer trying to track the sixteen different things stored in &lt;code&gt;rax&lt;/code&gt; in one function. This is just a little case study on what assembled code looks like with and without optimization so you can see how it relates back to the source code and how it is functionally equivalent.&lt;/p&gt;

&lt;p&gt;Here is a short but not-quite-trivial C program that calculates how many hit points a game character loses from an attack. I deliberately left in some inefficiencies to see what the optimizer would do with them.&lt;/p&gt;

&lt;div class="c" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;span style="color: #339933;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;span style="color: #339933;"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;span style="color: #339933;"&gt;#include &amp;lt;string.h&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;span style="color: #339933;"&gt;#include &amp;lt;math.h&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: #993333;"&gt;int&lt;/span&gt; main&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #993333;"&gt;int&lt;/span&gt; argc&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;char&lt;/span&gt;&lt;span style="color: #339933;"&gt;**&lt;/span&gt; argv&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #993333;"&gt;char&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt; name&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #993333;"&gt;int&lt;/span&gt; hits&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #993333;"&gt;double&lt;/span&gt; damage&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #993333;"&gt;double&lt;/span&gt; hitpoints &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color:#800080;"&gt;100.0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;argc &lt;span style="color: #339933;"&gt;!=&lt;/span&gt; &lt;span style="color: #0000dd;"&gt;4&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
        &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;usage: string:name int:hits float:damage&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
        &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #339933;"&gt;-&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
    &lt;span style="color: #808080; font-style: italic;"&gt;/* yes. the inefficiency is deliberate. */&lt;/span&gt;&lt;br/&gt;
    name &lt;span style="color: #339933;"&gt;=&lt;/span&gt; malloc&lt;span style="color: #009900;"&gt;(&lt;/span&gt;strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;argv&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;+&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;name &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000dd;"&gt;0&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
        &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;Geez, you really need more ram.&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
        &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #339933;"&gt;-&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
    strncpy&lt;span style="color: #009900;"&gt;(&lt;/span&gt;name&lt;span style="color: #339933;"&gt;,&lt;/span&gt;argv&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;argv&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    name&lt;span style="color: #009900;"&gt;[&lt;/span&gt;strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;argv&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #0000dd;"&gt;0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
    hits &lt;span style="color: #339933;"&gt;=&lt;/span&gt; atoi&lt;span style="color: #009900;"&gt;(&lt;/span&gt;argv&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;2&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;hits &lt;span style="color: #339933;"&gt;&amp;lt;=&lt;/span&gt; &lt;span style="color: #0000dd;"&gt;0&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
        &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;hits must be a positive integer&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
        &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #339933;"&gt;-&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
    damage &lt;span style="color: #339933;"&gt;=&lt;/span&gt; atof&lt;span style="color: #009900;"&gt;(&lt;/span&gt;argv&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;3&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;damage &lt;span style="color: #339933;"&gt;&amp;lt;=&lt;/span&gt; &lt;span style="color:#800080;"&gt;0.0f&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
        &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;damage must be a positive float&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
        &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #339933;"&gt;-&lt;/span&gt;&lt;span style="color: #0000dd;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
    &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;%f * %d == %f&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;damage&lt;span style="color: #339933;"&gt;,&lt;/span&gt;hits&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;damage &lt;span style="color: #339933;"&gt;*&lt;/span&gt; hits&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
    hitpoints &lt;span style="color: #339933;"&gt;-=&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;damage &lt;span style="color: #339933;"&gt;*&lt;/span&gt; hits&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;hitpoints &lt;span style="color: #339933;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#800080;"&gt;0.0f&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
        &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;%s lives with %f health&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;name&lt;span style="color: #339933;"&gt;,&lt;/span&gt;hitpoints&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
        &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;%s is dead with %f health!&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;name&lt;span style="color: #339933;"&gt;,&lt;/span&gt;hitpoints&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000dd;"&gt;0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;/div&gt;

&lt;p&gt;I compiled this on OSX with &lt;code&gt;llvm-gcc&lt;/code&gt; with &lt;code&gt;-O0&lt;/code&gt; (capital o, digit zero) option to disable the backend optimizer (as opposed to some things done in the parsing stage) entirely. You will of course get slightly different results with different compilers, but for such a short program the differences shouldn&amp;#8217;t be notable. The full disassembly is pretty long: &lt;a href="http://pastebin.com/3E7aM4d4" target="_blank"&gt;here it is on pastebin.&lt;/a&gt; Let&amp;#8217;s ask Hopper&amp;#8217;s decompiler mode to take a crack at it. The decomp is not perfect, largely because I deliberately chose to throw in some floating-point math just to complicate things, but compare the control flow structure to the original.&lt;/p&gt;

&lt;div class="c" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; _main &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
    var_92&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; rdi&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    var_80&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; rsi&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    asm&lt;span style="color: #009900;"&gt;{&lt;/span&gt; cvtsi2sd   xmm0&lt;span style="color: #339933;"&gt;,&lt;/span&gt; rax &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    var_24&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; xmm0&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_92&amp;#160;&lt;span style="color: #339933;"&gt;!=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x4&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
            puts&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;usage: string:name int:hits float:damage&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
            var_60&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0xffffffff&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
            rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
            rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; malloc&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rax &lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x1&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
            var_48&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
            &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_48&amp;#160;&lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x0&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                    puts&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;Geez, you really need more ram.&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                    var_60&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0xffffffff&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
            &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
            &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #208080;"&gt;0xffffffffffffffff&lt;/span&gt; &lt;span style="color: #339933;"&gt;!=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0xff&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                            var_16&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0xffffffffffffffff&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; __strncpy_chk&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_48&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;,&lt;/span&gt; var_16&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            var_64&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                            rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; ___inline_strncpy_chk&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_48&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            var_64&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
                    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #993333;"&gt;int8_t&lt;/span&gt; &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rcx &lt;span style="color: #339933;"&gt;+&lt;/span&gt; rax&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; atoi&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x10&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                    var_44&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_44&amp;#160;&lt;span style="color: #339933;"&gt;&amp;lt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x0&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                            puts&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;hits must be a positive integer&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            var_60&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0xffffffff&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                            atof&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_80&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x18&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            var_32&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; xmm0&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            xmm0&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; var_32&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            asm&lt;span style="color: #009900;"&gt;{&lt;/span&gt; cvtsi2sd   xmm1&lt;span style="color: #339933;"&gt;,&lt;/span&gt; rax &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;xmm1&amp;#160;&lt;span style="color: #339933;"&gt;&amp;gt;=&lt;/span&gt; var_32&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                                    puts&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;damage must be a positive float&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    var_60&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0xffffffff&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
                            &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                                    asm&lt;span style="color: #009900;"&gt;{&lt;/span&gt; cvtsi2sd   xmm0&lt;span style="color: #339933;"&gt;,&lt;/span&gt; eax &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    var_8&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; xmm0&amp;#160;&lt;span style="color: #339933;"&gt;*&lt;/span&gt; var_32&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;%f * %d == %f&lt;span style="color: #000099; font-weight: bold;"&gt;&amp;#92;&lt;/span&gt;n&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    asm&lt;span style="color: #009900;"&gt;{&lt;/span&gt; cvtsi2sd   xmm0&lt;span style="color: #339933;"&gt;,&lt;/span&gt; eax &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    var_24&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; var_24&amp;#160;&lt;span style="color: #339933;"&gt;-&lt;/span&gt; var_32&amp;#160;&lt;span style="color: #339933;"&gt;*&lt;/span&gt; var_32&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    asm&lt;span style="color: #009900;"&gt;{&lt;/span&gt; cvtsi2sd   xmm1&lt;span style="color: #339933;"&gt;,&lt;/span&gt; rax &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;var_24&amp;#160;&lt;span style="color: #339933;"&gt;&amp;gt;&lt;/span&gt; var_24&amp;#160;&lt;span style="color: #339933;"&gt;-&lt;/span&gt; var_32&amp;#160;&lt;span style="color: #339933;"&gt;*&lt;/span&gt; var_32&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                                            &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;%s lives with %f health&lt;span style="color: #000099; font-weight: bold;"&gt;&amp;#92;&lt;/span&gt;n&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
                                    &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
                                            &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;%s is dead with %f health!&lt;span style="color: #000099; font-weight: bold;"&gt;&amp;#92;&lt;/span&gt;n&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                                    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
                                    var_60&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
                            &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
                    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
            &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
    var_76&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; var_60&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; var_76&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;/div&gt;

&lt;p&gt;In my original code, I have multiple returns, and I rely on the knowledge that a return statement will terminate execution to not have any &lt;code&gt;else&lt;/code&gt; statements after my &lt;code&gt;if&lt;/code&gt; statements that return an error. The compiler, as a general rule, does not like multiple returns, and even with the optimizer disabled, it has rearranged my code so that there is a single return point. This causes the control flow to change from a shallow series of &lt;code&gt;if&lt;/code&gt; statement to nested &lt;code&gt;if&lt;/code&gt;-&lt;code&gt;else&lt;/code&gt;s. The compiler has invented a new variable, here named &lt;code&gt;var_60&lt;/code&gt;, to hold the return value at each possible error condition check and at the end of the function.&lt;/p&gt;

&lt;p&gt;Oh, and the compiler changed the places where I called &lt;code&gt;printf&lt;/code&gt; with a static string to &lt;code&gt;puts&lt;/code&gt;, probably because it has a much lower overhead. That was thoughtful of it, but I feel cheated somehow - I wanted &lt;em&gt;no&lt;/em&gt; optimization! (This was probably done at an early stage not affected by the &lt;code&gt;-O&lt;/code&gt; flags.) You can see a few other spots where compiler-generated cruft is added: for example, check out how the &lt;code&gt;strncpy&lt;/code&gt; of the player name to its malloc region is bracketed by nonsensical comparisons. Don&amp;#8217;t worry, this weirdness will disappear in an optimized build (to be replaced by other weirdness).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://i.imgur.com/R8KfO.png" target="_blank"&gt;Click here to see the control flow graph of the disassembly of this version in a new tab.&lt;/a&gt; You can clearly see several distinct chains leading to the common block at the end of loading the variable where the exit code is stored and returning it.&lt;/p&gt;

&lt;p&gt;Now, what about the fully optimized version? (Many compilers support multiple levels of optimization, but often there is little difference between them and most deployed binaries will just use the maximum setting regardless. This is with &lt;code&gt;-O3&lt;/code&gt;.) Check out &lt;a href="http://pastebin.com/HGURtsRa" target="_blank"&gt;the full disassembly here&lt;/a&gt; and notice that it is dramatically shorter - 70 opcodes vs. 152. Whence the savings? Let&amp;#8217;s find out.&lt;/p&gt;

&lt;div class="c" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; _main &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;rdi &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x4&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_0x100000cfe&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_100000ce2&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000cfe&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    rbx &lt;span style="color: #339933;"&gt;=&lt;/span&gt; rsi&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    r14&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rsi &lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rsi &lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; malloc&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rax &lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x1&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;rax &lt;span style="color: #339933;"&gt;!=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x0&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_0x100000d24&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_100000d1b&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000d24&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    r15&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;r14&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    strncpy&lt;span style="color: #009900;"&gt;(&lt;/span&gt;r15&lt;span style="color: #339933;"&gt;,&lt;/span&gt; r14&lt;span style="color: #339933;"&gt;,&lt;/span&gt; rax&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; strlen&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rbx &lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #993333;"&gt;int8_t&lt;/span&gt; &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;r15&amp;#160;&lt;span style="color: #339933;"&gt;+&lt;/span&gt; rax&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; atoi&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rbx &lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x10&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    r14&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;rax &lt;span style="color: #339933;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x0&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_0x100000d65&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_100000d5c&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000d65&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    atof&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rbx &lt;span style="color: #339933;"&gt;+&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x18&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #208080;"&gt;0x0&lt;/span&gt; &lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; xmm0&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_0x100000d84&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_100000d78&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000d84&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    asm&lt;span style="color: #009900;"&gt;{&lt;/span&gt; cvtsi2sd   xmm1&lt;span style="color: #339933;"&gt;,&lt;/span&gt; esi &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    var_0&amp;#160;&lt;span style="color: #339933;"&gt;=&lt;/span&gt; xmm1&amp;#160;&lt;span style="color: #339933;"&gt;*&lt;/span&gt; xmm0&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;#8220;%f * %d == %f&lt;span style="color: #000099; font-weight: bold;"&gt;&amp;#92;&lt;/span&gt;n&amp;#8221;&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #208080;"&gt;0x100000e70&lt;/span&gt; &lt;span style="color: #339933;"&gt;-&lt;/span&gt; var_0&amp;#160;&lt;span style="color: #339933;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #993333;"&gt;int32_t&lt;/span&gt; &lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;*&lt;/span&gt;&lt;span style="color: #208080;"&gt;0x100000e78&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
            rdi &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;#8220;%s lives with %f health&lt;span style="color: #000099; font-weight: bold;"&gt;&amp;#92;&lt;/span&gt;n&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;&lt;br/&gt;
            rdi &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;#8220;%s is dead with %f health!&lt;span style="color: #000099; font-weight: bold;"&gt;&amp;#92;&lt;/span&gt;n&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
    &lt;a style="color: #000060;" href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span style="color: #000066;"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rdi&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0x0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000cf3&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; rax&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000d78&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    rdi &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;#8220;damage must be a positive float&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000ce9&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    puts&lt;span style="color: #009900;"&gt;(&lt;/span&gt;rdi&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    rax &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #208080;"&gt;0xffffffff&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_100000cf3&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000d5c&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    rdi &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;#8220;hits must be a positive integer&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_100000ce9&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000d1b&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    rdi &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;#8220;Geez, you really need more ram.&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_100000ce9&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
loc_100000ce2&lt;span style="color: #339933;"&gt;:&lt;/span&gt;&lt;br/&gt;
    rdi &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;#8220;usage: string:name int:hits float:damage&amp;#8221;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;
    &lt;span style="color: #b1b100;"&gt;goto&lt;/span&gt; loc_100000ce9&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;br/&gt;
 &lt;/div&gt;

&lt;p&gt;Uh-oh!!! It&amp;#8217;s that thing your professor threatened to beat you over the head with a copy of K&amp;amp;R for if you ever used it in your code!!! &lt;code&gt;GOTO&lt;/code&gt;! The dark secret of &lt;code&gt;goto&lt;/code&gt; is that the compiler uses it like sprinkles on ice cream. It&amp;#8217;s just a &lt;code&gt;jmp&lt;/code&gt; instruction. Of course, all compiled code uses the &lt;code&gt;jmp&lt;/code&gt; family of instructions (jump-if-greater-than, jump-if-not-equal, etc) to implement control flow, but unconditional jumps - of which I count five in the disasm - are typical of code that has been ruthlessly rearranged by the optimizer to bear little superficial resemblance to the original line order.&lt;/p&gt;

&lt;p&gt;The trick here is that the optimizer is looking for repeated sections in the code. For example, it notices that &lt;code&gt;puts&lt;/code&gt; is called several times. In the unoptimized version, there was a different &lt;code&gt;puts&lt;/code&gt; call in-line each time. In the optimized version, there is only one &lt;code&gt;puts&lt;/code&gt; call, and each former callsite now jumps to it. The &lt;code&gt;puts&lt;/code&gt; is immediately followed by loading &lt;code&gt;-1&lt;/code&gt; into &lt;code&gt;eax&lt;/code&gt; and jumping to the return block, because every time I&amp;#8217;m writing a static string, it&amp;#8217;s because I&amp;#8217;m writing an error message and returning &lt;code&gt;-1&lt;/code&gt;. It&amp;#8217;s also rewritten the part where I &lt;code&gt;printf&lt;/code&gt; whether the player lives or dies to only use one &lt;code&gt;printf&lt;/code&gt; call instead of two.&lt;/p&gt;

&lt;p&gt;In the original, I calculated &lt;code&gt;(damage * hits)&lt;/code&gt; twice. The compiler was able to prove that I don&amp;#8217;t change the values of either side of the equation between the two calculations and has rewritten it to be calculated only once and stored in a new variable. Note, however, that the optimizer was &lt;em&gt;not&lt;/em&gt; able to fix my rookie mistake of calculating the &lt;code&gt;strlen&lt;/code&gt; of &lt;code&gt;argv[1]&lt;/code&gt; three times. Arrays Are Hard, and even though C programmers like you and I can look at that and say &amp;#8220;yeah, don&amp;#8217;t see how that could possibly change between these call sites,&amp;#8221; there is not much the compiler can do about fixing it &lt;em&gt;as written&lt;/em&gt; because I didn&amp;#8217;t throw in hints like &lt;code&gt;const&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Take a look at how &lt;code&gt;strlen&lt;/code&gt; is called each of those three times, however. First it takes an argument of &lt;code&gt;rsi + 0x8&lt;/code&gt;, then of &lt;code&gt;r14&lt;/code&gt;, and then of &lt;code&gt;rbx + 8&lt;/code&gt;. &lt;em&gt;All of these places point to the same location in memory - &lt;code&gt;argv[1]&lt;/code&gt;!&lt;/em&gt; (Recall that this being a 64-bit disassembly, incrementing a pointer to a pointer by 1 in C actually increments it by 8, as opposed to by 4 in a 32-bit program. Pointer math is on drugs, kids.) A key job of the optimizer is to get data to spend as much time in the registers as possible, since register accesses are &lt;em&gt;vastly&lt;/em&gt; faster than a memory fetch. To this end, it makes multiple copies of the pointer to &lt;code&gt;argv&lt;/code&gt; (which, according to the x86_64 calling convention in use, comes into &lt;code&gt;main&lt;/code&gt; in &lt;code&gt;rsi&lt;/code&gt;) to work with as it loads the several arguments. You may find it easiest to track these variable copies in &lt;a href="http://i.imgur.com/99Yzt.png" target="_blank"&gt;the control flow graph image of this disassembly.&lt;/a&gt; Spotting when two different registers or stack variables are really the same thing is a critical skill for understanding disassemblies (and a major reason Decompiling Is Hard.)&lt;/p&gt;

&lt;p&gt;There are some other minor things that one often sees in optimized code that can be puzzling the first time they are encountered. Perhaps the most famous example is using &lt;code&gt;xor&lt;/code&gt; with the same register twice to set it to 0 instead of loading a 0 value. The optimized disasm contains a &lt;code&gt;xor&lt;/code&gt; and a &lt;code&gt;pxor&lt;/code&gt; while the unoptimized contains neither. In a similar vein, &lt;code&gt;cmp value, 0&lt;/code&gt; is swapped out for &lt;code&gt;test value, value&lt;/code&gt;. While it doesn&amp;#8217;t show up in this disassembly, a classic optimization trick is to replace multiplication or division by powers of two (2, 4, 8, 16&amp;#8230;) with bitshifts to the left or right respectively. Do the math on paper if you&amp;#8217;re not sure why; it works out the same.&lt;/p&gt;

&lt;p&gt;Another trick is abusing the powerful &lt;code&gt;lea&lt;/code&gt; (&amp;#8220;load effective address&amp;#8221;) opcode to do normal integer math instead of pointer math. &lt;code&gt;lea&lt;/code&gt; is intended for working with pointer offsets and allows directly encoding values to add to or multiply by the base pointer value. In the unoptimized disasm, you see &lt;code&gt;lea&lt;/code&gt; only used for literal pointers, to load the addresses of the strings we&amp;#8217;re passing off to &lt;code&gt;printf&lt;/code&gt; and &lt;code&gt;puts&lt;/code&gt;. In the optimized verison, however, you will see the line &lt;code&gt;lea rdi, qword [ds:rax+0x1]&lt;/code&gt; in between a &lt;code&gt;strlen&lt;/code&gt; and a &lt;code&gt;malloc&lt;/code&gt;. It is deliberately misusing the return value of &lt;code&gt;strlen&lt;/code&gt; as though it were a pointer to add one to it and copy it to &lt;code&gt;rdi&lt;/code&gt; in one step.&lt;/p&gt;

&lt;p&gt;You may also notice that in the unoptimized version, the stack contains 96 (&lt;code&gt;0x60&lt;/code&gt;) bytes of temporary storage, but the optimized version contains 8. This is the agressive register usage at work, squashing intermediate results the instant they are no longer needed. Of course these dramatic memory savings complicate your life trying to understand the disassembly - personally I recommend using paper and pencil to track when registers are dirtied with new values.&lt;/p&gt;

&lt;p&gt;Bonus question: the original source code shows &lt;code&gt;hitpoints&lt;/code&gt; being set to 100.0. Look up and down the disassembly all you want and you will never see anything that even remotely resembles that number, so where does it go? Don&amp;#8217;t bother trying to look for 100 in hex (&lt;code&gt;0x64&lt;/code&gt;) either, if that&amp;#8217;s what you&amp;#8217;re thinking. The number is floating point, and hence evil. This is actually a trick question, as the number is not passed as an immediate value as you might expect, but is stored in the &lt;code&gt;__const&lt;/code&gt; section. This line in the optimized version - &lt;code&gt;movsd xmm0, qword [ds:0x100000e70]&lt;/code&gt; - is where 100.0 is loaded. If you load &lt;a href="https://www.box.com/s/f271ed84fbc1e927b182" target="_blank"&gt;the binary&lt;/a&gt; in your favorite disassembler-which-supports-&lt;code&gt;macho&lt;/code&gt; (or compile it yourself and find the equivalent line) and follow that pointer, you will see a stored value; the disassembler will probably display it as a hexadecimal value of &lt;code&gt;0x4059000000000000&lt;/code&gt; which is totally opaque to us mere mortals. Toggling the display method of the variable, or plugging it into an &lt;a href="http://www.binaryconvert.com/result_double.html?decimal=049048048046048048" target="_blank"&gt;online IEEE floating point converter&lt;/a&gt; will give you a nice, understandable 100.0. As the reverse engineer, your clue that it is a floating point value is that it is loaded into the &lt;code&gt;xmm0&lt;/code&gt; register and otherwise operated on with float-specific opcodes instead of normal integer ones, and you know it is a &lt;code&gt;double&lt;/code&gt; type instead of a &lt;code&gt;float&lt;/code&gt; because it is 64-bit instead of 32-bit.&lt;/p&gt;

&lt;p&gt;Personally, I hate floats.&lt;/p&gt;

&lt;p&gt;As usual, the disassembler (and decompiler) I use is &lt;a href="http://www.hopperapp.com/" target="_blank"&gt;Hopper&lt;/a&gt; for OSX, and here is your mandatory sickeningly cute picture.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/SZYcV.jpg"/&gt;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/28815774245</link><guid>http://abad1dea.tumblr.com/post/28815774245</guid><pubDate>Mon, 06 Aug 2012 00:27:00 -0400</pubDate><category>static analysis</category><category>binary analysis</category><category>x86</category><category>asm</category><category>assembly</category><category>hopper</category></item><item><title>Is the Vibe messaging app safe for protestors?</title><description>&lt;p&gt;I saw someone claiming that they believed a social messaging app for iPhone and Android called &amp;#8220;Vibe&amp;#8221; was actually a trap to solicit data from members of the Occupy movement, who were using the app for its advertised feature of location-specific anonymous messages. For example, you could set it so that the message is visible to people within 3 miles of your current GPS location. Since the app became popular with the Occupy movement, its threat model is bumped up a few notches from &amp;#8220;people posting about local band performances - nobody cares&amp;#8221; to &amp;#8220;people posting about potentially sensitive political activities - they may be monitored.&amp;#8221;&lt;/p&gt;

&lt;p&gt;I was bored and wanted a distraction so I decided to check it out. I only checked the Android version because that is a lot easier to work with. I did not at any time install the app or run a single line of its code. (I am a security researcher at &lt;a href="http://veracode.com"&gt;Veracode&lt;/a&gt; if you are wondering. This is my idea of a great evening.)&lt;/p&gt;

&lt;p&gt;The modest download page of Vibe: &lt;a href="http://zami.com/v.html"&gt;http://zami.com/v.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The FAQ: &lt;a href="http://www.zami.com/vibe/faq.html"&gt;http://www.zami.com/vibe/faq.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alright, here&amp;#8217;s the skinny. You may mistakenly believe that if you dial the distance on your message down really low, that only people who are actually physically close to you could ever see it. This is not true. It is very, very easy to write a script which impersonates being at any location you want and can get the vibes for that location. It is simply a REST client request to a specific URL recoverable from the app with the latitude, longitude and range set to anything. Tested and confirmed, I was reading short-range New York vibes from my home a few states away.&lt;/p&gt;

&lt;p&gt;This is not hacking. The remote web server simply works with whatever geo-coordinates the client provides. It could be improved, if the server hosts wanted, by comparing the client&amp;#8217;s IP address and seeing if it&amp;#8217;s roughly colocated with the submitted coordinates, but of course there are ways around that such as simply running the script from a rented server in the target&amp;#8217;s general region. The simple fact of the matter is that there is no way for a server on the internet to determine for sure you are, in fact, standing in a particular location with your phone. Hence, &lt;em&gt;do not post anything that should not read by someone outside of your range.&lt;/em&gt; It&amp;#8217;s not actually private! I have not tried it, but it appears someone could also remotely post messages pretending to be near you, so treat the messages you see with a healthy skepticism. (This is actually an advertised feature of the underlying &lt;a href="http://itunes.apple.com/us/app/asklocal/id409176264?mt=8"&gt;AskLocal&lt;/a&gt; platform, which lets you place a message anywhere on the world map but claims that only people near to it can see it. We have already seen that is not really true.)&lt;/p&gt;

&lt;p&gt;The second problem is that the app (at least on Android, but probably on iOS too) deliberately overrides SSL security validation (specifically &lt;code&gt;javax.net.ssl.x509trustmanager&lt;/code&gt;) to accept any certificate. What this means is that someone who set up malicious &amp;#8220;free wifi&amp;#8221; could install a MITM (man-in-the-middle) proxy to intercept your Vibe messages and log everything before posting it so that you never noticed anything was wrong. I am guessing the programmers did this not to facilitate evil but because SSL errors are difficult and annoying and they did not want to complicate their user interface with messages like &amp;#8220;Server presented expired certificate, can&amp;#8217;t connect.&amp;#8221; Now, if this app were only used to post about local art shows and the like, this would not be particularly worth worrying about, but again our threat model is members of a protest movement. Hence, this is not a good app to use if you are attending an event where someone may wish to log the information of who is present and use it against them. (Technically a MITM attack could still happen on your 3G, but the &amp;#8220;open a free wifi point and wait&amp;#8221; technique is both a very easy and very successful avenue of attack.) This bug could be fixed by the app programmers with a bit of effort so that the Vibe client would not post messages without being certain it was talking directly to the Vibe server.&lt;/p&gt;

&lt;p&gt;As for whether or not the real Vibe server logs the IP address when you submit a message, it is impossible to tell for sure but they claim they do not. The IP address alone is only &lt;a href="http://torrentfreak.com/ip-address-cant-even-identify-a-state-bittorrent-judge-rules-120515/"&gt;semi-useful&lt;/a&gt; but you will still have to answer for yourself how comfortable you are with the situation.&lt;/p&gt;

&lt;p&gt;I did not see any deliberately malicious activity (such as siphoning off contact data) and every interface functionality appears to work as advertised. Hence, my recommendation is to treat it as a convenient &lt;em&gt;filter&lt;/em&gt; for local messages rather than believing that only local people can see what you say, and to be mindful that your connection info may be logged by an interceptor. Use common sense in what you say and what you believe like on any other social networking service.&lt;/p&gt;

&lt;p&gt;Also, this is supposed to be a girly pictures blog, so here&amp;#8217;s a pic of Marisa the witch.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pixiv.net/member_illust.php?mode=medium&amp;amp;illust_id=18235066"&gt;&lt;img src="http://i.imgur.com/o8fJV.png"/&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/26496565466</link><guid>http://abad1dea.tumblr.com/post/26496565466</guid><pubDate>Wed, 04 Jul 2012 12:14:00 -0400</pubDate><category>vibe</category><category>ows</category><category>occupy</category><category>security</category><category>research</category></item><item><title>Why I posted the Asus screenshot</title><description>&lt;p&gt;So the big problem with Twitter is that only a tiny fraction of people who saw &amp;#8220;the screenshot&amp;#8221; will see this comment on it, because it already ricocheted off and I can&amp;#8217;t attach this now. Nonetheless I hope this clears it up for at least somebody.&lt;/p&gt;

&lt;p&gt;Why I posted the Asus screenshot even though a lot of people think it&amp;#8217;s not worth ruffling feathers about:&lt;/p&gt;

&lt;p&gt;Short version: I&amp;#8217;m not accusing Asus of deserving the ninth circle of fiery sexist hell for being the worst people in the universe. I am asserting whoever specifically thought posting that would be a good idea of being creepy in a way totally inappropriate to a corporate account, and suggesting that people who don&amp;#8217;t see the creepy factor may need to take a step back and reconsider their attitudes towards how women are portrayed to men in technology and how not-a-professional-model-who-hopefully-consented-to-this-picture women feel about how much the technology industry values them when they can&amp;#8217;t read about a new laptop without being visually assaulted with &amp;#8220;HAHA LADY-ARSE AMIRITE &lt;em&gt;GUYS&lt;/em&gt;.&amp;#8221; I&amp;#8217;ve already been told by several people that it&amp;#8217;s okay because laptops are for &lt;em&gt;men.&lt;/em&gt; Think about that. I guess I need to surrender the several laptops I own to my husband, then?&lt;/p&gt;

&lt;p&gt;~ ~ ~ ~ ~&lt;/p&gt;

&lt;p&gt;Maybe today you saw the &lt;a href="https://twitter.com/0xabad1dea/status/209659133710966784"&gt;screenshot&lt;/a&gt; of the Asus computer company&amp;#8217;s official twitter feed posting a picture of a woman&amp;#8217;s rear end in lieu of a clear picture of one of their products, with a caption actually &lt;em&gt;emphasizing&lt;/em&gt; that her rear end is the most obvious thing in the pic. She&amp;#8217;s presumably in their employ but it does not look like she&amp;#8217;s posing for the shot so much as someone just walked up while she was leaning forward and snapped a pic. Maybe she did pose, I don&amp;#8217;t know. She&amp;#8217;s next to a laptop. Or a tablet. Or a large phone? I really can&amp;#8217;t tell, because again, the picture is of a woman&amp;#8217;s posterior, NOT of the PRODUCT they are allegedly pitching. I saw the tweet when it was still fairly new and my spider sense told me to take a screenshot. A few minutes later it was deleted when someone at Asus caught on to all the negative comments, and I posted the screenshot with minimal comment so there would be a record of the event to back up what people were saying. It ended up on Gizmodo among other places, where the debate raged thick on whether or not this was &amp;#8220;sexist&amp;#8221; or indeed something even worth remarking on.&lt;/p&gt;

&lt;p&gt;A provocative photograph is not inherently wrong, assuming the person in the picture consented to it. Hiring a lady to stand next to your unspecified product of productyness to smile and hand out brochures is not inherently wrong and &lt;em&gt;she&lt;/em&gt; is not inherently in the wrong. Someone who happened to be wandering around the salesfloor and cracked a joke like &amp;#8220;nice curves, on the phone too&amp;#8221; would be pretty crass and I would not want to hang around with a person like that but it&amp;#8217;s a personal-level thing, not an official one. A corporate twitter account - that&amp;#8217;s official, and a lot more Serious Business than someone just making a comment on their &lt;em&gt;personal&lt;/em&gt; account. Now, I understand that these things are often staffed by interns or whoever wasn&amp;#8217;t too busy and may not have publicity training or whatever. So again, this is more against whichever Asus employee(s) &lt;em&gt;specifically&lt;/em&gt; decided to snap the pic and post it that than against the corporation as a whole. While theoretically it may have been a woman, I&amp;#8217;m going to use the male gender on a hunch. Dude: what were you &lt;em&gt;thinking?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When I saw the picture and its caption, my only thought was &amp;#8220;Ewwwwww, gross - so I guess Asus isn&amp;#8217;t planning on selling any laptops to any women ever.&amp;#8221; Remarks about the female body like that made in public are a major clue-in that the speaker is not respectful towards the female gender. It&amp;#8217;s a total turn-off both in the literal sense and the broader, social one. &amp;#8220;Right, this person isn&amp;#8217;t courting my respect so no need to court theirs.&amp;#8221;&lt;/p&gt;

&lt;p&gt;There is a time and place for &amp;#8220;sexy&amp;#8221; marketing. Like, you know, when you&amp;#8217;re selling something related to &lt;em&gt;sex&lt;/em&gt;. Trying to show off a &lt;em&gt;laptop&lt;/em&gt; (or a tablet or whatEVER it is, since may I remind you, &lt;em&gt;I can&amp;#8217;t clearly see it in the picture&lt;/em&gt;) by hiding it behind a woman bending over sends the message &amp;#8220;we don&amp;#8217;t have anything positive to say about our product so we&amp;#8217;ll count on the trick of being sleazy to at least get SOMEBODY to look at it.&amp;#8221; That&amp;#8217;s not a &lt;em&gt;conscious&lt;/em&gt; act of sexism against women, but it is a subconscious act of using women as a means to an end and apparently not even &lt;em&gt;remembering&lt;/em&gt; that they buy laptops too and tend to find this sales tactic really off-putting. The sexism here is assuming that the female half of the potential customer population can be insulted and dismissed without consequence. Again, that&amp;#8217;s not overt, deliberate sexism. That&amp;#8217;s a manifestation of the male-by-default technology culture that doesn&amp;#8217;t take women into account and then wonders why there&amp;#8217;s so few women in technology.&lt;/p&gt;

&lt;p&gt;I just know that someone&amp;#8217;s going to say that if I were a man I&amp;#8217;d totally get the joke and women need to stop overreacting. Now &lt;em&gt;that&lt;/em&gt; is overt sexism, because it excuses the grating behavior of one gender and ignores the complaints of the other (and &lt;em&gt;yes&lt;/em&gt;, this cuts both ways), but you probably didn&amp;#8217;t know that I am bisexual and I find female posterior just as attractive as I presume men do. And yet, my reaction to that picture was &amp;#8220;ewww,&amp;#8221; because of the &lt;em&gt;context&lt;/em&gt; of a corporation saying &amp;#8220;lol arse&amp;#8221; in an official corporate context while promoting their non-gender-specific, non-sexual products.&lt;/p&gt;

&lt;p&gt;So the reason I posted the screenshot was not to call everyone to set their Asus electronics on fire and vow to see the corporation destroyed for their sins. It was to just show that yes, the technology industry has an attitude-towards-women problem and it&amp;#8217;s sad and pretty creepy.&lt;/p&gt;

&lt;p&gt;PS. People actually sent hate tweets to a young lady I know on Twitter because she commented on all this, calling her a whore and whatnot. I assume I was shielded because my account isn&amp;#8217;t too obviously female (well, at the time I &lt;em&gt;thought&lt;/em&gt; that a pink cartoon girl avatar was pretty feminine, but it turns out the internet assumes you&amp;#8217;re a guy unless you have a &lt;em&gt;photographic&lt;/em&gt; female avatar). Isn&amp;#8217;t that just pathetic?&lt;/p&gt;

&lt;p&gt;(Please direct all gender-shaming hatemail to my carefully read account at whoops I already deleted it dot com. Yeah, there isn&amp;#8217;t anything you can say I haven&amp;#8217;t already heard a thousand times for being a girl on the internet for over a decade.)&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/24448697480</link><guid>http://abad1dea.tumblr.com/post/24448697480</guid><pubDate>Mon, 04 Jun 2012 23:01:09 -0400</pubDate><category>sexism</category><category>feminism</category><category>women</category><category>technology</category><category>asus</category></item><item><title>Analyzing Binaries with Hopper's Decompiler</title><description>&lt;p&gt;&lt;em&gt;by abadidea - &lt;a href="https://twitter.com/#!/0xabad1dea"&gt;@0xabad1dea&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;(this is now also on the corporate blog with an expanded introduction: &lt;a href="http://www.veracode.com/blog/2012/05/static-analysis-following-along-at-home-with-hoppers-decompiler-feature/"&gt;clickie&lt;/a&gt; )&lt;/p&gt;

&lt;h3&gt;No source code? &lt;em&gt;No problem!&lt;/em&gt;&lt;/h3&gt;

&lt;p&gt;This is aimed at beginners in static analysis. The binary we examine is non-malicious and non-obfuscated, and is not run through the highest optimization settings of the compiler. We will start at line one and proceed linearly, just to get a feel for how to read decompiled code.&lt;/p&gt;

&lt;p&gt;For this tutorial you will need a strong knowledge of C, only the slightest familiarity with assembly, the ability to understand Unix man pages, and &lt;a href="http://www.hopperapp.com/"&gt;Hopper Disassembler/Decompiler&lt;/a&gt;, which is $29. It is only for OSX, but it is literally cheaper to buy a Mac Mini and Hopper than the (naturally more mature and well-featured) x86 Hex-Rays decompiler. Heck, you could get an iMac and still have change for a coffee.&lt;/p&gt;

&lt;p&gt;Hopper is a disassembler with a very-close-to-C &amp;#8220;pseudocode&amp;#8221; decompiler that does not roundtrip with your C compiler but is quite good for examining other people&amp;#8217;s binaries. It supports both 32-bit and 64-bit executables for Windows and OSX (no Linux or iOS/ARM support yet). At the time of writing, the newest version is 2.2.0; the App Store is still holding it hostage for review, but you can also buy the app directly from the creator. It is still under active development, and (like every other decompiler) is not perfect, so learning how to spot when it goes awry is an important facet of making use of it.&lt;/p&gt;

&lt;p&gt;(I am not affiliated with Hopper or its creator nor am I receiving a handsome sum to promote it. Honest.)&lt;/p&gt;

&lt;p&gt;We will be looking at an ancient piece of C code for Unix called metamail, which was a mimetype helper that received base64-encoded attachments from email clients and opened the appropriate viewing program. Having reviewed it before, I strongly recommend that you do not use it on a production system (not that there is any use for it in this millennium). The source code is &lt;a href="http://www.ibiblio.org/pub/packages/solaris/sparc/html/metamail.2.7.html"&gt;yonder&lt;/a&gt;, but it is so old that I had to change a few functions to return 0 instead of void to get llvm to compile it for OSX. I also ran the &lt;code&gt;strip&lt;/code&gt; utility to remove any debug symbol names of internal functions that may be there, which would make it too easy (you will almost never see these in distributed closed-source programs). Download my metamail binary &lt;a href="http://dl.dropbox.com/u/3088132/metamail"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When you open metamail with the &amp;#8220;Read Executable&amp;#8221; button in the upper left, you will be dumped here:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/CAJbx.png" alt="Entrypoint disassembly" title="Entrypoint"/&gt;&lt;/p&gt;

&lt;p&gt;This is the prologue before we reach C&amp;#8217;s &lt;code&gt;main&lt;/code&gt;. Skip down to the first &lt;code&gt;call&lt;/code&gt; instruction. Place your cursor over the &lt;code&gt;sub_1000018b0&lt;/code&gt; symbol - the address of the first function called, which presumably is &lt;code&gt;main&lt;/code&gt; - and press enter to jump to it.&lt;/p&gt;

&lt;p&gt;We are now faced with a wall of inscrutable assembly, but there is no need to panic. In the upper right hand corner of Hopper is the magical Pseudo Code button. It will pop up a C-like reconstruction of the function.&lt;/p&gt;

&lt;p&gt;External library functions will show their names just like in source code, and are your waypoints that will make it much easier to understand what&amp;#8217;s going on. Internal functions will be named &amp;#8220;sub&amp;#8221; for &amp;#8220;subroutine&amp;#8221; followed by their address. Variables are &amp;#8220;var&amp;#8221; followed by a number. Hopper does not attempt to do much type guessing, nor does it completely write out the use of registers, although it collapses as much as it can manage. In a 32-bit program you will see &lt;code&gt;eax, ebx, ecx, edx, esi, edi, ebp, esp&lt;/code&gt;, and in a 64-bit one you will also see &lt;code&gt;rax, rbx, rcx, rdx, rsi, rdi, rbp, rsp&lt;/code&gt; and some unnamed registers that look like &lt;code&gt;r&amp;lt;num&amp;gt;&lt;/code&gt;. In optimized code, you may also see partial registers &lt;code&gt;ax, bx, cx, dx&lt;/code&gt; (16 bits) and &lt;code&gt;ah/al, bh/bl, ch/cl, dh/dl&lt;/code&gt; (8 bits).&lt;/p&gt;

&lt;p&gt;If you have never looked at assembly before, just know that the registers are named storage locations inside the processor itself, and compilers try to place variables into registers as much as possible because it is much faster than reading and writing RAM. &lt;code&gt;esp/rsp&lt;/code&gt; refer to the top of the stack, &lt;code&gt;ebp/rbp&lt;/code&gt; to the base of the current stack frame, and &lt;code&gt;eax/rax&lt;/code&gt; is normally where a function&amp;#8217;s return value is received. In the disassembly view of a function, you will normally see it move the stack pointer. This creates the storage area for the local variables. Rewriting these from relative offsets to the stack base to a name like &lt;code&gt;var_40&lt;/code&gt; is a nice thing that the decompiler view does for us.&lt;/p&gt;

&lt;p&gt;The decompiler view does not support in-place text editing, and disassembly-view comments do not carry over to decompiliation view, so in the following screenshots I have copied the decompiled C to a code editor for annotating with explanatory comments. (You can also directly rename symbols in the disassembler view with &amp;#8216;n&amp;#8217; when you have an idea what they&amp;#8217;re for, but we won&amp;#8217;t be doing that to keep the symbol name consistent across screenshots.) Let&amp;#8217;s focus on this block for now (first screenshot is of the disassembly, second is of the decompilation):&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/ZuZPb.png" alt="Main disasm, first part" title="Main disasm, first part"/&gt;&lt;img src="http://i.imgur.com/9ecyq.png" alt="Main lines 1-27" title="Main lines 1-27"/&gt;&lt;/p&gt;

&lt;p&gt;Note that &lt;code&gt;var_144&lt;/code&gt; is set to a function pointer. Switching back to disassembly view, we see that the &lt;code&gt;sub_100001620&lt;/code&gt; pointer is first loaded into &lt;code&gt;rcx&lt;/code&gt; and then copied from there to &lt;code&gt;var_144&lt;/code&gt; and then from there to &lt;code&gt;rsi&lt;/code&gt;. See how the decompiler abstracted that for us? It&amp;#8217;s then passed as the second argument to &lt;code&gt;signal&lt;/code&gt; so that it will be set up as the handler for signal &lt;code&gt;0x2&lt;/code&gt; (stored in &lt;code&gt;var_156&lt;/code&gt;), which according to the documentation is &lt;code&gt;SIGINT&lt;/code&gt;. Place your cursor on the &lt;code&gt;sub_100001620&lt;/code&gt; reference and press enter to see what function this is. Go ahead and annotate that it&amp;#8217;s a signal handler.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/jfXQe.png" alt="A signal handler" title="A signal handler"/&gt;&lt;img src="http://i.imgur.com/9ucfN.png" alt="A signal handler" title="A signal handler"/&gt;&lt;/p&gt;

&lt;p&gt;Before worrying about anything else, we see several standard functions; another call to &lt;code&gt;signal&lt;/code&gt;, followed by &lt;code&gt;getpid&lt;/code&gt; and &lt;code&gt;kill&lt;/code&gt; on the result of &lt;code&gt;getpid&lt;/code&gt;, so we know already that the process is attempting to send &lt;em&gt;itself&lt;/em&gt; a signal in its own signal handler.&lt;/p&gt;

&lt;p&gt;Hopper does not yet support decoding function arguments (it currently shows &amp;#8220;void&amp;#8221; as a placeholder), but you can see by inspecting the function body that it assumes there is a value in &lt;code&gt;rdi&lt;/code&gt; (on the x86-64 calling convention we are using, arguments in order are &lt;code&gt;rdi, rsi, rdx, rcx, r8, r9&lt;/code&gt;) .We know from signaling documentation that handlers receive the integer value of the signal they are handling. We already know that it at the very least will be processing &lt;code&gt;SIGINT&lt;/code&gt;, but there&amp;#8217;s no reason this handler can&amp;#8217;t be attached to other signals as well (spoiler alert: this will happen). Work through the rest of the function assuming &lt;code&gt;var_24&lt;/code&gt; has the value of &lt;code&gt;0x2&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We see that the handler calls another subroutine. Follow through in disassembler view to &lt;code&gt;sub_100009c50&lt;/code&gt; with enter (backspace will take you to your previous function).&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/BGYV0.png" alt="Handler's little helper" title="Handler's little helper"/&gt;&lt;img src="http://i.imgur.com/fmBui.png" alt="Handler's little helper" title="Handler's little helper"/&gt;&lt;/p&gt;

&lt;p&gt;Uh-oh. Things are getting uglier.&lt;/p&gt;

&lt;p&gt;What on earth is &lt;code&gt;0x10000F988&lt;/code&gt;? It is a value with a fixed address, i.e. a global variable. If you hover over it in disassembly view, you will see that it has a default value of zero. With it highlighted, press &amp;#8216;x&amp;#8217; to bring up the cross-reference window. Aside from the current spot, where it is being checked for zero, it is set to 1 in &lt;code&gt;sub_100009bd0&lt;/code&gt;, which is… well, let us not worry about it for now, as we will quickly get into a mess of function calls. We now know that &lt;code&gt;0x10000F988&lt;/code&gt; is a boolean flag. If it&amp;#8217;s set, we are doing an &lt;code&gt;ioctl&lt;/code&gt; with standard output and standard input. Don&amp;#8217;t worry too much about what exactly it&amp;#8217;s doing, as &lt;code&gt;ioctl&lt;/code&gt; takes arbitrary values and does arbitrary things pretty much by definition (one would have to dig into the macros for the platform it was compiled against and do some bitwise math- which isn&amp;#8217;t a productive use of our time until we&amp;#8217;re sure that it&amp;#8217;s important to the application logic and not just boilerplate, which, spoilers, it is). What we should note, though, is that &lt;code&gt;ioctl&lt;/code&gt; is a variadic function, and as such will confuse the decompiler and create orphan variables in the disassembly view that may not even show up in the decompiler view. In this case, it loses sight of the fact that &lt;code&gt;0x10000F83E&lt;/code&gt; and &lt;code&gt;0x10000F838&lt;/code&gt; are global variables (each moved into &lt;code&gt;rdx&lt;/code&gt; before the call) being passed as the third arguments to &lt;code&gt;ioctl&lt;/code&gt;. If we cross-reference them, we see that they are set in another small function almost identical to this one except it passes a different &lt;code&gt;ioctl&lt;/code&gt; value… and sets the boolean flag we found earlier. It is reasonable at this point to assume it is obtaining and later pushing back at exit time the properties of standard input and output to reset the terminal. (If we cheat and check the source code, this is exactly what it is doing, in function RestoreTtyState.)&lt;/p&gt;

&lt;p&gt;After annotating the function with what we&amp;#8217;ve learned, it is much easier to understand.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/3Z07Z.png" alt="RestoreInOutState" title="RestoreInOutState"/&gt;&lt;/p&gt;

&lt;p&gt;Press backspace until we&amp;#8217;re back in the signal handler at &lt;code&gt;sub_100001620&lt;/code&gt;. We went on quite the little excursion just to determine that it&amp;#8217;s pushing a stored terminal state. Picking up where we left off, we see that the handler takes the received signal number and &lt;em&gt;reassigns&lt;/em&gt; it to a null handler pointer with &lt;code&gt;signal(var_24, 0x0)&lt;/code&gt;. This will cause the next raising of that signal to go to the default handler instead of a custom one. We can see it store the return value in &lt;code&gt;var_8&lt;/code&gt; and proceed to do exactly nothing with it. (This would probably disappear altogether on a high optimization setting.) Having changed the signal handler after calling the terminal reset function, it then &lt;em&gt;resends&lt;/em&gt; the same signal to itself by calling &lt;code&gt;kill&lt;/code&gt; on the value of &lt;code&gt;getpid&lt;/code&gt;. The default handler will be raised with the propagated signal, which generally will result in process termination.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/X0Rso.png" alt="A signal handler, annotated" title="A signal handler, annotated"/&gt;&lt;/p&gt;

&lt;p&gt;Isn&amp;#8217;t that quite easy to understand? And we haven&amp;#8217;t taken a single peak at any source code!&lt;/p&gt;

&lt;p&gt;Alright, we will back up one more level back into main(). The next several lines are quite obvious: it&amp;#8217;s just repeatedly setting up our signal handler for several different signals. Bla bla bla, skip down to the next chunk, which is more interesting:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/556C1.png" alt="Main, part 2, disasm" title="Main, part 2, asm"/&gt;&lt;img src="http://i.imgur.com/myANW.png" alt="Main, part 2, decomp" title="Main, part 2, decomp"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;getenv&lt;/code&gt;! The program checks for the &lt;code&gt;METAMAIL_TMPDIR&lt;/code&gt; variable and, if found, points the global variable &lt;code&gt;0x10000f278&lt;/code&gt; to the returned buffer. Otherwise, it points it to the constant string &lt;code&gt;"/tmp"&lt;/code&gt;. Next it checks &lt;code&gt;MM_HEADERS&lt;/code&gt;. It gets the &lt;code&gt;strlen&lt;/code&gt; of the buffer if it exists; note that in high optimization settings, &lt;code&gt;strlen&lt;/code&gt; or &lt;code&gt;strcpy&lt;/code&gt; is often inlined and you will not see an explicit function call to it, just a few lines of byte-copying right in the middle of the surrounding code. It mallocs a new buffer into &lt;code&gt;var_160&lt;/code&gt; that is the length of the &lt;code&gt;MM_HEADERS&lt;/code&gt; string plus fifteen (&lt;code&gt;0xf&lt;/code&gt;) extra bytes. Why? We don&amp;#8217;t know yet.&lt;/p&gt;

&lt;p&gt;If the malloc fails and returns zero, the program goes to &lt;code&gt;sub_100006130&lt;/code&gt; passing the global pointer variable &lt;code&gt;0x10000f270&lt;/code&gt;. Follow the global pointer and it dumps you to another pointer; follow it again and you get the string &lt;code&gt;"Out of memory!"&lt;/code&gt;. It is not hard to guess what this function will do.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/Iyy26.png" alt="Flip out and quit, disasm" title="Flip out and quit, disasm"/&gt;&lt;img src="http://i.imgur.com/F0L7z.png" alt="Flip out and quit, decomp" title="Flip out and quit, decomp"/&gt;&lt;/p&gt;

&lt;p&gt;It flips out and quits.&lt;/p&gt;

&lt;p&gt;Backing up one - assuming the &lt;code&gt;malloc&lt;/code&gt; was successful, we are going to &lt;code&gt;sprintf&lt;/code&gt; something, and hence it becomes obvious that the extra fifteen bytes were to make room for the static string &lt;code&gt;"MM_HEADERS="&lt;/code&gt; and the trailing null. You may have noticed we are actually calling a wrapper that will land you in dynamic library purgatory if you try to follow it. We are not calling the real true &lt;code&gt;sprintf&lt;/code&gt;; a theoretically more secure variation (&lt;code&gt;int __sprintf_chk(char * str, int flag, size_t strlen, const char * format);&lt;/code&gt;) has automatically been substituted by the compiler. The seemingly mangled call is actually intentional. However… it specifies a security flag of zero and a max string length of &lt;code&gt;MAXINT&lt;/code&gt;, so I am not sure how that is supposed to help anyone. Just ignore these flags as noise. That being said, since &lt;code&gt;sprintf&lt;/code&gt; is a variadic function, the variadic part (in this case, the buffer stored at &lt;code&gt;0x10000f930&lt;/code&gt;) fell off the end. If you are not intimately familiar with &lt;code&gt;printf&lt;/code&gt; format strings, it&amp;#8217;s time to brush up- you need to understand them to correctly reconstruct calls and/or spot vulnerabilities in incorrect &lt;code&gt;printf&lt;/code&gt; usage.&lt;/p&gt;

&lt;p&gt;We haven&amp;#8217;t gotten very far into the program at all, but we&amp;#8217;ve covered quite a few different C paradigms and how they appear in a disassembly. Hopefully binaries now appear less inscrutable and less magical, and you understand why reverse engineers laugh in the face of programmers who think no-one will never understand their awesome secret keygen without the source code.&lt;/p&gt;

&lt;p&gt;I may do some followup articles examining particularly interesting pieces of this moderately large program. With some practice, you can learn to read decompiled code very quickly and learn to spot boilerplate that can be skipped over. Thanks for reading :)&lt;/p&gt;</description><link>http://abad1dea.tumblr.com/post/23487860422</link><guid>http://abad1dea.tumblr.com/post/23487860422</guid><pubDate>Mon, 21 May 2012 13:35:00 -0400</pubDate><category>talkypost</category><category>technical</category><category>binary</category><category>binary analysis</category><category>disassembly</category><category>decompiler</category><category>hopper</category><category>osx</category></item></channel></rss>
