xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ op_sync();
int /*<<< orphan*/ wl_mktree_sub(unsigned int, int /*<<< orphan*/);
int /*<<< orphan*/ wl_rmtree_sub(int /*<<< orphan*/);
void wl_rmtree(void) {
  unsigned testcode = 156;
  wl_mktree_sub(testcode, 0);
  op_sync();
  wl_rmtree_sub(0);
}


x86 assembly (clang, -O0):
<wl_rmtree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x9c,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <wl_mktree_sub@plt>
mov    $0x0,%al
call   1040 <op_sync@plt>
xor    %edi,%edi
call   1050 <wl_rmtree_sub@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_rmtree>:
push   %rax
mov    $0x9c,%edi
xor    %esi,%esi
call   1030 <wl_mktree_sub@plt>
xor    %eax,%eax
call   1040 <op_sync@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <wl_rmtree_sub@plt>

LLVM IR (-O0):
define void @wl_rmtree() {
%1 = alloca i32
store i32 156, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @wl_mktree_sub(i32 %2, i32 0)
%4 = call i32 (...) @op_sync()
%5 = call i32 @wl_rmtree_sub(i32 0)
ret void
}

LLVM IR (-O2):
define void @wl_rmtree() {
%1 = tail call i32 @wl_mktree_sub(i32 156, i32 0)
%2 = tail call i32 (...) @op_sync()
%3 = tail call i32 @wl_rmtree_sub(i32 0)
ret void
}
void ignore_handler(__attribute__((unused)) int i) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @create_quaddobl_Laurent_homotopy() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 794, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int swap(int a, int b) {
  int tmp = a;
  a = b;
  b = tmp;
  return a;
  return b;
}


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

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

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

LLVM IR (-O2):
define i32 @swap(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Type definitions */
struct battery {
  int dummy;
};

/* Variables and functions */
int ENODEV;
int default_charger_enable(struct battery *b, int enable) { return -ENODEV; }


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

x86 assembly (clang, -O2):
<default_charger_enable>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.battery = type { i32 }
@ENODEV = global i32 0
define i32 @default_charger_enable(%struct.battery* %0, i32 %1) {
%3 = alloca %struct.battery*
%4 = alloca i32
store %struct.battery* %0, %struct.battery** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENODEV
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
%struct.battery = type { i32 }
@ENODEV = global i32 0
define i32 @default_charger_enable(%struct.battery* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENODEV
%4 = sub nsw i32 0, %3
ret i32 %4
}
void foo280() {}


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

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

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

LLVM IR (-O2):
define void @foo280() {
ret void
}
int mycompare(const void *px, const void *py) {
  int x = *((int *)px);
  int y = *((int *)py);
  if (x > y)
    return 1;
  if (x < y)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<mycompare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1136 <mycompare+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1155 <mycompare+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <mycompare+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <mycompare+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mycompare>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @mycompare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
void __init_work(struct work_struct *work, int onstack) {}


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

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

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

LLVM IR (-O2):
%struct.work_struct = type opaque
define void @__init_work(%struct.work_struct* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main(int argc, char **argv) {
  int i = 3;
  if (i > 0) {
    while (--i)
      ;
  } else {
    f(3);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1158 <main+0x48>
jmp    113c <main+0x2c>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1153 <main+0x43>
jmp    113c <main+0x2c>
jmp    1162 <main+0x52>
mov    $0x3,%edi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("this is first vs code.");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"this is first vs code.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"this is first vs code.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint16_t;
typedef scalar_t__ int8_t;

/* Variables and functions */
int test_for_collision(uint16_t pos1[2], uint16_t pos2[2],
                       int8_t planned_step_x, int8_t planned_step_y) {
  if (!(pos1[0] + planned_step_x == pos2[0] &&
        pos1[1] + planned_step_y == pos2[1]))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<test_for_collision>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
add    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jne    1146 <test_for_collision+0x46>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
add    -0x28(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    0x8(%rcx),%rax
je     1152 <test_for_collision+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1159 <test_for_collision+0x59>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_for_collision>:
add    (%rdi),%rdx
xor    %eax,%eax
cmp    (%rsi),%rdx
jne    1117 <test_for_collision+0x17>
add    0x8(%rdi),%rcx
xor    %eax,%eax
cmp    0x8(%rsi),%rcx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @test_for_collision(i64* nocapture %0, i64* nocapture %1, i64 %2, i64 %3) {
%5 = load i64, i64* %0
%6 = add nsw i64 %5, %2
%7 = load i64, i64* %1
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %17
9: ; preds = %4
%10 = getelementptr inbounds i64, i64* %0, i64 1
%11 = load i64, i64* %10
%12 = add nsw i64 %11, %3
%13 = getelementptr inbounds i64, i64* %1, i64 1
%14 = load i64, i64* %13
%15 = icmp eq i64 %12, %14
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %9, %4
%18 = phi i32 [ 0, %4 ], [ %16, %9 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ z80_ed_45_retn();
void z80_ed_7d_retn(void) { z80_ed_45_retn(); }


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

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

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

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

/* Variables and functions */
int _vsnprintf(char *, size_t, char const *, int /*<<< orphan*/);
extern int vsnprintf(char *s, size_t n, const char *format, va_list arg) {
  return _vsnprintf(s, n, format, arg);
}


x86 assembly (clang, -O0):
<vsnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <_vsnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsnprintf>:
jmp    1030 <_vsnprintf@plt>

LLVM IR (-O0):
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @_vsnprintf(i8* %9, i64 %10, i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 @_vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ execlp(char *, char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int pg_dump_exec(char *db_name) {
  execlp("pg_dump", "pg_dump", "-d", db_name, NULL);
  perror("exec");
  return 1;
}


x86 assembly (clang, -O0):
<pg_dump_exec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xec9(%rip),%rsi
lea    0xeca(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   1040 <execlp@plt>
lea    0xeb9(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pg_dump_exec>:
push   %rax
mov    %rdi,%rcx
lea    0xed5(%rip),%rdi
lea    0xed6(%rip),%rdx
mov    %rdi,%rsi
xor    %r8d,%r8d
call   1040 <execlp@plt>
lea    0xec7(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"pg_dump\00"
@.str.1 = [3 x i8] c"-d\00"
@.str.2 = [5 x i8] c"exec\00"
define i32 @pg_dump_exec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3, i32* null)
%5 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [8 x i8] c"pg_dump\00"
@.str.1 = [3 x i8] c"-d\00"
@.str.2 = [5 x i8] c"exec\00"
define i32 @pg_dump_exec(i8* %0) {
%2 = tail call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32* null)
%3 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_address_parse();
int /*<<< orphan*/ test_nodes();
void test_network_nodes() {
  test_address_parse();
  test_nodes();
}


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

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

LLVM IR (-O0):
define void @test_network_nodes() {
%1 = call i32 (...) @test_address_parse()
%2 = call i32 (...) @test_nodes()
ret void
}

LLVM IR (-O2):
define void @test_network_nodes() {
%1 = tail call i32 (...) @test_address_parse()
%2 = tail call i32 (...) @test_nodes()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hang();
int /*<<< orphan*/ uart_strln(char *);
void c_undefined_instruction() {
  uart_strln("Exception: undefined instruction");
  hang();
}


x86 assembly (clang, -O0):
<c_undefined_instruction>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <uart_strln@plt>
mov    $0x0,%al
call   1040 <hang@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_undefined_instruction>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <uart_strln@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <hang@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Exception: undefined instruction\00"
define void @c_undefined_instruction() {
%1 = call i32 @uart_strln(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @hang()
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Exception: undefined instruction\00"
define void @c_undefined_instruction() {
%1 = tail call i32 @uart_strln(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @hang()
ret void
}
/* Variables and functions */
char const *getenv(char *);
const char *IoTHubAccount_GetEventHubConnectionString(void) {
  return getenv("IOTHUB_EVENTHUB_CONNECTION_STRING");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"IOTHUB_EVENTHUB_CONNECTION_STRING\00"
define i8* @IoTHubAccount_GetEventHubConnectionString() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [34 x i8] c"IOTHUB_EVENTHUB_CONNECTION_STRING\00"
define i8* @IoTHubAccount_GetEventHubConnectionString() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  pid_t pid = 0;
  kill(pid, SIGHUP);
  kill(pid, SIGKILL);
  kill(pid, SIGTERM);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
mov    -0x8(%rbp),%edi
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
mov    -0x8(%rbp),%edi
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed8(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <kill@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <kill@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGHUP = global i32 0
@SIGKILL = global i32 0
@SIGTERM = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGHUP
%5 = call i32 @kill(i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = load i32, i32* @SIGKILL
%8 = call i32 @kill(i32 %6, i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* @SIGTERM
%11 = call i32 @kill(i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@SIGHUP = global i32 0
@SIGKILL = global i32 0
@SIGTERM = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGHUP
%2 = tail call i32 @kill(i32 0, i32 %1)
%3 = load i32, i32* @SIGKILL
%4 = tail call i32 @kill(i32 0, i32 %3)
%5 = load i32, i32* @SIGTERM
%6 = tail call i32 @kill(i32 0, i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void print_time() {
  time_t current_time;
  char *c_time_string;
  current_time = time(NULL);
  c_time_string = ctime(&current_time);
  (void)printf("Current time is %s\n", c_time_string);
}


x86 assembly (clang, -O0):
<print_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_time>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
lea    0xeb3(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Current time is %s\0A\00"
define void @print_time() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i8* @ctime(i32* %1)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Current time is %s\0A\00"
define void @print_time() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i8* @ctime(i32* %1)
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
bool org(bool s, bool c) { return (s || c); }


x86 assembly (clang, -O0):
<org>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1123 <org+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<org>:
xor    %eax,%eax
or     %esi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @org(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int fxmlIsCloseTag(char *s) { return *(s + 1) == '/'; }


x86 assembly (clang, -O0):
<fxmlIsCloseTag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxmlIsCloseTag>:
xor    %eax,%eax
cmpb   $0x2f,0x1(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @fxmlIsCloseTag(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @fxmlIsCloseTag(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 47
%5 = zext i1 %4 to i32
ret i32 %5
}
char *TmpName(fname)
char *fname;
{
  static char buf[256];
  strcpy(buf, fname);
  strcat(buf, ".tmp~");
  return buf;
}


x86 assembly (clang, -O0):
<TmpName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f09(%rip),%rdi
call   1030 <strcpy@plt>
lea    0x2efd(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1040 <strcat@plt>
lea    0x2eea(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TmpName>:
push   %rbx
mov    %rdi,%rsi
lea    0x2f15(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
movl   $0x706d742e,(%rax,%rbx,1)
movw   $0x7e,0x4(%rax,%rbx,1)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@TmpName.buf = internal global [256 x i8] zeroinitializer
@.str = [6 x i8] c".tmp~\00"
define i8* @TmpName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strcpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @TmpName.buf, i64 0, i64 0), i8* %3)
%5 = call i8* @strcat(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @TmpName.buf, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @TmpName.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@TmpName.buf = internal global [256 x i8] zeroinitializer
@.str = [6 x i8] c".tmp~\00"
define i8* @TmpName(i8* nocapture %0) {
%2 = tail call i8* @strcpy(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @TmpName.buf, i64 0, i64 0), i8* dereferenceable(1) %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @TmpName.buf, i64 0, i64 0))
%4 = getelementptr [256 x i8], [256 x i8]* @TmpName.buf, i64 0, i64 %3
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(6) %4, i8* align 1 dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 6, i1 false)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @TmpName.buf, i64 0, i64 0)
}
void setival(a, b) int *a;
int b;
{ *a = b; }


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

x86 assembly (clang, -O2):
<setival>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @setival(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
void foo213(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo213(i32 %0) {
ret void
}
void audio_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @audio_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void validateArgCount(int actual, int wanted, const char *detail) {
  if (actual <= wanted) {
    printf("missing arguments: %s\n", detail);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<validateArgCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1158 <validateArgCount+0x38>
mov    -0x10(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validateArgCount>:
cmp    %esi,%edi
jle    1125 <validateArgCount+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"missing arguments: %s\0A\00"
define void @validateArgCount(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"missing arguments: %s\0A\00"
define void @validateArgCount(i32 %0, i32 %1, i8* %2) {
%4 = icmp sgt i32 %0, %1
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %3
ret void
}
/* Type definitions */
typedef double *__m128d;

/* Variables and functions */
void __attribute__((__always___, __nodebug__))
_mm_store_sd(double *dp, __m128d a) {
  dp[0] = a[0];
}


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

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

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

LLVM IR (-O2):
define void @_mm_store_sd(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
store double %3, double* %0
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ y_root;
};
struct TYPE_4__ {
  TYPE_1__ xbutton;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xbutton_y_root(void *_p) {
  return (int)((XEvent *)_p)->xbutton.y_root;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xbutton_y_root(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xbutton_y_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int test_imm_37uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x37 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_37uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x37,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_37uint64_highword_mem>:
testb  $0x37,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_37uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 55
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_37uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 236223201280
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ getchar();
int lower_one_mask(int, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  assert(lower_one_mask(0x7F, 6) == 0x3F);
  assert(lower_one_mask(0x3FFFF, 17) == 0x1FFFF);
  printf("Assertion successful :)\x0A");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x7f,%edi
mov    $0x6,%esi
call   1040 <lower_one_mask@plt>
cmp    $0x3f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x3ffff,%edi
mov    $0x11,%esi
call   1040 <lower_one_mask@plt>
cmp    $0x1ffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7f,%edi
mov    $0x6,%esi
call   1040 <lower_one_mask@plt>
xor    %edi,%edi
cmp    $0x3f,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0x3ffff,%edi
mov    $0x11,%esi
call   1040 <lower_one_mask@plt>
xor    %edi,%edi
cmp    $0x1ffff,%eax
sete   %dil
call   1060 <assert@plt>
lea    0xe7c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Assertion successful :)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @lower_one_mask(i32 127, i32 6)
%7 = icmp eq i32 %6, 63
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i32 @lower_one_mask(i32 262143, i32 17)
%11 = icmp eq i32 %10, 131071
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Assertion successful :)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @lower_one_mask(i32 127, i32 6)
%4 = icmp eq i32 %3, 63
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @lower_one_mask(i32 262143, i32 17)
%8 = icmp eq i32 %7, 131071
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 (...) @getchar()
ret i32 0
}
_Complex double test2() { return 1.0if; }


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x10(%rbp)
movabs $0x3ff0000000000000,%rax
mov    %rax,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
movsd  0xef8(%rip),%xmm1
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define { double, double } @test2() {
%1 = alloca { double, double }
%2 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%3 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
store double 0.000000e+00, double* %2
store double 1.000000e+00, double* %3
%4 = load { double, double }, { double, double }* %1
ret { double, double } %4
}

LLVM IR (-O2):
define { double, double } @test2() {
ret { double, double } { double 0.000000e+00, double 1.000000e+00 }
}
unsigned xrop3_191_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk2 = ~stk2;
  stk1 = D | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_191_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_191_0_0>:
mov    %edi,%eax
and    %esi,%eax
shl    $0x8,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_191_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %5
%28 = load i32, i32* %9
%29 = or i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_191_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = and i8 %1, %0
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = xor i32 %5, -1
ret i32 %6
}
/* Type definitions */
struct ns_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ns_printf(struct ns_connection *, char *, int, char const *);
void send_http_error(struct ns_connection *nc, int code, const char *reason) {
  if (reason == NULL) {
    reason = "";
  }
  ns_printf(nc, "HTTP/1.1 %d %s\r\nContent-Length: 0\r\n\r\n", code, reason);
}


x86 assembly (clang, -O0):
<send_http_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1139 <send_http_error+0x29>
lea    0xef0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xeb5(%rip),%rsi
call   1030 <ns_printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_http_error>:
mov    %esi,%eax
test   %rdx,%rdx
lea    0xf09(%rip),%rcx
cmovne %rdx,%rcx
lea    0xed9(%rip),%rsi
mov    %eax,%edx
jmp    1030 <ns_printf@plt>

LLVM IR (-O0):
%struct.ns_connection = type { i32 }
@.str = [1 x i8] zeroinitializer
@.str.1 = [38 x i8] c"HTTP/1.1 %d %s\0D\0AContent-Length: 0\0D\0A\0D\0A\00"
define void @send_http_error(%struct.ns_connection* %0, i32 %1, i8* %2) {
%4 = alloca %struct.ns_connection*
%5 = alloca i32
%6 = alloca i8*
store %struct.ns_connection* %0, %struct.ns_connection** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %3
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %6
br label %10
10: ; preds = %9, %3
%11 = load %struct.ns_connection*, %struct.ns_connection** %4
%12 = load i32, i32* %5
%13 = load i8*, i8** %6
%14 = call i32 @ns_printf(%struct.ns_connection* %11, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
%struct.ns_connection = type { i32 }
@.str = [1 x i8] zeroinitializer
@.str.1 = [38 x i8] c"HTTP/1.1 %d %s\0D\0AContent-Length: 0\0D\0A\0D\0A\00"
define void @send_http_error(%struct.ns_connection* %0, i32 %1, i8* %2) {
%4 = icmp eq i8* %2, null
%5 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2
%6 = tail call i32 @ns_printf(%struct.ns_connection* %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %1, i8* %5)
ret void
}
long max3(long val1, long val2, long val3) {
  long out = val1;
  if (out < val2)
    out = val2;
  if (out < val3)
    out = val3;
  return out;
}


x86 assembly (clang, -O0):
<max3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112e <max3+0x2e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1144 <max3+0x44>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max3>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
cmp    %rdx,%rax
cmovl  %rdx,%rax
ret

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

LLVM IR (-O2):
define i64 @max3(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = select i1 %4, i64 %1, i64 %0
%6 = icmp slt i64 %5, %2
%7 = select i1 %6, i64 %2, i64 %5
ret i64 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int stub1(int, char *);
void stub2(char *);
void open_file(char *filename, int (*fail)(int, char *), void (*done)(char *)) {
  FILE *fi;
  fi = fopen(filename, "r");
  if (fi == NULL)
    (*fail)(-11, "Open file");
  else
    (*done)(filename);
}


x86 assembly (clang, -O0):
<open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1157 <open_file+0x47>
mov    $0xfffffff5,%edi
lea    0xeb3(%rip),%rsi
call   *-0x10(%rbp)
jmp    1161 <open_file+0x51>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedb(%rip),%rsi
call   1030 <fopen@plt>
test   %rax,%rax
je     113c <open_file+0x2c>
mov    %rbx,%rdi
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
jmp    *%rax
lea    0xebf(%rip),%rsi
mov    $0xfffffff5,%edi
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
jmp    *%rax

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [10 x i8] c"Open file\00"
define void @open_file(i8* %0, i32 (i32, i8*)* %1, void (i8*)* %2) {
%4 = alloca i8*
%5 = alloca i32 (i32, i8*)*
%6 = alloca void (i8*)*
%7 = alloca i32*
store i8* %0, i8** %4
store i32 (i32, i8*)* %1, i32 (i32, i8*)** %5
store void (i8*)* %2, void (i8*)** %6
%8 = load i8*, i8** %4
%9 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i32 (i32, i8*)*, i32 (i32, i8*)** %5
%14 = call i32 %13(i32 -11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %18
15: ; preds = %3
%16 = load void (i8*)*, void (i8*)** %6
%17 = load i8*, i8** %4
br label %18
18: ; preds = %15, %12
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [10 x i8] c"Open file\00"
define void @open_file(i8* %0, i32 (i32, i8*)* nocapture %1, void (i8*)* nocapture %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 %1(i32 -11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %9
8: ; preds = %3
tail call void %2(i8* %0)
br label %9
9: ; preds = %8, %6
ret void
}
int getFunctionHash(char c) {
  if (c >= 'a' && c <= 'z') {
    return c - 'a';
  } else if (c >= 'A' && c <= 'Z') {
    return c - 'A';
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<getFunctionHash>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <getFunctionHash+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <getFunctionHash+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <getFunctionHash+0x63>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     115c <getFunctionHash+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     115c <getFunctionHash+0x5c>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <getFunctionHash+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFunctionHash>:
mov    %edi,%eax
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     110e <getFunctionHash+0xe>
add    $0xffffff9f,%eax
ret
lea    -0x41(%rax),%ecx
add    $0xffffffbf,%eax
xor    %edx,%edx
cmp    $0x1a,%cl
cmovb  %eax,%edx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @getFunctionHash(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 97
store i32 %14, i32* %2
br label %28
15: ; preds = %7, %1
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 65
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 90
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = sub nsw i32 %25, 65
store i32 %26, i32* %2
br label %28
27: ; preds = %19, %15
store i32 0, i32* %2
br label %28
28: ; preds = %27, %23, %11
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @getFunctionHash(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -97
%4 = icmp ult i8 %3, 26
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i32 %2, -97
br label %12
7: ; preds = %1
%8 = add i8 %0, -65
%9 = icmp ult i8 %8, 26
%10 = add nsw i32 %2, -65
%11 = select i1 %9, i32 %10, i32 0
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %6, %5 ], [ %11, %7 ]
ret i32 %13
}