xunge/DecIR huggingface dataset:
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
void set_timeval(struct timeval *target, struct timeval *val) {
  target->tv_sec = val->tv_sec;
  target->tv_usec = val->tv_usec;
}


x86 assembly (clang, -O0):
<set_timeval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_timeval>:
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    (%rsi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define void @set_timeval(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%7 = load i32, i32* %6
%8 = load %struct.timeval*, %struct.timeval** %3
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
store i32 %7, i32* %9
%10 = load %struct.timeval*, %struct.timeval** %4
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = load %struct.timeval*, %struct.timeval** %3
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define void @set_timeval(%struct.timeval* nocapture writeonly %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
store i32 %7, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x7e() {
  Assert_real((isgraph(126)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              635, ("isgraph should be 1 for ~"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x7e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x27b,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x7e>:
push   %rax
mov    $0x7e,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x27b,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for ~\00"
define void @t_isgraph_0x7e() {
%1 = call i32 @isgraph(i32 126)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 635, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for ~\00"
define void @t_isgraph_0x7e() {
%1 = tail call i32 @isgraph(i32 126)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 635, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int obj6func1(int a __attribute__((unused))) { return 77; }


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

x86 assembly (clang, -O2):
<obj6func1>:
mov    $0x4d,%eax
ret

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

LLVM IR (-O2):
define i32 @obj6func1(i32 %0) {
ret i32 77
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void tklog_renderer_line(const char *str) { printf("%s\n", str); }


x86 assembly (clang, -O0):
<tklog_renderer_line>:
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):
<tklog_renderer_line>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @tklog_renderer_line(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void minimum(long double *result, const long double x, long double *unused) {
  *result = (((*result) < (x)) ? (*result) : (x));
}


x86 assembly (clang, -O0):
<minimum>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
fldt   -0x20(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jbe    1138 <minimum+0x38>
jmp    112a <minimum+0x2a>
mov    -0x8(%rbp),%rax
fldt   (%rax)
fstpt  -0x34(%rbp)
jmp    113e <minimum+0x3e>
fldt   -0x20(%rbp)
fstpt  -0x34(%rbp)
fldt   -0x34(%rbp)
mov    -0x8(%rbp),%rax
fstpt  (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimum>:
fldt   0x8(%rsp)
fldt   (%rdi)
fxch   %st(1)
fucomi %st(1),%st
fcmovnbe %st(1),%st
fstp   %st(1)
fstpt  (%rdi)
ret

LLVM IR (-O0):
define void @minimum(x86_fp80* %0, x86_fp80 %1, x86_fp80* %2) {
%4 = alloca x86_fp80*
%5 = alloca x86_fp80
%6 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %4
store x86_fp80 %1, x86_fp80* %5
store x86_fp80* %2, x86_fp80** %6
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = load x86_fp80, x86_fp80* %5
%10 = fcmp olt x86_fp80 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load x86_fp80*, x86_fp80** %4
%13 = load x86_fp80, x86_fp80* %12
br label %16
14: ; preds = %3
%15 = load x86_fp80, x86_fp80* %5
br label %16
16: ; preds = %14, %11
%17 = phi x86_fp80 [ %13, %11 ], [ %15, %14 ]
%18 = load x86_fp80*, x86_fp80** %4
store x86_fp80 %17, x86_fp80* %18
ret void
}

LLVM IR (-O2):
define void @minimum(x86_fp80* nocapture %0, x86_fp80 %1, x86_fp80* nocapture readnone %2) {
%4 = load x86_fp80, x86_fp80* %0
%5 = fcmp olt x86_fp80 %4, %1
%6 = select i1 %5, x86_fp80 %4, x86_fp80 %1
store x86_fp80 %6, x86_fp80* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sys_cfg_auth_usage(void) {
  printf("\nUsage : sys_cfg_auth [AUTHMODE]\n");
  printf("\nOptions: AUTHMODE :     0 - Open authentication");
  printf("\n                        1 - Shared key authentication");
  printf("\n         empty - Get current authenticaton mode\n");
  return;
}


x86 assembly (clang, -O0):
<print_sys_cfg_auth_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4b(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sys_cfg_auth_usage>:
push   %rax
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
call   1040 <printf@plt>
lea    0xf3d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"\0AUsage : sys_cfg_auth [AUTHMODE]\0A\00"
@.str.1 = [49 x i8] c"\0AOptions: AUTHMODE : 0 - Open authentication\00"
@.str.2 = [55 x i8] c"\0A 1 - Shared key authentication\00"
@.str.3 = [50 x i8] c"\0A empty - Get current authenticaton mode\0A\00"
define void @print_sys_cfg_auth_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [49 x i8] c"\0AOptions: AUTHMODE : 0 - Open authentication\00"
@.str.2 = [55 x i8] c"\0A 1 - Shared key authentication\00"
@str = [33 x i8] c"\0AUsage : sys_cfg_auth [AUTHMODE]\00"
@str.4 = [49 x i8] c"\0A empty - Get current authenticaton mode\00"
define void @print_sys_cfg_auth_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
int /*<<< orphan*/ dot();
void sW() {
  dot();
  dash();
  dash();
  cBreak();
}


x86 assembly (clang, -O0):
<sW>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1050 <cBreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sW>:
push   %rax
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cBreak@plt>

LLVM IR (-O0):
define void @sW() {
%1 = call i32 (...) @dot()
%2 = call i32 (...) @dash()
%3 = call i32 (...) @dash()
%4 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sW() {
%1 = tail call i32 (...) @dot()
%2 = tail call i32 (...) @dash()
%3 = tail call i32 (...) @dash()
%4 = tail call i32 (...) @cBreak()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ntohb4(int /*<<< orphan*/ *);
uint32_t ntohl(uint32_t network) { return ntohb4((uint8_t *)&network); }


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

x86 assembly (clang, -O2):
<ntohl>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ntohb4@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ntohl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ntohb4(i32* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @ntohl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ntohb4(i32* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x15() {
  Assert_real((isupper(21) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              110, ("isupper should be 0 for 0x15"));
}


x86 assembly (clang, -O0):
<t_isupper_0x15>:
push   %rbp
mov    %rsp,%rbp
mov    $0x15,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x6e,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x15>:
push   %rax
mov    $0x15,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x6e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x15\00"
define void @t_isupper_0x15() {
%1 = call i64 @isupper(i32 21)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x15\00"
define void @t_isupper_0x15() {
%1 = tail call i64 @isupper(i32 21)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  while (1) {
    if (x >= 0) {
      x = x - 1;
    } else {
      if (y < 0) {
        break;
      }
      y = y - 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114b <main+0x3b>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1163 <main+0x53>
cmpl   $0x0,-0xc(%rbp)
jge    115a <main+0x4a>
jmp    1168 <main+0x58>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   %ebx,%ebx
jns    113d <main+0x2d>
test   %eax,%eax
js     1142 <main+0x32>
add    $0xffffffff,%eax
jmp    1130 <main+0x20>
add    $0xffffffff,%ebx
jmp    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %0, %19
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %2
br label %19
12: ; preds = %6
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
br label %20
16: ; preds = %12
%17 = load i32, i32* %3
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %9
br label %6
20: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
br label %3
3: ; preds = %9, %0
%4 = phi i32 [ %10, %9 ], [ %1, %0 ]
%5 = phi i32 [ %8, %9 ], [ %2, %0 ]
%6 = icmp sgt i32 %4, -1
br label %7
7: ; preds = %3, %13
%8 = phi i32 [ %14, %13 ], [ %5, %3 ]
br i1 %6, label %9, label %11
9: ; preds = %7
%10 = add nsw i32 %4, -1
br label %3
11: ; preds = %7
%12 = icmp slt i32 %8, 0
br i1 %12, label %15, label %13
13: ; preds = %11
%14 = add nsw i32 %8, -1
br label %7
15: ; preds = %11
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int strlen(char *);
int strend(char *s, char *t) {
  int len_diff = strlen(s) - strlen(t);
  s += len_diff;
  return !strcmp(s, t) ? 1 : 0;
}


x86 assembly (clang, -O0):
<strend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %dl
xor    $0xff,%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strend>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebp
movslq %ebp,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @strend(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = sub nsw i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i8*, i8** %3
%13 = sext i32 %11 to i64
%14 = getelementptr inbounds i8, i8* %12, i64 %13
store i8* %14, i8** %3
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = call i32 @strcmp(i8* %15, i8* %16)
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 1, i32 0
ret i32 %21
}

LLVM IR (-O2):
define i32 @strend(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = sub nsw i32 %3, %4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(1) %1)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int Fail(char *where) {
  printf("FAIL %s\n", where);
  return 1;
}


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

x86 assembly (clang, -O2):
<Fail>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"FAIL %s\0A\00"
define i32 @Fail(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
int security_bprm_alloc(struct linux_binprm *bprm) { return 0; }


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

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

LLVM IR (-O0):
%struct.linux_binprm = type opaque
define i32 @security_bprm_alloc(%struct.linux_binprm* %0) {
%2 = alloca %struct.linux_binprm*
store %struct.linux_binprm* %0, %struct.linux_binprm** %2
ret i32 0
}

LLVM IR (-O2):
%struct.linux_binprm = type opaque
define i32 @security_bprm_alloc(%struct.linux_binprm* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
float pow2f(float);
float pow3f(float x) { return pow2f(x) * x; }


x86 assembly (clang, -O0):
<pow3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <pow2f@plt>
mulss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow3f>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <pow2f@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @pow3f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @pow2f(float %3)
%5 = load float, float* %2
%6 = fmul float %4, %5
ret float %6
}

LLVM IR (-O2):
define float @pow3f(float %0) {
%2 = tail call float @pow2f(float %0)
%3 = fmul float %2, %0
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int main() {
  int x;
  if (x == 10)
    exit(1);
  if (x == 10)
    assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    1143 <main+0x23>
mov    $0x1,%edi
call   1040 <exit@plt>
cmpl   $0xa,-0x8(%rbp)
jne    1154 <main+0x34>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 10
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @exit(i32 1)
unreachable
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 10
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @assert(i32 0)
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Msg(char *);
int /*<<< orphan*/ initialize();
int /*<<< orphan*/ play();
void pl_main(void) {
  initialize();
  Msg("Aye aye, Sir");
  play();
}


x86 assembly (clang, -O0):
<pl_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <initialize@plt>
lea    0xebe(%rip),%rdi
call   1030 <Msg@plt>
mov    $0x0,%al
call   1050 <play@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_main>:
push   %rax
xor    %eax,%eax
call   1040 <initialize@plt>
lea    0xec1(%rip),%rdi
call   1030 <Msg@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <play@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Aye aye, Sir\00"
define void @pl_main() {
%1 = call i32 (...) @initialize()
%2 = call i32 @Msg(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @play()
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Aye aye, Sir\00"
define void @pl_main() {
%1 = tail call i32 (...) @initialize()
%2 = tail call i32 @Msg(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @play()
ret void
}
/* Variables and functions */
int recvfrom(int, void *, unsigned int, int /*<<< orphan*/,
             int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int cs_recv_from_ctrl_sock(int fd, void *data, unsigned int data_len) {
  int ret;
  ret = recvfrom(fd, data, data_len, 0, NULL, NULL);
  if (ret < 0) {
    return -1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<cs_recv_from_ctrl_sock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%r8
call   1030 <recvfrom@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1154 <cs_recv_from_ctrl_sock+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <cs_recv_from_ctrl_sock+0x4a>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs_recv_from_ctrl_sock>:
push   %rax
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <recvfrom@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovs  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cs_recv_from_ctrl_sock(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = call i32 @recvfrom(i32 %9, i8* %10, i32 %11, i32 0, i32* null, i32* null)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %3
store i32 -1, i32* %4
br label %18
16: ; preds = %3
%17 = load i32, i32* %8
store i32 %17, i32* %4
br label %18
18: ; preds = %16, %15
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @cs_recv_from_ctrl_sock(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @recvfrom(i32 %0, i8* %1, i32 %2, i32 0, i32* null, i32* null)
%5 = icmp sgt i32 %4, -1
%6 = select i1 %5, i32 %4, i32 -1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ bar(double);
int /*<<< orphan*/ foo(double);
int main(int argc, char *argv[]) {
  double src = 7777.;
  foo(src);
  bar(src);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <foo@plt>
movsd  -0x18(%rbp),%xmm0
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <foo@plt>
movsd  0xeca(%rip),%xmm0
call   1030 <bar@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**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 7.777000e+03, double* %6
%7 = load double, double* %6
%8 = call i32 @foo(double %7)
%9 = load double, double* %6
%10 = call i32 @bar(double %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(double 7.777000e+03)
%4 = tail call i32 @bar(double 7.777000e+03)
ret i32 0
}
/* Variables and functions */
int strcmp(char *, char *);
int compare(const void *p, const void *q) {
  return (strcmp(*(char **)p, *(char **)q));
}


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

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t max(uint8_t x, uint8_t y) { return x > y ? x : y; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
scalar_t__ lettersForNum(int);
int totalForRange(int min, int max) {
  int total = 0;
  for (int n = min; n <= max; n++) {
    total += lettersForNum(n);
  }
  return total;
}


x86 assembly (clang, -O0):
<totalForRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     115a <totalForRange+0x4a>
mov    -0x10(%rbp),%edi
call   1030 <lettersForNum@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112b <totalForRange+0x1b>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<totalForRange>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
cmp    %esi,%edi
jg     1141 <totalForRange+0x31>
mov    %esi,%r14d
mov    %edi,%ebp
add    $0x1,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebp,%edi
call   1030 <lettersForNum@plt>
add    %eax,%ebx
add    $0x1,%ebp
cmp    %ebp,%r14d
jne    1130 <totalForRange+0x20>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @totalForRange(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%7 = load i32, i32* %3
store i32 %7, i32* %6
br label %8
8: ; preds = %19, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load i32, i32* %6
%14 = call i64 @lettersForNum(i32 %13)
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = add nsw i64 %16, %14
%18 = trunc i64 %17 to i32
store i32 %18, i32* %5
br label %19
19: ; preds = %12
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %8
22: ; preds = %8
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @totalForRange(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %6, %2
%5 = phi i32 [ 0, %2 ], [ %11, %6 ]
ret i32 %5
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ %0, %2 ]
%8 = phi i32 [ %11, %6 ], [ 0, %2 ]
%9 = tail call i64 @lettersForNum(i32 %7)
%10 = trunc i64 %9 to i32
%11 = add i32 %8, %10
%12 = add i32 %7, 1
%13 = icmp eq i32 %7, %1
br i1 %13, label %4, label %6
}
/* Variables and functions */
double exp(double const);
double gaussian_activate(const double x) { return exp(-x * x); }


x86 assembly (clang, -O0):
<gaussian_activate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gaussian_activate>:
movapd 0xee8(%rip),%xmm1
xorpd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @gaussian_activate(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = call double @exp(double %6)
ret double %7
}

LLVM IR (-O2):
define double @gaussian_activate(double %0) {
%2 = fneg double %0
%3 = fmul double %2, %0
%4 = tail call double @exp(double %3)
ret double %4
}
/* Variables and functions */
int test00(int, int);
int test01(int a, int b, int c, int d) { return test00(a, b) + c; }


x86 assembly (clang, -O0):
<test01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <test00@plt>
add    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test01>:
push   %rbx
mov    %edx,%ebx
call   1030 <test00@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test01(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @test00(i32 %9, i32 %10)
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @test01(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @test00(i32 %0, i32 %1)
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Variables and functions */
double CumSumSq(double *, int);
double scalCumSumSq(double *xa, int n) { return CumSumSq(xa, n); }


x86 assembly (clang, -O0):
<scalCumSumSq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <CumSumSq@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalCumSumSq>:
jmp    1030 <CumSumSq@plt>

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

LLVM IR (-O2):
define double @scalCumSumSq(double* %0, i32 %1) {
%3 = tail call double @CumSumSq(double* %0, i32 %1)
ret double %3
}
void vbe_biosfn_save_restore_state(AX, DL, CX, ES, BX) {}


x86 assembly (clang, -O0):
<vbe_biosfn_save_restore_state>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vbe_biosfn_save_restore_state(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
define void @vbe_biosfn_save_restore_state(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret void
}
int startwin_idle(void *s) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @startwin_idle(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *native_int_to_s(int recv, int len) {
  char *str = malloc(len + 1);
  sprintf(str, "%d", recv);
  return str;
}


x86 assembly (clang, -O0):
<native_int_to_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb5(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<native_int_to_s>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0x1(%rsi),%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec9(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @native_int_to_s(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = call i8* @malloc(i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i32, i32* %3
%11 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i8*, i8** %5
ret i8* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define noalias i8* @native_int_to_s(i32 %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ PHYSFS_setErrorCode(int /*<<< orphan*/);
int /*<<< orphan*/ zlib_error_code(int const);
int zlib_err(const int rc) {
  PHYSFS_setErrorCode(zlib_error_code(rc));
  return rc;
}


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

x86 assembly (clang, -O2):
<zlib_err>:
push   %rbx
mov    %edi,%ebx
call   1040 <zlib_error_code@plt>
mov    %eax,%edi
call   1030 <PHYSFS_setErrorCode@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @zlib_err(i32 returned %0) {
%2 = tail call i32 @zlib_error_code(i32 %0)
%3 = tail call i32 @PHYSFS_setErrorCode(i32 %2)
ret i32 %0
}
/* Variables and functions */
int base64_decode_block(char *, int *, void const *, int);
int decode_block(char *dst, int *dstlen, const void *src, int srclen) {
  return (base64_decode_block(dst, dstlen, src, srclen));
}


x86 assembly (clang, -O0):
<decode_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <base64_decode_block@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_block>:
jmp    1030 <base64_decode_block@plt>

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

LLVM IR (-O2):
define i32 @decode_block(i8* %0, i32* %1, i8* %2, i32 %3) {
%5 = tail call i32 @base64_decode_block(i8* %0, i32* %1, i8* %2, i32 %3)
ret i32 %5
}
float Back__easeIn(float t, float b, float c, float d, float s, float p1) {
  if (-1 == s) {
    s = 1.70158f;
  }
  float postFix = t /= d;
  return c * (postFix)*t * ((s + 1) * t - s) + b;
}


x86 assembly (clang, -O0):
<Back__easeIn>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  0xed6(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jne    1147 <Back__easeIn+0x47>
jp     1147 <Back__easeIn+0x47>
movss  0xec2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xe92(%rip),%xmm2
addss  -0x14(%rbp),%xmm2
movss  -0x4(%rbp),%xmm3
movss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm3,%xmm2
addss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Back__easeIn>:
movss  0xef8(%rip),%xmm5
cmpeqss %xmm4,%xmm5
movss  0xeef(%rip),%xmm6
andps  %xmm5,%xmm6
andnps %xmm4,%xmm5
orps   %xmm6,%xmm5
divss  %xmm3,%xmm0
mulss  %xmm0,%xmm2
mulss  %xmm0,%xmm2
movss  0xed6(%rip),%xmm3
addss  %xmm5,%xmm3
mulss  %xmm3,%xmm0
subss  %xmm5,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Back__easeIn(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%14 = load float, float* %11
%15 = fcmp oeq float -1.000000e+00, %14
br i1 %15, label %16, label %17
16: ; preds = %6
store float 0x3FFB39AC00000000, float* %11
br label %17
17: ; preds = %16, %6
%18 = load float, float* %10
%19 = load float, float* %7
%20 = fdiv float %19, %18
store float %20, float* %7
store float %20, float* %13
%21 = load float, float* %9
%22 = load float, float* %13
%23 = fmul float %21, %22
%24 = load float, float* %7
%25 = fmul float %23, %24
%26 = load float, float* %11
%27 = fadd float %26, 1.000000e+00
%28 = load float, float* %7
%29 = load float, float* %11
%30 = fneg float %29
%31 = call float @llvm.fmuladd.f32(float %27, float %28, float %30)
%32 = load float, float* %8
%33 = call float @llvm.fmuladd.f32(float %25, float %31, float %32)
ret float %33
}

LLVM IR (-O2):
define float @Back__easeIn(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fcmp oeq float %4, -1.000000e+00
%8 = select i1 %7, float 0x3FFB39AC00000000, float %4
%9 = fdiv float %0, %3
%10 = fmul float %9, %2
%11 = fmul float %9, %10
%12 = fadd float %8, 1.000000e+00
%13 = fneg float %8
%14 = tail call float @llvm.fmuladd.f32(float %12, float %9, float %13)
%15 = tail call float @llvm.fmuladd.f32(float %11, float %14, float %1)
ret float %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ KAPI_save_as_header_String_always(int /*<<< orphan*/ *,
                                                     char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void KAPI_save_as_header_String_list_always(FILE *fp, char *pch) {
  FILE *fpTmp = fp;
  KAPI_save_as_header_String_always(fp, pch);
  fwrite(",", sizeof(char), 1, fpTmp);
}


x86 assembly (clang, -O0):
<KAPI_save_as_header_String_list_always>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <KAPI_save_as_header_String_always@plt>
mov    -0x18(%rbp),%rcx
lea    0xeb0(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KAPI_save_as_header_String_list_always>:
push   %rbx
mov    %rdi,%rbx
call   1030 <KAPI_save_as_header_String_always@plt>
mov    $0x2c,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <fputc@plt>

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define void @KAPI_save_as_header_String_list_always(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32*, i32** %3
store i32* %6, i32** %5
%7 = load i32*, i32** %3
%8 = load i8*, i8** %4
%9 = call i32 @KAPI_save_as_header_String_always(i32* %7, i8* %8)
%10 = load i32*, i32** %5
%11 = call i32 @fwrite(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32* %10)
ret void
}

LLVM IR (-O2):
define void @KAPI_save_as_header_String_list_always(i32* %0, i8* %1) {
%3 = tail call i32 @KAPI_save_as_header_String_always(i32* %0, i8* %1)
%4 = tail call i32 @fputc(i32 44, i32* %0)
ret void
}
/* Type definitions */
struct mem_block {
  int dummy;
};

/* Variables and functions */
struct mem_block *mem_block_end(struct mem_block *);
void *mem_heap_end();
struct mem_block *mem_block_next(struct mem_block *block) {
  block = mem_block_end(block);
  if ((void *)block == mem_heap_end()) {
    return NULL;
  }
  return block;
}


x86 assembly (clang, -O0):
<mem_block_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mem_block_end@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <mem_heap_end@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jne    1165 <mem_block_next+0x45>
movq   $0x0,-0x8(%rbp)
jmp    116d <mem_block_next+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_block_next>:
push   %r14
push   %rbx
push   %rax
call   1040 <mem_block_end@plt>
mov    %rax,%r14
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <mem_heap_end@plt>
cmp    %r14,%rax
cmovne %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.mem_block = type { i32 }
define %struct.mem_block* @mem_block_next(%struct.mem_block* %0) {
%2 = alloca %struct.mem_block*
%3 = alloca %struct.mem_block*
store %struct.mem_block* %0, %struct.mem_block** %3
%4 = load %struct.mem_block*, %struct.mem_block** %3
%5 = call %struct.mem_block* @mem_block_end(%struct.mem_block* %4)
store %struct.mem_block* %5, %struct.mem_block** %3
%6 = load %struct.mem_block*, %struct.mem_block** %3
%7 = bitcast %struct.mem_block* %6 to i8*
%8 = call i8* (...) @mem_heap_end()
%9 = icmp eq i8* %7, %8
br i1 %9, label %10, label %11
10: ; preds = %1
store %struct.mem_block* null, %struct.mem_block** %2
br label %13
11: ; preds = %1
%12 = load %struct.mem_block*, %struct.mem_block** %3
store %struct.mem_block* %12, %struct.mem_block** %2
br label %13
13: ; preds = %11, %10
%14 = load %struct.mem_block*, %struct.mem_block** %2
ret %struct.mem_block* %14
}

LLVM IR (-O2):
%struct.mem_block = type { i32 }
define %struct.mem_block* @mem_block_next(%struct.mem_block* %0) {
%2 = tail call %struct.mem_block* @mem_block_end(%struct.mem_block* %0)
%3 = bitcast %struct.mem_block* %2 to i8*
%4 = tail call i8* (...) @mem_heap_end()
%5 = icmp eq i8* %4, %3
%6 = select i1 %5, %struct.mem_block* null, %struct.mem_block* %2
ret %struct.mem_block* %6
}