xunge/DecIR huggingface dataset:
int makeSum(int max) {
  int i, sum;
  sum = 0;
  i = 0;
  while (i < max) {
    sum = sum + i;
    i = i + 1;
  }
  return sum;
}


x86 assembly (clang, -O0):
<makeSum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1138 <makeSum+0x38>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <makeSum+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeSum>:
test   %edi,%edi
jle    1118 <makeSum+0x18>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rdi,1),%eax
add    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @makeSum(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %13
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = zext i32 %4 to i33
%6 = add nsw i32 %0, -2
%7 = zext i32 %6 to i33
%8 = mul i33 %5, %7
%9 = lshr i33 %8, 1
%10 = trunc i33 %9 to i32
%11 = add i32 %10, %0
%12 = add i32 %11, -1
br label %13
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %12, %3 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int NGROUPS;
size_t getgroups(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ setgroups(size_t, int /*<<< orphan*/ *);
int main() {
  gid_t gidset[NGROUPS];
  size_t ngroups;
  ngroups = getgroups(NGROUPS, gidset);
  setgroups(ngroups, gidset);
  setgroups(-1, gidset);
  setgroups(ngroups, (gid_t *)-1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x8(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x20(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x10(%rbp)
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <getgroups@plt>
mov    -0x20(%rbp),%rsi
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <setgroups@plt>
mov    -0x20(%rbp),%rsi
mov    $0xffffffffffffffff,%rdi
call   1030 <setgroups@plt>
mov    -0x18(%rbp),%rdi
mov    $0xffffffffffffffff,%rsi
call   1030 <setgroups@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rbx
lea    0xf(,%rdi,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rsi
call   1040 <getgroups@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <setgroups@plt>
mov    $0xffffffffffffffff,%rdi
mov    %rbx,%rsi
call   1030 <setgroups@plt>
mov    %r14,%rdi
mov    $0xffffffffffffffff,%rsi
call   1030 <setgroups@plt>
xor    %eax,%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@NGROUPS = global i32 0
define i32 @main() {
%1 = alloca i8*
%2 = alloca i64
%3 = alloca i64
%4 = load i32, i32* @NGROUPS
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
store i8* %6, i8** %1
%7 = alloca i32, i64 %5
store i64 %5, i64* %2
%8 = load i32, i32* @NGROUPS
%9 = call i64 @getgroups(i32 %8, i32* %7)
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = call i32 @setgroups(i64 %10, i32* %7)
%12 = call i32 @setgroups(i64 -1, i32* %7)
%13 = load i64, i64* %3
%14 = call i32 @setgroups(i64 %13, i32* inttoptr (i64 -1 to i32*))
%15 = load i8*, i8** %1
ret i32 0
}

LLVM IR (-O2):
@NGROUPS = global i32 0
define i32 @main() {
%1 = load i32, i32* @NGROUPS
%2 = zext i32 %1 to i64
%3 = alloca i32, i64 %2
%4 = call i64 @getgroups(i32 %1, i32* %3)
%5 = call i32 @setgroups(i64 %4, i32* %3)
%6 = call i32 @setgroups(i64 -1, i32* %3)
%7 = call i32 @setgroups(i64 %4, i32* inttoptr (i64 -1 to i32*))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getvar(int /*<<< orphan*/);
int /*<<< orphan*/ push(int /*<<< orphan*/);
int /*<<< orphan*/ read_varid();
void pushvar_handler(void) { push(getvar(read_varid())); }


x86 assembly (clang, -O0):
<pushvar_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <read_varid@plt>
mov    %eax,%edi
call   1030 <getvar@plt>
mov    %eax,%edi
call   1050 <push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushvar_handler>:
push   %rax
xor    %eax,%eax
call   1040 <read_varid@plt>
mov    %eax,%edi
call   1030 <getvar@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <push@plt>

LLVM IR (-O0):
define void @pushvar_handler() {
%1 = call i32 (...) @read_varid()
%2 = call i32 @getvar(i32 %1)
%3 = call i32 @push(i32 %2)
ret void
}

LLVM IR (-O2):
define void @pushvar_handler() {
%1 = tail call i32 (...) @read_varid()
%2 = tail call i32 @getvar(i32 %1)
%3 = tail call i32 @push(i32 %2)
ret void
}
int test_imm_71uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x71 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_71uint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 113
%6 = icmp ne i64 %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_71uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 113
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int freerdp_dummy() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @freerdp_dummy() {
ret i32 0
}
int array2dindex(int x, int y, int width) { return y * width + x; }


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

x86 assembly (clang, -O2):
<array2dindex>:
imul   %edx,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @array2dindex(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @array2dindex(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int p1(int m) {
  int *v;
  printf("   P1 recebeu %d\n", m);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c" P1 recebeu %d\0A\00"
define i32 @p1(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
unsigned short ldh(unsigned short *p) { return p[7]; }


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

x86 assembly (clang, -O2):
<ldh>:
movzwl 0xe(%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @ldh(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = getelementptr inbounds i16, i16* %3, i64 7
%5 = load i16, i16* %4
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @ldh(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 7
%3 = load i16, i16* %2
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ test_mean();
int /*<<< orphan*/ test_negative_size();
int /*<<< orphan*/ test_null_array();
int /*<<< orphan*/ test_null_result();
int /*<<< orphan*/ test_too_big_sum();
int /*<<< orphan*/ test_too_small_sum();
int main(void) {
  ;
  test_null_array();
  test_negative_size();
  test_null_result();
  test_too_big_sum();
  test_too_small_sum();
  test_mean();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_null_array@plt>
mov    $0x0,%al
call   1060 <test_negative_size@plt>
mov    $0x0,%al
call   1080 <test_null_result@plt>
mov    $0x0,%al
call   1070 <test_too_big_sum@plt>
mov    $0x0,%al
call   1040 <test_too_small_sum@plt>
mov    $0x0,%al
call   1050 <test_mean@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_null_array@plt>
xor    %eax,%eax
call   1060 <test_negative_size@plt>
xor    %eax,%eax
call   1080 <test_null_result@plt>
xor    %eax,%eax
call   1070 <test_too_big_sum@plt>
xor    %eax,%eax
call   1040 <test_too_small_sum@plt>
xor    %eax,%eax
call   1050 <test_mean@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_null_array()
%2 = call i32 (...) @test_negative_size()
%3 = call i32 (...) @test_null_result()
%4 = call i32 (...) @test_too_big_sum()
%5 = call i32 (...) @test_too_small_sum()
%6 = call i32 (...) @test_mean()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_null_array()
%2 = tail call i32 (...) @test_negative_size()
%3 = tail call i32 (...) @test_null_result()
%4 = tail call i32 (...) @test_too_big_sum()
%5 = tail call i32 (...) @test_too_small_sum()
%6 = tail call i32 (...) @test_mean()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *generate_muspi_merol(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  char *muspi_merol;
  srand(time(NULL));
  muspi_merol = generate_muspi_merol(10);
  printf(muspi_merol);
  free(muspi_merol);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0xa,%edi
call   1050 <generate_muspi_merol@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0xa,%edi
call   1050 <generate_muspi_merol@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i8* @generate_muspi_merol(i32 10)
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* %6)
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i8* @generate_muspi_merol(i32 10)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
%5 = tail call i32 @free(i8* %3)
ret i32 0
}
int do_450() { return 450; }


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

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

LLVM IR (-O0):
define i32 @do_450() {
ret i32 450
}

LLVM IR (-O2):
define i32 @do_450() {
ret i32 450
}
/* Variables and functions */
unsigned char *LL_skip_expr(unsigned char *);
unsigned char *skip_expr(unsigned char *expr) { return LL_skip_expr(expr); }


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

x86 assembly (clang, -O2):
<skip_expr>:
jmp    1030 <LL_skip_expr@plt>

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

LLVM IR (-O2):
define i8* @skip_expr(i8* %0) {
%2 = tail call i8* @LL_skip_expr(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ cgmjpost2l(float *, float *, float, int, int, int, int);
void cgmjpost2l_(float *part, float *amu, float *qm, int *nop, int *idimp,
                 int *nxv, int *nyv) {
  cgmjpost2l(part, amu, *qm, *nop, *idimp, *nxv, *nyv);
  return;
}


x86 assembly (clang, -O0):
<cgmjpost2l_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x30(%rbp),%rax
mov    (%rax),%r8d
mov    0x10(%rbp),%rax
mov    (%rax),%r9d
call   1030 <cgmjpost2l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgmjpost2l_>:
mov    0x8(%rsp),%rax
movss  (%rdx),%xmm0
mov    (%rcx),%edx
mov    (%r8),%ecx
mov    (%r9),%r8d
mov    (%rax),%r9d
jmp    1030 <cgmjpost2l@plt>

LLVM IR (-O0):
define void @cgmjpost2l_(float* %0, float* %1, float* %2, i32* %3, i32* %4, i32* %5, i32* %6) {
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
store float* %0, float** %8
store float* %1, float** %9
store float* %2, float** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store i32* %6, i32** %14
%15 = load float*, float** %8
%16 = load float*, float** %9
%17 = load float*, float** %10
%18 = load float, float* %17
%19 = load i32*, i32** %11
%20 = load i32, i32* %19
%21 = load i32*, i32** %12
%22 = load i32, i32* %21
%23 = load i32*, i32** %13
%24 = load i32, i32* %23
%25 = load i32*, i32** %14
%26 = load i32, i32* %25
%27 = call i32 @cgmjpost2l(float* %15, float* %16, float %18, i32 %20, i32 %22, i32 %24, i32 %26)
ret void
}

LLVM IR (-O2):
define void @cgmjpost2l_(float* %0, float* %1, float* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6) {
%8 = load float, float* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = tail call i32 @cgmjpost2l(float* %0, float* %1, float %8, i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_sub_of_pi_e();
int /*<<< orphan*/ basic_test();
int /*<<< orphan*/ div_sqr_of_pi();
int /*<<< orphan*/ log_exp_of_pi();
int /*<<< orphan*/ my_sqrt();
int main(void) {
  basic_test();
  add_sub_of_pi_e();
  div_sqr_of_pi();
  log_exp_of_pi();
  my_sqrt();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <basic_test@plt>
mov    $0x0,%al
call   1070 <add_sub_of_pi_e@plt>
mov    $0x0,%al
call   1040 <div_sqr_of_pi@plt>
mov    $0x0,%al
call   1060 <log_exp_of_pi@plt>
mov    $0x0,%al
call   1050 <my_sqrt@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <basic_test@plt>
xor    %eax,%eax
call   1070 <add_sub_of_pi_e@plt>
xor    %eax,%eax
call   1040 <div_sqr_of_pi@plt>
xor    %eax,%eax
call   1060 <log_exp_of_pi@plt>
xor    %eax,%eax
call   1050 <my_sqrt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @basic_test()
%2 = call i32 (...) @add_sub_of_pi_e()
%3 = call i32 (...) @div_sqr_of_pi()
%4 = call i32 (...) @log_exp_of_pi()
%5 = call i32 (...) @my_sqrt()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @basic_test()
%2 = tail call i32 (...) @add_sub_of_pi_e()
%3 = tail call i32 (...) @div_sqr_of_pi()
%4 = tail call i32 (...) @log_exp_of_pi()
%5 = tail call i32 (...) @my_sqrt()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int nwkGroupSwitch(int, int /*<<< orphan*/);
bool NWK_GroupAdd(uint16_t group) { return nwkGroupSwitch(0xffff, group); }


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

x86 assembly (clang, -O2):
<NWK_GroupAdd>:
mov    %edi,%esi
mov    $0xffff,%edi
jmp    1030 <nwkGroupSwitch@plt>

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

LLVM IR (-O2):
define i32 @NWK_GroupAdd(i32 %0) {
%2 = tail call i32 @nwkGroupSwitch(i32 65535, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ wait(int *);
void handle_chld(int signo) {
  int status = 0;
  wait(&status);
  exit(0);
}


x86 assembly (clang, -O0):
<handle_chld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <wait@plt>
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<handle_chld>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1040 <wait@plt>
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @handle_chld(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = call i32 @wait(i32* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @handle_chld(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @wait(i32* %2)
%5 = call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct cdrom_blk {
  int dummy;
};
typedef int /*<<< orphan*/ b;

/* Variables and functions */
int main(void) {
  struct cdrom_blk b;
  (void)b;
  return sizeof(b);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  int num;
  int result;
  num = 10;
  result = 1;
  for (i = 1; i <= num; i++) {
    result = result * i;
  }
  printf("%d!=%d\n", num, result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1158 <main+0x48>
mov    -0x10(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"%d!=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %3
store i32 1, i32* %4
store i32 1, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = mul nsw i32 %10, %11
store i32 %12, i32* %4
br label %13
13: ; preds = %9
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d!=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10, i32 3628800)
ret i32 0
}
int unkown_eap_handler() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @unkown_eap_handler() {
ret i32 0
}
void utilCudaCheckError(void *cudaError_t_ptr, char *msg) { return; }


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

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

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

LLVM IR (-O2):
define void @utilCudaCheckError(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int track_update() {}


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

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

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

LLVM IR (-O2):
define i32 @track_update() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  extern char *__progname;
  fprintf(stderr, "usage: %s [-] [-Pprinter] [[job# ...] [user ...]]\n",
          __progname);
  exit(2);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"usage: %s [-] [-Pprinter] [[job# ...] [user ...]]\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"usage: %s [-] [-Pprinter] [[job# ...] [user ...]]\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 2)
unreachable
}
void f1(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j,
        int k, int l, int m, int n, int o) {
  return;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14) {
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
store i32 %0, i32* %16
store i32 %1, i32* %17
store i32 %2, i32* %18
store i32 %3, i32* %19
store i32 %4, i32* %20
store i32 %5, i32* %21
store i32 %6, i32* %22
store i32 %7, i32* %23
store i32 %8, i32* %24
store i32 %9, i32* %25
store i32 %10, i32* %26
store i32 %11, i32* %27
store i32 %12, i32* %28
store i32 %13, i32* %29
store i32 %14, i32* %30
ret void
}

LLVM IR (-O2):
define void @f1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ init_textures(char *);
void init(char *filename) {
  glEnable(GL_TEXTURE_2D);
  init_textures(filename);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    -0x8(%rbp),%rdi
call   1040 <init_textures@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <init_textures@plt>

LLVM IR (-O0):
@GL_TEXTURE_2D = global i32 0
define void @init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @GL_TEXTURE_2D
%4 = call i32 @glEnable(i32 %3)
%5 = load i8*, i8** %2
%6 = call i32 @init_textures(i8* %5)
ret void
}

LLVM IR (-O2):
@GL_TEXTURE_2D = global i32 0
define void @init(i8* %0) {
%2 = load i32, i32* @GL_TEXTURE_2D
%3 = tail call i32 @glEnable(i32 %2)
%4 = tail call i32 @init_textures(i8* %0)
ret void
}
int test_imm_3Cuint16_reg(unsigned short val) {
  return ((val) & (0x3C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_3Cuint16_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, 60
%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_3Cuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 60
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
uint8_t update_default_encryption_mode(struct list_head *m, void *p,
                                       int value) {
  ;
  return 0x00;
}


x86 assembly (clang, -O0):
<update_default_encryption_mode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @update_default_encryption_mode(%struct.list_head* %0, i8* %1, i32 %2) {
%4 = alloca %struct.list_head*
%5 = alloca i8*
%6 = alloca i32
store %struct.list_head* %0, %struct.list_head** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @update_default_encryption_mode(%struct.list_head* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit_unreachable();
void call_unreachable() { exit_unreachable(); }


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

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

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

LLVM IR (-O2):
define void @call_unreachable() {
%1 = tail call i32 (...) @exit_unreachable()
ret void
}
void rop3_237_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ T;
  stk2 = ~stk2;
  stk1 = S | stk2;
  *D = stk1;
}


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

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

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

LLVM IR (-O2):
define void @rop3_237_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = xor i8 %5, -1
%7 = or i8 %6, %1
store i8 %7, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int mkfifo(const char *pathname __attribute__((unused)),
           mode_t mode __attribute__((unused))) {
  printf("mkfifo\n");
  errno = ENOENT;
  return -1;
}


x86 assembly (clang, -O0):
<mkfifo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea5(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkfifo>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"mkfifo\0A\00"
@ENOENT = global i32 0
@errno = global i32 0
define i32 @mkfifo(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @ENOENT
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
@str = [7 x i8] c"mkfifo\00"
define i32 @mkfifo(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @ENOENT
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int errno;
int konnect_get_last_error() { return errno; }


x86 assembly (clang, -O0):
<konnect_get_last_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<konnect_get_last_error>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @konnect_get_last_error() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @konnect_get_last_error() {
%1 = load i32, i32* @errno
ret i32 %1
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/iamrekcah/"
                        "cyclone/refs/heads/master/bin/genfiles/buildlib.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/iamrekcah/cyclone/refs/heads/master/bin/genfiles/buildlib.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/iamrekcah/cyclone/refs/heads/master/bin/genfiles/buildlib.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
void AmiSetDword24ToLe(void *pAddr_p, unsigned long int dwDwordVal_p) {
  ((unsigned char *)pAddr_p)[0] = ((unsigned char *)&dwDwordVal_p)[0];
  ((unsigned char *)pAddr_p)[1] = ((unsigned char *)&dwDwordVal_p)[1];
  ((unsigned char *)pAddr_p)[2] = ((unsigned char *)&dwDwordVal_p)[2];
}


x86 assembly (clang, -O0):
<AmiSetDword24ToLe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xf(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xe(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AmiSetDword24ToLe>:
mov    %rsi,%rax
mov    %al,(%rdi)
mov    %ah,0x1(%rdi)
shr    $0x10,%rax
mov    %al,0x2(%rdi)
ret

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

LLVM IR (-O2):
define void @AmiSetDword24ToLe(i8* nocapture writeonly %0, i64 %1) {
%3 = trunc i64 %1 to i8
%4 = lshr i64 %1, 8
%5 = trunc i64 %4 to i8
%6 = lshr i64 %1, 16
%7 = trunc i64 %6 to i8
store i8 %3, i8* %0
%8 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_line(char *);
void ipf_enumerate(void) { write_line(":ol."); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c":ol.\00"
define void @ipf_enumerate() {
%1 = call i32 @write_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c":ol.\00"
define void @ipf_enumerate() {
%1 = tail call i32 @write_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.rt2x00_dev = type opaque
define void @rt2x00rfkill_allocate(%struct.rt2x00_dev* nocapture %0) {
ret void
}
double GetSP(int *Ptr, int Scale) {
  int i, Sign, Oct;
  double x;
  Oct = *Ptr;
  if (0 != (040000 & Oct)) {
    Oct = ~Oct;
    Sign = -1;
  } else {
    Sign = 1;
  }
  i = (Oct & 037777);
  x = Sign * i * (1.0 / 040000) * Scale;
  return (x);
}


x86 assembly (clang, -O0):
<GetSP>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
and    $0x4000,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     113c <GetSP+0x3c>
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
movl   $0xffffffff,-0x14(%rbp)
jmp    1143 <GetSP+0x43>
movl   $0x1,-0x14(%rbp)
mov    -0x18(%rbp),%eax
and    $0x3fff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe9f(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSP>:
mov    (%rdi),%eax
mov    %eax,%ecx
and    $0x4000,%ecx
mov    %ecx,%edx
shr    $0xe,%edx
neg    %edx
xor    %eax,%edx
and    $0x3fff,%edx
mov    %edx,%eax
neg    %eax
test   %ecx,%ecx
cmove  %edx,%eax
cvtsi2sd %eax,%xmm1
mulsd  0xed2(%rip),%xmm1
cvtsi2sd %esi,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @GetSP(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store i32* %0, i32** %3
store i32 %1, i32* %4
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = and i32 16384, %11
%13 = icmp ne i32 0, %12
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i32, i32* %7
%16 = xor i32 %15, -1
store i32 %16, i32* %7
store i32 -1, i32* %6
br label %18
17: ; preds = %2
store i32 1, i32* %6
br label %18
18: ; preds = %17, %14
%19 = load i32, i32* %7
%20 = and i32 %19, 16383
store i32 %20, i32* %5
%21 = load i32, i32* %6
%22 = load i32, i32* %5
%23 = mul nsw i32 %21, %22
%24 = sitofp i32 %23 to double
%25 = fmul double %24, 0x3F10000000000000
%26 = load i32, i32* %4
%27 = sitofp i32 %26 to double
%28 = fmul double %25, %27
store double %28, double* %8
%29 = load double, double* %8
ret double %29
}

LLVM IR (-O2):
define double @GetSP(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = and i32 %3, 16384
%5 = icmp eq i32 %4, 0
%6 = xor i1 %5, true
%7 = sext i1 %6 to i32
%8 = xor i32 %3, %7
%9 = and i32 %8, 16383
%10 = sub nsw i32 0, %9
%11 = select i1 %5, i32 %9, i32 %10
%12 = sitofp i32 %11 to double
%13 = fmul double %12, 0x3F10000000000000
%14 = sitofp i32 %1 to double
%15 = fmul double %13, %14
ret double %15
}
double getPi(void) { return 3.141592454; }


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

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

LLVM IR (-O0):
define double @getPi() {
ret double 0x400921FB397A52B5
}

LLVM IR (-O2):
define double @getPi() {
ret double 0x400921FB397A52B5
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ sprintf(char *, char *, int);
extern char *str_pid() {
  static char buf[24];
  sprintf(buf, "%d", getpid());
  return buf;
}


x86 assembly (clang, -O0):
<str_pid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edx
lea    0x2f0c(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ef9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_pid>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0x2f11(%rip),%rbx
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@str_pid.buf = internal global [24 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @str_pid() {
%1 = call i32 (...) @getpid()
%2 = call i32 @sprintf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str_pid.buf, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str_pid.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@str_pid.buf = internal global [24 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @str_pid() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str_pid.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str_pid.buf, i64 0, i64 0)
}
/* Variables and functions */
__attribute__((always_)) size_t
ev3_port_syspath_buf_len_from_dir_len(size_t len) {
  size_t n = (len += 17) & 3;
  if (n != 0) {
    len += 4 - n;
  }
  return len;
}


x86 assembly (clang, -O0):
<ev3_port_syspath_buf_len_from_dir_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x11,%rax
mov    %rax,-0x8(%rbp)
and    $0x3,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1138 <ev3_port_syspath_buf_len_from_dir_len+0x38>
mov    $0x4,%eax
sub    -0x10(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ev3_port_syspath_buf_len_from_dir_len>:
lea    0x11(%rdi),%rcx
mov    %ecx,%edx
and    $0x3,%edx
sub    %rdx,%rdi
lea    0x15(%rdi),%rax
test   %rdx,%rdx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @ev3_port_syspath_buf_len_from_dir_len(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = add i64 %4, 17
store i64 %5, i64* %2
%6 = and i64 %5, 3
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i64, i64* %3
%11 = sub i64 4, %10
%12 = load i64, i64* %2
%13 = add i64 %12, %11
store i64 %13, i64* %2
br label %14
14: ; preds = %9, %1
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
define i64 @ev3_port_syspath_buf_len_from_dir_len(i64 %0) {
%2 = add i64 %0, 17
%3 = and i64 %2, 3
%4 = icmp eq i64 %3, 0
%5 = add i64 %0, 21
%6 = sub i64 %5, %3
%7 = select i1 %4, i64 %2, i64 %6
ret i64 %7
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t sz = 0;
  while (str[sz])
    sz++;
  return sz;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
unsigned int rgb_to_pixel16bgr(unsigned int r, unsigned int g, unsigned int b) {
  return ((b >> 3) << 11) | ((g >> 2) << 5) | (r >> 3);
}


x86 assembly (clang, -O0):
<rgb_to_pixel16bgr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x3,%eax
shl    $0xb,%eax
mov    -0x8(%rbp),%ecx
shr    $0x2,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x3,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb_to_pixel16bgr>:
and    $0xfffffff8,%edx
shl    $0x8,%edx
lea    0x0(,%rsi,8),%eax
and    $0xffffffe0,%eax
shr    $0x3,%edi
or     %edi,%eax
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @rgb_to_pixel16bgr(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %2, 8
%5 = and i32 %4, -2048
%6 = shl i32 %1, 3
%7 = and i32 %6, -32
%8 = lshr i32 %0, 3
%9 = or i32 %7, %8
%10 = or i32 %9, %5
ret i32 %10
}