xunge/DecIR huggingface dataset:
/* Variables and functions */
int pow(int, int);
float ldexpi(int m, int e) { return (float)(m * pow(2, e)); }


x86 assembly (clang, -O0):
<ldexpi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexpi>:
push   %rbx
mov    %edi,%ebx
mov    $0x2,%edi
call   1030 <pow@plt>
imul   %ebx,%eax
cvtsi2ss %eax,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @ldexpi(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @pow(i32 2, i32 %6)
%8 = mul nsw i32 %5, %7
%9 = sitofp i32 %8 to float
ret float %9
}

LLVM IR (-O2):
define float @ldexpi(i32 %0, i32 %1) {
%3 = tail call i32 @pow(i32 2, i32 %1)
%4 = mul nsw i32 %3, %0
%5 = sitofp i32 %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xc5() {
  Assert_real((ispunct(197) == 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_ispunct.c",
              990, ("ispunct should be 0 for 0xc5"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xc5>:
push   %rax
mov    $0xc5,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3de,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xc5\00"
define void @t_ispunct_0xc5() {
%1 = call i64 @ispunct(i32 197)
%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 990, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xc5\00"
define void @t_ispunct_0xc5() {
%1 = tail call i64 @ispunct(i32 197)
%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 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello();
int hello_name(char *);
int hello_num(int);
int main(int argc, char *argv[]) {
  hello();
  int num = hello_name("joker");
  return hello_num(num / 3);
}


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)
mov    $0x0,%al
call   1040 <hello@plt>
lea    0xeac(%rip),%rdi
call   1030 <hello_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <hello_num@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <hello@plt>
lea    0xec1(%rip),%rdi
call   1030 <hello_name@plt>
cltq
imul   $0x55555556,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
shr    $0x20,%rdi
add    %eax,%edi
pop    %rax
jmp    1050 <hello_num@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"joker\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @hello()
%4 = tail call i32 @hello_name(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = sdiv i32 %4, 3
%6 = tail call i32 @hello_num(i32 %5)
ret i32 %6
}
/* Variables and functions */
int sleep(int /*<<< orphan*/);
int shim_sched_yield(void) { return sleep(0); }


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

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

LLVM IR (-O0):
define i32 @shim_sched_yield() {
%1 = call i32 @sleep(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @shim_sched_yield() {
%1 = tail call i32 @sleep(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ insert_quarter(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ turn_crank();
int main(int argc, char **argv) {
  printf("Simple Gumball Machine - Version 1\n");
  insert_quarter(25);
  turn_crank();
  insert_quarter(25);
  turn_crank();
  insert_quarter(10);
  turn_crank();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x19,%edi
call   1050 <insert_quarter@plt>
mov    $0x0,%al
call   1030 <turn_crank@plt>
mov    $0x19,%edi
call   1050 <insert_quarter@plt>
mov    $0x0,%al
call   1030 <turn_crank@plt>
mov    $0xa,%edi
call   1050 <insert_quarter@plt>
mov    $0x0,%al
call   1030 <turn_crank@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x19,%edi
call   1050 <insert_quarter@plt>
xor    %eax,%eax
call   1040 <turn_crank@plt>
mov    $0x19,%edi
call   1050 <insert_quarter@plt>
xor    %eax,%eax
call   1040 <turn_crank@plt>
mov    $0xa,%edi
call   1050 <insert_quarter@plt>
xor    %eax,%eax
call   1040 <turn_crank@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Simple Gumball Machine - Version 1\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @insert_quarter(i32 25)
%8 = call i32 (...) @turn_crank()
%9 = call i32 @insert_quarter(i32 25)
%10 = call i32 (...) @turn_crank()
%11 = call i32 @insert_quarter(i32 10)
%12 = call i32 (...) @turn_crank()
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"Simple Gumball Machine - Version 1\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @insert_quarter(i32 25)
%5 = tail call i32 (...) @turn_crank()
%6 = tail call i32 @insert_quarter(i32 25)
%7 = tail call i32 (...) @turn_crank()
%8 = tail call i32 @insert_quarter(i32 10)
%9 = tail call i32 (...) @turn_crank()
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t ror(uint64_t n, int k) { return (n >> k) | (n << (64 - k)); }


x86 assembly (clang, -O0):
<ror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ror>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @ror(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 64, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ror(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 64, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ e_indi();
int /*<<< orphan*/ e_jmp();
void e_jmp_indi() {
  e_indi();
  e_jmp();
}


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

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

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

LLVM IR (-O2):
define void @e_jmp_indi() {
%1 = tail call i32 (...) @e_indi()
%2 = tail call i32 (...) @e_jmp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led2On();
void TestAppP__Leds__led2On(void) { LedsP__Leds__led2On(); }


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

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

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

LLVM IR (-O2):
define void @TestAppP__Leds__led2On() {
%1 = tail call i32 (...) @LedsP__Leds__led2On()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *prompt = "Press any key: ";
  printf("%s", prompt);
  getchar();
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Press any key: \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Press any key: \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret i32 0
}
double MIN(double a, double b) {
  if (a < b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<MIN>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <MIN+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <MIN+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIN>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @MIN(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @MIN(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
char *cpApgWebsite() { return "http://www.coasttocoastresearch.com"; }


x86 assembly (clang, -O0):
<cpApgWebsite>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpApgWebsite>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [36 x i8] c"http://www.coasttocoastresearch.com\00"
define i8* @cpApgWebsite() {
ret i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [36 x i8] c"http://www.coasttocoastresearch.com\00"
define i8* @cpApgWebsite() {
ret i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int watchccs_gets(BIO *bio, char *buf, int size) { return -1; }


x86 assembly (clang, -O0):
<watchccs_gets>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @watchccs_gets(i32* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}
/* Type definitions */
struct ovs_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_is_empty(struct ovs_list const *);
scalar_t__ list_is_short(struct ovs_list const *);
bool list_is_singleton(const struct ovs_list *list) {
  return list_is_short(list) && !list_is_empty(list);
}


x86 assembly (clang, -O0):
<list_is_singleton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <list_is_short@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115b <list_is_singleton+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <list_is_empty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_is_singleton>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_is_short@plt>
test   %rax,%rax
je     1141 <list_is_singleton+0x21>
mov    %rbx,%rdi
call   1030 <list_is_empty@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ovs_list = type { i32 }
define i32 @list_is_singleton(%struct.ovs_list* %0) {
%2 = alloca %struct.ovs_list*
store %struct.ovs_list* %0, %struct.ovs_list** %2
%3 = load %struct.ovs_list*, %struct.ovs_list** %2
%4 = call i64 @list_is_short(%struct.ovs_list* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load %struct.ovs_list*, %struct.ovs_list** %2
%8 = call i32 @list_is_empty(%struct.ovs_list* %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
%struct.ovs_list = type { i32 }
define i32 @list_is_singleton(%struct.ovs_list* %0) {
%2 = tail call i64 @list_is_short(%struct.ovs_list* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @list_is_empty(%struct.ovs_list* %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
int event_handler_stdin_hup(struct event_handler *handler) {
  (void)handler;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.event_handler = type opaque
define i32 @event_handler_stdin_hup(%struct.event_handler* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndexedXE0(int);
int /*<<< orphan*/ STZ8(int /*<<< orphan*/);
void Op74E0M1(void) { STZ8(DirectIndexedXE0(2)); }


x86 assembly (clang, -O0):
<Op74E0M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <DirectIndexedXE0@plt>
mov    %eax,%edi
call   1030 <STZ8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op74E0M1>:
push   %rax
mov    $0x2,%edi
call   1040 <DirectIndexedXE0@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <STZ8@plt>

LLVM IR (-O0):
define void @Op74E0M1() {
%1 = call i32 @DirectIndexedXE0(i32 2)
%2 = call i32 @STZ8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op74E0M1() {
%1 = tail call i32 @DirectIndexedXE0(i32 2)
%2 = tail call i32 @STZ8(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("llama\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"llama\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func5() { printf("This is func5\n"); }


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

x86 assembly (clang, -O2):
<func5>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"This is func5\0A\00"
define void @func5() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"This is func5\00"
define void @func5() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
int adc_chunk_type(char _byte) {
  if (_byte & 0x80)
    return 0x01;
  if (_byte & 0x40)
    return 0x03;
  return 0x02;
}


x86 assembly (clang, -O0):
<adc_chunk_type>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1128 <adc_chunk_type+0x28>
movl   $0x1,-0x4(%rbp)
jmp    114b <adc_chunk_type+0x4b>
movsbl -0x5(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1144 <adc_chunk_type+0x44>
movl   $0x3,-0x4(%rbp)
jmp    114b <adc_chunk_type+0x4b>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc_chunk_type>:
mov    %edi,%eax
and    $0x40,%eax
cmp    $0x1,%eax
mov    $0x3,%ecx
sbb    $0x0,%ecx
test   $0x80,%dil
mov    $0x1,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @adc_chunk_type(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 128
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %16
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = and i32 %11, 64
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 3, i32* %2
br label %16
15: ; preds = %9
store i32 2, i32* %2
br label %16
16: ; preds = %15, %14, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @adc_chunk_type(i8 signext %0) {
%2 = zext i8 %0 to i32
%3 = and i32 %2, 128
%4 = icmp eq i32 %3, 0
%5 = and i32 %2, 64
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 2, i32 3
%8 = select i1 %4, i32 %7, i32 1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
void addbc(void) { ol("add\thl,bc"); }


x86 assembly (clang, -O0):
<addbc>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <ol@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addbc>:
lea    0xee9(%rip),%rdi
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"add\09hl,bc\00"
define void @addbc() {
%1 = call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"add\09hl,bc\00"
define void @addbc() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f(int);
int main() {
  int x;
  x = 0;
  x = x + 1;
  if (x == 1)
    x = x + 1;
  else
    x = x - 1;
  return f(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1147 <main+0x37>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1150 <main+0x40>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%edi
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2)
ret i32 %1
}
/* Variables and functions */
int getch();
int /*<<< orphan*/ ungetch(int);
void skipblanks(void) {
  int c;
  while ((c = getch()) == ' ' || c == '\t')
    ;
  ungetch(c);
}


x86 assembly (clang, -O0):
<skipblanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getch@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x5(%rbp)
je     114c <skipblanks+0x2c>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    115c <skipblanks+0x3c>
jmp    1161 <skipblanks+0x41>
jmp    1128 <skipblanks+0x8>
mov    -0x4(%rbp),%edi
call   1030 <ungetch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipblanks>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getch@plt>
cmp    $0x9,%eax
je     1130 <skipblanks+0x10>
cmp    $0x20,%eax
je     1130 <skipblanks+0x10>
mov    %eax,%edi
pop    %rax
jmp    1030 <ungetch@plt>

LLVM IR (-O0):
define void @skipblanks() {
%1 = alloca i32
br label %2
2: ; preds = %10, %0
%3 = call i32 (...) @getch()
store i32 %3, i32* %1
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 9
br label %8
8: ; preds = %5, %2
%9 = phi i1 [ true, %2 ], [ %7, %5 ]
br i1 %9, label %10, label %11
10: ; preds = %8
br label %2
11: ; preds = %8
%12 = load i32, i32* %1
%13 = call i32 @ungetch(i32 %12)
ret void
}

LLVM IR (-O2):
define void @skipblanks() {
br label %1
1: ; preds = %3, %0
%2 = tail call i32 (...) @getch()
switch i32 %2, label %4 [
i32 32, label %3
i32 9, label %3
]
3: ; preds = %1, %1
br label %1
4: ; preds = %1
%5 = tail call i32 @ungetch(i32 %2)
ret void
}
const char *unqlite_lib_version(void) { return "1.1.6"; }


x86 assembly (clang, -O0):
<unqlite_lib_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unqlite_lib_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"1.1.6\00"
define i8* @unqlite_lib_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.1.6\00"
define i8* @unqlite_lib_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int lseek(int /*<<< orphan*/, long, int /*<<< orphan*/);
int main(int argc, char *argv[]) { return lseek(atoi(argv[1]), 0L, 0); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <lseek@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @atoi(i8* %8)
%10 = call i32 @lseek(i32 %9, i64 0, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @lseek(i32 %5, i64 0, i32 0)
ret i32 %6
}
void user_kernelhm() {}


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

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

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

LLVM IR (-O2):
define void @user_kernelhm() {
ret void
}
/* Variables and functions */
long partition(long *, long, long);
void quicksort(long int arr[], long int low, long int high) {
  long int s;
  if (low < high) {
    s = partition(arr, low, high);
    quicksort(arr, low, s - 1);
    quicksort(arr, s + 1, high);
  }
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1181 <quicksort+0x61>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <partition@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
sub    $0x1,%rdx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
add    $0x1,%rsi
mov    -0x18(%rbp),%rdx
call   1040 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    %rdx,%rsi
jge    116c <quicksort+0x4c>
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
call   1030 <partition@plt>
mov    %rax,%rbx
lea    -0x1(%rax),%rdx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <quicksort@plt>
add    $0x1,%rbx
mov    %rbx,%r12
cmp    %r14,%rbx
jl     1140 <quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @quicksort(i64* %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i64 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i64 @partition(i64* %0, i64 %6, i64 %2)
%8 = add nsw i64 %7, -1
tail call void @quicksort(i64* %0, i64 %6, i64 %8)
%9 = add nsw i64 %7, 1
%10 = icmp slt i64 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nextChar();
void init() { nextChar(); }


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

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

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

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @nextChar()
ret void
}
int stub_ast_encdec_bin(unsigned char *dst, const unsigned char *src,
                        int srclen, struct ast_key *key) {
  ast_log(2,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/"
          "master/cryptostub.c",
          61, __PRETTY_FUNCTION__, "Crypto support not loaded!\n");
  return -1;
}


x86 assembly (clang, -O0):
<stub_ast_encdec_bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x2,%edi
lea    0xecd(%rip),%rsi
mov    $0x3d,%edx
lea    0xf58(%rip),%rcx
lea    0xfa8(%rip),%r8
mov    $0x0,%al
call   1030 <ast_log@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stub_ast_encdec_bin>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xf78(%rip),%rcx
lea    0xfc8(%rip),%r8
mov    $0x2,%edi
mov    $0x3d,%edx
xor    %eax,%eax
call   1030 <ast_log@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ast_key = type opaque
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/master/cryptostub.c\00"
@__PRETTY_FUNCTION__.stub_ast_encdec_bin = [87 x i8] c"int stub_ast_encdec_bin(unsigned char *, const unsigned char *, int, struct ast_key *)\00"
@.str.1 = [28 x i8] c"Crypto support not loaded!\0A\00"
define i32 @stub_ast_encdec_bin(i8* %0, i8* %1, i32 %2, %struct.ast_key* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.ast_key*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store %struct.ast_key* %3, %struct.ast_key** %8
%9 = call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @ast_log to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 2, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 61, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @__PRETTY_FUNCTION__.stub_ast_encdec_bin, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.ast_key = type opaque
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/master/cryptostub.c\00"
@__PRETTY_FUNCTION__.stub_ast_encdec_bin = [87 x i8] c"int stub_ast_encdec_bin(unsigned char *, const unsigned char *, int, struct ast_key *)\00"
@.str.1 = [28 x i8] c"Crypto support not loaded!\0A\00"
define i32 @stub_ast_encdec_bin(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, %struct.ast_key* nocapture readnone %3) {
%5 = tail call i32 (i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @ast_log to i32 (i32, i8*, i32, i8*, i8*, ...)*)(i32 2, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 61, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @__PRETTY_FUNCTION__.stub_ast_encdec_bin, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long atoi(int /*<<< orphan*/);
int /*<<< orphan*/ findLine(int /*<<< orphan*/ *, char *);
long parse_send_time(FILE *plr_file) {
  return atoi(findLine(plr_file, "Sent:"));
}


x86 assembly (clang, -O0):
<parse_send_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <findLine@plt>
mov    %eax,%edi
call   1030 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_send_time>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <findLine@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <atoi@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Sent:\00"
define i64 @parse_send_time(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @findLine(i32* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i64 @atoi(i32 %4)
ret i64 %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"Sent:\00"
define i64 @parse_send_time(i32* %0) {
%2 = tail call i32 @findLine(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @atoi(i32 %2)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glPixelTransferi(int /*<<< orphan*/, int /*<<< orphan*/);
void PixelTransferi(GLenum pname, GLint param) {
  glPixelTransferi(pname, param);
}


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

x86 assembly (clang, -O2):
<PixelTransferi>:
jmp    1030 <glPixelTransferi@plt>

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

LLVM IR (-O2):
define void @PixelTransferi(i32 %0, i32 %1) {
%3 = tail call i32 @glPixelTransferi(i32 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t USBHostHubAddrGet(uint32_t ui32Base, uint32_t ui32Endpoint,
                           uint32_t ui32Flags) {
  ;

  ;
  if (ui32Flags & 0x00002000) {
    return (
        (*((volatile uint8_t *)(ui32Base + 0x00000082 + (ui32Endpoint >> 1)))));
  } else {
    return ((*((volatile uint8_t *)(ui32Base + 0x00000082 + 4 +
                                    (ui32Endpoint >> 1)))));
  }
}


x86 assembly (clang, -O0):
<USBHostHubAddrGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
je     113a <USBHostHubAddrGet+0x3a>
mov    -0x8(%rbp),%eax
add    $0x82,%eax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <USBHostHubAddrGet+0x54>
mov    -0x8(%rbp),%eax
add    $0x82,%eax
add    $0x4,%eax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostHubAddrGet>:
xor    %eax,%eax
test   $0x2000,%edx
sete   %al
lea    (%rdi,%rax,4),%eax
add    $0x82,%eax
sar    %esi
cltq
movslq %esi,%rcx
mov    (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
define i32 @USBHostHubAddrGet(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 = and i32 %8, 8192
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %3
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 130
%14 = load i32, i32* %6
%15 = ashr i32 %14, 1
%16 = add nsw i32 %13, %15
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load volatile i32, i32* %18
store i32 %19, i32* %4
br label %30
20: ; preds = %3
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 130
%23 = add nsw i32 %22, 4
%24 = load i32, i32* %6
%25 = ashr i32 %24, 1
%26 = add nsw i32 %23, %25
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i32*
%29 = load volatile i32, i32* %28
store i32 %29, i32* %4
br label %30
30: ; preds = %20, %11
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @USBHostHubAddrGet(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, 8192
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 134, i32 130
%7 = add nsw i32 %6, %0
%8 = ashr i32 %1, 1
%9 = add nsw i32 %7, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
ret i32 %12
}
void aa_fastrender(int x1, int y1, int x2, int y2) {
  if (x2 < 0 || y2 < 0 || x1 > (3) || y1 > (4))
    return;
}


x86 assembly (clang, -O0):
<aa_fastrender>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1138 <aa_fastrender+0x38>
cmpl   $0x0,-0x10(%rbp)
jl     1138 <aa_fastrender+0x38>
cmpl   $0x3,-0x4(%rbp)
jg     1138 <aa_fastrender+0x38>
cmpl   $0x4,-0x8(%rbp)
jle    113d <aa_fastrender+0x3d>
jmp    113d <aa_fastrender+0x3d>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @aa_fastrender(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* %7
%10 = icmp slt i32 %9, 0
br i1 %10, label %20, label %11
11: ; preds = %4
%12 = load i32, i32* %8
%13 = icmp slt i32 %12, 0
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %5
%16 = icmp sgt i32 %15, 3
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %6
%19 = icmp sgt i32 %18, 4
br i1 %19, label %20, label %21
20: ; preds = %17, %14, %11, %4
br label %21
21: ; preds = %20, %17
ret void
}

LLVM IR (-O2):
define void @aa_fastrender(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
void randomMove() {}


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

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

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

LLVM IR (-O2):
define void @randomMove() {
ret void
}
int pfloat_ConvertFromInt(int i) { return i << 16; }


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

x86 assembly (clang, -O2):
<pfloat_ConvertFromInt>:
mov    %edi,%eax
shl    $0x10,%eax
ret

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

LLVM IR (-O2):
define i32 @pfloat_ConvertFromInt(i32 %0) {
%2 = shl i32 %0, 16
ret i32 %2
}
struct bt_peer *get_peer_data(int ip_version, const char *infohash,
                              int number_of_entries) {}


x86 assembly (clang, -O0):
<get_peer_data>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bt_peer = type opaque
define %struct.bt_peer* @get_peer_data(i32 %0, i8* %1, i32 %2) {
%4 = alloca %struct.bt_peer*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load %struct.bt_peer*, %struct.bt_peer** %4
ret %struct.bt_peer* %8
}

LLVM IR (-O2):
%struct.bt_peer = type opaque
define noalias %struct.bt_peer* @get_peer_data(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret %struct.bt_peer* undef
}
/* Variables and functions */
int f6(void *, unsigned long);
int f2(void *p) { return f6(p, 256UL); }


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

x86 assembly (clang, -O2):
<f2>:
mov    $0x100,%esi
jmp    1030 <f6@plt>

LLVM IR (-O0):
define i32 @f2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @f6(i8* %3, i64 256)
ret i32 %4
}

LLVM IR (-O2):
define i32 @f2(i8* %0) {
%2 = tail call i32 @f6(i8* %0, i64 256)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ mclget();
int /*<<< orphan*/ parse_commandline(int, char **);
int main(int argc, char *argv[]) {
  parse_commandline(argc, argv);
  mclget();
  exit(0);
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @parse_commandline(i32 %6, i8** %7)
%9 = call i32 (...) @mclget()
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_commandline(i32 %0, i8** %1)
%4 = tail call i32 (...) @mclget()
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ usage();
void uniopt(char *p) {
  if (p[2])
    usage();
}


x86 assembly (clang, -O0):
<uniopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,0x2(%rax)
je     1131 <uniopt+0x21>
mov    $0x0,%al
call   1030 <usage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniopt>:
cmpb   $0x0,0x2(%rdi)
je     111d <uniopt+0xd>
xor    %eax,%eax
jmp    1030 <usage@plt>
ret

LLVM IR (-O0):
define void @uniopt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @usage()
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @uniopt(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @usage()
br label %7
7: ; preds = %5, %1
ret void
}
int createPlain(int x, int y) {
  x += 64;
  y += 64;
  x &= 0xFFFF;
  y &= 0xFFFF;
  return ((x << 16) | (y));
}


x86 assembly (clang, -O0):
<createPlain>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x40,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<createPlain>:
add    $0x40,%esi
movzwl %si,%eax
shl    $0x10,%edi
add    %edi,%eax
add    $0x400000,%eax
ret

LLVM IR (-O0):
define i32 @createPlain(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 64
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 64
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = and i32 %9, 65535
store i32 %10, i32* %3
%11 = load i32, i32* %4
%12 = and i32 %11, 65535
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = shl i32 %13, 16
%15 = load i32, i32* %4
%16 = or i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @createPlain(i32 %0, i32 %1) {
%3 = add nsw i32 %1, 64
%4 = and i32 %3, 65535
%5 = shl i32 %0, 16
%6 = add i32 %5, 4194304
%7 = or i32 %4, %6
ret i32 %7
}
long long load64_reverse_6(long long dummy __attribute__((unused)),
                           long long *p, int i) {
  return __builtin_bswap64(p[i]);
}


x86 assembly (clang, -O0):
<load64_reverse_6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
bswap  %rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load64_reverse_6>:
movslq %edx,%rax
mov    (%rsi,%rax,8),%rax
bswap  %rax
ret

LLVM IR (-O0):
define i64 @load64_reverse_6(i64 %0, i64* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i32
store i64 %0, i64* %4
store i64* %1, i64** %5
store i32 %2, i32* %6
%7 = load i64*, i64** %5
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %7, i64 %9
%11 = load i64, i64* %10
%12 = call i64 @llvm.bswap.i64(i64 %11)
ret i64 %12
}

LLVM IR (-O2):
define i64 @load64_reverse_6(i64 %0, i64* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i64, i64* %1, i64 %4
%6 = load i64, i64* %5
%7 = tail call i64 @llvm.bswap.i64(i64 %6)
ret i64 %7
}
const char *str_expr_addr() { return "address-of"; }


x86 assembly (clang, -O0):
<str_expr_addr>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_expr_addr>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"address-of\00"
define i8* @str_expr_addr() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [11 x i8] c"address-of\00"
define i8* @str_expr_addr() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
int compare(const void *a, const void *b) { return (*(char *)a - *(char *)b); }


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

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 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}