xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xb9() {
  Assert_real((isalnum(185) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              930, ("isalnum should be 0 for 0xb9"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xb9>:
push   %rax
mov    $0xb9,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3a2,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xb9\00"
define void @t_isalnum_0xb9() {
%1 = call i64 @isalnum(i32 185)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 930, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xb9\00"
define void @t_isalnum_0xb9() {
%1 = tail call i64 @isalnum(i32 185)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 930, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int power_management_suspend() { return -1; }


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

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

LLVM IR (-O0):
define i32 @power_management_suspend() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @power_management_suspend() {
ret i32 -1
}
/* Variables and functions */
double fmod(double, double);
double j_fmod(double x, double y) { return fmod((y + fmod(x, y)), y); }


x86 assembly (clang, -O0):
<j_fmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fmod@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fmod@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_fmod>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <fmod@plt>
movsd  (%rsp),%xmm1
addsd  %xmm1,%xmm0
pop    %rax
jmp    1030 <fmod@plt>

LLVM IR (-O0):
define double @j_fmod(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 = load double, double* %3
%7 = load double, double* %4
%8 = call double @fmod(double %6, double %7)
%9 = fadd double %5, %8
%10 = load double, double* %4
%11 = call double @fmod(double %9, double %10)
ret double %11
}

LLVM IR (-O2):
define double @j_fmod(double %0, double %1) {
%3 = tail call double @fmod(double %0, double %1)
%4 = fadd double %3, %1
%5 = tail call double @fmod(double %4, double %1)
ret double %5
}
void rop3_202_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S ^ *D;
  stk2 = T & stk3;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_202_1_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
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_202_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
and    %dl,%cl
xor    %al,%cl
xor    %cl,%al
and    %sil,%al
xor    %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_202_1_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** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = xor i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = trunc i32 %42 to i8
%44 = load i8*, i8** %4
store i8 %43, i8* %44
ret void
}

LLVM IR (-O2):
define void @rop3_202_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = and i8 %5, %2
%7 = xor i8 %6, %4
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %4, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pic32_standby();
int /*<<< orphan*/ pic_write_panel(int, int, int);
void pic32_program_end(__attribute__((unused)) int config) {
  pic_write_panel((3), (0xFFFF), (0xFFFF));
  pic32_standby();
}


x86 assembly (clang, -O0):
<pic32_program_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x3,%edi
mov    $0xffff,%edx
mov    %edx,%esi
call   1040 <pic_write_panel@plt>
mov    $0x0,%al
call   1030 <pic32_standby@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic32_program_end>:
push   %rax
mov    $0x3,%edi
mov    $0xffff,%esi
mov    $0xffff,%edx
call   1040 <pic_write_panel@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <pic32_standby@plt>

LLVM IR (-O0):
define void @pic32_program_end(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @pic_write_panel(i32 3, i32 65535, i32 65535)
%4 = call i32 (...) @pic32_standby()
ret void
}

LLVM IR (-O2):
define void @pic32_program_end(i32 %0) {
%2 = tail call i32 @pic_write_panel(i32 3, i32 65535, i32 65535)
%3 = tail call i32 (...) @pic32_standby()
ret void
}
void *test_anti_range_90(unsigned short n) {
  extern void *alloc_anti_range_90(unsigned short)
      __attribute__((alloc_size(1)));
  if ((0x7fff * 2U + 1) - 2 <= n && n <= (0x7fff * 2U + 1) - 1)
    n = (0x7fff * 2U + 1) - 2 - 1;
  return alloc_anti_range_90(n);
}


x86 assembly (clang, -O0):
<test_anti_range_90>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%ecx
mov    $0xfffd,%eax
cmp    %ecx,%eax
ja     1145 <test_anti_range_90+0x35>
movzwl -0x2(%rbp),%eax
cmp    $0xfffe,%eax
ja     1145 <test_anti_range_90+0x35>
movw   $0xfffc,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <alloc_anti_range_90@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_90>:
lea    0x3(%rdi),%eax
cmp    $0x2,%ax
mov    $0xfffc,%eax
cmovb  %eax,%edi
jmp    1030 <alloc_anti_range_90@plt>

LLVM IR (-O0):
define i8* @test_anti_range_90(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = icmp ule i32 65533, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = icmp ule i32 %8, 65534
br i1 %9, label %10, label %11
10: ; preds = %6
store i16 -4, i16* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i16, i16* %2
%13 = call i8* @alloc_anti_range_90(i16 zeroext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_90(i16 zeroext %0) {
%2 = add i16 %0, 3
%3 = icmp ult i16 %2, 2
%4 = select i1 %3, i16 -4, i16 %0
%5 = tail call i8* @alloc_anti_range_90(i16 zeroext %4)
ret i8* %5
}
void RTVfsDirRelease(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsDirRelease() {
ret void
}
void swift_storeEnumTagSinglePayload(void) {}


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

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

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

LLVM IR (-O2):
define void @swift_storeEnumTagSinglePayload() {
ret void
}
/* Variables and functions */
long double atan2(double, double);
long double atan2l(long double x, long double y) {
  return atan2((double)x, (double)y);
}


x86 assembly (clang, -O0):
<atan2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
call   1030 <atan2@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2l>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm1
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define x86_fp80 @atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call x86_fp80 @atan2(double %6, double %8)
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call x86_fp80 @atan2(double %3, double %4)
ret x86_fp80 %5
}
void pci_map_io_early(unsigned long pfn) {}


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

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

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

LLVM IR (-O2):
define void @pci_map_io_early(i64 %0) {
ret void
}
void test2(void) {
  int *apic_tpr_addr = (int *)0xfee00080;
  *apic_tpr_addr = 0;
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfee00080,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
mov    $0xfee00080,%eax
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @test2() {
%1 = alloca i32*
store i32* inttoptr (i64 4276093056 to i32*), i32** %1
%2 = load i32*, i32** %1
store i32 0, i32* %2
ret void
}

LLVM IR (-O2):
define void @test2() {
store i32 0, i32* inttoptr (i64 4276093056 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_gen_gen_qrc();
int /*<<< orphan*/ test_gen_gen_uat();
int /*<<< orphan*/ test_gen_lc();
int /*<<< orphan*/ test_gen_uat();
int /*<<< orphan*/ test_rem_qrc();
int /*<<< orphan*/ test_rem_uat1();
int /*<<< orphan*/ test_rem_uat2();
int /*<<< orphan*/ test_rem_uat3();
int main(int argc, char **argv) {
  test_gen_lc();
  test_gen_uat();
  test_gen_gen_qrc();
  test_gen_gen_uat();
  test_rem_qrc();
  test_rem_uat1();
  test_rem_uat2();
  test_rem_uat3();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1080 <test_gen_lc@plt>
mov    $0x0,%al
call   1030 <test_gen_uat@plt>
mov    $0x0,%al
call   1040 <test_gen_gen_qrc@plt>
mov    $0x0,%al
call   1060 <test_gen_gen_uat@plt>
mov    $0x0,%al
call   1070 <test_rem_qrc@plt>
mov    $0x0,%al
call   1090 <test_rem_uat1@plt>
mov    $0x0,%al
call   1050 <test_rem_uat2@plt>
mov    $0x0,%al
call   10a0 <test_rem_uat3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <test_gen_lc@plt>
xor    %eax,%eax
call   1030 <test_gen_uat@plt>
xor    %eax,%eax
call   1040 <test_gen_gen_qrc@plt>
xor    %eax,%eax
call   1060 <test_gen_gen_uat@plt>
xor    %eax,%eax
call   1070 <test_rem_qrc@plt>
xor    %eax,%eax
call   1090 <test_rem_uat1@plt>
xor    %eax,%eax
call   1050 <test_rem_uat2@plt>
xor    %eax,%eax
call   10a0 <test_rem_uat3@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_gen_lc()
%7 = call i32 (...) @test_gen_uat()
%8 = call i32 (...) @test_gen_gen_qrc()
%9 = call i32 (...) @test_gen_gen_uat()
%10 = call i32 (...) @test_rem_qrc()
%11 = call i32 (...) @test_rem_uat1()
%12 = call i32 (...) @test_rem_uat2()
%13 = call i32 (...) @test_rem_uat3()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_gen_lc()
%4 = tail call i32 (...) @test_gen_uat()
%5 = tail call i32 (...) @test_gen_gen_qrc()
%6 = tail call i32 (...) @test_gen_gen_uat()
%7 = tail call i32 (...) @test_rem_qrc()
%8 = tail call i32 (...) @test_rem_uat1()
%9 = tail call i32 (...) @test_rem_uat2()
%10 = tail call i32 (...) @test_rem_uat3()
ret i32 0
}
char *get_state_name(int state) {
  switch (state) {
  case 0xa4:
    return "occupied";
    break;
  case 0xb8:
    return "deleted";
    break;
  case 0xce:
    return "empty";
    break;
  default:
    return "?????";
    break;
  }
}


x86 assembly (clang, -O0):
<get_state_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xa4,%eax
je     1143 <get_state_name+0x43>
jmp    111d <get_state_name+0x1d>
mov    -0x10(%rbp),%eax
sub    $0xb8,%eax
je     1153 <get_state_name+0x53>
jmp    1130 <get_state_name+0x30>
mov    -0x10(%rbp),%eax
sub    $0xce,%eax
je     1163 <get_state_name+0x63>
jmp    1173 <get_state_name+0x73>
lea    0xeb6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117e <get_state_name+0x7e>
lea    0xeaf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117e <get_state_name+0x7e>
lea    0xea7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117e <get_state_name+0x7e>
lea    0xe9d(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_state_name>:
cmp    $0xa4,%edi
je     1120 <get_state_name+0x20>
cmp    $0xce,%edi
je     1128 <get_state_name+0x28>
cmp    $0xb8,%edi
jne    1130 <get_state_name+0x30>
lea    0xeea(%rip),%rax
ret
lea    0xed9(%rip),%rax
ret
lea    0xee2(%rip),%rax
ret
lea    0xee0(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"occupied\00"
@.str.1 = [8 x i8] c"deleted\00"
@.str.2 = [6 x i8] c"empty\00"
@.str.3 = [6 x i8] c"?????\00"
define i8* @get_state_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 164, label %5
i32 184, label %6
i32 206, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [9 x i8] c"occupied\00"
@.str.1 = [8 x i8] c"deleted\00"
@.str.2 = [6 x i8] c"empty\00"
@.str.3 = [6 x i8] c"?????\00"
define i8* @get_state_name(i32 %0) {
switch i32 %0, label %4 [
i32 164, label %5
i32 184, label %2
i32 206, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %6
}
void ScaleFilterCols64_16_C() {}


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

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

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

LLVM IR (-O2):
define void @ScaleFilterCols64_16_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_ctrl_cmd(int);
int /*<<< orphan*/ send_data_cmd(int);
void lcm_setbacklight(unsigned int level) {
  if (level > 255)
    level = 255;
  send_ctrl_cmd(0xBE);
  send_data_cmd(0x0F);
}


x86 assembly (clang, -O0):
<lcm_setbacklight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jbe    113f <lcm_setbacklight+0x1f>
movl   $0xff,-0x4(%rbp)
mov    $0xbe,%edi
call   1040 <send_ctrl_cmd@plt>
mov    $0xf,%edi
call   1030 <send_data_cmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm_setbacklight>:
push   %rax
mov    $0xbe,%edi
call   1040 <send_ctrl_cmd@plt>
mov    $0xf,%edi
pop    %rax
jmp    1030 <send_data_cmd@plt>

LLVM IR (-O0):
define void @lcm_setbacklight(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 255
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 255, i32* %2
br label %6
6: ; preds = %5, %1
%7 = call i32 @send_ctrl_cmd(i32 190)
%8 = call i32 @send_data_cmd(i32 15)
ret void
}

LLVM IR (-O2):
define void @lcm_setbacklight(i32 %0) {
%2 = tail call i32 @send_ctrl_cmd(i32 190)
%3 = tail call i32 @send_data_cmd(i32 15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strtol(char *, int /*<<< orphan*/, int);
int get_word(char buffer[], char hex_chunk[], char *wordlist[]) {
  strcpy(buffer, wordlist[(int)strtol(hex_chunk, 0, 16)]);
  return 0;
}


x86 assembly (clang, -O0):
<get_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <strtol@plt>
mov    -0x28(%rbp),%rdi
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_word>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <strtol@plt>
cltq
mov    (%rbx,%rax,8),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @get_word(i8* %0, i8* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %6
%9 = load i8*, i8** %5
%10 = call i64 @strtol(i8* %9, i32 0, i32 16)
%11 = trunc i64 %10 to i32
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8*, i8** %8, i64 %12
%14 = load i8*, i8** %13
%15 = call i32 @strcpy(i8* %7, i8* %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @get_word(i8* %0, i8* %1, i8** nocapture %2) {
%4 = tail call i64 @strtol(i8* %1, i32 0, i32 16)
%5 = shl i64 %4, 32
%6 = ashr exact i64 %5, 32
%7 = getelementptr inbounds i8*, i8** %2, i64 %6
%8 = load i8*, i8** %7
%9 = tail call i32 @strcpy(i8* %0, i8* %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ generateParenthesis(int, int *);
int main(int argc, char **argv) {
  int ret = 0;
  generateParenthesis(1, &ret);
  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   $0x0,-0x14(%rbp)
mov    $0x1,%edi
lea    -0x14(%rbp),%rsi
call   1030 <generateParenthesis@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
call   1030 <generateParenthesis@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @generateParenthesis(i32 1, i32* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rgd_get_double_grid_address(long *, long const *,
                                               long const *, long const *);
void ksp_get_double_grid_address(long address_double[3], const long address[3],
                                 const long mesh[3], const long is_shift[3]) {
  rgd_get_double_grid_address(address_double, address, mesh, is_shift);
}


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

x86 assembly (clang, -O2):
<ksp_get_double_grid_address>:
jmp    1030 <rgd_get_double_grid_address@plt>

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

LLVM IR (-O2):
define void @ksp_get_double_grid_address(i64* %0, i64* %1, i64* %2, i64* %3) {
%5 = tail call i32 @rgd_get_double_grid_address(i64* %0, i64* %1, i64* %2, i64* %3)
ret void
}
void TpmSizeChecks(void) { return; }


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

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

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

LLVM IR (-O2):
define void @TpmSizeChecks() {
ret void
}
/* Variables and functions */
int my2upper(char);
int /*<<< orphan*/ printf(char *, char, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c = 'A';
  do {
    scanf(" %c", &c);
    printf("Uppercase of %c is %c\n", c, my2upper(c));
  } while (1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
lea    0xeb6(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x5(%rbp),%al
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%edi
call   1040 <my2upper@plt>
mov    %eax,%edx
mov    -0x6(%rbp),%al
lea    0xe96(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    $0x1,%al
test   $0x1,%al
jne    1143 <main+0x13>
jmp    1185 <main+0x55>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
movb   $0x41,0x7(%rsp)
lea    0xebd(%rip),%r14
lea    0x7(%rsp),%r15
lea    0xeb5(%rip),%rbx
nop
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%ebp
mov    %ebp,%edi
call   1040 <my2upper@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [4 x i8] c" %c\00"
@.str.1 = [23 x i8] c"Uppercase of %c is %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
br label %3
3: ; preds = %9, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = load i8, i8* %2
%7 = call i32 @my2upper(i8 signext %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8 signext %5, i32 %7)
br label %9
9: ; preds = %3
br i1 true, label %3, label %10
10: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c" %c\00"
@.str.1 = [23 x i8] c"Uppercase of %c is %c\0A\00"
define i32 @main() {
%1 = alloca i8
store i8 65, i8* %1
br label %2
2: ; preds = %2, %0
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = call i32 @my2upper(i8 signext %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8 signext %4, i32 %5)
br label %2
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
void int32Clear(int32_t *data) { *data = 0; }


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

x86 assembly (clang, -O2):
<int32Clear>:
movq   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @int32Clear(i64* nocapture writeonly %0) {
store i64 0, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *mir_malloc_int(size_t);
void *mir_cmalloc_int(size_t bytes) {
  void *memptr = mir_malloc_int(bytes);
  memset(memptr, 0, bytes);
  return memptr;
}


x86 assembly (clang, -O0):
<mir_cmalloc_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mir_malloc_int@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mir_cmalloc_int>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <mir_malloc_int@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mir_cmalloc_int(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @mir_malloc_int(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @mir_cmalloc_int(i64 %0) {
%2 = tail call i8* @mir_malloc_int(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t gg_fix16(uint16_t x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @gg_fix16(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ remove(char *);
void reset() {
  if (remove("Stats.txt") == 0)
    printf("\n __________________________________ \n"
           ": All runs reset successfully      :\n"
           ":__________________________________:\n");
  else {
    printf("\n __________________________________ \n"
           ": Unable to reset                  :\n"
           ":__________________________________:\n");
  }
}


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
jne    114b <reset+0x2b>
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
jmp    1157 <reset+0x37>
lea    0xf29(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <remove@plt>
test   %rax,%rax
lea    0xf43(%rip),%rax
lea    0xecc(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Stats.txt\00"
@.str.1 = [113 x i8] c"\0A __________________________________ \0A: All runs reset successfully :\0A:__________________________________:\0A\00"
@.str.2 = [113 x i8] c"\0A __________________________________ \0A: Unable to reset :\0A:__________________________________:\0A\00"
define void @reset() {
%1 = call i64 @remove(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @printf(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.1, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Stats.txt\00"
@str = [112 x i8] c"\0A __________________________________ \0A: Unable to reset :\0A:__________________________________:\00"
@str.3 = [112 x i8] c"\0A __________________________________ \0A: All runs reset successfully :\0A:__________________________________:\00"
define void @reset() {
%1 = tail call i64 @remove(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([112 x i8], [112 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([112 x i8], [112 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
int sum_of_1_through_10() {
  int i, j = 0;
  for (i = 0; i < 10; i++) {
    j += i;
  }
  return i;
}


x86 assembly (clang, -O0):
<sum_of_1_through_10>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1133 <sum_of_1_through_10+0x33>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <sum_of_1_through_10+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sum_of_1_through_10() {
ret i32 10
}
double fmod(double x, double y) {
  unsigned short fpsr;
  do
    __asm__("fprem; fnstsw %%ax" : "+t"(x), "=a"(fpsr) : "u"(y));
  while (fpsr & 0x400);
  return x;
}


x86 assembly (clang, -O0):
<fmod>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
fldl   -0x20(%rbp)
fldl   -0x28(%rbp)
fprem
fnstsw %ax
fstp   %st(1)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
and    $0x400,%eax
cmp    $0x0,%eax
jne    110e <fmod+0xe>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmod>:
movsd  %xmm1,-0x8(%rsp)
movsd  %xmm0,-0x10(%rsp)
fldl   -0x8(%rsp)
fldl   -0x10(%rsp)
fprem
fnstsw %ax
fstp   %st(1)
fstpl  -0x18(%rsp)
movsd  -0x18(%rsp),%xmm0
test   $0x400,%eax
jne    1100 <fmod>
ret

LLVM IR (-O0):
define double @fmod(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i16
store double %0, double* %3
store double %1, double* %4
br label %6
6: ; preds = %12, %2
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call { double, i16 } asm "fprem; fnstsw %ax", "={st},={ax},{st(1)},0,~{dirflag},~{fpsr},~{flags}"(double %8, double %7)
%10 = extractvalue { double, i16 } %9, 0
%11 = extractvalue { double, i16 } %9, 1
store double %10, double* %3
store i16 %11, i16* %5
br label %12
12: ; preds = %6
%13 = load i16, i16* %5
%14 = zext i16 %13 to i32
%15 = and i32 %14, 1024
%16 = icmp ne i32 %15, 0
br i1 %16, label %6, label %17
17: ; preds = %12
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
define double @fmod(double %0, double %1) {
br label %3
3: ; preds = %3, %2
%4 = phi double [ %0, %2 ], [ %6, %3 ]
%5 = tail call { double, i16 } asm "fprem; fnstsw %ax", "={st},={ax},{st(1)},0,~{dirflag},~{fpsr},~{flags}"(double %1, double %4)
%6 = extractvalue { double, i16 } %5, 0
%7 = extractvalue { double, i16 } %5, 1
%8 = and i16 %7, 1024
%9 = icmp eq i16 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3
%11 = extractvalue { double, i16 } %5, 0
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ echo();
void call_echo() { echo(); }


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

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

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

LLVM IR (-O2):
define void @call_echo() {
%1 = tail call i32 (...) @echo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int read_lines(char *);
int main(int argc, char *argv[]) {
  if (argc == 1) {
    printf("usage: ./a.out <name of file>\n");
    return 1;
  }
  int returnValue = read_lines(argv[1]);
  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)
cmpl   $0x1,-0x8(%rbp)
jne    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    116f <main+0x4f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <read_lines@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jne    1139 <main+0x19>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
call   1040 <read_lines@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"usage: ./a.out <name of file>\0A\00"
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
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @read_lines(i8* %14)
store i32 %15, i32* %6
store i32 0, i32* %3
br label %16
16: ; preds = %11, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@str = [30 x i8] c"usage: ./a.out <name of file>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
br label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @read_lines(i8* %8)
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ 1, %4 ], [ 0, %6 ]
ret i32 %11
}
double TestMe() { return 5; }


x86 assembly (clang, -O0):
<TestMe>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @TestMe() {
ret double 5.000000e+00
}

LLVM IR (-O2):
define double @TestMe() {
ret double 5.000000e+00
}
signed int rt_mynode(void) {
  signed int a = 0;
  return a;
}


x86 assembly (clang, -O0):
<rt_mynode>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @rt_mynode() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fatalx(char *);
double log(double);
double NPlog2(double y) {
  if (y <= 0.0)
    fatalx("(NPlog2) negative argument\n");
  return (log(y) / log(2.0));
}


x86 assembly (clang, -O0):
<NPlog2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1147 <NPlog2+0x27>
lea    0xec6(%rip),%rdi
call   1030 <fatalx@plt>
movsd  -0x8(%rbp),%xmm0
call   1040 <log@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xea2(%rip),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NPlog2>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jb     1141 <NPlog2+0x21>
lea    0xed6(%rip),%rdi
movsd  %xmm0,(%rsp)
call   1030 <fatalx@plt>
movsd  (%rsp),%xmm0
call   1040 <log@plt>
divsd  0xeb2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [28 x i8] c"(NPlog2) negative argument\0A\00"
define double @NPlog2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ole double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @fatalx(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load double, double* %2
%9 = call double @log(double %8)
%10 = call double @log(double 2.000000e+00)
%11 = fdiv double %9, %10
ret double %11
}

LLVM IR (-O2):
@.str = [28 x i8] c"(NPlog2) negative argument\0A\00"
define double @NPlog2(double %0) {
%2 = fcmp ugt double %0, 0.000000e+00
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fatalx(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call double @log(double %0)
%7 = fdiv double %6, 0x3FE62E42FEFA39EF
ret double %7
}
void libopencore_amrwb_init() {}


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

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

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

LLVM IR (-O2):
define void @libopencore_amrwb_init() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ cmd;

/* Variables and functions */
int /*<<< orphan*/ enable_infen();
int /*<<< orphan*/ enable_wen();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ spi_transfer(int *, int);
int /*<<< orphan*/ wait_ready();
void cmd_erase_all() {
  uint8_t cmd[1];
  enable_infen();
  enable_wen();
  printf("Erasing all...\n");
  cmd[0] = 0x62;
  spi_transfer(cmd, sizeof(cmd));
  wait_ready();
}


x86 assembly (clang, -O0):
<cmd_erase_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <enable_infen@plt>
mov    $0x0,%al
call   1070 <enable_wen@plt>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
movl   $0x62,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1060 <spi_transfer@plt>
mov    $0x0,%al
call   1040 <wait_ready@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_erase_all>:
push   %rax
xor    %eax,%eax
call   1050 <enable_infen@plt>
xor    %eax,%eax
call   1070 <enable_wen@plt>
lea    0xe9a(%rip),%rdi
call   1030 <puts@plt>
movl   $0x62,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1060 <spi_transfer@plt>
xor    %eax,%eax
call   1040 <wait_ready@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Erasing all...\0A\00"
define void @cmd_erase_all() {
%1 = alloca [1 x i32]
%2 = call i32 (...) @enable_infen()
%3 = call i32 (...) @enable_wen()
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 98, i32* %5
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%7 = call i32 @spi_transfer(i32* %6, i32 4)
%8 = call i32 (...) @wait_ready()
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"Erasing all...\00"
define void @cmd_erase_all() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = tail call i32 (...) @enable_infen()
%4 = tail call i32 (...) @enable_wen()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 98, i32* %6
%7 = call i32 @spi_transfer(i32* %6, i32 4)
%8 = call i32 (...) @wait_ready()
ret void
}
double todbl(char *str) { return 0; }


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

x86 assembly (clang, -O2):
<todbl>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @todbl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @todbl(i8* nocapture readnone %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int tty_match(char const *s, char const *e) { return s == NULL || s == e; }


x86 assembly (clang, -O0):
<tty_match>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     112a <tty_match+0x2a>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_match>:
test   %rdi,%rdi
sete   %al
cmp    %rsi,%rdi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @tty_match(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = icmp eq i8* %8, %9
br label %11
11: ; preds = %7, %2
%12 = phi i1 [ true, %2 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @tty_match(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %0, %1
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ mrf24j40_rf_reset();
int /*<<< orphan*/ pmrf_wake_pin(int);
void mrf24j40_wakeup() {
  pmrf_wake_pin(1);
  mrf24j40_rf_reset();
}


x86 assembly (clang, -O0):
<mrf24j40_wakeup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <pmrf_wake_pin@plt>
mov    $0x0,%al
call   1040 <mrf24j40_rf_reset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mrf24j40_wakeup>:
push   %rax
mov    $0x1,%edi
call   1030 <pmrf_wake_pin@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <mrf24j40_rf_reset@plt>

LLVM IR (-O0):
define void @mrf24j40_wakeup() {
%1 = call i32 @pmrf_wake_pin(i32 1)
%2 = call i32 (...) @mrf24j40_rf_reset()
ret void
}

LLVM IR (-O2):
define void @mrf24j40_wakeup() {
%1 = tail call i32 @pmrf_wake_pin(i32 1)
%2 = tail call i32 (...) @mrf24j40_rf_reset()
ret void
}
int accessF(const char *pathname, int mode) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @accessF(i8* nocapture readnone %0, i32 %1) {
ret i32 1
}
int cdz_load_cfg(struct cdz_cfg_struct *ccs) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.cdz_cfg_struct = type opaque
define i32 @cdz_load_cfg(%struct.cdz_cfg_struct* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bubble_sort_test();
int /*<<< orphan*/ insert_sort_test();
int /*<<< orphan*/ merge_sort_test();
int /*<<< orphan*/ quick_sort_test();
int /*<<< orphan*/ select_sort_test();
int /*<<< orphan*/ shell_sort_test();
void sort_test() {
  bubble_sort_test();
  select_sort_test();
  insert_sort_test();
  quick_sort_test();
  merge_sort_test();
  shell_sort_test();
}


x86 assembly (clang, -O0):
<sort_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <bubble_sort_test@plt>
mov    $0x0,%al
call   1050 <select_sort_test@plt>
mov    $0x0,%al
call   1040 <insert_sort_test@plt>
mov    $0x0,%al
call   1030 <quick_sort_test@plt>
mov    $0x0,%al
call   1080 <merge_sort_test@plt>
mov    $0x0,%al
call   1070 <shell_sort_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_test>:
push   %rax
xor    %eax,%eax
call   1060 <bubble_sort_test@plt>
xor    %eax,%eax
call   1050 <select_sort_test@plt>
xor    %eax,%eax
call   1040 <insert_sort_test@plt>
xor    %eax,%eax
call   1030 <quick_sort_test@plt>
xor    %eax,%eax
call   1080 <merge_sort_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <shell_sort_test@plt>

LLVM IR (-O0):
define void @sort_test() {
%1 = call i32 (...) @bubble_sort_test()
%2 = call i32 (...) @select_sort_test()
%3 = call i32 (...) @insert_sort_test()
%4 = call i32 (...) @quick_sort_test()
%5 = call i32 (...) @merge_sort_test()
%6 = call i32 (...) @shell_sort_test()
ret void
}

LLVM IR (-O2):
define void @sort_test() {
%1 = tail call i32 (...) @bubble_sort_test()
%2 = tail call i32 (...) @select_sort_test()
%3 = tail call i32 (...) @insert_sort_test()
%4 = tail call i32 (...) @quick_sort_test()
%5 = tail call i32 (...) @merge_sort_test()
%6 = tail call i32 (...) @shell_sort_test()
ret void
}
int test_imm_58uint8_mem(unsigned char *val) {
  return ((*val) & (0x58 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_58uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x58,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_58uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 88
%7 = icmp ne i32 %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_58uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 88
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}