Created
January 25, 2018 15:29
-
-
Save doughgle/5d9ed726e9287465185982ca60519140 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
#include <stdint.h> | |
#include <stdio.h> | |
long int globl_cnt = 3; | |
void myfunc() { | |
int32_t a; // variable initialized with the value of %edi register | |
int64_t b = 0; | |
int32_t c = 0; | |
if(c - a < 0) { | |
b = c * a + b; | |
if(c & 1) { | |
globl_cnt += b; | |
} | |
else { | |
globl_cnt -= b; | |
c++; | |
} | |
} | |
printf("a=%d, b=%ld, c=%d\nglobl_cnt=%ld\n", a, b, c, globl_cnt); | |
} | |
int main(int argc, char const *argv[]) { | |
myfunc(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment