xunge/DecIR huggingface dataset:
int Vec_IntSortCompare2(int *pp1, int *pp2) {
  if (*pp1 > *pp2)
    return -1;
  if (*pp1 < *pp2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<Vec_IntSortCompare2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <Vec_IntSortCompare2+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <Vec_IntSortCompare2+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1148 <Vec_IntSortCompare2+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <Vec_IntSortCompare2+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vec_IntSortCompare2>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Vec_IntSortCompare2(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp sgt i32 %3, %4
%6 = icmp slt i32 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Type definitions */
struct Cyc_Tcenv_Tenv {
  int dummy;
};
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_Tcutil_coerce_arg(struct Cyc_Tcenv_Tenv *,
                                         struct Cyc_Absyn_Exp *, void *, int *);
int Cyc_Tcutil_coerce_assign(struct Cyc_Tcenv_Tenv *te, struct Cyc_Absyn_Exp *e,
                             void *t) {
  int bogus = 0;
  return ({ Cyc_Tcutil_coerce_arg(te, e, t, &bogus); });
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_coerce_assign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1030 <Cyc_Tcutil_coerce_arg@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_coerce_assign>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rcx
call   1030 <Cyc_Tcutil_coerce_arg@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.Cyc_Tcenv_Tenv = type { i32 }
%struct.Cyc_Absyn_Exp = type { i32 }
define i32 @Cyc_Tcutil_coerce_assign(%struct.Cyc_Tcenv_Tenv* %0, %struct.Cyc_Absyn_Exp* %1, i8* %2) {
%4 = alloca %struct.Cyc_Tcenv_Tenv*
%5 = alloca %struct.Cyc_Absyn_Exp*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store %struct.Cyc_Tcenv_Tenv* %0, %struct.Cyc_Tcenv_Tenv** %4
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %5
store i8* %2, i8** %6
store i32 0, i32* %7
%9 = load %struct.Cyc_Tcenv_Tenv*, %struct.Cyc_Tcenv_Tenv** %4
%10 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
%11 = load i8*, i8** %6
%12 = call i32 @Cyc_Tcutil_coerce_arg(%struct.Cyc_Tcenv_Tenv* %9, %struct.Cyc_Absyn_Exp* %10, i8* %11, i32* %7)
store i32 %12, i32* %8
%13 = load i32, i32* %8
ret i32 %13
}

LLVM IR (-O2):
%struct.Cyc_Tcenv_Tenv = type { i32 }
%struct.Cyc_Absyn_Exp = type { i32 }
define i32 @Cyc_Tcutil_coerce_assign(%struct.Cyc_Tcenv_Tenv* %0, %struct.Cyc_Absyn_Exp* %1, i8* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%6 = call i32 @Cyc_Tcutil_coerce_arg(%struct.Cyc_Tcenv_Tenv* %0, %struct.Cyc_Absyn_Exp* %1, i8* %2, i32* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fortchartoc(char *);
int /*<<< orphan*/ gmvwrite_group_fromfile(int /*<<< orphan*/);
void fgmvwrite_group_fromfile_(char filnam[]) {
  gmvwrite_group_fromfile(fortchartoc(filnam));
}


x86 assembly (clang, -O0):
<fgmvwrite_group_fromfile_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fortchartoc@plt>
mov    %eax,%edi
call   1040 <gmvwrite_group_fromfile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_group_fromfile_>:
push   %rax
call   1030 <fortchartoc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <gmvwrite_group_fromfile@plt>

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

LLVM IR (-O2):
define void @fgmvwrite_group_fromfile_(i8* %0) {
%2 = tail call i32 @fortchartoc(i8* %0)
%3 = tail call i32 @gmvwrite_group_fromfile(i32 %2)
ret void
}
/* Variables and functions */
int f215(int *);
int f216(int *p) { return f215(p); }


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

x86 assembly (clang, -O2):
<f216>:
jmp    1030 <f215@plt>

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

LLVM IR (-O2):
define i32 @f216(i32* %0) {
%2 = tail call i32 @f215(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x3b() {
  Assert_real((isalnum(59) == 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_isalnum.c",
              300, ("isalnum should be 0 for ;"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x3b>:
push   %rax
mov    $0x3b,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x12c,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for ;\00"
define void @t_isalnum_0x3b() {
%1 = call i64 @isalnum(i32 59)
%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 300, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for ;\00"
define void @t_isalnum_0x3b() {
%1 = tail call i64 @isalnum(i32 59)
%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 300, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RTP_set_version(unsigned char *p, int v) {
  p[0] = (p[0] & 0x3f) | (((unsigned char)v) << 6);
}


x86 assembly (clang, -O0):
<RTP_set_version>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0x3f,%eax
mov    -0xc(%rbp),%ecx
movzbl %cl,%ecx
shl    $0x6,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTP_set_version>:
mov    (%rdi),%al
and    $0x3f,%al
shl    $0x6,%sil
or     %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @RTP_set_version(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = and i32 %8, 63
%10 = load i32, i32* %4
%11 = trunc i32 %10 to i8
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 6
%14 = or i32 %9, %13
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 0
store i8 %15, i8* %17
ret void
}

LLVM IR (-O2):
define void @RTP_set_version(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = and i8 %3, 63
%5 = trunc i32 %1 to i8
%6 = shl i8 %5, 6
%7 = or i8 %4, %6
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EA_A7_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int /*<<< orphan*/);
void m68k_op_sf_8_pd7(void) { m68ki_write_8(EA_A7_PD_8(), 0); }


x86 assembly (clang, -O0):
<m68k_op_sf_8_pd7>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <EA_A7_PD_8@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <m68ki_write_8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_sf_8_pd7>:
push   %rax
xor    %eax,%eax
call   1030 <EA_A7_PD_8@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_sf_8_pd7() {
%1 = call i32 (...) @EA_A7_PD_8()
%2 = call i32 @m68ki_write_8(i32 %1, i32 0)
ret void
}

LLVM IR (-O2):
define void @m68k_op_sf_8_pd7() {
%1 = tail call i32 (...) @EA_A7_PD_8()
%2 = tail call i32 @m68ki_write_8(i32 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyndump_dumpntyp(void *);
void Cyc_Absyndump_dumprgn(void *t) { Cyc_Absyndump_dumpntyp(t); }


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

x86 assembly (clang, -O2):
<Cyc_Absyndump_dumprgn>:
jmp    1030 <Cyc_Absyndump_dumpntyp@plt>

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

LLVM IR (-O2):
define void @Cyc_Absyndump_dumprgn(i8* %0) {
%2 = tail call i32 @Cyc_Absyndump_dumpntyp(i8* %0)
ret void
}
unsigned long int inttouint(long int i) { return (unsigned long int)i; }


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

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

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

LLVM IR (-O2):
define i64 @inttouint(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR9F_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR9F_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR9F_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void colorize(char printme, int key) { printf("%c", printme); }


x86 assembly (clang, -O0):
<colorize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xed8(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colorize>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @colorize(i8 signext %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ instance1(int /*<<< orphan*/);
int /*<<< orphan*/ instance2(int /*<<< orphan*/);
int /*<<< orphan*/ instance3(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  instance1(0);
__CPROVER_ASYNC_1:
  instance2(0);
__CPROVER_ASYNC_2:
  instance3(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @instance1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @instance2(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @instance3(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @instance1(i32 0)
%2 = tail call i32 @instance2(i32 0)
%3 = tail call i32 @instance3(i32 0)
ret i32 0
}
/* Type definitions */
struct tree {
  int dummy;
};

/* Variables and functions */
scalar_t__ tree_balance(struct tree *);
scalar_t__ tree_justdelnode(struct tree *, void *);
int tree_delnode(struct tree *t, void *elem) {
  if (tree_justdelnode(t, elem) != 0)
    return -1;
  if (tree_balance(t) != 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<tree_delnode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <tree_justdelnode@plt>
cmp    $0x0,%rax
je     1153 <tree_delnode+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <tree_delnode+0x59>
mov    -0x10(%rbp),%rdi
call   1040 <tree_balance@plt>
cmp    $0x0,%rax
je     1172 <tree_delnode+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <tree_delnode+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tree_delnode>:
push   %rbx
mov    %rdi,%rbx
call   1030 <tree_justdelnode@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1138 <tree_delnode+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <tree_balance@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tree = type { i32 }
define i32 @tree_delnode(%struct.tree* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.tree*
%5 = alloca i8*
store %struct.tree* %0, %struct.tree** %4
store i8* %1, i8** %5
%6 = load %struct.tree*, %struct.tree** %4
%7 = load i8*, i8** %5
%8 = call i64 @tree_justdelnode(%struct.tree* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %17
11: ; preds = %2
%12 = load %struct.tree*, %struct.tree** %4
%13 = call i64 @tree_balance(%struct.tree* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 -1, i32* %3
br label %17
16: ; preds = %11
store i32 0, i32* %3
br label %17
17: ; preds = %16, %15, %10
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.tree = type { i32 }
define i32 @tree_delnode(%struct.tree* %0, i8* %1) {
%3 = tail call i64 @tree_justdelnode(%struct.tree* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @tree_balance(%struct.tree* %0)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ -1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t bitops64_count(uint64_t bits) {
  uint8_t counter = 0;
  while (bits) {
    counter += bits % 2;
    bits >>= 1;
  }
  return counter;
}


x86 assembly (clang, -O0):
<bitops64_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1137 <bitops64_count+0x37>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <bitops64_count+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitops64_count>:
xor    %eax,%eax
test   %edi,%edi
je     1129 <bitops64_count+0x29>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
shr    $0x1f,%edx
add    %edi,%edx
and    $0xfffffffe,%edx
mov    %edi,%esi
sub    %edx,%esi
add    %esi,%eax
sar    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <bitops64_count+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitops64_count(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = srem i32 %5, 2
%7 = add nsw i32 %4, %6
%8 = ashr i32 %5, 1
%9 = icmp ult i32 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int sival_int;
};
struct TYPE_5__ {
  TYPE_1__ si_value;
};
typedef TYPE_2__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(int signum, siginfo_t *info, void *act) {
  printf("sival_int = %d\n", info->si_value.sival_int);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
@.str = [16 x i8] c"sival_int = %d\0A\00"
define void @handler(i32 %0, %struct.TYPE_5__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_5__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_5__* %1, %struct.TYPE_5__** %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%8 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
@.str = [16 x i8] c"sival_int = %d\0A\00"
define void @handler(i32 %0, %struct.TYPE_5__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
int registerChargerInOutNotificaition(void (*callback)(int)) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @registerChargerInOutNotificaition(void (i32)* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void blink_dummy_func(void) {
  static int i;
  printf("Counter = %d\n", i++);
}


x86 assembly (clang, -O0):
<blink_dummy_func>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f12(%rip),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,0x2f07(%rip)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<blink_dummy_func>:
mov    0x2f16(%rip),%esi
lea    0x1(%rsi),%eax
mov    %eax,0x2f0d(%rip)
lea    0xeda(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@blink_dummy_func.i = internal global i32 0
@.str = [14 x i8] c"Counter = %d\0A\00"
define void @blink_dummy_func() {
%1 = load i32, i32* @blink_dummy_func.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @blink_dummy_func.i
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@blink_dummy_func.i = internal unnamed_addr global i32 0
@.str = [14 x i8] c"Counter = %d\0A\00"
define void @blink_dummy_func() {
%1 = load i32, i32* @blink_dummy_func.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @blink_dummy_func.i
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void gtk_window_group_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_group_get_type() {
ret void
}
/* Variables and functions */
int check_string(const char *str, size_t sz) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @check_string(i8* nocapture readnone %0, i64 %1) {
ret i32 1
}
/* Variables and functions */
int PAPI_set_cmp_granularity(int, int);
void PAPIF_SET_CMP_GRANULARITY(int *granularity, int *cidx, int *check) {
  *check = PAPI_set_cmp_granularity(*granularity, *cidx);
}


x86 assembly (clang, -O0):
<PAPIF_SET_CMP_GRANULARITY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <PAPI_set_cmp_granularity@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_SET_CMP_GRANULARITY>:
push   %rbx
mov    %rdx,%rbx
mov    (%rdi),%edi
mov    (%rsi),%esi
call   1030 <PAPI_set_cmp_granularity@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @PAPIF_SET_CMP_GRANULARITY(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @PAPI_set_cmp_granularity(i32 %4, i32 %5)
store i32 %6, i32* %2
ret void
}
double iterate(double x_n, int i) { return ((cos(i * (acos(x_n)))) * 0.5); }


x86 assembly (clang, -O0):
<iterate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  0xea3(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iterate>:
push   %rax
cvtsi2sd %edi,%xmm1
movsd  %xmm1,(%rsp)
call   1030 <acos@plt>
mulsd  (%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0xebf(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @iterate(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = load double, double* %3
%8 = call double @acos(double %7)
%9 = fmul double %6, %8
%10 = call double @cos(double %9)
%11 = fmul double %10, 5.000000e-01
ret double %11
}

LLVM IR (-O2):
define double @iterate(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = tail call double @acos(double %0)
%5 = fmul double %4, %3
%6 = tail call double @cos(double %5)
%7 = fmul double %6, 5.000000e-01
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ endutent();
extern void _p_endutent(void) { endutent(); }


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

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

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

LLVM IR (-O2):
define void @_p_endutent() {
%1 = tail call i32 (...) @endutent()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void ft_putchar(char c) { write(1, &c, sizeof(char)); }


x86 assembly (clang, -O0):
<ft_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @ft_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @ft_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}
/* Variables and functions */
void *calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void *salloc(int num, int size) {
  void *ptr = calloc(num, size);
  if (ptr == 0) {
    printf("out of memory\n");
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<salloc>:
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   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <salloc+0x3e>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<salloc>:
push   %rax
call   1040 <calloc@plt>
test   %rax,%rax
je     113d <salloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"out of memory\0A\00"
define i8* @salloc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i8* @calloc(i32 %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@str = [14 x i8] c"out of memory\00"
define noalias i8* @salloc(i32 %0, i32 %1) {
%3 = tail call i8* @calloc(i32 %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret i8* %3
}
void LEDMatrix_Display_Timer() {}


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

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

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

LLVM IR (-O2):
define void @LEDMatrix_Display_Timer() {
ret void
}
unsigned int uimin(unsigned int a, unsigned int b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<uimin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1121 <uimin+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <uimin+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uimin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @uimin(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 = icmp ult i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @uimin(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int open(char const *, int, int /*<<< orphan*/);
int creat(__const char *file, mode_t mode) {
  return open(file, O_TRUNC | O_CREAT | O_WRONLY, mode);
}


x86 assembly (clang, -O0):
<creat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
mov    0x2ec5(%rip),%rax
or     (%rax),%esi
mov    0x2e8c(%rip),%rax
or     (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat>:
mov    0x2ed9(%rip),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %esi,%edx
mov    0x2e9d(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_TRUNC = global i32 0
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
define i32 @creat(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_TRUNC
%7 = load i32, i32* @O_CREAT
%8 = or i32 %6, %7
%9 = load i32, i32* @O_WRONLY
%10 = or i32 %8, %9
%11 = load i32, i32* %4
%12 = call i32 @open(i8* %5, i32 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@O_TRUNC = global i32 0
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
define i32 @creat(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @O_TRUNC
%4 = load i32, i32* @O_CREAT
%5 = or i32 %4, %3
%6 = load i32, i32* @O_WRONLY
%7 = or i32 %5, %6
%8 = tail call i32 @open(i8* %0, i32 %7, i32 %1)
ret i32 %8
}
char fn1(void) { return (char)0x600; }


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

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

LLVM IR (-O0):
define signext i8 @fn1() {
ret i8 0
}

LLVM IR (-O2):
define signext i8 @fn1() {
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ fc8080_write(void *, int, int);
int fc8080_set_filter(void *handle) {
  unsigned char cal = 0;
  unsigned int tcxo = 24576 * 1000;
  unsigned int csfbw = 780000;
  cal = (unsigned int)(tcxo * 78 * 2 / csfbw) / 100;
  fc8080_write(handle, 0x3c, 0x01);
  fc8080_write(handle, 0x3d, cal);
  fc8080_write(handle, 0x3c, 0x00);
  fc8080_write(handle, 0x32, 0x07);
  return 0;
}


x86 assembly (clang, -O0):
<fc8080_set_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
movl   $0x1770000,-0x10(%rbp)
movl   $0xbe6e0,-0x14(%rbp)
imul   $0x4e,-0x10(%rbp),%eax
shl    $0x1,%eax
xor    %edx,%edx
divl   -0x14(%rbp)
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3c,%esi
mov    $0x1,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%edx
mov    $0x3d,%esi
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3c,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    -0x8(%rbp),%rdi
mov    $0x32,%esi
mov    $0x7,%edx
call   1030 <fc8080_write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8080_set_filter>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3c,%esi
mov    $0x1,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x3d,%esi
mov    $0x31,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
xor    %edx,%edx
call   1030 <fc8080_write@plt>
mov    %rbx,%rdi
mov    $0x32,%esi
mov    $0x7,%edx
call   1030 <fc8080_write@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fc8080_set_filter(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
store i8 0, i8* %3
store i32 24576000, i32* %4
store i32 780000, i32* %5
%6 = load i32, i32* %4
%7 = mul i32 %6, 78
%8 = mul i32 %7, 2
%9 = load i32, i32* %5
%10 = udiv i32 %8, %9
%11 = udiv i32 %10, 100
%12 = trunc i32 %11 to i8
store i8 %12, i8* %3
%13 = load i8*, i8** %2
%14 = call i32 @fc8080_write(i8* %13, i32 60, i32 1)
%15 = load i8*, i8** %2
%16 = load i8, i8* %3
%17 = zext i8 %16 to i32
%18 = call i32 @fc8080_write(i8* %15, i32 61, i32 %17)
%19 = load i8*, i8** %2
%20 = call i32 @fc8080_write(i8* %19, i32 60, i32 0)
%21 = load i8*, i8** %2
%22 = call i32 @fc8080_write(i8* %21, i32 50, i32 7)
ret i32 0
}

LLVM IR (-O2):
define i32 @fc8080_set_filter(i8* %0) {
%2 = tail call i32 @fc8080_write(i8* %0, i32 60, i32 1)
%3 = tail call i32 @fc8080_write(i8* %0, i32 61, i32 49)
%4 = tail call i32 @fc8080_write(i8* %0, i32 60, i32 0)
%5 = tail call i32 @fc8080_write(i8* %0, i32 50, i32 7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ move_cursor_xy(int, int);
int /*<<< orphan*/ printf(char *, int);
void show_level(int level, int row, int col) {
  move_cursor_xy(row, col);
  printf("Level: %-2d", level);
}


x86 assembly (clang, -O0):
<show_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <move_cursor_xy@plt>
mov    -0x4(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_level>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
mov    %edx,%esi
call   1040 <move_cursor_xy@plt>
lea    0xecd(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"Level: %-2d\00"
define void @show_level(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @move_cursor_xy(i32 %1, i32 %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ GJmalloc(int);
char *strcpy(char *, char const *);
int strlen(char const *);
char *GJstrdup(const char *s) {
  char *temp;
  temp = (char *)GJmalloc(sizeof(char) * (strlen(s) + 1));
  temp = strcpy(temp, s);
  return temp;
}


x86 assembly (clang, -O0):
<GJstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <GJmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GJstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
call   1040 <GJmalloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @GJstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = mul i64 1, %7
%9 = trunc i64 %8 to i32
%10 = call i64 @GJmalloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i8* @strcpy(i8* %12, i8* %13)
store i8* %14, i8** %3
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @GJstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @GJmalloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
ret i8* %5
}
int is_prime(long int n) {
  int prime = 1;
  long int i;
  for (i = (long int)n / 2; i > 1; i--)
    if (n % i == 0) {
      prime = 0;
      break;
    }
  return prime;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
jle    1162 <is_prime+0x62>
mov    -0x8(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
jne    114c <is_prime+0x4c>
movl   $0x0,-0xc(%rbp)
jmp    1162 <is_prime+0x62>
jmp    1151 <is_prime+0x51>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1121 <is_prime+0x21>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
mov    $0x1,%ecx
cmp    $0x4,%rdi
jl     1158 <is_prime+0x58>
mov    %rdi,%rsi
shr    %rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1140 <is_prime+0x40>
mov    %rdi,%rax
cqto
idiv   %rsi
test   %rdx,%rdx
jne    114b <is_prime+0x4b>
jmp    115b <is_prime+0x5b>
nopl   0x0(%rax,%rax,1)
mov    %edi,%eax
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
je     115b <is_prime+0x5b>
lea    -0x1(%rsi),%rax
cmp    $0x3,%rsi
mov    %rax,%rsi
jge    1120 <is_prime+0x20>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @is_prime(i64 %0) {
%2 = icmp sgt i64 %0, 3
br i1 %2, label %3, label %12
3: ; preds = %1
%4 = lshr i64 %0, 1
br label %8
5: ; preds = %8
%6 = add nsw i64 %9, -1
%7 = icmp sgt i64 %9, 2
br i1 %7, label %8, label %12
8: ; preds = %3, %5
%9 = phi i64 [ %6, %5 ], [ %4, %3 ]
%10 = srem i64 %0, %9
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %8, %1
%13 = phi i32 [ 1, %1 ], [ 0, %8 ], [ 1, %5 ]
ret i32 %13
}
/* Type definitions */
struct FNVHash1024 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fnv1024UpdateBuffer(struct FNVHash1024 *, char const *,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void fnv1024UpdateString(struct FNVHash1024 *hval, const char *str) {
  fnv1024UpdateBuffer(hval, str, strlen(str));
}


x86 assembly (clang, -O0):
<fnv1024UpdateString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <fnv1024UpdateBuffer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnv1024UpdateString>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fnv1024UpdateBuffer@plt>

LLVM IR (-O0):
%struct.FNVHash1024 = type { i32 }
define void @fnv1024UpdateString(%struct.FNVHash1024* %0, i8* %1) {
%3 = alloca %struct.FNVHash1024*
%4 = alloca i8*
store %struct.FNVHash1024* %0, %struct.FNVHash1024** %3
store i8* %1, i8** %4
%5 = load %struct.FNVHash1024*, %struct.FNVHash1024** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @fnv1024UpdateBuffer(%struct.FNVHash1024* %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.FNVHash1024 = type { i32 }
define void @fnv1024UpdateString(%struct.FNVHash1024* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @fnv1024UpdateBuffer(%struct.FNVHash1024* %0, i8* %1, i32 %3)
ret void
}
void test___atomic_fetch_nand_2(int *mem) { __atomic_fetch_nand(mem, -1, 4); }


x86 assembly (clang, -O0):
<test___atomic_fetch_nand_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
and    %esi,%edx
mov    %edx,-0x28(%rbp)
not    %edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    1150 <test___atomic_fetch_nand_2+0x50>
jmp    1122 <test___atomic_fetch_nand_2+0x22>
mov    -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_fetch_nand_2>:
mov    (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
not    %ecx
lock cmpxchg %ecx,(%rdi)
jne    1110 <test___atomic_fetch_nand_2+0x10>
ret

LLVM IR (-O0):
define void @test___atomic_fetch_nand_2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32 -1, i32* %3
%6 = load i32, i32* %3
%7 = atomicrmw nand i32* %5, i32 %6 acq_rel
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_fetch_nand_2(i32* nocapture %0) {
%2 = atomicrmw nand i32* %0, i32 -1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *, int);
void func(void *addr, int offset) {
  printf("this:%p offset:%d\n", addr, offset);
}


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

x86 assembly (clang, -O2):
<func>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"this:%p offset:%d\0A\00"
define void @func(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"this:%p offset:%d\0A\00"
define void @func(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int strncmp(char *, char *, int);
int diff_board(char *board1, char *board2) {
  return strncmp(board1, board2, 90);
}


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

x86 assembly (clang, -O2):
<diff_board>:
mov    $0x5a,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
define i32 @diff_board(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 i32 @strncmp(i8* %5, i8* %6, i32 90)
ret i32 %7
}

LLVM IR (-O2):
define i32 @diff_board(i8* %0, i8* %1) {
%3 = tail call i32 @strncmp(i8* %0, i8* %1, i32 90)
ret i32 %3
}
/* Variables and functions */
bool nrf91_errata_27(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf91_errata_27() {
ret i32 0
}
unsigned char answer_3(unsigned char arg0, int arg1) {
  return arg0 | (1 << arg1);
}


x86 assembly (clang, -O0):
<answer_3>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<answer_3>:
mov    %edi,%eax
bts    %esi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @answer_3(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 1, %7
%9 = or i32 %6, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define zeroext i8 @answer_3(i8 zeroext %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = trunc i32 %3 to i8
%5 = or i8 %4, %0
ret i8 %5
}
int f2(x) { return 3; }


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

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

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

LLVM IR (-O2):
define i32 @f2(i32 %0) {
ret i32 3
}
/* Variables and functions */
int foo();
int bar() {
  int a = foo();
  a += foo();
  return a;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bar() {
%1 = alloca i32
%2 = call i32 (...) @foo()
store i32 %2, i32* %1
%3 = call i32 (...) @foo()
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %3
store i32 %5, i32* %1
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
%3 = add nsw i32 %2, %1
ret i32 %3
}