xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void show_usage(const char *progname) {
  printf("[Usage]\n"
         "  $ %s FILE [options]\n"
         "[Options]\n"
         "  -b, --bytecode\n"
         "    Show code in hexadecimal\n"
         "  -f, --filter\n"
         "    Visualize whitespace source code\n"
         "  -h, --help\n"
         "    Show help and exit\n"
         "  -m, --mnemonic\n"
         "    Show byte code in mnemonic format\n"
         "  -o FILE, --output=FILE\n"
         "    Specify output filename\n"
         "  -t, --translate\n"
         "    Translate brainfuck to C source code\n",
         progname);
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [342 x i8] c"[Usage]\0A $ %s FILE [options]\0A[Options]\0A -b, --bytecode\0A Show code in hexadecimal\0A -f, --filter\0A Visualize whitespace source code\0A -h, --help\0A Show help and exit\0A -m, --mnemonic\0A Show byte code in mnemonic format\0A -o FILE, --output=FILE\0A Specify output filename\0A -t, --translate\0A Translate brainfuck to C source code\0A\00"
define void @show_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([342 x i8], [342 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [342 x i8] c"[Usage]\0A $ %s FILE [options]\0A[Options]\0A -b, --bytecode\0A Show code in hexadecimal\0A -f, --filter\0A Visualize whitespace source code\0A -h, --help\0A Show help and exit\0A -m, --mnemonic\0A Show byte code in mnemonic format\0A -o FILE, --output=FILE\0A Specify output filename\0A -t, --translate\0A Translate brainfuck to C source code\0A\00"
define void @show_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([342 x i8], [342 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_sub(int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_neg_op();
void t16_rsb_rdn3() { arm_arith_sub(t16_data_neg_op()); }


x86 assembly (clang, -O0):
<t16_rsb_rdn3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <t16_data_neg_op@plt>
mov    %eax,%edi
call   1030 <arm_arith_sub@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_rsb_rdn3>:
push   %rax
xor    %eax,%eax
call   1040 <t16_data_neg_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <arm_arith_sub@plt>

LLVM IR (-O0):
define void @t16_rsb_rdn3() {
%1 = call i32 (...) @t16_data_neg_op()
%2 = call i32 @arm_arith_sub(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_rsb_rdn3() {
%1 = tail call i32 (...) @t16_data_neg_op()
%2 = tail call i32 @arm_arith_sub(i32 %1)
ret void
}
void ASN1_item_i2d_fp(void) {}


x86 assembly (clang, -O0):
<ASN1_item_i2d_fp>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_item_i2d_fp>:
ret

LLVM IR (-O0):
define void @ASN1_item_i2d_fp() {
ret void
}

LLVM IR (-O2):
define void @ASN1_item_i2d_fp() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, char *, int);
void print_usage(FILE *stream) {
  fprintf(stream,
          "Usage: hashgen [OPTIONS] [FILE]\nGenerate hashes of n-grams.\n\n -n "
          "NUM    n-gram length (default: %i)\n -o STR    prefix of output "
          "files (default: %s)\n -c NUM    number of output files (default: "
          "%i)\n -q        quiet; suppress all output except for errors\n\n -V "
          "       print version information and exit\n -h        display this "
          "help and exit\n\nWith no FILE, or when FILE is -, read standard "
          "input.\n\nProject home page: <http://code.google.com/p/onion/>\n",
          5, "hashes.", 10);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x5,%edx
lea    0x108c(%rip),%rcx
mov    $0xa,%r8d
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
lea    0xee9(%rip),%rsi
lea    0x10a1(%rip),%rcx
mov    $0x5,%edx
mov    $0xa,%r8d
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [447 x i8] c"Usage: hashgen [OPTIONS] [FILE]\0AGenerate hashes of n-grams.\0A\0A -n NUM n-gram length (default: %i)\0A -o STR prefix of output files (default: %s)\0A -c NUM number of output files (default: %i)\0A -q quiet; suppress all output except for errors\0A\0A -V print version information and exit\0A -h display this help and exit\0A\0AWith no FILE, or when FILE is -, read standard input.\0A\0AProject home page: <http://code.google.com/p/onion/>\0A\00"
@.str.1 = [8 x i8] c"hashes.\00"
define void @print_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([447 x i8], [447 x i8]* @.str, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret void
}

LLVM IR (-O2):
@.str = [447 x i8] c"Usage: hashgen [OPTIONS] [FILE]\0AGenerate hashes of n-grams.\0A\0A -n NUM n-gram length (default: %i)\0A -o STR prefix of output files (default: %s)\0A -c NUM number of output files (default: %i)\0A -q quiet; suppress all output except for errors\0A\0A -V print version information and exit\0A -h display this help and exit\0A\0AWith no FILE, or when FILE is -, read standard input.\0A\0AProject home page: <http://code.google.com/p/onion/>\0A\00"
@.str.1 = [8 x i8] c"hashes.\00"
define void @print_usage(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([447 x i8], [447 x i8]* @.str, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret void
}
int dumb_log_2(int k) {
  int r = -1;
  while (k > 0) {
    k >>= 1;
    r++;
  }
  return r;
}


x86 assembly (clang, -O0):
<dumb_log_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    112f <dumb_log_2+0x2f>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <dumb_log_2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumb_log_2>:
mov    $0xffffffff,%eax
test   %edi,%edi
jle    111c <dumb_log_2+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <dumb_log_2+0x10>
ret

LLVM IR (-O0):
define i32 @dumb_log_2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = ashr i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @dumb_log_2(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ -1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ -1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ flush_buffer();
int /*<<< orphan*/ stream_new_line();
void new_line(void) {
  flush_buffer();
  stream_new_line();
}


x86 assembly (clang, -O0):
<new_line>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <flush_buffer@plt>
mov    $0x0,%al
call   1030 <stream_new_line@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_line>:
push   %rax
xor    %eax,%eax
call   1040 <flush_buffer@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <stream_new_line@plt>

LLVM IR (-O0):
define void @new_line() {
%1 = call i32 (...) @flush_buffer()
%2 = call i32 (...) @stream_new_line()
ret void
}

LLVM IR (-O2):
define void @new_line() {
%1 = tail call i32 (...) @flush_buffer()
%2 = tail call i32 (...) @stream_new_line()
ret void
}
/* Variables and functions */
int addnumbers(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("sum = %d\n", 3 + 4);
  printf("sum2 = %d\n", addnumbers(6, 5));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    $0x6,%edi
mov    $0x5,%esi
call   1040 <addnumbers@plt>
mov    %eax,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    $0x6,%edi
mov    $0x5,%esi
call   1040 <addnumbers@plt>
lea    0xec2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"sum = %d\0A\00"
@.str.1 = [11 x i8] c"sum2 = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 7)
%7 = call i32 @addnumbers(i32 6, i32 5)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"sum = %d\0A\00"
@.str.1 = [11 x i8] c"sum2 = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 7)
%4 = tail call i32 @addnumbers(i32 6, i32 5)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ limitsInit();
void coreInitLimits(void) { limitsInit(); }


x86 assembly (clang, -O0):
<coreInitLimits>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <limitsInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<coreInitLimits>:
xor    %eax,%eax
jmp    1030 <limitsInit@plt>

LLVM IR (-O0):
define void @coreInitLimits() {
%1 = call i32 (...) @limitsInit()
ret void
}

LLVM IR (-O2):
define void @coreInitLimits() {
%1 = tail call i32 (...) @limitsInit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CG_DrawFlashFade();
int /*<<< orphan*/ CG_DrawFlashZoomTransition();
void CG_DrawFlashBlendBehindHUD(void) {
  CG_DrawFlashZoomTransition();
  CG_DrawFlashFade();
}


x86 assembly (clang, -O0):
<CG_DrawFlashBlendBehindHUD>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <CG_DrawFlashZoomTransition@plt>
mov    $0x0,%al
call   1030 <CG_DrawFlashFade@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_DrawFlashBlendBehindHUD>:
push   %rax
xor    %eax,%eax
call   1040 <CG_DrawFlashZoomTransition@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <CG_DrawFlashFade@plt>

LLVM IR (-O0):
define void @CG_DrawFlashBlendBehindHUD() {
%1 = call i32 (...) @CG_DrawFlashZoomTransition()
%2 = call i32 (...) @CG_DrawFlashFade()
ret void
}

LLVM IR (-O2):
define void @CG_DrawFlashBlendBehindHUD() {
%1 = tail call i32 (...) @CG_DrawFlashZoomTransition()
%2 = tail call i32 (...) @CG_DrawFlashFade()
ret void
}
/* Variables and functions */
int close(int);
int Close(int sockfd) { return close(sockfd); }


x86 assembly (clang, -O0):
<Close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Close>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @Close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @Close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int sockbuf_on_write(int, int, char const *, int);
int sockbuf_write(int idx, const char *data, int len) {
  return sockbuf_on_write(idx, 1000000, data, len);
}


x86 assembly (clang, -O0):
<sockbuf_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0xf4240,%esi
call   1030 <sockbuf_on_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sockbuf_write>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0xf4240,%esi
jmp    1030 <sockbuf_on_write@plt>

LLVM IR (-O0):
define i32 @sockbuf_write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @sockbuf_on_write(i32 %7, i32 1000000, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @sockbuf_write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @sockbuf_on_write(i32 %0, i32 1000000, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
double fromRep64(int);
double makeQNaN64() { return fromRep64(0x7ff8000000000000UL); }


x86 assembly (clang, -O0):
<makeQNaN64>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <fromRep64@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeQNaN64>:
xor    %edi,%edi
jmp    1030 <fromRep64@plt>

LLVM IR (-O0):
define double @makeQNaN64() {
%1 = call double @fromRep64(i32 0)
ret double %1
}

LLVM IR (-O2):
define double @makeQNaN64() {
%1 = tail call double @fromRep64(i32 0)
ret double %1
}
/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int /*<<< orphan*/ free(void *);
void *malloc(unsigned int);
int main() {
  union {
    void *p0;
    struct {
      char c[2];
      int p1;
      int p2;
    } str;
  } data;
  data.p0 = malloc(37U);
  if (__VERIFIER_nondet_int()) {
    data.str.p2 = 20;
  } else {
    data.str.p2 = 30;
  }
  if (20 > data.str.p2) {
    data.str.c[1] = sizeof data.str.p1;
  }
  free(data.p0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x25,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     116a <main+0x3a>
movl   $0x14,-0x10(%rbp)
jmp    1171 <main+0x41>
movl   $0x1e,-0x10(%rbp)
mov    $0x14,%eax
cmp    -0x10(%rbp),%eax
jle    1183 <main+0x53>
movb   $0x4,-0x17(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x25,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%union.anon = type { i8*, [8 x i8] }
%struct.anon = type { [2 x i8], i32, i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %union.anon
store i32 0, i32* %1
%3 = call i8* @malloc(i32 37)
%4 = bitcast %union.anon* %2 to i8**
store i8* %3, i8** %4
%5 = call i64 (...) @__VERIFIER_nondet_int()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = bitcast %union.anon* %2 to %struct.anon*
%9 = getelementptr inbounds %struct.anon, %struct.anon* %8, i32 0, i32 2
store i32 20, i32* %9
br label %13
10: ; preds = %0
%11 = bitcast %union.anon* %2 to %struct.anon*
%12 = getelementptr inbounds %struct.anon, %struct.anon* %11, i32 0, i32 2
store i32 30, i32* %12
br label %13
13: ; preds = %10, %7
%14 = bitcast %union.anon* %2 to %struct.anon*
%15 = getelementptr inbounds %struct.anon, %struct.anon* %14, i32 0, i32 2
%16 = load i32, i32* %15
%17 = icmp sgt i32 20, %16
br i1 %17, label %18, label %22
18: ; preds = %13
%19 = bitcast %union.anon* %2 to %struct.anon*
%20 = getelementptr inbounds %struct.anon, %struct.anon* %19, i32 0, i32 0
%21 = getelementptr inbounds [2 x i8], [2 x i8]* %20, i64 0, i64 1
store i8 4, i8* %21
br label %22
22: ; preds = %18, %13
%23 = bitcast %union.anon* %2 to i8**
%24 = load i8*, i8** %23
%25 = call i32 @free(i8* %24)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call dereferenceable_or_null(37) i8* @malloc(i32 37)
%2 = tail call i64 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
void mclose(unsigned int fd) {}


x86 assembly (clang, -O0):
<mclose>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mclose>:
ret

LLVM IR (-O0):
define void @mclose(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @mclose(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ messip_sin(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  messip_sin(NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <messip_sin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <messip_sin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @messip_sin(i32* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @messip_sin(i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart0SendChar(int /*<<< orphan*/);
void uart0SendChars(char *pBuff, unsigned short count) {
  while (count--)
    uart0SendChar(*pBuff++);
}


x86 assembly (clang, -O0):
<uart0SendChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %ax,%cx
add    $0xffff,%cx
mov    %cx,-0xa(%rbp)
cmp    $0x0,%ax
je     1158 <uart0SendChars+0x48>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <uart0SendChar@plt>
jmp    1123 <uart0SendChars+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart0SendChars>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1144 <uart0SendChars+0x34>
mov    %rdi,%r14
movzwl %si,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <uart0SendChar@plt>
add    $0x1,%rbx
cmp    %bx,%r15w
jne    1130 <uart0SendChars+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @uart0SendChars(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
br label %5
5: ; preds = %9, %2
%6 = load i16, i16* %4
%7 = add i16 %6, -1
store i16 %7, i16* %4
%8 = icmp ne i16 %6, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
%12 = load i8, i8* %10
%13 = sext i8 %12 to i32
%14 = call i32 @uart0SendChar(i32 %13)
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @uart0SendChars(i8* nocapture %0, i16 zeroext %1) {
%3 = icmp eq i16 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i16 [ %7, %4 ], [ %1, %2 ]
%6 = phi i8* [ %8, %4 ], [ %0, %2 ]
%7 = add i16 %5, -1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %6
%10 = sext i8 %9 to i32
%11 = tail call i32 @uart0SendChar(i32 %10)
%12 = icmp eq i16 %7, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
time_t time(time_t *tp) {
  time_t seconds;
  time_t milliseconds;
  int rc;
  return seconds;
}


x86 assembly (clang, -O0):
<time>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time>:
ret

LLVM IR (-O0):
define i32 @time(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @time(i32* nocapture readnone %0) {
ret i32 undef
}
int my_isspace(int c) {
  return (c == ' ') || (c == '\f') || (c == '\n') || (c == '\r') ||
         (c == '\t') || (c == '\v');
}


x86 assembly (clang, -O0):
<my_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
cmpl   $0xb,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_isspace>:
cmp    $0x20,%edi
ja     111d <my_isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111d <my_isspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xb,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @my_isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 12
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 13
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 9
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 11
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @my_isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void uv_system_init(void) {}


x86 assembly (clang, -O0):
<uv_system_init>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uv_system_init>:
ret

LLVM IR (-O0):
define void @uv_system_init() {
ret void
}

LLVM IR (-O2):
define void @uv_system_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EOPNOTSUPP;
int /*<<< orphan*/ errno;
int set_nodelay(int fd, void *optval, int optlen) {
  errno = EOPNOTSUPP;
  return -1;
}


x86 assembly (clang, -O0):
<set_nodelay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ecb(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nodelay>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @set_nodelay(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @EOPNOTSUPP
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @set_nodelay(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @EOPNOTSUPP
store i32 %4, i32* @errno
ret i32 -1
}
void gencvt_s_w() {}


x86 assembly (clang, -O0):
<gencvt_s_w>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gencvt_s_w>:
ret

LLVM IR (-O0):
define void @gencvt_s_w() {
ret void
}

LLVM IR (-O2):
define void @gencvt_s_w() {
ret void
}
int trailingZeroes(int n) {
  int res = 0;
  while ((n /= 5) != 0) {
    res += n;
  }
  return res;
}


x86 assembly (clang, -O0):
<trailingZeroes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1133 <trailingZeroes+0x33>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110e <trailingZeroes+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trailingZeroes>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%eax
movslq %edi,%rdx
imul   $0x66666667,%rdx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rdi
add    %ecx,%edi
add    $0x4,%edx
lea    (%rax,%rdi,1),%ecx
cmp    $0x8,%edx
ja     1110 <trailingZeroes+0x10>
ret

LLVM IR (-O0):
define i32 @trailingZeroes(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 5
store i32 %6, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, %9
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @trailingZeroes(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = phi i32 [ 0, %1 ], [ %8, %2 ]
%5 = sdiv i32 %3, 5
%6 = add i32 %3, 4
%7 = icmp ult i32 %6, 9
%8 = add nsw i32 %4, %5
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ log10(int /*<<< orphan*/);
int /*<<< orphan*/ luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
void math_log10(void) { lua_pushnumber(log10(luaL_check_number(1))); }


x86 assembly (clang, -O0):
<math_log10>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mov    %eax,%edi
call   1050 <log10@plt>
mov    %eax,%edi
call   1040 <lua_pushnumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_log10>:
push   %rax
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mov    %eax,%edi
call   1050 <log10@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_log10() {
%1 = call i32 @luaL_check_number(i32 1)
%2 = call i32 @log10(i32 %1)
%3 = call i32 @lua_pushnumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @math_log10() {
%1 = tail call i32 @luaL_check_number(i32 1)
%2 = tail call i32 @log10(i32 %1)
%3 = tail call i32 @lua_pushnumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char s[] = "Bangladesh";
  char *p;
  p = s;
  printf("Name of our country : %s\n", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0xf(%rbp)
mov    0xed7(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xecf(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0xf(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6564616c676e6142,%rax
61 64 65
mov    %rax,0x8(%rsp)
movl   $0x687365,0xf(%rsp)
lea    0xed9(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [11 x i8] c"Bangladesh\00"
@.str = [26 x i8] c"Name of our country : %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [11 x i8]* %2 to i8*
%5 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [11 x i8] c"Bangladesh\00"
@.str = [26 x i8] c"Name of our country : %s\0A\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void _Unwind_PNaClSetResult0() {}


x86 assembly (clang, -O0):
<_Unwind_PNaClSetResult0>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Unwind_PNaClSetResult0>:
ret

LLVM IR (-O0):
define void @_Unwind_PNaClSetResult0() {
ret void
}

LLVM IR (-O2):
define void @_Unwind_PNaClSetResult0() {
ret void
}
int main() {
  _Bool C_plus_plus;
  char *program_name = "flex";
  program_name = "Executable";
  if (program_name[0] != '\0' && program_name[strlen(program_name) - 1] == '+')
    C_plus_plus = 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xed4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1172 <main+0x62>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2b,%eax
jne    1172 <main+0x62>
movb   $0x1,-0x5(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"flex\00"
@.str.1 = [11 x i8] c"Executable\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %0
%10 = load i8*, i8** %3
%11 = load i8*, i8** %3
%12 = call i64 @strlen(i8* %11)
%13 = sub i64 %12, 1
%14 = getelementptr inbounds i8, i8* %10, i64 %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 43
br i1 %17, label %18, label %19
18: ; preds = %9
store i8 1, i8* %2
br label %19
19: ; preds = %18, %9, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int strcmp(const char *s1, const char *s2) {
  unsigned char c1, c2;
  do {
    c1 = *s1++;
    c2 = *s2++;
  } while (c1 != 0 && c1 == c2);
  return c1 - c2;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x12(%rbp)
movzbl -0x11(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x13(%rbp)
je     1156 <strcmp+0x56>
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x13(%rbp)
mov    -0x13(%rbp),%al
test   $0x1,%al
jne    110c <strcmp+0xc>
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%eax
movzbl (%rsi,%rcx,1),%edx
test   %eax,%eax
je     1124 <strcmp+0x24>
add    $0x1,%rcx
cmp    %dl,%al
je     1110 <strcmp+0x10>
movzbl %dl,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %7
7: ; preds = %24, %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
store i8 %10, i8* %5
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %4
%13 = load i8, i8* %11
store i8 %13, i8* %6
br label %14
14: ; preds = %7
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load i8, i8* %5
%20 = zext i8 %19 to i32
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = icmp eq i32 %20, %22
br label %24
24: ; preds = %18, %14
%25 = phi i1 [ false, %14 ], [ %23, %18 ]
br i1 %25, label %7, label %26
26: ; preds = %24
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = load i8, i8* %6
%30 = zext i8 %29 to i32
%31 = sub nsw i32 %28, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %8, %3 ]
%5 = phi i8* [ %0, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = load i8, i8* %4
%10 = icmp ne i8 %7, 0
%11 = icmp eq i8 %7, %9
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = zext i8 %9 to i32
%15 = zext i8 %7 to i32
%16 = sub nsw i32 %15, %14
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void glmCopyMatrix4f(const float source[16], float target[16]) {
  memcpy(target, source, 16 * sizeof(float));
}


x86 assembly (clang, -O0):
<glmCopyMatrix4f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x40,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmCopyMatrix4f>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x40,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @glmCopyMatrix4f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = load float*, float** %3
%7 = call i32 @memcpy(float* %5, float* %6, i32 64)
ret void
}

LLVM IR (-O2):
define void @glmCopyMatrix4f(float* %0, float* %1) {
%3 = tail call i32 @memcpy(float* %1, float* %0, i32 64)
ret void
}
int killpg(int pgid, int str) {}


x86 assembly (clang, -O0):
<killpg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<killpg>:
ret

LLVM IR (-O0):
define i32 @killpg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @killpg(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("*\n**\n***\n****\n*****\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"*\0A**\0A***\0A****\0A*****\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"*\0A**\0A***\0A****\0A*****\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *);
void dumpmapentry(void *data, const void *key, void *value) {
  FILE *fi = (FILE *)data;
  fprintf(fi, "%s=%s\n", (char *)key, (char *)value);
}


x86 assembly (clang, -O0):
<dumpmapentry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpmapentry>:
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee3(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s=%s\0A\00"
define void @dumpmapentry(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s=%s\0A\00"
define void @dumpmapentry(i8* nocapture %0, i8* %1, i8* %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_int_code();
void get_long_code(void) {
  get_int_code();
  get_int_code();
}


x86 assembly (clang, -O0):
<get_long_code>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_int_code@plt>
mov    $0x0,%al
call   1030 <get_int_code@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_long_code>:
push   %rax
xor    %eax,%eax
call   1030 <get_int_code@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <get_int_code@plt>

LLVM IR (-O0):
define void @get_long_code() {
%1 = call i32 (...) @get_int_code()
%2 = call i32 (...) @get_int_code()
ret void
}

LLVM IR (-O2):
define void @get_long_code() {
%1 = tail call i32 (...) @get_int_code()
%2 = tail call i32 (...) @get_int_code()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int var;
  int *ptr;
  int **pptr;
  var = 3000;
  ptr = &var;
  pptr = &ptr;
  printf("value of  var = %d\n", var);
  printf("value of at *ptr = %d\n", *ptr);
  printf("value of  at **pptr= %d\n", **pptr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xbb8,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xbb8,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0xbb8,%esi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0xbb8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"value of var = %d\0A\00"
@.str.1 = [23 x i8] c"value of at *ptr = %d\0A\00"
@.str.2 = [25 x i8] c"value of at **pptr= %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32**
store i32 3000, i32* %1
store i32* %1, i32** %2
store i32** %2, i32*** %3
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32**, i32*** %3
%10 = load i32*, i32** %9
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"value of var = %d\0A\00"
@.str.1 = [23 x i8] c"value of at *ptr = %d\0A\00"
@.str.2 = [25 x i8] c"value of at **pptr= %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 3000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 3000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 3000)
ret i32 0
}
/* Type definitions */
struct ether_addr {
  int dummy;
};

/* Variables and functions */
char const *__ether_line(char *, struct ether_addr *);
char *strpbrk(char *, char *);
const char *__ether_line_w(char *line, struct ether_addr *addr) {
  char *end = strpbrk(line, "#\n");
  if (end)
    *end = '\0';
  return __ether_line(line, addr);
}


x86 assembly (clang, -O0):
<__ether_line_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1156 <__ether_line_w+0x36>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__ether_line@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ether_line_w>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rsi
call   1040 <strpbrk@plt>
test   %rax,%rax
je     113e <__ether_line_w+0x1e>
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__ether_line@plt>

LLVM IR (-O0):
%struct.ether_addr = type { i32 }
@.str = [3 x i8] c"#\0A\00"
define i8* @__ether_line_w(i8* %0, %struct.ether_addr* %1) {
%3 = alloca i8*
%4 = alloca %struct.ether_addr*
%5 = alloca i8*
store i8* %0, i8** %3
store %struct.ether_addr* %1, %struct.ether_addr** %4
%6 = load i8*, i8** %3
%7 = call i8* @strpbrk(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i8*, i8** %5
store i8 0, i8* %11
br label %12
12: ; preds = %10, %2
%13 = load i8*, i8** %3
%14 = load %struct.ether_addr*, %struct.ether_addr** %4
%15 = call i8* @__ether_line(i8* %13, %struct.ether_addr* %14)
ret i8* %15
}

LLVM IR (-O2):
%struct.ether_addr = type { i32 }
@.str = [3 x i8] c"#\0A\00"
define i8* @__ether_line_w(i8* %0, %struct.ether_addr* %1) {
%3 = tail call i8* @strpbrk(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
store i8 0, i8* %3
br label %6
6: ; preds = %5, %2
%7 = tail call i8* @__ether_line(i8* %0, %struct.ether_addr* %1)
ret i8* %7
}
int copiarInt(void *destino, const void *origen) {
  int *d = (int *)destino;
  int *o = (int *)origen;
  *d = *o;
  return 0;
}


x86 assembly (clang, -O0):
<copiarInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copiarInt>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @copiarInt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = load i32*, i32** %5
store i32 %12, i32* %13
ret i32 0
}

LLVM IR (-O2):
define i32 @copiarInt(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %3
ret i32 0
}
/* Variables and functions */
unsigned int lrand48();
int makeLevel() {
  unsigned int r = lrand48();
  int i = 1;
  while ((r & 1) && (i < 32)) {
    i++;
    r = r >> 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<makeLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <lrand48@plt>
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <makeLevel+0x37>
cmpl   $0x20,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <makeLevel+0x47>
jmp    116e <makeLevel+0x5e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1129 <makeLevel+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeLevel>:
push   %rax
xor    %eax,%eax
call   1030 <lrand48@plt>
mov    $0x1,%ecx
test   $0x1,%al
je     1140 <makeLevel+0x30>
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rdx),%ecx
test   $0x2,%al
je     1140 <makeLevel+0x30>
shr    %eax
cmp    $0x1f,%edx
mov    %ecx,%edx
jb     1130 <makeLevel+0x20>
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @makeLevel() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @lrand48()
store i32 %3, i32* %1
store i32 1, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %1
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 32
br label %11
11: ; preds = %8, %4
%12 = phi i1 [ false, %4 ], [ %10, %8 ]
br i1 %12, label %13, label %18
13: ; preds = %11
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
%16 = load i32, i32* %1
%17 = lshr i32 %16, 1
store i32 %17, i32* %1
br label %4
18: ; preds = %11
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @makeLevel() {
%1 = tail call i32 (...) @lrand48()
%2 = and i32 %1, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ 1, %0 ]
%6 = phi i32 [ %8, %4 ], [ %1, %0 ]
%7 = add nuw nsw i32 %5, 1
%8 = lshr i32 %6, 1
%9 = and i32 %6, 2
%10 = icmp ne i32 %9, 0
%11 = icmp ult i32 %5, 31
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %4, label %13
13: ; preds = %4, %0
%14 = phi i32 [ 1, %0 ], [ %7, %4 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ gnu_get_libc_version();
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int main(void) {
  puts(gnu_get_libc_version());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <gnu_get_libc_version@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <gnu_get_libc_version@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @gnu_get_libc_version()
%3 = call i32 @puts(i32 %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @gnu_get_libc_version()
%2 = tail call i32 @puts(i32 %1)
ret i32 0
}