Last active
December 17, 2015 15:39
-
-
Save alexcrichton/5632961 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.globl __c0_main | |
__c0_main: | |
L__c0_main_bb_0: | |
sub $8, %rsp // %rsp | |
mov $1, %edx | |
mov $2, %r9d | |
mov $0, %r10d | |
L__c0_main_bb_1: | |
cmp $3, %r10d // l | |
jge L__c0_main_bb_3 | |
L__c0_main_bb_2: | |
add $1, %r10d // %r10d | |
xchg %r9, %rdx | |
jmp L__c0_main_bb_1 | |
L__c0_main_bb_3: | |
mov %edx, %eax | |
add %r9d, %eax // %edx | |
add $8, %rsp // %rsp | |
ret // %t8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
int a = 1; | |
int b = 2; | |
for (int i = 0; i < 3; i++) { | |
int t = a; | |
a = b; | |
b = t; | |
} | |
return a + b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment