xunge/DecIR huggingface dataset:
void rop3_177_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S ^ T;
  stk2 = *D | stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_177_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_177_0_0>:
xor    %edx,%esi
or     (%rdi),%sil
xor    %dl,%sil
not    %sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_177_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %6, %2
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
void test_five(int x, int y, int z) {
#pragma omp target parallel for collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      for (int i = 0; i < z; i++)
        ;
}


x86 assembly (clang, -O0):
<test_five>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117f <test_five+0x7f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <test_five+0x6c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <test_five+0x59>
jmp    114b <test_five+0x4b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <test_five+0x3a>
jmp    115e <test_five+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <test_five+0x27>
jmp    1171 <test_five+0x71>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <test_five+0x14>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_five(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void no_colon_in_cmd() {
  fprintf(stderr, "cmdline is supposed to be in user:command form\n");
  exit(1);
}


x86 assembly (clang, -O0):
<no_colon_in_cmd>:
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):
<no_colon_in_cmd>:
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 = [48 x i8] c"cmdline is supposed to be in user:command form\0A\00"
define void @no_colon_in_cmd() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"cmdline is supposed to be in user:command form\0A\00"
define void @no_colon_in_cmd() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ _bench_copy(int /*<<< orphan*/ *);
void bench_copy(FILE *outf) {
  for (size_t i = 0; i < 3; i++) {
    _bench_copy(outf);
  }
}


x86 assembly (clang, -O0):
<bench_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x3,-0x10(%rbp)
jae    1149 <bench_copy+0x39>
mov    -0x8(%rbp),%rdi
call   1030 <_bench_copy@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <bench_copy+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bench_copy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <_bench_copy@plt>
mov    %rbx,%rdi
call   1030 <_bench_copy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <_bench_copy@plt>

LLVM IR (-O0):
define void @bench_copy(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i64, i64* %3
%6 = icmp ult i64 %5, 3
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = call i32 @_bench_copy(i32* %8)
br label %10
10: ; preds = %7
%11 = load i64, i64* %3
%12 = add i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @bench_copy(i32* %0) {
%2 = tail call i32 @_bench_copy(i32* %0)
%3 = tail call i32 @_bench_copy(i32* %0)
%4 = tail call i32 @_bench_copy(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *argv0) { printf("Usage: %s <src_eid>\n", argv0); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s <src_eid>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s <src_eid>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int set_memory_rw(unsigned long addr, int numpages) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @set_memory_rw(i64 %0, i32 %1) {
ret i32 0
}
int test_imm_A8int32_reg(int val) { return ((val) & (0xA8 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_A8int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xa8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A8int32_reg>:
test   $0xa8,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A8int32_reg(i32 %0) {
%2 = and i32 %0, 168
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: rmdir <dir_name> ...\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 = [29 x i8] c"Usage: rmdir <dir_name> ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: rmdir <dir_name> ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void i2d_DHparams(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_DHparams() {
ret void
}
__attribute__((gnu_)) __attribute__((always_)) int func8b(int x) {
  return x < 7 ? 11 : 9;
}


x86 assembly (clang, -O0):
<func8b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x9,%eax
mov    $0xb,%ecx
cmp    $0x7,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func8b>:
xor    %eax,%eax
cmp    $0x7,%edi
setl   %al
add    %eax,%eax
add    $0x9,%eax
ret

LLVM IR (-O0):
define i32 @func8b(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 7
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 11, i32 9
ret i32 %6
}

LLVM IR (-O2):
define i32 @func8b(i32 %0) {
%2 = icmp slt i32 %0, 7
%3 = select i1 %2, i32 11, i32 9
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help_msg() {
  printf("Usage:./RandomAccess TotalMemSize(MB) [outFileName=gupsout]\n");
}


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

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

LLVM IR (-O0):
@.str = [61 x i8] c"Usage:./RandomAccess TotalMemSize(MB) [outFileName=gupsout]\0A\00"
define void @print_help_msg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [60 x i8] c"Usage:./RandomAccess TotalMemSize(MB) [outFileName=gupsout]\00"
define void @print_help_msg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(short, int /*<<< orphan*/);
void dstroy(short obj) {
  move(obj, 0);
  return;
}


x86 assembly (clang, -O0):
<dstroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
xor    %esi,%esi
movswl -0x2(%rbp),%edi
call   1030 <move@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dstroy>:
xor    %esi,%esi
jmp    1030 <move@plt>

LLVM IR (-O0):
define void @dstroy(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @move(i16 signext %3, i32 0)
ret void
}

LLVM IR (-O2):
define void @dstroy(i16 signext %0) {
%2 = tail call i32 @move(i16 signext %0, i32 0)
ret void
}
/* Variables and functions */
int unknown_nat();
void band_positive_Bad() {
  char a[5];
  int x = unknown_nat();
  int y = unknown_nat();
  if (x <= 10 && y <= 8) {
    int z = x & y;
    a[z] = 0;
  }
}


x86 assembly (clang, -O0):
<band_positive_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <unknown_nat@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <unknown_nat@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     1152 <band_positive_Bad+0x42>
cmpl   $0x8,-0x10(%rbp)
jg     1152 <band_positive_Bad+0x42>
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
movb   $0x0,-0x5(%rbp,%rax,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<band_positive_Bad>:
push   %rax
xor    %eax,%eax
call   1030 <unknown_nat@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <unknown_nat@plt>

LLVM IR (-O0):
define void @band_positive_Bad() {
%1 = alloca [5 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @unknown_nat()
store i32 %5, i32* %2
%6 = call i32 (...) @unknown_nat()
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 10
br i1 %8, label %9, label %19
9: ; preds = %0
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 8
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = and i32 %13, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 %17
store i8 0, i8* %18
br label %19
19: ; preds = %12, %9, %0
ret void
}

LLVM IR (-O2):
define void @band_positive_Bad() {
%1 = tail call i32 (...) @unknown_nat()
%2 = tail call i32 (...) @unknown_nat()
ret void
}
float SoftSpline2(float r) { return r * (2.0f - r); }


x86 assembly (clang, -O0):
<SoftSpline2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SoftSpline2>:
movss  0xef8(%rip),%xmm1
subss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @SoftSpline2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fsub float 2.000000e+00, %4
%6 = fmul float %3, %5
ret float %6
}

LLVM IR (-O2):
define float @SoftSpline2(float %0) {
%2 = fsub float 2.000000e+00, %0
%3 = fmul float %2, %0
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float a, b;
  scanf("%f %f", &a, &b);
  printf("MEDIA = %.5f\n", (3.5 * a + 7.5 * b) / 11);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xeb3(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe9f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe87(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xeb0(%rip),%xmm1
mulsd  0xeb0(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0xeac(%rip),%xmm0
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [14 x i8] c"MEDIA = %.5f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %2, float* %3)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = fmul double 7.500000e+00, %8
%10 = call double @llvm.fmuladd.f64(double 3.500000e+00, double %6, double %9)
%11 = fdiv double %10, 1.100000e+01
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [14 x i8] c"MEDIA = %.5f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fmul double %9, 7.500000e+00
%11 = call double @llvm.fmuladd.f64(double %7, double 3.500000e+00, double %10)
%12 = fdiv double %11, 1.100000e+01
%13 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %12)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ p(int, int, int);
int main() {
  int m = __VERIFIER_nondet_int();
  int n = __VERIFIER_nondet_int();
  int r = __VERIFIER_nondet_int();
  if (m >= 0 && n >= 0 && r >= 0) {
    p(m, n, r);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1179 <main+0x59>
cmpl   $0x0,-0xc(%rbp)
jl     1179 <main+0x59>
cmpl   $0x0,-0x10(%rbp)
jl     1179 <main+0x59>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <p@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %ebx,%ebx
js     1153 <main+0x33>
test   %ebp,%ebp
js     1153 <main+0x33>
test   %eax,%eax
js     1153 <main+0x33>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <p@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = icmp sgt i32 %1, -1
%5 = icmp sgt i32 %2, -1
%6 = select i1 %4, i1 %5, i1 false
%7 = icmp sgt i32 %3, -1
%8 = select i1 %6, i1 %7, i1 false
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = tail call i32 @p(i32 %1, i32 %2, i32 %3)
br label %11
11: ; preds = %9, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void display_set_pixel(unsigned int x, unsigned int y, uint32_t color) {
  volatile uint32_t *start =
      ((void *)((char *)(0x040000c0 << 2) + (0x00000100 << 2)));
  if (x < 640 && y < 480) {
    start[x + (y * 640)] = color;
  }
}


x86 assembly (clang, -O0):
<display_set_pixel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x10000300,%eax
add    $0x400,%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x280,-0x4(%rbp)
jae    114e <display_set_pixel+0x4e>
cmpl   $0x1e0,-0x8(%rbp)
jae    114e <display_set_pixel+0x4e>
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
imul   $0x280,-0x8(%rbp),%esi
add    %esi,%ecx
mov    %ecx,%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_set_pixel>:
cmp    $0x27f,%edi
ja     111f <display_set_pixel+0x1f>
cmp    $0x1df,%esi
ja     111f <display_set_pixel+0x1f>
lea    (%rsi,%rsi,4),%eax
shl    $0x7,%eax
add    %edi,%eax
mov    %edx,0x10000700(,%rax,4)
ret

LLVM IR (-O0):
define void @display_set_pixel(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32* bitcast (i8* getelementptr inbounds (i8, i8* inttoptr (i64 268436224 to i8*), i64 1024) to i32*), i32** %7
%8 = load i32, i32* %4
%9 = icmp ult i32 %8, 640
br i1 %9, label %10, label %22
10: ; preds = %3
%11 = load i32, i32* %5
%12 = icmp ult i32 %11, 480
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i32, i32* %6
%15 = load i32*, i32** %7
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = mul i32 %17, 640
%19 = add i32 %16, %18
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %15, i64 %20
store volatile i32 %14, i32* %21
br label %22
22: ; preds = %13, %10, %3
ret void
}

LLVM IR (-O2):
define void @display_set_pixel(i32 %0, i32 %1, i32 %2) {
%4 = icmp ult i32 %0, 640
%5 = icmp ult i32 %1, 480
%6 = and i1 %4, %5
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = mul nuw nsw i32 %1, 640
%9 = add nuw nsw i32 %8, %0
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* inttoptr (i64 268437248 to i32*), i64 %10
store volatile i32 %2, i32* %11
br label %12
12: ; preds = %7, %3
ret void
}
int isTypeChar(int c) {
  switch (c) {
  case '%':
  case 'd':
  case 'u':
  case 'i':
  case 'f':
  case 'F':
  case 'e':
  case 'E':
  case 'g':
  case 'G':
  case 'x':
  case 'X':
  case 'O':
  case 's':
  case 'c':
  case 'p':
  case 'a':
  case 'A':
  case 'n':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isTypeChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffdb,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x53,%eax
ja     113c <isTypeChar+0x3c>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1143 <isTypeChar+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTypeChar>:
add    $0xffffffdb,%edi
cmp    $0x53,%edi
ja     111e <isTypeChar+0x1e>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isTypeChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 37, label %5
i32 100, label %5
i32 117, label %5
i32 105, label %5
i32 102, label %5
i32 70, label %5
i32 101, label %5
i32 69, label %5
i32 103, label %5
i32 71, label %5
i32 120, label %5
i32 88, label %5
i32 79, label %5
i32 115, label %5
i32 99, label %5
i32 112, label %5
i32 97, label %5
i32 65, label %5
i32 110, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @isTypeChar(i32 %0) {
switch i32 %0, label %2 [
i32 37, label %3
i32 100, label %3
i32 117, label %3
i32 105, label %3
i32 102, label %3
i32 70, label %3
i32 101, label %3
i32 69, label %3
i32 103, label %3
i32 71, label %3
i32 120, label %3
i32 88, label %3
i32 79, label %3
i32 115, label %3
i32 99, label %3
i32 112, label %3
i32 97, label %3
i32 65, label %3
i32 110, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
struct xdg_surface {
  int dummy;
};
struct wl_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int,
                                    struct wl_surface *);
void xdg_surface_set_transient_for(struct xdg_surface *xdg_surface,
                                   struct wl_surface *parent) {
  wl_proxy_marshal((struct wl_proxy *)xdg_surface, 1, parent);
}


x86 assembly (clang, -O0):
<xdg_surface_set_transient_for>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x1,%esi
call   1030 <wl_proxy_marshal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdg_surface_set_transient_for>:
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.xdg_surface = type { i32 }
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_set_transient_for(%struct.xdg_surface* %0, %struct.wl_surface* %1) {
%3 = alloca %struct.xdg_surface*
%4 = alloca %struct.wl_surface*
store %struct.xdg_surface* %0, %struct.xdg_surface** %3
store %struct.wl_surface* %1, %struct.wl_surface** %4
%5 = load %struct.xdg_surface*, %struct.xdg_surface** %3
%6 = bitcast %struct.xdg_surface* %5 to %struct.wl_proxy*
%7 = load %struct.wl_surface*, %struct.wl_surface** %4
%8 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %6, i32 1, %struct.wl_surface* %7)
ret void
}

LLVM IR (-O2):
%struct.xdg_surface = type { i32 }
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_set_transient_for(%struct.xdg_surface* %0, %struct.wl_surface* %1) {
%3 = bitcast %struct.xdg_surface* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %3, i32 1, %struct.wl_surface* %1)
ret void
}
unsigned short x87_get_control_word(void) {
  unsigned short mode;
  __asm__ __volatile__("fstcw %0\n\t" : "=m"(*&mode) :);
  return mode;
}


x86 assembly (clang, -O0):
<x87_get_control_word>:
push   %rbp
mov    %rsp,%rbp
fstcw  -0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x87_get_control_word>:
fstcw  -0x2(%rsp)
movzwl -0x2(%rsp),%eax
ret

LLVM IR (-O0):
define zeroext i16 @x87_get_control_word() {
%1 = alloca i16
%2 = load i16, i16* %1
ret i16 %2
}

LLVM IR (-O2):
define zeroext i16 @x87_get_control_word() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
%3 = load i16, i16* %1
ret i16 %3
}
/* Variables and functions */
float pow(float, double);
float ak(float t, float s) { return pow(t * s, 0.75); }


x86 assembly (clang, -O0):
<ak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ak>:
mulss  %xmm1,%xmm0
movsd  0xee4(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define float @ak(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
%8 = call float @pow(float %7, double 7.500000e-01)
ret float %8
}

LLVM IR (-O2):
define float @ak(float %0, float %1) {
%3 = fmul float %0, %1
%4 = tail call float @pow(float %3, double 7.500000e-01)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ runtime_write(int, char *);
int strlen(char const *);
int puts(const char *s) {
  int len = strlen(s);
  runtime_write(len, (char *)s);
  runtime_write(1, "\n");
  return 0;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1040 <runtime_write@plt>
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1040 <runtime_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <runtime_write@plt>
lea    0xec6(%rip),%rsi
mov    $0x1,%edi
call   1040 <runtime_write@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i8*, i8** %2
%8 = call i32 @runtime_write(i32 %6, i8* %7)
%9 = call i32 @runtime_write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @puts(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @runtime_write(i32 %2, i8* %0)
%4 = tail call i32 @runtime_write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int num1, num2, sum;
  printf("Enters two number to add\n");
  scanf("%d %d", &num1, &num2);
  sum = add(num1, num2);
  printf("sum=%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <add@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1030 <add@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enters two number to add\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [7 x i8] c"sum=%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @add(i32 %7, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [7 x i8] c"sum=%d\00"
@str = [25 x i8] c"Enters two number to add\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @add(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
const char *jac_chain_nm2_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<jac_chain_nm2_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <jac_chain_nm2_name_out+0x2b>
jmp    111a <jac_chain_nm2_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <jac_chain_nm2_name_out+0x3b>
jmp    114b <jac_chain_nm2_name_out+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <jac_chain_nm2_name_out+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <jac_chain_nm2_name_out+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm2_name_out>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @jac_chain_nm2_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @jac_chain_nm2_name_out(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
__attribute__((weak)) int _open(const char *name, int flags, int mode) {
  flags = flags;
  mode = mode;
  return -1;
}


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

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

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

LLVM IR (-O2):
define weak i32 @_open(i8* %0, i32 %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("Hello Darwin"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello Darwin\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello Darwin\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
int status(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @status() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_32(int /*<<< orphan*/);
uint32_t reverse_u32(bool reversed, uint32_t word) {
  return reversed ? bswap_32(word) : word;
}


x86 assembly (clang, -O0):
<reverse_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1138 <reverse_u32+0x28>
mov    -0x8(%rbp),%edi
call   1030 <bswap_32@plt>
mov    %eax,-0xc(%rbp)
jmp    113e <reverse_u32+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_u32>:
test   %edi,%edi
je     111b <reverse_u32+0xb>
mov    %esi,%edi
jmp    1030 <bswap_32@plt>
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @reverse_u32(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 %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @bswap_32(i32 %8)
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %7
%13 = phi i32 [ %9, %7 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @reverse_u32(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @bswap_32(i32 %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ %1, %2 ]
ret i32 %7
}
int oneof(target, list, cnt)
register char *target, **list;
int cnt;
{
  register int i;
  for (i = 0; i < cnt; i++)
    if (strcmp(target, list[i]) == 0)
      return (i);
  return (-1);
}


x86 assembly (clang, -O0):
<oneof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1172 <oneof+0x62>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    115f <oneof+0x4f>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <oneof+0x69>
jmp    1164 <oneof+0x54>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112a <oneof+0x1a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oneof>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0xffffffff,%r14d
test   %edx,%edx
jle    114e <oneof+0x3e>
mov    %rsi,%r15
mov    %rdi,%r12
mov    %edx,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rsi
mov    %r12,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     114b <oneof+0x3b>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <oneof+0x20>
jmp    114e <oneof+0x3e>
mov    %ebx,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @oneof(i8* nocapture %0, i8** nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %13
%8 = phi i64 [ 0, %5 ], [ %14, %13 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %7
%14 = add nuw nsw i64 %8, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %18, label %7
16: ; preds = %7
%17 = trunc i64 %8 to i32
br label %18
18: ; preds = %13, %16, %3
%19 = phi i32 [ -1, %3 ], [ %17, %16 ], [ -1, %13 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
void a4(int n) { malloc(n); }


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

x86 assembly (clang, -O2):
<a4>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define void @a4(i32 %0) {
%2 = tail call i32 @malloc(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void data_wipe(unsigned char *data) {
  if (data)
    free(data);
}


x86 assembly (clang, -O0):
<data_wipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <data_wipe+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_wipe>:
test   %rdi,%rdi
je     111a <data_wipe+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @data_wipe(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @data_wipe(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
int doublecmp(const void *a, const void *b) {
  if (*((double *)a) > *((double *)b))
    return 1;
  else if (*((double *)a) < *((double *)b))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<doublecmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    112e <doublecmp+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1160 <doublecmp+0x60>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1154 <doublecmp+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <doublecmp+0x60>
jmp    1159 <doublecmp+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doublecmp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @doublecmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRC5_set(void) { return U_WMRCORENONE_set("U_WMRC5"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRC5\00"
define i8* @U_WMRC5_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int fibonacci_hs(int);
int /*<<< orphan*/ printf(char *, int);
int main_hs(int argc, char *argv[]) {
  int i = fibonacci_hs(42);
  printf("Fibonacci: %d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main_hs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2a,%edi
call   1040 <fibonacci_hs@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Fibonacci: %d\0A\00"
define i32 @main_hs(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 @fibonacci_hs(i32 42)
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Fibonacci: %d\0A\00"
define i32 @main_hs(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fibonacci_hs(i32 42)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}