xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ hello();
__attribute__((constructor)) void loadMsg() { hello(); }


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @loadMsg, i8* null }]
define void @loadMsg() {
%1 = call i32 (...) @hello()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @loadMsg, i8* null }]
define void @loadMsg() {
%1 = tail call i32 (...) @hello()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x2d() {
  Assert_real((isalnum(45) == 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",
              230, ("isalnum should be 0 for -"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for -\00"
define void @t_isalnum_0x2d() {
%1 = call i64 @isalnum(i32 45)
%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 230, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for -\00"
define void @t_isalnum_0x2d() {
%1 = tail call i64 @isalnum(i32 45)
%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 230, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int sanitycheck_bob(const char *buf, size_t len) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @sanitycheck_bob(i8* nocapture readnone %0, i64 %1) {
ret i32 1
}
/* Variables and functions */
double fabs(double);
int gmx_within_tol(double f1, double f2, double tol) {
  if (fabs(f1 - f2) <= tol * fabs(f1 + f2 + 1.0)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<gmx_within_tol>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movaps 0xedc(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  -0x18(%rbp),%xmm2
movsd  0xed1(%rip),%xmm3
addsd  %xmm3,%xmm2
movaps 0xeb6(%rip),%xmm3
pand   %xmm3,%xmm2
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1168 <gmx_within_tol+0x68>
movl   $0x1,-0x4(%rbp)
jmp    116f <gmx_within_tol+0x6f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_within_tol>:
movapd %xmm0,%xmm3
subsd  %xmm1,%xmm3
movapd 0xef0(%rip),%xmm4
andpd  %xmm4,%xmm3
addsd  %xmm1,%xmm0
addsd  0xef0(%rip),%xmm0
andpd  %xmm4,%xmm0
mulsd  %xmm2,%xmm0
xor    %eax,%eax
ucomisd %xmm3,%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @gmx_within_tol(double %0, double %1, double %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fsub double %8, %9
%11 = call double @llvm.fabs.f64(double %10)
%12 = load double, double* %7
%13 = load double, double* %5
%14 = load double, double* %6
%15 = fadd double %13, %14
%16 = fadd double %15, 1.000000e+00
%17 = call double @llvm.fabs.f64(double %16)
%18 = fmul double %12, %17
%19 = fcmp ole double %11, %18
br i1 %19, label %20, label %21
20: ; preds = %3
store i32 1, i32* %4
br label %22
21: ; preds = %3
store i32 0, i32* %4
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @gmx_within_tol(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = fadd double %0, %1
%7 = fadd double %6, 1.000000e+00
%8 = tail call double @llvm.fabs.f64(double %7)
%9 = fmul double %8, %2
%10 = fcmp ole double %5, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
void mpu_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @mpu_setup() {
ret void
}
/* Variables and functions */
scalar_t__ menu_save(int);
int /*<<< orphan*/ reset_all_save(int);
void menu_save_wiz(void) {
  if (menu_save(1))
    reset_all_save(1);
}


x86 assembly (clang, -O0):
<menu_save_wiz>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <menu_save@plt>
cmp    $0x0,%rax
je     1142 <menu_save_wiz+0x22>
mov    $0x1,%edi
call   1030 <reset_all_save@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_save_wiz>:
push   %rax
mov    $0x1,%edi
call   1040 <menu_save@plt>
test   %rax,%rax
je     113b <menu_save_wiz+0x1b>
mov    $0x1,%edi
pop    %rax
jmp    1030 <reset_all_save@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @menu_save_wiz() {
%1 = call i64 @menu_save(i32 1)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @reset_all_save(i32 1)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @menu_save_wiz() {
%1 = tail call i64 @menu_save(i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @reset_all_save(i32 1)
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lib2_default();
void lib1_ref(void) { lib2_default(); }


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

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

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

LLVM IR (-O2):
define void @lib1_ref() {
%1 = tail call i32 (...) @lib2_default()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
char *strrchr(char *, char);
short chomp(char *line) {
  char *newline;
  newline = strrchr(line, '\n');
  assert(newline);
  if (!newline)
    return 0;
  *newline = '\0';
  return 1;
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
jne    115d <chomp+0x3d>
movw   $0x0,-0x2(%rbp)
jmp    116a <chomp+0x4a>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
movw   $0x1,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
push   %rbx
mov    $0xa,%esi
call   1030 <strrchr@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <assert@plt>
test   %rbx,%rbx
je     1144 <chomp+0x24>
movb   $0x0,(%rbx)
mov    $0x1,%ax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @chomp(i8* %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 10)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @assert(i8* %7)
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %1
store i16 0, i16* %2
br label %14
12: ; preds = %1
%13 = load i8*, i8** %4
store i8 0, i8* %13
store i16 1, i16* %2
br label %14
14: ; preds = %12, %11
%15 = load i16, i16* %2
ret i16 %15
}

LLVM IR (-O2):
define signext i16 @chomp(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = tail call i32 @assert(i8* %2)
%4 = icmp eq i8* %2, null
br i1 %4, label %6, label %5
5: ; preds = %1
store i8 0, i8* %2
br label %6
6: ; preds = %1, %5
%7 = phi i16 [ 1, %5 ], [ 0, %1 ]
ret i16 %7
}
/* Variables and functions */
int /*<<< orphan*/ edgefree_world();
int /*<<< orphan*/ edgeptrfree_world();
int /*<<< orphan*/ nodefree_world();
int /*<<< orphan*/ shortedgefree_world();
void free_linked_world(void) {
  nodefree_world();
  edgefree_world();
  edgeptrfree_world();
  shortedgefree_world();
}


x86 assembly (clang, -O0):
<free_linked_world>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <nodefree_world@plt>
mov    $0x0,%al
call   1040 <edgefree_world@plt>
mov    $0x0,%al
call   1060 <edgeptrfree_world@plt>
mov    $0x0,%al
call   1030 <shortedgefree_world@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_linked_world>:
push   %rax
xor    %eax,%eax
call   1050 <nodefree_world@plt>
xor    %eax,%eax
call   1040 <edgefree_world@plt>
xor    %eax,%eax
call   1060 <edgeptrfree_world@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <shortedgefree_world@plt>

LLVM IR (-O0):
define void @free_linked_world() {
%1 = call i32 (...) @nodefree_world()
%2 = call i32 (...) @edgefree_world()
%3 = call i32 (...) @edgeptrfree_world()
%4 = call i32 (...) @shortedgefree_world()
ret void
}

LLVM IR (-O2):
define void @free_linked_world() {
%1 = tail call i32 (...) @nodefree_world()
%2 = tail call i32 (...) @edgefree_world()
%3 = tail call i32 (...) @edgeptrfree_world()
%4 = tail call i32 (...) @shortedgefree_world()
ret void
}
void test56_TestProg_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test56_TestProg_targetInit__I() {
ret void
}
int changeValue() {
  int intArray[10];
  int *intPtr1 = intArray;
  return intArray[5];
}


x86 assembly (clang, -O0):
<changeValue>:
push   %rbp
mov    %rsp,%rbp
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @changeValue() {
%1 = alloca [10 x i32]
%2 = alloca i32*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32* %3, i32** %2
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @changeValue() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ solver(char **, int /*<<< orphan*/, int /*<<< orphan*/);
void solveSudoku(char **board, int rSize, int cSize) { solver(board, 0, 0); }


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

x86 assembly (clang, -O2):
<solveSudoku>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <solver@plt>

LLVM IR (-O0):
define void @solveSudoku(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 i8**, i8*** %4
%8 = call i32 @solver(i8** %7, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @solveSudoku(i8** %0, i32 %1, i32 %2) {
%4 = tail call i32 @solver(i8** %0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hellow\n");
  printf("Hru Bob\n");
  if (0)
    printf("I am fine\n");
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"hellow\0A\00"
@.str.1 = [9 x i8] c"Hru Bob\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"hellow\00"
@str.2 = [8 x i8] c"Hru Bob\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void INI_Rename_fnc_ctx() { ; }


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

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

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

LLVM IR (-O2):
define void @INI_Rename_fnc_ctx() {
ret void
}
/* Variables and functions */
int linkat(int, char const *, int, char const *, int);
__attribute__((__weak__, __always___)) int
softboundcets_linkat(int olddirfd, const char *oldpath, int newdirfd,
                     const char *newpath, int flags) {
  return linkat(olddirfd, oldpath, newdirfd, newpath, flags);
}


x86 assembly (clang, -O0):
<softboundcets_linkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <linkat@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_linkat>:
jmp    1030 <linkat@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_linkat(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @linkat(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4)
ret i32 %6
}
unsigned int hash_func(unsigned int buckets, void *key) {
  unsigned int *ip = (unsigned int *)key;
  return (*ip) % buckets;
}


x86 assembly (clang, -O0):
<hash_func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
xor    %edx,%edx
divl   -0x4(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_func>:
mov    (%rsi),%eax
xor    %edx,%edx
div    %edi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hash_func(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = load i32, i32* %3
%11 = urem i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @hash_func(i32 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = urem i32 %4, %0
ret i32 %5
}
void glGetActiveAttrib(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetActiveAttrib() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void child() {
  printf("Fork Child\n");
  sleep(1);
}


x86 assembly (clang, -O0):
<child>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<child>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Fork Child\0A\00"
define void @child() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @sleep(i32 1)
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Fork Child\00"
define void @child() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @sleep(i32 1)
ret void
}
void closure_mapping_order2_square(int *out_5427770538133181134) {
  out_5427770538133181134[0] = 4;
  out_5427770538133181134[1] = 1;
  out_5427770538133181134[2] = 5;
  out_5427770538133181134[3] = 7;
  out_5427770538133181134[4] = 3;
  out_5427770538133181134[5] = 0;
  out_5427770538133181134[6] = 2;
  out_5427770538133181134[7] = 8;
  out_5427770538133181134[8] = 6;
}


x86 assembly (clang, -O0):
<closure_mapping_order2_square>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x4,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x5,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x7,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0x10(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x14(%rax)
mov    -0x8(%rbp),%rax
movl   $0x2,0x18(%rax)
mov    -0x8(%rbp),%rax
movl   $0x8,0x1c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x6,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<closure_mapping_order2_square>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movl   $0x6,0x20(%rdi)
ret

LLVM IR (-O0):
define void @closure_mapping_order2_square(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 4, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 1, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 5, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 7, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 4
store i32 3, i32* %12
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 5
store i32 0, i32* %14
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 6
store i32 2, i32* %16
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 7
store i32 8, i32* %18
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 8
store i32 6, i32* %20
ret void
}

LLVM IR (-O2):
define void @closure_mapping_order2_square(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 4, i32 1, i32 5, i32 7>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 3, i32 0, i32 2, i32 8>, <4 x i32>* %4
%5 = getelementptr inbounds i32, i32* %0, i64 8
store i32 6, i32* %5
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int _ythread_err_map(int /*<<< orphan*/);
int /*<<< orphan*/ nanosleep(struct timespec const *, struct timespec *);
int thrd_sleep(const struct timespec *duration, struct timespec *remaining) {
  return _ythread_err_map(nanosleep(duration, remaining));
}


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

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

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @thrd_sleep(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = load %struct.timespec*, %struct.timespec** %4
%7 = call i32 @nanosleep(%struct.timespec* %5, %struct.timespec* %6)
%8 = call i32 @_ythread_err_map(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @thrd_sleep(%struct.timespec* %0, %struct.timespec* %1) {
%3 = tail call i32 @nanosleep(%struct.timespec* %0, %struct.timespec* %1)
%4 = tail call i32 @_ythread_err_map(i32 %3)
ret i32 %4
}
/* Type definitions */
struct FILE {
  int dummy;
};

/* Variables and functions */
int whisperPutc(int);
int putc(int c, struct FILE *f) { return whisperPutc(c); }


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

x86 assembly (clang, -O2):
<putc>:
jmp    1030 <whisperPutc@plt>

LLVM IR (-O0):
%struct.FILE = type { i32 }
define i32 @putc(i32 %0, %struct.FILE* %1) {
%3 = alloca i32
%4 = alloca %struct.FILE*
store i32 %0, i32* %3
store %struct.FILE* %1, %struct.FILE** %4
%5 = load i32, i32* %3
%6 = call i32 @whisperPutc(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.FILE = type { i32 }
define i32 @putc(i32 %0, %struct.FILE* nocapture readnone %1) {
%3 = tail call i32 @whisperPutc(i32 %0)
ret i32 %3
}
int SATURATE(int a, int b) {
  if (a > b)
    a = b;
  if (a < -b)
    a = -b;
  return a;
}


x86 assembly (clang, -O0):
<SATURATE>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    111c <SATURATE+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jge    1134 <SATURATE+0x34>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SATURATE>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %esi,%edi
neg    %eax
cmp    %eax,%edi
cmovge %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @SATURATE(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
%5 = sub nsw i32 0, %1
%6 = icmp slt i32 %4, %5
%7 = select i1 %6, i32 %5, i32 %4
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, double *, int);
uint64_t toRep64(double x) {
  uint64_t ret;
  memcpy(&ret, &x, 8);
  return ret;
}


x86 assembly (clang, -O0):
<toRep64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toRep64>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    0xc(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @toRep64(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = call i32 @memcpy(i32* %3, double* %2, i32 8)
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @toRep64(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @memcpy(i32* %3, double* %2, i32 8)
%6 = load i32, i32* %3
ret i32 %6
}
/* Variables and functions */
int _myPow(double, int);
double myPow(double x, int n) {
  if (n > 0)
    return _myPow(x, n);
  else
    return 1 / _myPow(x, -n);
}


x86 assembly (clang, -O0):
<myPow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1145 <myPow+0x35>
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edi
call   1030 <_myPow@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1167 <myPow+0x57>
movsd  -0x10(%rbp),%xmm0
xor    %edi,%edi
sub    -0x14(%rbp),%edi
call   1030 <_myPow@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myPow>:
push   %rax
test   %edi,%edi
jle    111c <myPow+0xc>
call   1030 <_myPow@plt>
jmp    1130 <myPow+0x20>
neg    %edi
call   1030 <_myPow@plt>
mov    %eax,%ecx
lea    0x1(%rcx),%edx
xor    %eax,%eax
cmp    $0x3,%edx
cmovb  %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @myPow(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @_myPow(double %0, i32 %1)
br label %12
6: ; preds = %2
%7 = sub nsw i32 0, %1
%8 = tail call i32 @_myPow(double %0, i32 %7)
%9 = add i32 %8, 1
%10 = icmp ult i32 %9, 3
%11 = select i1 %10, i32 %8, i32 0
br label %12
12: ; preds = %6, %4
%13 = phi i32 [ %5, %4 ], [ %11, %6 ]
%14 = sitofp i32 %13 to double
ret double %14
}
long __modsi3(long numerator, long denominator) {
  int sign;
  long res;
  if (numerator < 0) {
    numerator = -numerator;
    sign = 1;
  } else
    sign = 0;
  if (denominator < 0)
    denominator = -denominator;
  res = (unsigned int)numerator % (unsigned int)denominator;
  if (sign)
    return -res;
  else
    return res;
}


x86 assembly (clang, -O0):
<__modsi3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    112d <__modsi3+0x2d>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x1c(%rbp)
jmp    1134 <__modsi3+0x34>
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    1149 <__modsi3+0x49>
xor    %eax,%eax
sub    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1174 <__modsi3+0x74>
xor    %eax,%eax
sub    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <__modsi3+0x7c>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__modsi3>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
mov    %rsi,%rcx
neg    %rcx
cmovs  %rsi,%rcx
xor    %edx,%edx
div    %ecx
mov    %rdx,%rax
neg    %rax
test   %rdi,%rdi
cmovns %rdx,%rax
ret

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

LLVM IR (-O2):
define i64 @__modsi3(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, 0
%4 = sub nsw i64 0, %0
%5 = select i1 %3, i64 %4, i64 %0
%6 = tail call i64 @llvm.abs.i64(i64 %1, i1 true)
%7 = trunc i64 %5 to i32
%8 = trunc i64 %6 to i32
%9 = urem i32 %7, %8
%10 = zext i32 %9 to i64
%11 = sub nsw i64 0, %10
%12 = select i1 %3, i64 %11, i64 %10
ret i64 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ blake256_hash(int /*<<< orphan*/ *, void const *, size_t);
void hash_extra_blake(const void *data, size_t length, char *hash) {
  blake256_hash((uint8_t *)hash, data, length);
}


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

x86 assembly (clang, -O2):
<hash_extra_blake>:
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rax,%rdi
jmp    1030 <blake256_hash@plt>

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

LLVM IR (-O2):
define void @hash_extra_blake(i8* %0, i64 %1, i8* %2) {
%4 = bitcast i8* %2 to i32*
%5 = tail call i32 @blake256_hash(i32* %4, i8* %0, i64 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ hecmw_read_bin_value(unsigned char *, int, int /*<<< orphan*/ *);
int hecmw_read_bin_double(double *x, FILE *fp) {
  if (hecmw_read_bin_value((unsigned char *)x, sizeof(double), fp) != 0) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<hecmw_read_bin_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x8,%esi
call   1030 <hecmw_read_bin_value@plt>
cmp    $0x0,%rax
je     1148 <hecmw_read_bin_double+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <hecmw_read_bin_double+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hecmw_read_bin_double>:
push   %rax
mov    %rsi,%rdx
mov    $0x8,%esi
call   1030 <hecmw_read_bin_value@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hecmw_read_bin_double(double* %0, i32* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32*
store double* %0, double** %4
store i32* %1, i32** %5
%6 = load double*, double** %4
%7 = bitcast double* %6 to i8*
%8 = load i32*, i32** %5
%9 = call i64 @hecmw_read_bin_value(i8* %7, i32 8, i32* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %13
12: ; preds = %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @hecmw_read_bin_double(double* %0, i32* %1) {
%3 = bitcast double* %0 to i8*
%4 = tail call i64 @hecmw_read_bin_value(i8* %3, i32 8, i32* %1)
%5 = icmp ne i64 %4, 0
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ rpiPrint(char *);
void rpiPrintln(char *str) {
  rpiPrint(str);
  rpiPrint("\r\n");
}


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

x86 assembly (clang, -O2):
<rpiPrintln>:
push   %rax
call   1030 <rpiPrint@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <rpiPrint@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define void @rpiPrintln(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @rpiPrint(i8* %3)
%5 = call i32 @rpiPrint(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define void @rpiPrintln(i8* %0) {
%2 = tail call i32 @rpiPrint(i8* %0)
%3 = tail call i32 @rpiPrint(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
void main() {
  int i;
  i = EOF;
  printf("%d", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int test_imm_48uint16_reg(unsigned short val) {
  return ((val) & (-0x48 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_48uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffb8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_48uint16_reg>:
test   $0xffb8,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_48uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -72
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
unsigned int Invert(unsigned int, int, int);
int /*<<< orphan*/ PrintBits(unsigned int);
int main() {
  unsigned x = 3520348542;
  PrintBits(x);
  PrintBits(Invert(x, 31, 32));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xd1d4417e,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <PrintBits@plt>
mov    -0x4(%rbp),%edi
mov    $0x1f,%esi
mov    $0x20,%edx
call   1030 <Invert@plt>
mov    %eax,%edi
call   1040 <PrintBits@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xd1d4417e,%edi
call   1040 <PrintBits@plt>
mov    $0xd1d4417e,%edi
mov    $0x1f,%esi
mov    $0x20,%edx
call   1030 <Invert@plt>
mov    %eax,%edi
call   1040 <PrintBits@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 -774618754, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @PrintBits(i32 %2)
%4 = load i32, i32* %1
%5 = call i32 @Invert(i32 %4, i32 31, i32 32)
%6 = call i32 @PrintBits(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @PrintBits(i32 -774618754)
%2 = tail call i32 @Invert(i32 -774618754, i32 31, i32 32)
%3 = tail call i32 @PrintBits(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void increment_progress() {
  fwrite(".", sizeof(char), 1, stdout);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<increment_progress>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%ecx
lea    0xecc(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fwrite@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment_progress>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%ecx
lea    0xecf(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
@stdout = global i32 0
define void @increment_progress() {
%1 = load i32, i32* @stdout
%2 = call i32 @fwrite(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 %1)
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
@stdout = global i32 0
define void @increment_progress() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fwrite(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ajUrlinExit();
int /*<<< orphan*/ ajUrloutExit();
void ajUrlExit(void) {
  ajUrlinExit();
  ajUrloutExit();
  return;
}


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

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

LLVM IR (-O0):
define void @ajUrlExit() {
%1 = call i32 (...) @ajUrlinExit()
%2 = call i32 (...) @ajUrloutExit()
ret void
}

LLVM IR (-O2):
define void @ajUrlExit() {
%1 = tail call i32 (...) @ajUrlinExit()
%2 = tail call i32 (...) @ajUrloutExit()
ret void
}
int aa(struct AA { int a; } p) {
  struct AA a;
  a.a;
}


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

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

LLVM IR (-O0):
%struct.AA = type { i32 }
define i32 @aa(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.AA
%4 = alloca %struct.AA
%5 = getelementptr inbounds %struct.AA, %struct.AA* %3, i32 0, i32 0
store i32 %0, i32* %5
%6 = getelementptr inbounds %struct.AA, %struct.AA* %4, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @aa(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_get_diff();
int /*<<< orphan*/ test_init_dispose();
int /*<<< orphan*/ test_tick_tack();
int main(void) {
  test_init_dispose();
  test_tick_tack();
  test_get_diff();
  printf("The test is all over!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_init_dispose@plt>
mov    $0x0,%al
call   1060 <test_tick_tack@plt>
mov    $0x0,%al
call   1040 <test_get_diff@plt>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_init_dispose@plt>
xor    %eax,%eax
call   1060 <test_tick_tack@plt>
xor    %eax,%eax
call   1040 <test_get_diff@plt>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"The test is all over!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_init_dispose()
%3 = call i32 (...) @test_tick_tack()
%4 = call i32 (...) @test_get_diff()
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [22 x i8] c"The test is all over!\00"
define i32 @main() {
%1 = tail call i32 (...) @test_init_dispose()
%2 = tail call i32 (...) @test_tick_tack()
%3 = tail call i32 (...) @test_get_diff()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isascii(int);
int isupper(int c) {
  if (!isascii(c))
    return 0;
  if (((unsigned char)c >= 'A') && ((unsigned char)c <= 'Z'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isascii@plt>
cmp    $0x0,%eax
jne    1138 <isupper+0x28>
movl   $0x0,-0x4(%rbp)
jmp    1169 <isupper+0x59>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x41,%eax
jl     1162 <isupper+0x52>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x5a,%eax
jg     1162 <isupper+0x52>
movl   $0x1,-0x4(%rbp)
jmp    1169 <isupper+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @isascii(i32 %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %20
8: ; preds = %1
%9 = load i32, i32* %3
%10 = trunc i32 %9 to i8
%11 = zext i8 %10 to i32
%12 = icmp sge i32 %11, 65
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i32, i32* %3
%15 = trunc i32 %14 to i8
%16 = zext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 1, i32* %2
br label %20
19: ; preds = %13, %8
store i32 0, i32* %2
br label %20
20: ; preds = %19, %18, %7
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
void randomize(void) {
  time_t timer;
  srand((unsigned)time(&timer));
}


x86 assembly (clang, -O0):
<randomize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomize>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @randomize() {
%1 = alloca i32
%2 = call i64 @time(i32* %1)
%3 = trunc i64 %2 to i32
%4 = call i32 @srand(i32 %3)
ret void
}

LLVM IR (-O2):
define void @randomize() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @time(i32* %1)
%4 = trunc i64 %3 to i32
%5 = call i32 @srand(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *defip(int /*<<< orphan*/, int);
int /*<<< orphan*/ get_string(char *);
char *macgetip(char *arg) {
  if (defip(get_string(arg), 10240) == NULL)
    *arg = '\0';
  return arg;
}


x86 assembly (clang, -O0):
<macgetip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_string@plt>
mov    %eax,%edi
mov    $0x2800,%esi
call   1030 <defip@plt>
cmp    $0x0,%rax
jne    1152 <macgetip+0x32>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macgetip>:
push   %rbx
mov    %rdi,%rbx
call   1040 <get_string@plt>
mov    %eax,%edi
mov    $0x2800,%esi
call   1030 <defip@plt>
test   %rax,%rax
jne    113d <macgetip+0x1d>
movb   $0x0,(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @macgetip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @get_string(i8* %3)
%5 = call i32* @defip(i32 %4, i32 10240)
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %2
store i8 0, i8* %8
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
define i8* @macgetip(i8* returned %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i32* @defip(i32 %2, i32 10240)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
store i8 0, i8* %0
br label %6
6: ; preds = %5, %1
ret i8* %0
}
int test_imm_CDuint32_reg(unsigned int val) {
  return ((val) & (0xCD << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_CDuint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 205
%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_CDuint32_reg(i32 %0) {
%2 = and i32 %0, 205
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int wycc_type_flags(int);
int wycc_type_is_list(int id) {
  int flgs = wycc_type_flags(id);
  if (flgs & 16) {
    return 1;
  };
  return 0;
}


x86 assembly (clang, -O0):
<wycc_type_is_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <wycc_type_flags@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1141 <wycc_type_is_list+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <wycc_type_is_list+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wycc_type_is_list>:
push   %rax
call   1030 <wycc_type_flags@plt>
shr    $0x4,%eax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wycc_type_is_list(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @wycc_type_flags(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 16
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @wycc_type_is_list(i32 %0) {
%2 = tail call i32 @wycc_type_flags(i32 %0)
%3 = lshr i32 %2, 4
%4 = and i32 %3, 1
ret i32 %4
}