xunge/DecIR huggingface dataset:
void mot_patch_kernel(unsigned int addr) {}


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

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

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

LLVM IR (-O2):
define void @mot_patch_kernel(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ autogen_SD0(char *, int *, long *, int, int, int);
int /*<<< orphan*/ printf(char *, char, int, long);
int main() {
  char a = 'a';
  int b = 42;
  long c = 74;
  autogen_SD0(&a, &b, &c, 1, 1, 1);
  printf("%d %d %ld \n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movl   $0x2a,-0xc(%rbp)
movq   $0x4a,-0x18(%rbp)
lea    -0x5(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x1,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1040 <autogen_SD0@plt>
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xe90(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x61,0xb(%rsp)
movl   $0x2a,0xc(%rsp)
movq   $0x4a,0x10(%rsp)
lea    0xb(%rsp),%rdi
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <autogen_SD0@plt>
movsbl 0xb(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x10(%rsp),%rcx
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %ld \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i64
store i32 0, i32* %1
store i8 97, i8* %2
store i32 42, i32* %3
store i64 74, i64* %4
%5 = call i32 @autogen_SD0(i8* %2, i32* %3, i64* %4, i32 1, i32 1, i32 1)
%6 = load i8, i8* %2
%7 = load i32, i32* %3
%8 = load i64, i64* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %6, i32 %7, i64 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %ld \0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i64
store i8 97, i8* %1
%4 = bitcast i32* %2 to i8*
store i32 42, i32* %2
%5 = bitcast i64* %3 to i8*
store i64 74, i64* %3
%6 = call i32 @autogen_SD0(i8* %1, i32* %2, i64* %3, i32 1, i32 1, i32 1)
%7 = load i8, i8* %1
%8 = load i32, i32* %2
%9 = load i64, i64* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %7, i32 %8, i64 %9)
ret i32 0
}
OP(ed, f8) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
void rcu_preempt_deferred_qs(struct task_struct *t) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @rcu_preempt_deferred_qs(%struct.task_struct* nocapture %0) {
ret void
}
int mhia_t_free(struct mhia_t *mhia) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mhia_t = type opaque
define i32 @mhia_t_free(%struct.mhia_t* nocapture readnone %0) {
ret i32 0
}
dd(x, d) { return x / d; }


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

x86 assembly (clang, -O2):
<dd>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @dd(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @dd(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ poDebugInit();
int /*<<< orphan*/ runScenario(int, int);
int main(int argc, char **argv) {
  poDebugInit();
  runScenario(10, 10);
  runScenario(50, 50);
  runScenario(200, 20);
  runScenario(500, 100);
  runScenario(200, 200);
  runScenario(200, 100);
  runScenario(500, 500);
  ;
  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)
mov    $0x0,%al
call   1040 <poDebugInit@plt>
mov    $0xa,%esi
mov    %esi,%edi
call   1030 <runScenario@plt>
mov    $0x32,%esi
mov    %esi,%edi
call   1030 <runScenario@plt>
mov    $0xc8,%edi
mov    $0x14,%esi
call   1030 <runScenario@plt>
mov    $0x1f4,%edi
mov    $0x64,%esi
call   1030 <runScenario@plt>
mov    $0xc8,%esi
mov    %esi,%edi
call   1030 <runScenario@plt>
mov    $0xc8,%edi
mov    $0x64,%esi
call   1030 <runScenario@plt>
mov    $0x1f4,%esi
mov    %esi,%edi
call   1030 <runScenario@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <poDebugInit@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1030 <runScenario@plt>
mov    $0x32,%edi
mov    $0x32,%esi
call   1030 <runScenario@plt>
mov    $0xc8,%edi
mov    $0x14,%esi
call   1030 <runScenario@plt>
mov    $0x1f4,%edi
mov    $0x64,%esi
call   1030 <runScenario@plt>
mov    $0xc8,%edi
mov    $0xc8,%esi
call   1030 <runScenario@plt>
mov    $0xc8,%edi
mov    $0x64,%esi
call   1030 <runScenario@plt>
mov    $0x1f4,%edi
mov    $0x1f4,%esi
call   1030 <runScenario@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @poDebugInit()
%7 = call i32 @runScenario(i32 10, i32 10)
%8 = call i32 @runScenario(i32 50, i32 50)
%9 = call i32 @runScenario(i32 200, i32 20)
%10 = call i32 @runScenario(i32 500, i32 100)
%11 = call i32 @runScenario(i32 200, i32 200)
%12 = call i32 @runScenario(i32 200, i32 100)
%13 = call i32 @runScenario(i32 500, i32 500)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @poDebugInit()
%4 = tail call i32 @runScenario(i32 10, i32 10)
%5 = tail call i32 @runScenario(i32 50, i32 50)
%6 = tail call i32 @runScenario(i32 200, i32 20)
%7 = tail call i32 @runScenario(i32 500, i32 100)
%8 = tail call i32 @runScenario(i32 200, i32 200)
%9 = tail call i32 @runScenario(i32 200, i32 100)
%10 = tail call i32 @runScenario(i32 500, i32 500)
ret i32 0
}
unsigned long long carried_add_jnc(unsigned long long carry,
                                   unsigned long long *res,
                                   unsigned long long *a1,
                                   unsigned long long *a2) {
  asm("xor %%rax, %%rax;"
      "adc %%rbx, %%rdx;"
      "jnc nofirst;"
      "mov $1, %%rax;"
      "nofirst:"
      "adc %%rcx, %%rdx;"
      "jnc nosecond;"
      "mov $1, %%rax;"
      "nosecond:"
      : "=a"(carry), "=d"(*res)
      : "b"(*a1), "c"(*a2), "d"(carry));
  return carry;
}


x86 assembly (clang, -O0):
<carried_add_jnc>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rbx
mov    -0x28(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rdx
xor    %rax,%rax
adc    %rbx,%rdx
jae    1142 <nofirst>
mov    $0x1,%rax

x86 assembly (clang, -O2):
<carried_add_jnc>:
push   %rbx
mov    (%rdx),%rbx
mov    (%rcx),%rcx
mov    %rdi,%rdx
xor    %rax,%rax
adc    %rbx,%rdx
jae    1119 <nofirst>
mov    $0x1,%rax

LLVM IR (-O0):
define i64 @carried_add_jnc(i64 %0, i64* %1, i64* %2, i64* %3) {
%5 = alloca i64
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i64*
store i64 %0, i64* %5
store i64* %1, i64** %6
store i64* %2, i64** %7
store i64* %3, i64** %8
%9 = load i64*, i64** %6
%10 = load i64*, i64** %7
%11 = load i64, i64* %10
%12 = load i64*, i64** %8
%13 = load i64, i64* %12
%14 = load i64, i64* %5
%15 = call { i64, i64 } asm "xor %rax, %rax;adc %rbx, %rdx;jnc nofirst;mov $$1, %rax;nofirst:adc %rcx, %rdx;jnc nosecond;mov $$1, %rax;nosecond:", "={ax},={dx},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i64 %11, i64 %13, i64 %14)
%16 = extractvalue { i64, i64 } %15, 0
%17 = extractvalue { i64, i64 } %15, 1
store i64 %16, i64* %5
store i64 %17, i64* %9
%18 = load i64, i64* %5
ret i64 %18
}

LLVM IR (-O2):
define i64 @carried_add_jnc(i64 %0, i64* nocapture writeonly %1, i64* nocapture %2, i64* nocapture %3) {
%5 = load i64, i64* %2
%6 = load i64, i64* %3
%7 = tail call { i64, i64 } asm "xor %rax, %rax;adc %rbx, %rdx;jnc nofirst;mov $$1, %rax;nofirst:adc %rcx, %rdx;jnc nosecond;mov $$1, %rax;nosecond:", "={ax},={dx},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i64 %5, i64 %6, i64 %0)
%8 = extractvalue { i64, i64 } %7, 0
%9 = extractvalue { i64, i64 } %7, 1
store i64 %9, i64* %1
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ fn1(int /*<<< orphan*/);
int main() {
  fn1(0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fn1(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_file_open_error();
int /*<<< orphan*/ test_file_open_success();
int /*<<< orphan*/ test_file_read_line_error();
int /*<<< orphan*/ test_file_read_line_success();
int /*<<< orphan*/ test_quick_sort();
int /*<<< orphan*/ test_randomize_length();
void run_all_tests() {
  test_file_open_success();
  test_file_open_error();
  test_randomize_length();
  test_quick_sort();
  test_file_read_line_success();
  test_file_read_line_error();
}


x86 assembly (clang, -O0):
<run_all_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <test_file_open_success@plt>
mov    $0x0,%al
call   1080 <test_file_open_error@plt>
mov    $0x0,%al
call   1070 <test_randomize_length@plt>
mov    $0x0,%al
call   1060 <test_quick_sort@plt>
mov    $0x0,%al
call   1030 <test_file_read_line_success@plt>
mov    $0x0,%al
call   1040 <test_file_read_line_error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_all_tests>:
push   %rax
xor    %eax,%eax
call   1050 <test_file_open_success@plt>
xor    %eax,%eax
call   1080 <test_file_open_error@plt>
xor    %eax,%eax
call   1070 <test_randomize_length@plt>
xor    %eax,%eax
call   1060 <test_quick_sort@plt>
xor    %eax,%eax
call   1030 <test_file_read_line_success@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_file_read_line_error@plt>

LLVM IR (-O0):
define void @run_all_tests() {
%1 = call i32 (...) @test_file_open_success()
%2 = call i32 (...) @test_file_open_error()
%3 = call i32 (...) @test_randomize_length()
%4 = call i32 (...) @test_quick_sort()
%5 = call i32 (...) @test_file_read_line_success()
%6 = call i32 (...) @test_file_read_line_error()
ret void
}

LLVM IR (-O2):
define void @run_all_tests() {
%1 = tail call i32 (...) @test_file_open_success()
%2 = tail call i32 (...) @test_file_open_error()
%3 = tail call i32 (...) @test_randomize_length()
%4 = tail call i32 (...) @test_quick_sort()
%5 = tail call i32 (...) @test_file_read_line_success()
%6 = tail call i32 (...) @test_file_read_line_error()
ret void
}
int get_phase(const int num_knights, const int num_bishops, const int num_rooks,
              const int num_queens) {
  const int knight_phase = 1;
  const int bishop_phase = 1;
  const int rook_phase = 2;
  const int queen_phase = 4;
  const int total_phase =
      knight_phase * 4 + bishop_phase * 4 + rook_phase * 4 + queen_phase * 2;
  int phase = total_phase;
  phase -= knight_phase * num_knights;
  phase -= bishop_phase * num_bishops;
  phase -= rook_phase * num_rooks;
  phase -= queen_phase * num_queens;
  return (phase * 256 + (total_phase / 2)) / total_phase;
}


x86 assembly (clang, -O0):
<get_phase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
movl   $0x18,-0x24(%rbp)
movl   $0x18,-0x28(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x0,%ecx
mov    -0x28(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%ecx
shl    $0x0,%ecx
mov    -0x28(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x28(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x28(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
shl    $0x8,%eax
add    $0xc,%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_phase>:
add    %esi,%edi
lea    (%rdi,%rdx,2),%eax
lea    (%rax,%rcx,4),%eax
shl    $0x8,%eax
mov    $0x180c,%ecx
sub    %eax,%ecx
movslq %ecx,%rax
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get_phase(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 1, i32* %9
store i32 1, i32* %10
store i32 2, i32* %11
store i32 4, i32* %12
store i32 24, i32* %13
store i32 24, i32* %14
%15 = load i32, i32* %5
%16 = mul nsw i32 1, %15
%17 = load i32, i32* %14
%18 = sub nsw i32 %17, %16
store i32 %18, i32* %14
%19 = load i32, i32* %6
%20 = mul nsw i32 1, %19
%21 = load i32, i32* %14
%22 = sub nsw i32 %21, %20
store i32 %22, i32* %14
%23 = load i32, i32* %7
%24 = mul nsw i32 2, %23
%25 = load i32, i32* %14
%26 = sub nsw i32 %25, %24
store i32 %26, i32* %14
%27 = load i32, i32* %8
%28 = mul nsw i32 4, %27
%29 = load i32, i32* %14
%30 = sub nsw i32 %29, %28
store i32 %30, i32* %14
%31 = load i32, i32* %14
%32 = mul nsw i32 %31, 256
%33 = add nsw i32 %32, 12
%34 = sdiv i32 %33, 24
ret i32 %34
}

LLVM IR (-O2):
define i32 @get_phase(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul i32 %2, -2
%6 = mul i32 %3, -4
%7 = add i32 %0, %1
%8 = sub i32 24, %7
%9 = add i32 %8, %5
%10 = add i32 %9, %6
%11 = shl nsw i32 %10, 8
%12 = or i32 %11, 12
%13 = sdiv i32 %12, 24
ret i32 %13
}
int jump_label_apply_nops(struct module *mod) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.module = type opaque
define i32 @jump_label_apply_nops(%struct.module* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint16_t hash_function_inode(void *key) {
  int ret;
  unsigned long long *real_key;
  real_key = (unsigned long long *)key;
  ret = (int)(*real_key & 0xFFFF);
  assert(ret >= 0 && ret <= 65535);
  return ret;
}


x86 assembly (clang, -O0):
<hash_function_inode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
and    $0xffff,%rax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x19(%rbp)
jl     1150 <hash_function_inode+0x40>
cmpl   $0xffff,-0xc(%rbp)
setle  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function_inode>:
push   %rbx
movzwl (%rdi),%ebx
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hash_function_inode(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i64*
store i64* %6, i64** %4
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = and i64 %8, 65535
%10 = trunc i64 %9 to i32
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 65535
br label %16
16: ; preds = %13, %1
%17 = phi i1 [ false, %1 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @hash_function_inode(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 65535
%6 = tail call i32 @assert(i32 1)
ret i32 %5
}
int S_empty(struct Stack *const s) { return s == 0; }


x86 assembly (clang, -O0):
<S_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_empty>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
%struct.Stack = type opaque
define i32 @S_empty(%struct.Stack* %0) {
%2 = alloca %struct.Stack*
store %struct.Stack* %0, %struct.Stack** %2
%3 = load %struct.Stack*, %struct.Stack** %2
%4 = icmp eq %struct.Stack* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
%struct.Stack = type opaque
define i32 @S_empty(%struct.Stack* readnone %0) {
%2 = icmp eq %struct.Stack* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int size_sub_check(const size_t x, const size_t y) { return (x >= y); }


x86 assembly (clang, -O0):
<size_sub_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_sub_check>:
xor    %eax,%eax
cmp    %rsi,%rdi
setae  %al
ret

LLVM IR (-O0):
define i32 @size_sub_check(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp uge i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @size_sub_check(i64 %0, i64 %1) {
%3 = icmp uge i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int list_strcmp(void *x, void *key) {
  if (!x || !key) {
    ;
    return -1;
  }
  if (!strcmp((char *)x, (char *)key))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<list_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <list_strcmp+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <list_strcmp+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <list_strcmp+0x5b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1164 <list_strcmp+0x54>
movl   $0x1,-0x4(%rbp)
jmp    116b <list_strcmp+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_strcmp>:
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     1132 <list_strcmp+0x22>
test   %rsi,%rsi
je     1132 <list_strcmp+0x22>
push   %rax
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @list_strcmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i32 @strcmp(i8* %0, i8* %1)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ -1, %2 ], [ %9, %6 ]
ret i32 %11
}
OP(fd, a1) { op_a1(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_a1()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__19__IO__selectIOFunc();
void HplMsp430Usart0P__UCLK__selectIOFunc(void) {
  HplMsp430GeneralIOP__19__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430Usart0P__UCLK__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__19__IO__selectIOFunc()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcscpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
int wcslen(int /*<<< orphan*/ *);
wchar_t *wcscat(wchar_t *dest, const wchar_t *src) {
  wcscpy(dest + wcslen(dest), src);
  return dest;
}


x86 assembly (clang, -O0):
<wcscat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wcslen@plt>
mov    -0x18(%rbp),%rdi
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <wcscpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcscat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <wcslen@plt>
cltq
lea    (%rbx,%rax,4),%rdi
mov    %r14,%rsi
call   1040 <wcscpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @wcscat(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** %3
%7 = call i32 @wcslen(i32* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32*, i32** %4
%11 = call i32 @wcscpy(i32* %9, i32* %10)
%12 = load i32*, i32** %3
ret i32* %12
}

LLVM IR (-O2):
define i32* @wcscat(i32* returned %0, i32* %1) {
%3 = tail call i32 @wcslen(i32* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = tail call i32 @wcscpy(i32* %5, i32* %1)
ret i32* %0
}
void RTSgBufCopyFromBuf(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSgBufCopyFromBuf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void report_header() {
  printf(("RO    RA   SSZ   BSZ   StartSec            Size   Device\n"));
}


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

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

LLVM IR (-O0):
@.str = [58 x i8] c"RO RA SSZ BSZ StartSec Size Device\0A\00"
define void @report_header() {
%1 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [57 x i8] c"RO RA SSZ BSZ StartSec Size Device\00"
define void @report_header() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int sad_mx_n_c(unsigned char const *, int, unsigned char const *, int,
                        unsigned int, int, int);
unsigned int vp8_sad8x16_c(const unsigned char *src_ptr, int src_stride,
                           const unsigned char *ref_ptr, int ref_stride,
                           unsigned int max_sad) {
  return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, max_sad, 8, 16);
}


x86 assembly (clang, -O0):
<vp8_sad8x16_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    $0x8,%r9d
movl   $0x10,(%rsp)
call   1030 <sad_mx_n_c@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vp8_sad8x16_c>:
push   %rax
movl   $0x10,(%rsp)
mov    $0x8,%r9d
call   1030 <sad_mx_n_c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vp8_sad8x16_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @sad_mx_n_c(i8* %11, i32 %12, i8* %13, i32 %14, i32 %15, i32 8, i32 16)
ret i32 %16
}

LLVM IR (-O2):
define i32 @vp8_sad8x16_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @sad_mx_n_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 8, i32 16)
ret i32 %6
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ sprintf(char *, char *, char const *);
int strlen(char const *);
char *atnick(const void *a) {
  size_t len;
  char *out;
  len = strlen((const char *)a) + 2;
  if (!(out = malloc(len + 1)))
    return NULL;
  sprintf(out, "@%s,", (const char *)a);
  return out;
}


x86 assembly (clang, -O0):
<atnick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x2,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1176 <atnick+0x46>
movq   $0x0,-0x8(%rbp)
jmp    1192 <atnick+0x62>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe7b(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atnick>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
movslq %eax,%rdi
add    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1162 <atnick+0x32>
lea    0xea9(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"@%s,\00"
define noalias i8* @atnick(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = add nsw i64 %3, 3
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %1, %7
ret i8* %5
}
/* Variables and functions */
int ack(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char *argv[]) {
  int m, n;
  m = 5, n = 1;
  printf("ack(%d,%d) = %d\n", m, n, ack(m, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <ack@plt>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x1,%esi
call   1030 <ack@plt>
lea    0xec9(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"ack(%d,%d) = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @ack(i32 5, i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 5, i32 1, i32 %3)
ret i32 0
}
int execute_fremovexattr() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_fremovexattr() {
ret i32 0
}
/* Variables and functions */
char *strstr(char *, char *);
bool str_starts_with(char *base, char *str) {
  return (strstr(base, str) - base) == 0;
}


x86 assembly (clang, -O0):
<str_starts_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_starts_with>:
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    %rax,%rdx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @str_starts_with(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 = call i8* @strstr(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %8 to i64
%11 = sub i64 %9, %10
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @str_starts_with(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %3)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x9d() {
  Assert_real((islower(157) == 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_islower.c",
              790, ("islower should be 0 for 0x9d"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x9d>:
push   %rax
mov    $0x9d,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x316,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x9d\00"
define void @t_islower_0x9d() {
%1 = call i64 @islower(i32 157)
%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 790, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x9d\00"
define void @t_islower_0x9d() {
%1 = tail call i64 @islower(i32 157)
%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 790, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int foo_1();
int foo_2();
int foo_3();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Expect 4,    get %d\n", foo_1());
  printf("Expect 13,   get %d\n", foo_2());
  printf("Expect 103,  get %d\n", foo_3());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <foo_1@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <foo_2@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <foo_3@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <foo_1@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <foo_2@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <foo_3@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Expect 4, get %d\0A\00"
@.str.1 = [21 x i8] c"Expect 13, get %d\0A\00"
@.str.2 = [21 x i8] c"Expect 103, get %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo_1()
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @foo_2()
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @foo_3()
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Expect 4, get %d\0A\00"
@.str.1 = [21 x i8] c"Expect 13, get %d\0A\00"
@.str.2 = [21 x i8] c"Expect 103, get %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @foo_1()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @foo_2()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @foo_3()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
void cvt_s_d(double *source, float *dest) { *dest = *source; }


x86 assembly (clang, -O0):
<cvt_s_d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvt_s_d>:
movsd  (%rdi),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @cvt_s_d(double* %0, float* %1) {
%3 = alloca double*
%4 = alloca float*
store double* %0, double** %3
store float* %1, float** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = fptrunc double %6 to float
%8 = load float*, float** %4
store float %7, float* %8
ret void
}

LLVM IR (-O2):
define void @cvt_s_d(double* nocapture %0, float* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = fptrunc double %3 to float
store float %4, float* %1
ret void
}
void swap(int *element1_ptr, int *element2_ptr) {
  int hold;
  hold = *element1_ptr;
  *element1_ptr = *element2_ptr;
  *element2_ptr = hold;
}


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

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
void vlogical_imm_andminus1_int8_t(int8_t *dst, int count) {
  for (int i = 0; i < count; i++)
    dst[i] = dst[i] & -1;
}


x86 assembly (clang, -O0):
<vlogical_imm_andminus1_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1145 <vlogical_imm_andminus1_int8_t+0x45>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
and    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <vlogical_imm_andminus1_int8_t+0x12>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @vlogical_imm_andminus1_int8_t(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ menu_load(int, int /*<<< orphan*/);
int /*<<< orphan*/ reset_all_save(int);
void menu_load_wiz(void) {
  if (menu_load(1, 0))
    reset_all_save(1);
}


x86 assembly (clang, -O0):
<menu_load_wiz>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <menu_load@plt>
cmp    $0x0,%rax
je     1144 <menu_load_wiz+0x24>
mov    $0x1,%edi
call   1030 <reset_all_save@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_load_wiz>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <menu_load@plt>
test   %rax,%rax
je     113d <menu_load_wiz+0x1d>
mov    $0x1,%edi
pop    %rax
jmp    1030 <reset_all_save@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @menu_load_wiz() {
%1 = call i64 @menu_load(i32 1, i32 0)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @reset_all_save(i32 1)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @menu_load_wiz() {
%1 = tail call i64 @menu_load(i32 1, i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @reset_all_save(i32 1)
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int /*<<< orphan*/ reverse(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
main() {
  char s[20];
  int len;
  strcpy(s, "reverse this string");
  len = strlen(s);
  reverse(s, len);
  printf("%s, %d\n", s, len);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x20(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <reverse@plt>
lea    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xe96(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
lea    0xeb3(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <reverse@plt>
lea    0xea1(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"reverse this string\00"
@.str.1 = [8 x i8] c"%s, %d\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %2
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%8 = load i32, i32* %2
%9 = call i32 @reverse(i8* %7, i32 %8)
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"reverse this string\00"
@.str.1 = [8 x i8] c"%s, %d\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @strlen(i8* %2)
%5 = call i32 @reverse(i8* %2, i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ evutil_socket_t;

/* Variables and functions */
void stdin_error_callback(evutil_socket_t fd, void *arg) {}


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

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

LLVM IR (-O0):
define void @stdin_error_callback(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 @stdin_error_callback(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int contAlgarismo(int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
main() {
  printf("O soma dos algarismos de 45363 eh: %d", contAlgarismo(45363, 0));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"O soma dos algarismos de 45363 eh: %d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @contAlgarismo(i32 45363, i32 0)
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"O soma dos algarismos de 45363 eh: %d\00"
define i32 @main() {
%1 = tail call i32 @contAlgarismo(i32 45363, i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}