xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, double);
double tocelsius(float);
main() {
  float fah, cel;
  int lower, upper, step;
  lower = 0;
  upper = 100;
  step = 1;
  fah = lower;
  while (fah <= upper) {
    printf("%3.0f %6.3f\n", fah, tocelsius(fah));
    fah = fah + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11a0 <main+0x80>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <tocelsius@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
movss  0xe6f(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    114e <main+0x2e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
lea    0xed4(%rip),%rbx
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  %xmm0,0x4(%rsp)
call   1030 <tocelsius@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0x4(%rsp),%xmm0
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x65,%ebp
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%3.0f %6.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 100, i32* %5
store i32 1, i32* %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
store float %8, float* %2
br label %9
9: ; preds = %14, %0
%10 = load float, float* %2
%11 = load i32, i32* %5
%12 = sitofp i32 %11 to float
%13 = fcmp ole float %10, %12
br i1 %13, label %14, label %21
14: ; preds = %9
%15 = load float, float* %2
%16 = load float, float* %2
%17 = call double @tocelsius(float %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %15, double %17)
%19 = load float, float* %2
%20 = fadd float %19, 1.000000e+00
store float %20, float* %2
br label %9
21: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%3.0f %6.3f\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = sitofp i32 %2 to float
%4 = tail call double @tocelsius(float %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %3, double %4)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 101
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Type definitions */
struct tinyjson_token {
  int dummy;
};

/* Variables and functions */
int tinyjson_parse_err(char const *, int, struct tinyjson_token *, int);
int tinyjson_parse(const char *json, int length, struct tinyjson_token *out,
                   int max_tokens) {
  int err = tinyjson_parse_err(json, length, out, max_tokens);
  if (err == -1)
    err = 0;
  return err;
}


x86 assembly (clang, -O0):
<tinyjson_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <tinyjson_parse_err@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    114d <tinyjson_parse+0x3d>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tinyjson_parse>:
push   %rax
call   1030 <tinyjson_parse_err@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.tinyjson_token = type { i32 }
define i32 @tinyjson_parse(i8* %0, i32 %1, %struct.tinyjson_token* %2, i32 %3) {
%5 = tail call i32 @tinyjson_parse_err(i8* %0, i32 %1, %struct.tinyjson_token* %2, i32 %3)
%6 = icmp eq i32 %5, -1
%7 = select i1 %6, i32 0, i32 %5
ret i32 %7
}
void omap_ion_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @omap_ion_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr, "usage: testfile [-b bytes] [-f file] [-o ops]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"usage: testfile [-b bytes] [-f file] [-o ops]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"usage: testfile [-b bytes] [-f file] [-o ops]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void test45_Test7_pollen__run__E() {}


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

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

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

LLVM IR (-O2):
define void @test45_Test7_pollen__run__E() {
ret void
}
void caller_1_1_1_2_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_1_1_2_2_1_1() {
ret void
}
int do_169() { return 169; }


x86 assembly (clang, -O0):
<do_169>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa9,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_169() {
ret i32 169
}

LLVM IR (-O2):
define i32 @do_169() {
ret i32 169
}
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len) { return 0; }


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

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

LLVM IR (-O0):
%struct.ast_cli_entry = type opaque
define i32 @ast_cli_unregister_multiple(%struct.ast_cli_entry* %0, i32 %1) {
%3 = alloca %struct.ast_cli_entry*
%4 = alloca i32
store %struct.ast_cli_entry* %0, %struct.ast_cli_entry** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.ast_cli_entry = type opaque
define i32 @ast_cli_unregister_multiple(%struct.ast_cli_entry* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ compare();
int /*<<< orphan*/ subtract();
int /*<<< orphan*/ t1();
int /*<<< orphan*/ t2();
int /*<<< orphan*/ t3();
int /*<<< orphan*/ t4();
int /*<<< orphan*/ t5();
int /*<<< orphan*/ t6();
int /*<<< orphan*/ t7();
int main() {
  t1();
  t2();
  t3();
  t4();
  t5();
  t6();
  t7();
  subtract();
  compare();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <t1@plt>
mov    $0x0,%al
call   1080 <t2@plt>
mov    $0x0,%al
call   1040 <t3@plt>
mov    $0x0,%al
call   1090 <t4@plt>
mov    $0x0,%al
call   1050 <t5@plt>
mov    $0x0,%al
call   10a0 <t6@plt>
mov    $0x0,%al
call   1060 <t7@plt>
mov    $0x0,%al
call   1070 <subtract@plt>
mov    $0x0,%al
call   10b0 <compare@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <t1@plt>
xor    %eax,%eax
call   1080 <t2@plt>
xor    %eax,%eax
call   1040 <t3@plt>
xor    %eax,%eax
call   1090 <t4@plt>
xor    %eax,%eax
call   1050 <t5@plt>
xor    %eax,%eax
call   10a0 <t6@plt>
xor    %eax,%eax
call   1060 <t7@plt>
xor    %eax,%eax
call   1070 <subtract@plt>
xor    %eax,%eax
call   10b0 <compare@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @t1()
%3 = call i32 (...) @t2()
%4 = call i32 (...) @t3()
%5 = call i32 (...) @t4()
%6 = call i32 (...) @t5()
%7 = call i32 (...) @t6()
%8 = call i32 (...) @t7()
%9 = call i32 (...) @subtract()
%10 = call i32 (...) @compare()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @t1()
%2 = tail call i32 (...) @t2()
%3 = tail call i32 (...) @t3()
%4 = tail call i32 (...) @t4()
%5 = tail call i32 (...) @t5()
%6 = tail call i32 (...) @t6()
%7 = tail call i32 (...) @t7()
%8 = tail call i32 (...) @subtract()
%9 = tail call i32 (...) @compare()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord2i(int /*<<< orphan*/, int /*<<< orphan*/);
void TexCoord2i(GLint s, GLint t) { glTexCoord2i(s, t); }


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

x86 assembly (clang, -O2):
<TexCoord2i>:
jmp    1030 <glTexCoord2i@plt>

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

LLVM IR (-O2):
define void @TexCoord2i(i32 %0, i32 %1) {
%3 = tail call i32 @glTexCoord2i(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stop_here();
int main() {
  stop_here();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @stop_here()
ret i32 0
}
int indexIntoF(int indx, int *cftab) {
  int nb, na, mid;
  nb = 0;
  na = 256;
  do {
    mid = (nb + na) >> 1;
    if (indx >= cftab[mid])
      nb = mid;
    else
      na = mid;
  } while (na - nb != 1);
  return nb;
}


x86 assembly (clang, -O0):
<indexIntoF>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x100,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jl     1144 <indexIntoF+0x44>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114a <indexIntoF+0x4a>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114f <indexIntoF+0x4f>
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
cmp    $0x1,%eax
jne    1119 <indexIntoF+0x19>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indexIntoF>:
xor    %eax,%eax
mov    $0x100,%r8d
jmp    111c <indexIntoF+0x1c>
nopw   0x0(%rax,%rax,1)
mov    %edx,%eax
mov    %r8d,%ecx
sub    %eax,%ecx
cmp    $0x1,%ecx
je     112f <indexIntoF+0x2f>
lea    (%rax,%r8,1),%edx
sar    %edx
movslq %edx,%rcx
cmp    %edi,(%rsi,%rcx,4)
jle    1110 <indexIntoF+0x10>
mov    %edx,%r8d
jmp    1112 <indexIntoF+0x12>
ret

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

LLVM IR (-O2):
define i32 @indexIntoF(i32 %0, i32* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 256, %2 ], [ %12, %3 ]
%5 = phi i32 [ 0, %2 ], [ %13, %3 ]
%6 = add nsw i32 %5, %4
%7 = ashr i32 %6, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = icmp sgt i32 %10, %0
%12 = select i1 %11, i32 %7, i32 %4
%13 = select i1 %11, i32 %5, i32 %7
%14 = sub nsw i32 %12, %13
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %3
16: ; preds = %3
ret i32 %13
}
void resetTimer() {
  (*(unsigned int *)0x4000C004) |= 0b10;
  __asm("nop");
  (*(unsigned int *)0x4000C004) &= ~0x2;
}


x86 assembly (clang, -O0):
<resetTimer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4000c004,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0x4000c004,%eax
mov    %ecx,(%rax)
nop
mov    $0x4000c004,%eax
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    $0x4000c004,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetTimer>:
orb    $0x2,0x4000c004
02
nop
andb   $0xfd,0x4000c004
fd
ret

LLVM IR (-O0):
define void @resetTimer() {
%1 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%2 = or i32 %1, 2
store i32 %2, i32* inttoptr (i64 1073790980 to i32*)
%3 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%4 = and i32 %3, -3
store i32 %4, i32* inttoptr (i64 1073790980 to i32*)
ret void
}

LLVM IR (-O2):
define void @resetTimer() {
%1 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%2 = or i32 %1, 2
store i32 %2, i32* inttoptr (i64 1073790980 to i32*)
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%3 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%4 = and i32 %3, -3
store i32 %4, i32* inttoptr (i64 1073790980 to i32*)
ret void
}
/* Variables and functions */
float math_cerp(float, float, float);
float call_cerpf(float a, float b, float t) { return math_cerp(a, b, t); }


x86 assembly (clang, -O0):
<call_cerpf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <math_cerp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_cerpf>:
jmp    1030 <math_cerp@plt>

LLVM IR (-O0):
define float @call_cerpf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @math_cerp(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @call_cerpf(float %0, float %1, float %2) {
%4 = tail call float @math_cerp(float %0, float %1, float %2)
ret float %4
}
void foo_1_2_2_2_2_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_2_2_2_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFD;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
int setnonblocking(int sockfd) {
  if (fcntl(sockfd, F_SETFL, fcntl(sockfd, F_GETFD, 0) | O_NONBLOCK) == -1) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<setnonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
mov    0x2e99(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
jne    116b <setnonblocking+0x5b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <setnonblocking+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setnonblocking>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebc(%rip),%rax
mov    (%rax),%ebp
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2eb3(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <fcntl@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@F_SETFL = global i32 0
@F_GETFD = global i32 0
@O_NONBLOCK = global i32 0
define i32 @setnonblocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @F_SETFL
%6 = load i32, i32* %3
%7 = load i32, i32* @F_GETFD
%8 = call i32 @fcntl(i32 %6, i32 %7, i32 0)
%9 = load i32, i32* @O_NONBLOCK
%10 = or i32 %8, %9
%11 = call i32 @fcntl(i32 %4, i32 %5, i32 %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %1
store i32 -1, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@F_GETFD = global i32 0
@O_NONBLOCK = global i32 0
define i32 @setnonblocking(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @F_GETFD
%4 = tail call i32 @fcntl(i32 %0, i32 %3, i32 0)
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %4
%7 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %6)
%8 = icmp eq i32 %7, -1
%9 = sext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ decrypt(int);
int /*<<< orphan*/ print_ch(int /*<<< orphan*/);
int scanf(char *, int *);
int main() {
  int n, read;
  read = scanf("%i", &n);
  while (read == 1) {
    print_ch(decrypt(n));
    read = scanf("%i", &n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1183 <main+0x53>
mov    -0x8(%rbp),%edi
call   1030 <decrypt@plt>
mov    %eax,%edi
call   1040 <print_ch@plt>
lea    0xe8e(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,-0xc(%rbp)
jmp    1152 <main+0x22>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    1180 <main+0x50>
lea    0xeaf(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    0x4(%rsp),%edi
call   1030 <decrypt@plt>
mov    %eax,%edi
call   1040 <print_ch@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
je     1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 %4, i32* %3
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %2
%10 = call i32 @decrypt(i32 %9)
%11 = call i32 @print_ch(i32 %10)
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 %12, i32* %3
br label %5
13: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = load i32, i32* %1
%7 = call i32 @decrypt(i32 %6)
%8 = call i32 @print_ch(i32 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = icmp eq i32 %9, 1
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
unsigned int getParameter(unsigned int sp, unsigned int param) {
  if (param > 10) {
    return 0;
  }
  return (unsigned int)(*(unsigned int *)(sp + param * 4));
}


x86 assembly (clang, -O0):
<getParameter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jbe    1120 <getParameter+0x20>
movl   $0x0,-0x4(%rbp)
jmp    1132 <getParameter+0x32>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
mov    %eax,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getParameter>:
xor    %eax,%eax
cmp    $0xa,%esi
ja     110c <getParameter+0xc>
lea    (%rdi,%rsi,4),%eax
mov    (%rax),%eax
ret

LLVM IR (-O0):
define i32 @getParameter(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* %5
%7 = icmp ugt i32 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = mul i32 %11, 4
%13 = add i32 %10, %12
%14 = zext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load i32, i32* %15
store i32 %16, i32* %3
br label %17
17: ; preds = %9, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @getParameter(i32 %0, i32 %1) {
%3 = icmp ugt i32 %1, 10
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = shl nuw nsw i32 %1, 2
%6 = add i32 %5, %0
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load i32, i32* %8
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ config_destroy();
int config_init();
int config_refresh() {
  config_destroy();
  return config_init();
}


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

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

LLVM IR (-O0):
define i32 @config_refresh() {
%1 = call i32 (...) @config_destroy()
%2 = call i32 (...) @config_init()
ret i32 %2
}

LLVM IR (-O2):
define i32 @config_refresh() {
%1 = tail call i32 (...) @config_destroy()
%2 = tail call i32 (...) @config_init()
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t __murmur_fmix(uint32_t h) {
  h ^= h >> 16;
  h *= 0x85ebca6b;
  h ^= h >> 13;
  h *= 0xc2b2ae35;
  h ^= h >> 16;
  return h;
}


x86 assembly (clang, -O0):
<__murmur_fmix>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
imul   $0x85ebca6b,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xd,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
imul   $0xc2b2ae35,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__murmur_fmix>:
mov    %edi,%eax
sar    $0x10,%eax
xor    %edi,%eax
imul   $0x85ebca6b,%eax,%eax
mov    %eax,%ecx
sar    $0xd,%ecx
xor    %eax,%ecx
imul   $0xc2b2ae35,%ecx,%ecx
mov    %ecx,%eax
sar    $0x10,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__murmur_fmix(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 16
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = mul i32 %7, -2048144789
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = ashr i32 %9, 13
%11 = load i32, i32* %2
%12 = xor i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = mul i32 %13, -1028477387
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = ashr i32 %15, 16
%17 = load i32, i32* %2
%18 = xor i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @__murmur_fmix(i32 %0) {
%2 = ashr i32 %0, 16
%3 = xor i32 %2, %0
%4 = mul i32 %3, -2048144789
%5 = ashr i32 %4, 13
%6 = xor i32 %5, %4
%7 = mul i32 %6, -1028477387
%8 = ashr i32 %7, 16
%9 = xor i32 %8, %7
ret i32 %9
}
void ff_hevc_put_hevc_uni_qpel_v32_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v32_8_sse4() {
ret void
}
/* Variables and functions */
bool nrf52_errata_214(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_214() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ECHILD;
int /*<<< orphan*/ errno;
__attribute__((weak)) int _wait(int *status) {
  do {
    (void)(status);
  } while (0);
  errno = ECHILD;
  return -1;
}


x86 assembly (clang, -O0):
<_wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wait>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ECHILD = global i32 0
@errno = global i32 0
define weak i32 @_wait(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
br label %3
3: ; preds = %1
%4 = load i32*, i32** %2
br label %5
5: ; preds = %3
%6 = load i32, i32* @ECHILD
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ECHILD = global i32 0
@errno = global i32 0
define weak i32 @_wait(i32* %0) {
%2 = load i32, i32* @ECHILD
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ decodeHUD_MapIcon();
int /*<<< orphan*/ decodeSprite(int, int, int, char *);
void decodeHUD() {
  decodeSprite(274, 297, 8, "jag_hud");
  decodeHUD_MapIcon();
  decodeSprite(299, 353, 8, "jag_hud");
}


x86 assembly (clang, -O0):
<decodeHUD>:
push   %rbp
mov    %rsp,%rbp
mov    $0x112,%edi
mov    $0x129,%esi
mov    $0x8,%edx
lea    0xec6(%rip),%rcx
call   1030 <decodeSprite@plt>
mov    $0x0,%al
call   1040 <decodeHUD_MapIcon@plt>
mov    $0x12b,%edi
mov    $0x161,%esi
mov    $0x8,%edx
lea    0xea4(%rip),%rcx
call   1030 <decodeSprite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<decodeHUD>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    $0x112,%edi
mov    $0x129,%esi
mov    $0x8,%edx
mov    %rbx,%rcx
call   1030 <decodeSprite@plt>
xor    %eax,%eax
call   1040 <decodeHUD_MapIcon@plt>
mov    $0x12b,%edi
mov    $0x161,%esi
mov    $0x8,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1030 <decodeSprite@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"jag_hud\00"
define void @decodeHUD() {
%1 = call i32 @decodeSprite(i32 274, i32 297, i32 8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @decodeHUD_MapIcon()
%3 = call i32 @decodeSprite(i32 299, i32 353, i32 8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"jag_hud\00"
define void @decodeHUD() {
%1 = tail call i32 @decodeSprite(i32 274, i32 297, i32 8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @decodeHUD_MapIcon()
%3 = tail call i32 @decodeSprite(i32 299, i32 353, i32 8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int new_window_from_buf(int, int, int, int, char *, int /*<<< orphan*/, int);
int new_window(int x, int y, int w, int h, char *title) {
  return new_window_from_buf(x, y, w, h, title, 0, 16);
}


x86 assembly (clang, -O0):
<new_window>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
xor    %r9d,%r9d
movl   $0x10,(%rsp)
call   1030 <new_window_from_buf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_window>:
push   %rax
movl   $0x10,(%rsp)
xor    %r9d,%r9d
call   1030 <new_window_from_buf@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @new_window(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = tail call i32 @new_window_from_buf(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i32 0, i32 16)
ret i32 %6
}
int binToDec(char binArg) {}


x86 assembly (clang, -O0):
<binToDec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @binToDec(i8 signext %0) {
ret i32 undef
}
/* Type definitions */
typedef int in_addr_t;

/* Variables and functions */
in_addr_t first_n_bit_mask(int n) {
  return (n >= 32 ? 0xFFFFFFFFUL : ~(0xFFFFFFFFUL >> n));
}


x86 assembly (clang, -O0):
<first_n_bit_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jl     111f <first_n_bit_mask+0x1f>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
jmp    1134 <first_n_bit_mask+0x34>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    $0xffffffff,%eax
shr    %cl,%rax
xor    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<first_n_bit_mask>:
mov    %edi,%ecx
movabs $0xffffffff00000000,%rdx
ff ff ff
sar    %cl,%rdx
cmp    $0x20,%edi
mov    $0xffffffff,%eax
cmovl  %edx,%eax
ret

LLVM IR (-O0):
define i32 @first_n_bit_mask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 32
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = lshr i64 4294967295, %8
%10 = xor i64 %9, -1
br label %11
11: ; preds = %6, %5
%12 = phi i64 [ 4294967295, %5 ], [ %10, %6 ]
%13 = trunc i64 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @first_n_bit_mask(i32 %0) {
%2 = icmp sgt i32 %0, 31
%3 = zext i32 %0 to i64
%4 = ashr i64 -4294967296, %3
%5 = trunc i64 %4 to i32
%6 = select i1 %2, i32 -1, i32 %5
ret i32 %6
}
void interrupt_reserved_2(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<interrupt_reserved_2>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <interrupt_reserved_2+0x9>
jmp    1109 <interrupt_reserved_2+0x9>

x86 assembly (clang, -O2):
<interrupt_reserved_2>:
jmp    1100 <interrupt_reserved_2>

LLVM IR (-O0):
define void @interrupt_reserved_2() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @interrupt_reserved_2() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct rnet_message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct rnet_message *);
void rnet_message_del(struct rnet_message *message) { free(message); }


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

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

LLVM IR (-O0):
%struct.rnet_message = type { i32 }
define void @rnet_message_del(%struct.rnet_message* %0) {
%2 = alloca %struct.rnet_message*
store %struct.rnet_message* %0, %struct.rnet_message** %2
%3 = load %struct.rnet_message*, %struct.rnet_message** %2
%4 = call i32 @free(%struct.rnet_message* %3)
ret void
}

LLVM IR (-O2):
%struct.rnet_message = type { i32 }
define void @rnet_message_del(%struct.rnet_message* nocapture %0) {
%2 = tail call i32 @free(%struct.rnet_message* %0)
ret void
}
/* Variables and functions */
int ejtag_switch(int, int);
int mips_ejtag_data(int data) { return ejtag_switch(0x1000, data); }


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

x86 assembly (clang, -O2):
<mips_ejtag_data>:
mov    %edi,%esi
mov    $0x1000,%edi
jmp    1030 <ejtag_switch@plt>

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

LLVM IR (-O2):
define i32 @mips_ejtag_data(i32 %0) {
%2 = tail call i32 @ejtag_switch(i32 4096, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, unsigned long *, unsigned long *,
                          unsigned long *, unsigned long *);
unsigned int IP2Int(char *str, unsigned long *ip) {
  unsigned long ip1, ip2, ip3, ip4;
  sscanf(str, "%lu.%lu.%lu.%lu", &ip1, &ip2, &ip3, &ip4);
  *ip = ip1 << 24 | ip2 << 16 | ip3 << 8 | ip4;
  return 1;
}


x86 assembly (clang, -O0):
<IP2Int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x30(%rbp),%r9
call   1030 <sscanf@plt>
mov    -0x18(%rbp),%rcx
shl    $0x18,%rcx
mov    -0x20(%rbp),%rax
shl    $0x10,%rax
or     %rax,%rcx
mov    -0x28(%rbp),%rax
shl    $0x8,%rax
or     %rax,%rcx
or     -0x30(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IP2Int>:
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rbx
lea    0xee1(%rip),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
call   1030 <sscanf@plt>
mov    0x18(%rsp),%rax
shl    $0x18,%rax
mov    0x10(%rsp),%rcx
shl    $0x10,%rcx
or     %rax,%rcx
mov    0x8(%rsp),%rax
shl    $0x8,%rax
or     %rcx,%rax
or     (%rsp),%rax
mov    %rax,(%rbx)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%lu.%lu.%lu.%lu\00"
define i32 @IP2Int(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %3
store i64* %1, i64** %4
%9 = load i8*, i8** %3
%10 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64* %5, i64* %6, i64* %7, i64* %8)
%11 = load i64, i64* %5
%12 = shl i64 %11, 24
%13 = load i64, i64* %6
%14 = shl i64 %13, 16
%15 = or i64 %12, %14
%16 = load i64, i64* %7
%17 = shl i64 %16, 8
%18 = or i64 %15, %17
%19 = load i64, i64* %8
%20 = or i64 %18, %19
%21 = load i64*, i64** %4
store i64 %20, i64* %21
ret i32 1
}

LLVM IR (-O2):
@.str = [16 x i8] c"%lu.%lu.%lu.%lu\00"
define i32 @IP2Int(i8* nocapture %0, i64* nocapture writeonly %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = bitcast i64* %3 to i8*
%8 = bitcast i64* %4 to i8*
%9 = bitcast i64* %5 to i8*
%10 = bitcast i64* %6 to i8*
%11 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64* %3, i64* %4, i64* %5, i64* %6)
%12 = load i64, i64* %3
%13 = shl i64 %12, 24
%14 = load i64, i64* %4
%15 = shl i64 %14, 16
%16 = or i64 %15, %13
%17 = load i64, i64* %5
%18 = shl i64 %17, 8
%19 = or i64 %16, %18
%20 = load i64, i64* %6
%21 = or i64 %19, %20
store i64 %21, i64* %1
ret i32 1
}
int isnanf(float x) { return 0; }


x86 assembly (clang, -O0):
<isnanf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @isnanf(float %0) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void *p2v(uint32_t addr) { return (void *)addr + 0xe0000000; }


x86 assembly (clang, -O0):
<p2v>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movabs $0xe0000000,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<p2v>:
mov    $0xe0000000,%eax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @p2v(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
%5 = getelementptr i8, i8* %4, i64 3758096384
ret i8* %5
}

LLVM IR (-O2):
define i8* @p2v(i64 %0) {
%2 = inttoptr i64 %0 to i8*
%3 = getelementptr i8, i8* %2, i64 3758096384
ret i8* %3
}
unsigned blend_half(register unsigned color1, register unsigned color2) {
  return (color1 + color2) >> 1;
}


x86 assembly (clang, -O0):
<blend_half>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blend_half>:
lea    (%rdi,%rsi,1),%eax
shr    %eax
ret

LLVM IR (-O0):
define i32 @blend_half(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 = add i32 %5, %6
%8 = lshr i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @blend_half(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = lshr i32 %3, 1
ret i32 %4
}
/* Variables and functions */
long LONG_MIN;
int expect_long_sum(long (*f)(long, long)) {
  return f(LONG_MIN + 1, -1) == LONG_MIN;
}


x86 assembly (clang, -O0):
<expect_long_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ed1(%rip),%rcx
mov    (%rcx),%rdi
add    $0x1,%rdi
mov    $0xffffffffffffffff,%rsi
call   *%rax
mov    0x2eba(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect_long_sum>:
push   %rbx
mov    %rdi,%rax
mov    0x2edd(%rip),%rbx
mov    (%rbx),%rdi
add    $0x1,%rdi
mov    $0xffffffffffffffff,%rsi
call   *%rax
xor    %ecx,%ecx
cmp    (%rbx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@LONG_MIN = global i64 0
define i32 @expect_long_sum(i64 (i64, i64)* %0) {
%2 = alloca i64 (i64, i64)*
store i64 (i64, i64)* %0, i64 (i64, i64)** %2
%3 = load i64 (i64, i64)*, i64 (i64, i64)** %2
%4 = load i64, i64* @LONG_MIN
%5 = add nsw i64 %4, 1
%6 = call i64 %3(i64 %5, i64 -1)
%7 = load i64, i64* @LONG_MIN
%8 = icmp eq i64 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@LONG_MIN = global i64 0
define i32 @expect_long_sum(i64 (i64, i64)* nocapture %0) {
%2 = load i64, i64* @LONG_MIN
%3 = add nsw i64 %2, 1
%4 = tail call i64 %0(i64 %3, i64 -1)
%5 = load i64, i64* @LONG_MIN
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
double pow(double x, double y) {
  double r = x;
  if (y <= 0)
    return (1.0);
  if (y == 1)
    return (x);
  while (y > 1) {
    r *= x;
    y--;
  }
  return (r);
}


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1138 <pow+0x38>
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11b0 <pow+0xb0>
movsd  -0x18(%rbp),%xmm0
movsd  0xebb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1164 <pow+0x64>
jp     1164 <pow+0x64>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11b0 <pow+0xb0>
jmp    1169 <pow+0x69>
movsd  -0x18(%rbp),%xmm0
movsd  0xe8a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11a6 <pow+0xa6>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe71(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1169 <pow+0x69>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jae    1143 <pow+0x43>
ucomisd 0xeee(%rip),%xmm1
jbe    114b <pow+0x4b>
movsd  0xeec(%rip),%xmm3
movsd  0xedc(%rip),%xmm4
movapd %xmm0,%xmm2
nopl   0x0(%rax,%rax,1)
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm1
ucomisd %xmm4,%xmm1
ja     1130 <pow+0x30>
movapd %xmm2,%xmm0
ret
movsd  0xeb5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @pow(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %4
store double %7, double* %6
%8 = load double, double* %5
%9 = fcmp ole double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %2
store double 1.000000e+00, double* %3
br label %28
11: ; preds = %2
%12 = load double, double* %5
%13 = fcmp oeq double %12, 1.000000e+00
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = load double, double* %4
store double %15, double* %3
br label %28
16: ; preds = %11
br label %17
17: ; preds = %20, %16
%18 = load double, double* %5
%19 = fcmp ogt double %18, 1.000000e+00
br i1 %19, label %20, label %26
20: ; preds = %17
%21 = load double, double* %4
%22 = load double, double* %6
%23 = fmul double %22, %21
store double %23, double* %6
%24 = load double, double* %5
%25 = fadd double %24, -1.000000e+00
store double %25, double* %5
br label %17
26: ; preds = %17
%27 = load double, double* %6
store double %27, double* %3
br label %28
28: ; preds = %26, %14, %10
%29 = load double, double* %3
ret double %29
}

LLVM IR (-O2):
define double @pow(double %0, double %1) {
%3 = fcmp ugt double %1, 0.000000e+00
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = fcmp ogt double %1, 1.000000e+00
br i1 %5, label %6, label %12
6: ; preds = %4, %6
%7 = phi double [ %9, %6 ], [ %0, %4 ]
%8 = phi double [ %10, %6 ], [ %1, %4 ]
%9 = fmul double %7, %0
%10 = fadd double %8, -1.000000e+00
%11 = fcmp ogt double %10, 1.000000e+00
br i1 %11, label %6, label %12
12: ; preds = %6, %4, %2
%13 = phi double [ 1.000000e+00, %2 ], [ %0, %4 ], [ %9, %6 ]
ret double %13
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int /*<<< orphan*/ EVP_MD_CTX_md_data(int /*<<< orphan*/ *);
int SHA256_Update(int /*<<< orphan*/, void const *, size_t);
int update256(EVP_MD_CTX *ctx, const void *data, size_t count) {
  return SHA256_Update(EVP_MD_CTX_md_data(ctx), data, count);
}


x86 assembly (clang, -O0):
<update256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <EVP_MD_CTX_md_data@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <SHA256_Update@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update256>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <EVP_MD_CTX_md_data@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <SHA256_Update@plt>

LLVM IR (-O0):
define i32 @update256(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = call i32 @EVP_MD_CTX_md_data(i32* %7)
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @SHA256_Update(i32 %8, i8* %9, i64 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @update256(i32* %0, i8* %1, i64 %2) {
%4 = tail call i32 @EVP_MD_CTX_md_data(i32* %0)
%5 = tail call i32 @SHA256_Update(i32 %4, i8* %1, i64 %2)
ret i32 %5
}
/* Variables and functions */
int *malloc(int);
int *copy_array(int *l, int n) {
  int i;
  int *array = malloc(n * sizeof(int));
  for (i = 0; i < n; i++) {
    array[i] = l[i];
  }
  return array;
}


x86 assembly (clang, -O0):
<copy_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1169 <copy_array+0x59>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1139 <copy_array+0x29>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_array>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
lea    0x0(,%rbx,4),%edi
call   1040 <malloc@plt>
mov    %rax,%r15
test   %ebx,%ebx
jle    114e <copy_array+0x2e>
mov    %ebx,%edx
shl    $0x2,%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i32* @copy_array(i32* nocapture %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32* @malloc(i32 %3)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %0 to i8*
%9 = zext i32 %1 to i64
%10 = shl nuw nsw i64 %9, 2
br label %11
11: ; preds = %6, %2
ret i32* %4
}