xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void string_closer(void *data) { free(data); }


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

x86 assembly (clang, -O2):
<string_closer>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @string_closer(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned short IPCLiteMtoCBootBranch(unsigned long ulAddress) {
  unsigned short returnStatus;
  if ((*((volatile unsigned long *)(0x400FB700 + 0x000000010))) &
      (0x00000001 | 0x80000000)) {
    returnStatus = 0x0001;
  } else {
    (*((volatile unsigned long *)(0x400FB700 + 0x000000030))) = 0x00000011;
    (*((volatile unsigned long *)(0x400FB700 + 0x000000034))) = ulAddress;
    (*((volatile unsigned long *)(0x400FB700 + 0x000000008))) |=
        (0x00000001 | 0x80000000);
    returnStatus = 0x0000;
  }
  return returnStatus;
}


x86 assembly (clang, -O0):
<IPCLiteMtoCBootBranch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x400fb710,%eax
mov    (%rax),%rax
movabs $0x80000001,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     1132 <IPCLiteMtoCBootBranch+0x32>
movw   $0x1,-0xa(%rbp)
jmp    116d <IPCLiteMtoCBootBranch+0x6d>
mov    $0x400fb730,%eax
movq   $0x11,(%rax)
mov    -0x8(%rbp),%rcx
mov    $0x400fb734,%eax
mov    %rcx,(%rax)
mov    $0x400fb708,%eax
mov    (%rax),%rcx
movabs $0x80000001,%rax
or     %rax,%rcx
mov    $0x400fb708,%eax
mov    %rcx,(%rax)
movw   $0x0,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IPCLiteMtoCBootBranch>:
mov    0x400fb710,%rcx
40
and    $0x80000001,%ecx
mov    $0x1,%ax
test   %rcx,%rcx
je     1118 <IPCLiteMtoCBootBranch+0x18>
ret
movq   $0x11,0x400fb730
mov    %rdi,0x400fb734
40
mov    $0x80000001,%eax
or     %rax,0x400fb708
40
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i16 @IPCLiteMtoCBootBranch(i64 %0) {
%2 = alloca i64
%3 = alloca i16
store i64 %0, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074771728 to i64*)
%5 = and i64 %4, 2147483649
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i16 1, i16* %3
br label %12
8: ; preds = %1
store volatile i64 17, i64* inttoptr (i64 1074771760 to i64*)
%9 = load i64, i64* %2
store volatile i64 %9, i64* inttoptr (i64 1074771764 to i64*)
%10 = load volatile i64, i64* inttoptr (i64 1074771720 to i64*)
%11 = or i64 %10, 2147483649
store volatile i64 %11, i64* inttoptr (i64 1074771720 to i64*)
store i16 0, i16* %3
br label %12
12: ; preds = %8, %7
%13 = load i16, i16* %3
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @IPCLiteMtoCBootBranch(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074771728 to i64*)
%3 = and i64 %2, 2147483649
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
store volatile i64 17, i64* inttoptr (i64 1074771760 to i64*)
store volatile i64 %0, i64* inttoptr (i64 1074771764 to i64*)
%6 = load volatile i64, i64* inttoptr (i64 1074771720 to i64*)
%7 = or i64 %6, 2147483649
store volatile i64 %7, i64* inttoptr (i64 1074771720 to i64*)
br label %8
8: ; preds = %1, %5
%9 = phi i16 [ 0, %5 ], [ 1, %1 ]
ret i16 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xd9() {
  Assert_real((isodigit(217) == 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_isodigit.c",
              1090, ("isodigit should be 0 for 0xd9"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xd9>:
push   %rax
mov    $0xd9,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x442,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xd9\00"
define void @t_isodigit_0xd9() {
%1 = call i64 @isodigit(i32 217)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1090, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xd9\00"
define void @t_isodigit_0xd9() {
%1 = tail call i64 @isodigit(i32 217)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1090, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int HelpItem38(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @HelpItem38() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem38() {
ret i32 0
}
void use_syslog(int kind, char *msg) {}


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

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

LLVM IR (-O0):
define void @use_syslog(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @use_syslog(i32 %0, i8* nocapture %1) {
ret void
}
int cvmx_helper_get_ipd_port(int interface, int port) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cvmx_helper_get_ipd_port(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abortTimeslice();
int /*<<< orphan*/ isLiftAboveRobot();
void waitLiftAboveRobot() {
  while (!isLiftAboveRobot()) {
    abortTimeslice();
  }
}


x86 assembly (clang, -O0):
<waitLiftAboveRobot>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <waitLiftAboveRobot+0x9>
mov    $0x0,%al
call   1040 <isLiftAboveRobot@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1145 <waitLiftAboveRobot+0x25>
jmp    1151 <waitLiftAboveRobot+0x31>
mov    $0x0,%al
call   1030 <abortTimeslice@plt>
jmp    1129 <waitLiftAboveRobot+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitLiftAboveRobot>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <isLiftAboveRobot@plt>
test   %eax,%eax
jne    1144 <waitLiftAboveRobot+0x24>
xor    %eax,%eax
call   1030 <abortTimeslice@plt>
jmp    1130 <waitLiftAboveRobot+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @waitLiftAboveRobot() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @isLiftAboveRobot()
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abortTimeslice()
br label %1
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @waitLiftAboveRobot() {
%1 = tail call i32 (...) @isLiftAboveRobot()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0, %3
%4 = tail call i32 (...) @abortTimeslice()
%5 = tail call i32 (...) @isLiftAboveRobot()
%6 = icmp eq i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() {
  int a = 3, b = 2;
  if (a > b) {
    f(a);
  } else {
    f(b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1146 <main+0x36>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
jmp    114e <main+0x3e>
mov    -0xc(%rbp),%edi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 3)
ret i32 0
}
/* Type definitions */
struct timeval {
  unsigned long tv_sec;
  unsigned long tv_usec;
};

/* Variables and functions */
unsigned long time_elapsed(struct timeval *last, struct timeval *current) {
  unsigned long secs, usecs, diff;
  secs = current->tv_sec - last->tv_sec;
  usecs = current->tv_usec - last->tv_usec;
  diff = 1000000 * secs + usecs;
  return (diff);
}


x86 assembly (clang, -O0):
<time_elapsed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x8(%rbp),%rcx
sub    0x8(%rcx),%rax
mov    %rax,-0x20(%rbp)
imul   $0xf4240,-0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_elapsed>:
mov    (%rsi),%rax
mov    0x8(%rsi),%rcx
sub    (%rdi),%rax
sub    0x8(%rdi),%rcx
imul   $0xf4240,%rax,%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @time_elapsed(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%8 = load %struct.timeval*, %struct.timeval** %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = load %struct.timeval*, %struct.timeval** %3
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 0
%13 = load i64, i64* %12
%14 = sub i64 %10, %13
store i64 %14, i64* %5
%15 = load %struct.timeval*, %struct.timeval** %4
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 1
%17 = load i64, i64* %16
%18 = load %struct.timeval*, %struct.timeval** %3
%19 = getelementptr inbounds %struct.timeval, %struct.timeval* %18, i32 0, i32 1
%20 = load i64, i64* %19
%21 = sub i64 %17, %20
store i64 %21, i64* %6
%22 = load i64, i64* %5
%23 = mul i64 1000000, %22
%24 = load i64, i64* %6
%25 = add i64 %23, %24
store i64 %25, i64* %7
%26 = load i64, i64* %7
ret i64 %26
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @time_elapsed(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i64, i64* %5
%7 = sub i64 %4, %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%11 = load i64, i64* %10
%12 = sub i64 %9, %11
%13 = mul i64 %7, 1000000
%14 = add i64 %12, %13
ret i64 %14
}
int f_ge_rr2(float a1, float a2) { return !(((a1) >= (a2))); }


x86 assembly (clang, -O0):
<f_ge_rr2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_ge_rr2>:
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setb   %al
ret

LLVM IR (-O0):
define i32 @f_ge_rr2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp oge float %5, %6
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_ge_rr2(float %0, float %1) {
%3 = fcmp ult float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ test_nu();
int /*<<< orphan*/ test_u();
int main(void) {
  test_u();
  test_nu();
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_u@plt>
mov    $0x0,%al
call   1040 <test_nu@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_u@plt>
xor    %eax,%eax
call   1040 <test_nu@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_u()
%3 = call i32 (...) @test_nu()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_u()
%2 = tail call i32 (...) @test_nu()
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr, "Usage: fsaexists [-ip d/s[dr]] [-op d/s] [-silent] [-v] "
                  "[-l/-h] filename\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<badusage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [74 x i8] c"Usage: fsaexists [-ip d/s[dr]] [-op d/s] [-silent] [-v] [-l/-h] filename\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [74 x i8] c"Usage: fsaexists [-ip d/s[dr]] [-op d/s] [-silent] [-v] [-l/-h] filename\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int c097(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @c097() {
ret i32 0
}

LLVM IR (-O2):
define i32 @c097() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void handle_fatal_error(char *message) {
  fprintf(stderr, "%s", message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<handle_fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_fatal_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@EXIT_FAILURE = global i32 0
define void @handle_fatal_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@EXIT_FAILURE = global i32 0
define void @handle_fatal_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ patch_op_imm(void *, void *, int /*<<< orphan*/,
                                int /*<<< orphan*/, int);
void patch_op_imm16(void *out, void *in, uint16_t imm) {
  patch_op_imm(out, in, imm, 0, 16);
}


x86 assembly (clang, -O0):
<patch_op_imm16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
mov    $0x10,%r8d
call   1030 <patch_op_imm@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<patch_op_imm16>:
xor    %ecx,%ecx
mov    $0x10,%r8d
jmp    1030 <patch_op_imm@plt>

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

LLVM IR (-O2):
define void @patch_op_imm16(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @patch_op_imm(i8* %0, i8* %1, i32 %2, i32 0, i32 16)
ret void
}
void *mocking_json_run_filename(const char *filename) {
  int result = 233;
  return (void *)result;
}


x86 assembly (clang, -O0):
<mocking_json_run_filename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xe9,-0xc(%rbp)
movslq -0xc(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @mocking_json_run_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 233, i32* %3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @mocking_json_run_filename(i8* nocapture readnone %0) {
ret i8* inttoptr (i64 233 to i8*)
}
/* Variables and functions */
double INT_MAX;
extern double cmax_int() { return INT_MAX; }


x86 assembly (clang, -O0):
<cmax_int>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmax_int>:
mov    0x2ee1(%rip),%rax
movsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@INT_MAX = global double 0.000000e+00
define double @cmax_int() {
%1 = load double, double* @INT_MAX
ret double %1
}

LLVM IR (-O2):
@INT_MAX = global double 0.000000e+00
define double @cmax_int() {
%1 = load double, double* @INT_MAX
ret double %1
}
void genjal() {}


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

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

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

LLVM IR (-O2):
define void @genjal() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int file_open(const char *path) { return open(path, O_RDONLY, 0); }


x86 assembly (clang, -O0):
<file_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_open>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @file_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDONLY
%5 = call i32 @open(i8* %3, i32 %4, i32 0)
ret i32 %5
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @file_open(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_store_sd(double *, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_storeh_pd(double *, int /*<<< orphan*/);
void store_2(__m128d val, double *a) {
  _mm_store_sd(&a[1], val);
  _mm_storeh_pd(&a[2], val);
}


x86 assembly (clang, -O0):
<store_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
mov    -0x4(%rbp),%esi
call   1040 <_mm_store_sd@plt>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x4(%rbp),%esi
call   1030 <_mm_storeh_pd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_2>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x8(%rsi),%rdi
mov    %ebp,%esi
call   1040 <_mm_store_sd@plt>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_mm_storeh_pd@plt>

LLVM IR (-O0):
define void @store_2(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 1
%7 = load i32, i32* %3
%8 = call i32 @_mm_store_sd(double* %6, i32 %7)
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i64 2
%11 = load i32, i32* %3
%12 = call i32 @_mm_storeh_pd(double* %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @store_2(i32 %0, double* %1) {
%3 = getelementptr inbounds double, double* %1, i64 1
%4 = tail call i32 @_mm_store_sd(double* %3, i32 %0)
%5 = getelementptr inbounds double, double* %1, i64 2
%6 = tail call i32 @_mm_storeh_pd(double* %5, i32 %0)
ret void
}
/* Variables and functions */
int nybble(char const);
unsigned char unhex(const char *data) {
  return (nybble(data[0]) << 4) | nybble(data[1]);
}


x86 assembly (clang, -O0):
<unhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <nybble@plt>
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <nybble@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
or     %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unhex>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <nybble@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
movsbl 0x1(%rbx),%edi
call   1030 <nybble@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @unhex(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call i32 @nybble(i8 signext %5)
%7 = shl i32 %6, 4
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = call i32 @nybble(i8 signext %10)
%12 = or i32 %7, %11
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @unhex(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @nybble(i8 signext %2)
%4 = shl i32 %3, 4
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = tail call i32 @nybble(i8 signext %6)
%8 = or i32 %7, %4
%9 = trunc i32 %8 to i8
ret i8 %9
}
void genc_ngle_s() {}


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

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

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

LLVM IR (-O2):
define void @genc_ngle_s() {
ret void
}
/* Variables and functions */
int help();
int go(void) { return (help() + 1); }


x86 assembly (clang, -O0):
<go>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <help@plt>
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<go>:
push   %rax
xor    %eax,%eax
call   1030 <help@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @go() {
%1 = call i32 (...) @help()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @go() {
%1 = tail call i32 (...) @help()
%2 = add nsw i32 %1, 1
ret i32 %2
}
int cmatch(char c, char mstr[]) {
  int e;
  for (e = 0; mstr[e] != '\0'; ++e) {
    if (c == mstr[e]) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmatch>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1161 <cmatch+0x61>
movsbl -0x5(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    114e <cmatch+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1168 <cmatch+0x68>
jmp    1153 <cmatch+0x53>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <cmatch+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmatch>:
mov    (%rsi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <cmatch+0x20>
add    $0x1,%rsi
nopl   0x0(%rax)
cmp    %dil,%cl
je     1121 <cmatch+0x21>
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <cmatch+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @cmatch(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %1, i64 %13
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %13, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = icmp eq i8 %11, %0
%13 = add nuw i64 %10, 1
br i1 %12, label %14, label %5
14: ; preds = %9, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
bool strhasprefix(const char *str, const char *prefix) {
  return (strncmp(str, prefix, strlen(prefix)) == 0);
}


x86 assembly (clang, -O0):
<strhasprefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strhasprefix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @strhasprefix(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 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @strhasprefix(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void glutBitmapCharacter(void *font, int character) {}


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

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

LLVM IR (-O0):
define void @glutBitmapCharacter(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @glutBitmapCharacter(i8* nocapture %0, i32 %1) {
ret void
}
void ff_hevc_put_hevc_uni_qpel_v48_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v48_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello world!\n");
  return 1;
}


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>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x4_setup() {
  char cmd[256];
  sprintf(cmd,
          "iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x4_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x4_setup>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x4_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x4_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("The sum of x and y is %d\n", 5 + 8);
  ;
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"The sum of x and y is %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 13)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"The sum of x and y is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 13)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwaddstr(int /*<<< orphan*/ *, int, int, char *);
void draw_arrow(WINDOW *win, int y, int x) { mvwaddstr(win, y, x, ">>"); }


x86 assembly (clang, -O0):
<draw_arrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xecd(%rip),%rcx
call   1030 <mvwaddstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_arrow>:
lea    0xee9(%rip),%rcx
jmp    1030 <mvwaddstr@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c">>\00"
define void @draw_arrow(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @mvwaddstr(i32* %0, i32 %1, i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
int Operand_mr2_decode(unsigned int *valp __attribute__((__unused__))) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @Operand_mr2_decode(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int clear_quaddobl_data(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(248, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_quaddobl_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xf8,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_quaddobl_data>:
mov    $0xf8,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @clear_quaddobl_data() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 248, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_quaddobl_data() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 248, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int rf_clamp_int(int min, int max, int in) {
  if (in > max)
    return max;
  if (in < min)
    return min;
  return in;
}


x86 assembly (clang, -O0):
<rf_clamp_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1124 <rf_clamp_int+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <rf_clamp_int+0x41>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113b <rf_clamp_int+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <rf_clamp_int+0x41>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rf_clamp_int>:
mov    %edi,%eax
cmp    %edi,%edx
cmovge %edx,%eax
cmp    %esi,%edx
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @rf_clamp_int(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
%5 = icmp slt i32 %2, %0
%6 = select i1 %5, i32 %0, i32 %2
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *mystrdup(char *s) {
  char *p;
  p = (char *)malloc(strlen(s) + 1);
  if (p != NULL) {
    strcpy(p, s);
  }
  return p;
}


x86 assembly (clang, -O0):
<mystrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <mystrdup+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <mystrdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mystrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
br label %15
15: ; preds = %11, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @mystrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %7, %1
ret i8* %5
}
void brcmf_debugfs_init(void) {}


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

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

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

LLVM IR (-O2):
define void @brcmf_debugfs_init() {
ret void
}
/* Type definitions */
typedef scalar_t__ __m64;

/* Variables and functions */
long long __attribute__((__always___, __nodebug__)) _mm_cvtm64_si64(__m64 __m) {
  return (long long)__m;
}


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

x86 assembly (clang, -O2):
<_mm_cvtm64_si64>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @_mm_cvtm64_si64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret i64 %3
}

LLVM IR (-O2):
define i64 @_mm_cvtm64_si64(i64 returned %0) {
ret i64 %0
}
void uexit(exitcode) int exitcode;
{
  if (exitcode == 0)
    exit(1);
  else
    exit(exitcode);
}


x86 assembly (clang, -O0):
<uexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112f <uexit+0x1f>
mov    $0x1,%edi
call   1030 <exit@plt>
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<uexit>:
push   %rax
test   %edi,%edi
jne    111a <uexit+0xa>
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @uexit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
%7 = load i32, i32* %2
unreachable
}

LLVM IR (-O2):
define void @uexit(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void @exit(i32 1)
unreachable
4: ; preds = %1
tail call void @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fxch() {
  db(0xD9);
  db(0xC9);
}


x86 assembly (clang, -O0):
<fxch>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xc9,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxch>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xc9,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fxch() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 201)
ret void
}

LLVM IR (-O2):
define void @fxch() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 201)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t in8(uint32_t a) {
  return *(volatile uint8_t *)(((a - 0x3f8) << 2) + 0x83e01003);
}


x86 assembly (clang, -O0):
<in8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x3f8,%eax
shl    $0x2,%eax
add    $0x83e01003,%eax
mov    %eax,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in8>:
lea    -0x7c1fffdd(,%rdi,4),%eax
mov    (%rax),%eax
ret

LLVM IR (-O0):
define i32 @in8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1016
%5 = shl i32 %4, 2
%6 = add i32 %5, -2082467837
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @in8(i32 %0) {
%2 = shl i32 %0, 2
%3 = add i32 %2, -2082471901
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_new(int);
int /*<<< orphan*/ test_update_cellular_array(int);
int /*<<< orphan*/ test_update_life(int);
int main(void) {
  test_new(100);
  printf("\n");
  test_update_cellular_array(10);
  test_update_life(10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
call   1060 <test_new@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <test_update_cellular_array@plt>
mov    $0xa,%edi
call   1050 <test_update_life@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1060 <test_new@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1040 <test_update_cellular_array@plt>
mov    $0xa,%edi
call   1050 <test_update_life@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_new(i32 100)
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @test_update_cellular_array(i32 10)
%4 = tail call i32 @test_update_life(i32 10)
ret i32 0
}
void gtk_scrolled_window_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_scrolled_window_get_type() {
ret void
}
void ble_rsp_hardware_io_port_read(
    const struct ble_msg_hardware_io_port_read_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_hardware_io_port_read_rsp_t = type opaque
define void @ble_rsp_hardware_io_port_read(%struct.ble_msg_hardware_io_port_read_rsp_t* nocapture %0) {
ret void
}
int main(void) {
  int i, n = 0;
  for (i = 0; i < 10; i += 1) {
    n = n + i;
  }
  return n;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    113a <main+0x3a>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 45
}