xunge/DecIR huggingface dataset:
/* Variables and functions */
double sqrt(double);
double speed(double d, double mu) {
  double g = 9.81;
  double m_to_km = 3600.0 / 1000.0;
  return (mu * g / 2.0) * (sqrt((4.0 + 8.0 * d / mu / g)) - 2.0) * m_to_km;
}


x86 assembly (clang, -O0):
<speed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xef6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeb1(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xe92(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  0xe71(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speed>:
push   %rax
movsd  0xee7(%rip),%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
mulsd  0xedf(%rip),%xmm3
mulsd  0xedf(%rip),%xmm0
divsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
addsd  0xed7(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1151 <speed+0x41>
sqrtsd %xmm0,%xmm0
jmp    1160 <speed+0x50>
movsd  %xmm3,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm3
addsd  0xeb8(%rip),%xmm0
mulsd  %xmm0,%xmm3
mulsd  0xeb4(%rip),%xmm3
movapd %xmm3,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @speed(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 9.810000e+00, double* %5
store double 3.600000e+00, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fmul double %7, %8
%10 = fdiv double %9, 2.000000e+00
%11 = load double, double* %3
%12 = fmul double 8.000000e+00, %11
%13 = load double, double* %4
%14 = fdiv double %12, %13
%15 = load double, double* %5
%16 = fdiv double %14, %15
%17 = fadd double 4.000000e+00, %16
%18 = call double @sqrt(double %17)
%19 = fsub double %18, 2.000000e+00
%20 = fmul double %10, %19
%21 = load double, double* %6
%22 = fmul double %20, %21
ret double %22
}

LLVM IR (-O2):
define double @speed(double %0, double %1) {
%3 = fmul double %1, 9.810000e+00
%4 = fmul double %3, 5.000000e-01
%5 = fmul double %0, 8.000000e+00
%6 = fdiv double %5, %1
%7 = fdiv double %6, 9.810000e+00
%8 = fadd double %7, 4.000000e+00
%9 = tail call double @sqrt(double %8)
%10 = fadd double %9, -2.000000e+00
%11 = fmul double %4, %10
%12 = fmul double %11, 3.600000e+00
ret double %12
}
/* Variables and functions */
int atoi(char *);
void parse_int(void *out, char *in) { *(int *)out = atoi(in); }


x86 assembly (clang, -O0):
<parse_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_int>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <atoi@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @parse_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @atoi(i8* %5)
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @parse_int(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = tail call i32 @atoi(i8* %1)
%4 = bitcast i8* %0 to i32*
store i32 %3, i32* %4
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void incr_be(uint8_t *v, size_t len) {
  len--;
  while (1) {
    if (++v[len] != 0)
      return;
    if (len == 0)
      return;
    len--;
  }
}


x86 assembly (clang, -O0):
<incr_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rdx
mov    (%rcx,%rdx,8),%rax
add    $0x1,%rax
mov    %rax,(%rcx,%rdx,8)
cmp    $0x0,%rax
je     113b <incr_be+0x3b>
jmp    115c <incr_be+0x5c>
cmpq   $0x0,-0x10(%rbp)
jne    114b <incr_be+0x4b>
jmp    115c <incr_be+0x5c>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <incr_be+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<incr_be>:
add    $0xffffffffffffffff,%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rsi,%rcx
sub    $0x1,%rsi
setb   %al
addq   $0x1,(%rdi,%rcx,8)
jne    1125 <incr_be+0x25>
test   %al,%al
je     1110 <incr_be+0x10>
ret

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

LLVM IR (-O2):
define void @incr_be(i64* nocapture %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %1, %2 ], [ %5, %3 ]
%5 = add i64 %4, -1
%6 = getelementptr inbounds i64, i64* %0, i64 %5
%7 = load i64, i64* %6
%8 = add nsw i64 %7, 1
store i64 %8, i64* %6
%9 = icmp ne i64 %8, 0
%10 = icmp eq i64 %5, 0
%11 = select i1 %9, i1 true, i1 %10
br i1 %11, label %12, label %3
12: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x5b() {
  Assert_real((islower(91) == 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_islower.c",
              460, ("islower should be 0 for ["));
}


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

x86 assembly (clang, -O2):
<t_islower_0x5b>:
push   %rax
mov    $0x5b,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1cc,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for [\00"
define void @t_islower_0x5b() {
%1 = call i64 @islower(i32 91)
%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 460, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for [\00"
define void @t_islower_0x5b() {
%1 = tail call i64 @islower(i32 91)
%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 460, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int EAST_CD_1(int in) {
  FILE *fin = fopen("func_header.h.ecov", "a");
  if (fin) {
    fprintf(fin, "CD1:%d\n", in);
  }
  fclose(fin);
  return in;
}


x86 assembly (clang, -O0):
<EAST_CD_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1170 <EAST_CD_1+0x40>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeaa(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EAST_CD_1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xec4(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <EAST_CD_1+0x31>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"func_header.h.ecov\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"CD1:%d\0A\00"
define i32 @EAST_CD_1(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32*, i32** %3
%9 = load i32, i32* %2
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %1
%12 = load i32*, i32** %3
%13 = call i32 @fclose(i32* %12)
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [19 x i8] c"func_header.h.ecov\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"CD1:%d\0A\00"
define i32 @EAST_CD_1(i32 returned %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @fclose(i32* %2)
ret i32 %0
}
int execute_getppid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_getppid() {
ret i32 0
}
double double_mult(double x, double y, int index) { return x * y; }


x86 assembly (clang, -O0):
<double_mult>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_mult>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @double_mult(double %0, double %1, i32 %2) {
%4 = fmul double %0, %1
ret double %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int stable_mixed_volume(int *mv, int *smv) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(79, mv, smv, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<stable_mixed_volume>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x4f,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @stable_mixed_volume(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc4c(i32 79, i32* %0, i32* %1, double* undef, i32 0)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xdestroywindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xdestroywindow_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xdestroywindow.window;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xdestroywindow_window>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XEvent_xdestroywindow_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ csolve_assert(int /*<<< orphan*/);
void csolve_block_end(void *p) { csolve_assert(0); }


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

x86 assembly (clang, -O2):
<csolve_block_end>:
xor    %edi,%edi
jmp    1030 <csolve_assert@plt>

LLVM IR (-O0):
define void @csolve_block_end(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @csolve_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @csolve_block_end(i8* nocapture readnone %0) {
%2 = tail call i32 @csolve_assert(i32 0)
ret void
}
/* Variables and functions */
double genrand_close1_open2();
double genrand_close_open(void) { return genrand_close1_open2() - 1.0; }


x86 assembly (clang, -O0):
<genrand_close_open>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand_close1_open2@plt>
movsd  0xedd(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_close_open>:
push   %rax
xor    %eax,%eax
call   1030 <genrand_close1_open2@plt>
addsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand_close_open() {
%1 = call double (...) @genrand_close1_open2()
%2 = fsub double %1, 1.000000e+00
ret double %2
}

LLVM IR (-O2):
define double @genrand_close_open() {
%1 = tail call double (...) @genrand_close1_open2()
%2 = fadd double %1, -1.000000e+00
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ gpio_export(char *);
int /*<<< orphan*/ gpio_exported(char *);
int /*<<< orphan*/ gpio_output(char *);
void gpio_setup(char *pin) {
  if (!gpio_exported(pin))
    gpio_export(pin);
  gpio_output(pin);
}


x86 assembly (clang, -O0):
<gpio_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <gpio_exported@plt>
cmp    $0x0,%eax
jne    1157 <gpio_setup+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <gpio_export@plt>
mov    -0x8(%rbp),%rdi
call   1040 <gpio_output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_setup>:
push   %rbx
mov    %rdi,%rbx
call   1050 <gpio_exported@plt>
test   %eax,%eax
jne    1145 <gpio_setup+0x15>
mov    %rbx,%rdi
call   1030 <gpio_export@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <gpio_output@plt>

LLVM IR (-O0):
define void @gpio_setup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @gpio_exported(i8* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @gpio_export(i8* %7)
br label %9
9: ; preds = %6, %1
%10 = load i8*, i8** %2
%11 = call i32 @gpio_output(i8* %10)
ret void
}

LLVM IR (-O2):
define void @gpio_setup(i8* %0) {
%2 = tail call i32 @gpio_exported(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @gpio_export(i8* %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @gpio_output(i8* %0)
ret void
}
void McASPTxSerActivate(unsigned int baseAddr) {
  (*((volatile unsigned int *)(baseAddr + (0xC0)))) = 0xFFFF;
  (*((volatile unsigned int *)(baseAddr + (0x44)))) |= (0x00000400u);
  while (((*((volatile unsigned int *)(baseAddr + (0x44)))) & (0x00000400u)) !=
         (0x00000400u))
    ;
}


x86 assembly (clang, -O0):
<McASPTxSerActivate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%eax
mov    %eax,%eax
movl   $0xffff,(%rax)
mov    -0x4(%rbp),%eax
add    $0x44,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     $0x400,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x44,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x400,%eax
cmp    $0x400,%eax
je     1148 <McASPTxSerActivate+0x48>
jmp    1129 <McASPTxSerActivate+0x29>
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPTxSerActivate>:
lea    0xc0(%rdi),%eax
movl   $0xffff,(%rax)
add    $0x44,%edi
orl    $0x400,(%rdi)
cs nopw 0x0(%rax,%rax,1)
nop
testl  $0x400,(%rdi)
je     1120 <McASPTxSerActivate+0x20>
ret

LLVM IR (-O0):
define void @McASPTxSerActivate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 192
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
store volatile i32 65535, i32* %6
%7 = load i32, i32* %2
%8 = add i32 %7, 68
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 1024
store volatile i32 %12, i32* %10
br label %13
13: ; preds = %21, %1
%14 = load i32, i32* %2
%15 = add i32 %14, 68
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
%19 = and i32 %18, 1024
%20 = icmp ne i32 %19, 1024
br i1 %20, label %21, label %22
21: ; preds = %13
br label %13
22: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @McASPTxSerActivate(i32 %0) {
%2 = add i32 %0, 192
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
store volatile i32 65535, i32* %4
%5 = add i32 %0, 68
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = or i32 %8, 1024
store volatile i32 %9, i32* %7
br label %10
10: ; preds = %10, %1
%11 = load volatile i32, i32* %7
%12 = and i32 %11, 1024
%13 = icmp eq i32 %12, 0
br i1 %13, label %10, label %14
14: ; preds = %10
ret void
}
/* Variables and functions */
scalar_t__ util_shift_right_saturate_n(int, short, int);
int _sshvr(int src2, int src1) {
  short s1;
  if (src1 > 31)
    s1 = 31;
  else if (src1 < -31)
    s1 = -31;
  else
    s1 = src1;
  return (int)util_shift_right_saturate_n(src2, s1, 32);
}


x86 assembly (clang, -O0):
<_sshvr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1f,-0x8(%rbp)
jle    1133 <_sshvr+0x23>
movw   $0x1f,-0xa(%rbp)
jmp    1154 <_sshvr+0x44>
cmpl   $0xffffffe1,-0x8(%rbp)
jge    1148 <_sshvr+0x38>
movw   $0xffe1,-0xa(%rbp)
jmp    114f <_sshvr+0x3f>
mov    -0x8(%rbp),%eax
mov    %ax,-0xa(%rbp)
jmp    1154 <_sshvr+0x44>
mov    -0x4(%rbp),%edi
mov    $0x20,%edx
movswl -0xa(%rbp),%esi
call   1030 <util_shift_right_saturate_n@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sshvr>:
cmp    $0xffffffe2,%esi
mov    $0xffffffe1,%eax
cmovge %esi,%eax
cmp    $0x1f,%eax
mov    $0x1f,%ecx
cmovl  %eax,%ecx
movswl %cx,%esi
mov    $0x20,%edx
jmp    1030 <util_shift_right_saturate_n@plt>

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

LLVM IR (-O2):
define i32 @_sshvr(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, -31
%4 = select i1 %3, i32 %1, i32 -31
%5 = icmp slt i32 %4, 31
%6 = select i1 %5, i32 %4, i32 31
%7 = trunc i32 %6 to i16
%8 = tail call i64 @util_shift_right_saturate_n(i32 %0, i16 signext %7, i32 32)
%9 = trunc i64 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ TCODE_LOCK_FETCH_ADD;
int /*<<< orphan*/ do_lock_request(int /*<<< orphan*/);
void do_add_big(void) { do_lock_request(TCODE_LOCK_FETCH_ADD); }


x86 assembly (clang, -O0):
<do_add_big>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <do_lock_request@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_add_big>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <do_lock_request@plt>

LLVM IR (-O0):
@TCODE_LOCK_FETCH_ADD = global i32 0
define void @do_add_big() {
%1 = load i32, i32* @TCODE_LOCK_FETCH_ADD
%2 = call i32 @do_lock_request(i32 %1)
ret void
}

LLVM IR (-O2):
@TCODE_LOCK_FETCH_ADD = global i32 0
define void @do_add_big() {
%1 = load i32, i32* @TCODE_LOCK_FETCH_ADD
%2 = tail call i32 @do_lock_request(i32 %1)
ret void
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct entry_list {
  int dummy;
};
struct entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_append(struct genlist *, struct entry *);
void entry_list_append(struct entry_list *tthis, struct entry *pfoo) {
  genlist_append((struct genlist *)tthis, pfoo);
}


x86 assembly (clang, -O0):
<entry_list_append>:
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   1030 <genlist_append@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<entry_list_append>:
jmp    1030 <genlist_append@plt>

LLVM IR (-O0):
%struct.entry_list = type { i32 }
%struct.entry = type { i32 }
%struct.genlist = type { i32 }
define void @entry_list_append(%struct.entry_list* %0, %struct.entry* %1) {
%3 = alloca %struct.entry_list*
%4 = alloca %struct.entry*
store %struct.entry_list* %0, %struct.entry_list** %3
store %struct.entry* %1, %struct.entry** %4
%5 = load %struct.entry_list*, %struct.entry_list** %3
%6 = bitcast %struct.entry_list* %5 to %struct.genlist*
%7 = load %struct.entry*, %struct.entry** %4
%8 = call i32 @genlist_append(%struct.genlist* %6, %struct.entry* %7)
ret void
}

LLVM IR (-O2):
%struct.entry_list = type { i32 }
%struct.entry = type { i32 }
%struct.genlist = type { i32 }
define void @entry_list_append(%struct.entry_list* %0, %struct.entry* %1) {
%3 = bitcast %struct.entry_list* %0 to %struct.genlist*
%4 = tail call i32 @genlist_append(%struct.genlist* %3, %struct.entry* %1)
ret void
}
void ff_hevc_put_hevc_bi_qpel_hv16_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv16_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isqrt(int /*<<< orphan*/);
void t_sqrt_0() {
  Assert_real((isqrt(0) == 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/stdlib/isqrt.c",
              5, ("Integer square root of 0 should be 0"));
}


x86 assembly (clang, -O0):
<t_sqrt_0>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <isqrt@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec2(%rip),%rsi
mov    $0x5,%edx
lea    0xf58(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_0>:
push   %rax
xor    %edi,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec8(%rip),%rsi
lea    0xf63(%rip),%rcx
mov    $0x5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [37 x i8] c"Integer square root of 0 should be 0\00"
define void @t_sqrt_0() {
%1 = call i64 @isqrt(i32 0)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [37 x i8] c"Integer square root of 0 should be 0\00"
define void @t_sqrt_0() {
%1 = tail call i64 @isqrt(i32 0)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ G_Match_SetAutorecordState(char *);
void G_Match_Autorecord_AltStart(void) {
  G_Match_SetAutorecordState("altstart");
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"altstart\00"
define void @G_Match_Autorecord_AltStart() {
%1 = tail call i32 @G_Match_SetAutorecordState(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
int ft_tolower(int c) {
  if ((c >= 'A') && (c <= 'Z'))
    c += 32;
  return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1124 <ft_tolower+0x24>
cmpl   $0x5a,-0x4(%rbp)
jg     1124 <ft_tolower+0x24>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char const *, char);
int has_delim(const char *str) {
  if (str == NULL)
    return 0;
  return strchr(str, '/') != NULL;
}


x86 assembly (clang, -O0):
<has_delim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <has_delim+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1150 <has_delim+0x40>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_delim>:
test   %rdi,%rdi
je     1130 <has_delim+0x20>
push   %rax
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @has_delim(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32* @strchr(i8* %0, i8 signext 47)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
/* Type definitions */
struct core_instr_params {
  int dummy;
};
struct core_cpu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ core_cpu_i__jump(struct core_cpu *,
                                    struct core_instr_params *, int);
void core_cpu_i_op_jn(struct core_cpu *cpu, struct core_instr_params *p) {
  core_cpu_i__jump(cpu, p, 0x08);
}


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

x86 assembly (clang, -O2):
<core_cpu_i_op_jn>:
mov    $0x8,%edx
jmp    1030 <core_cpu_i__jump@plt>

LLVM IR (-O0):
%struct.core_cpu = type { i32 }
%struct.core_instr_params = type { i32 }
define void @core_cpu_i_op_jn(%struct.core_cpu* %0, %struct.core_instr_params* %1) {
%3 = alloca %struct.core_cpu*
%4 = alloca %struct.core_instr_params*
store %struct.core_cpu* %0, %struct.core_cpu** %3
store %struct.core_instr_params* %1, %struct.core_instr_params** %4
%5 = load %struct.core_cpu*, %struct.core_cpu** %3
%6 = load %struct.core_instr_params*, %struct.core_instr_params** %4
%7 = call i32 @core_cpu_i__jump(%struct.core_cpu* %5, %struct.core_instr_params* %6, i32 8)
ret void
}

LLVM IR (-O2):
%struct.core_cpu = type { i32 }
%struct.core_instr_params = type { i32 }
define void @core_cpu_i_op_jn(%struct.core_cpu* %0, %struct.core_instr_params* %1) {
%3 = tail call i32 @core_cpu_i__jump(%struct.core_cpu* %0, %struct.core_instr_params* %1, i32 8)
ret void
}
int __attribute__((format(printf, 2, 3)))
hw_dbg(struct e1000_hw *hw, const char *format, ...) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.e1000_hw = type opaque
define i32 @hw_dbg(%struct.e1000_hw* nocapture readnone %0, i8* nocapture readnone %1, ...) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, char const *, int);
int bson_parse_integer_32(const char *cur) {
  int out;
  (memcpy(&out, cur, 4));
  return out;
}


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

x86 assembly (clang, -O2):
<bson_parse_integer_32>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @bson_parse_integer_32(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void stbi__stdio_skip(void *user, int n) { fseek((FILE *)user, n, SEEK_CUR); }


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

x86 assembly (clang, -O2):
<stbi__stdio_skip>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <fseek@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define void @stbi__stdio_skip(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = load i32, i32* @SEEK_CUR
%9 = call i32 @fseek(i32* %6, i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define void @stbi__stdio_skip(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* @SEEK_CUR
%5 = tail call i32 @fseek(i32* %3, i32 %1, i32 %4)
ret void
}
unsigned MEM_32bits(void) { return sizeof(void *) == 4; }


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

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

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

LLVM IR (-O2):
define i32 @MEM_32bits() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/LibLzma/"
             "src/lzmainfo/.libs/lt-lzmainfo.c",
             311, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x137,%esi
lea    0xf4b(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf66(%rip),%rdx
mov    $0x137,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/LibLzma/src/lzmainfo/.libs/lt-lzmainfo.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/LibLzma/src/lzmainfo/.libs/lt-lzmainfo.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int getchar();
int /*<<< orphan*/ stderr;
void waitEnter(void) {
  int unused;
  fprintf(stderr, "Press enter to continue...\n");
  unused = getchar();
  (void)unused;
}


x86 assembly (clang, -O0):
<waitEnter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitEnter>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <getchar@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Press enter to continue...\0A\00"
define void @waitEnter() {
%1 = alloca i32
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @getchar()
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Press enter to continue...\0A\00"
define void @waitEnter() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
ret void
}
void gtk_text_iter_is_end() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_is_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_control_event(int, int /*<<< orphan*/, char *,
                                      char const *);
void control_event_clients_seen(const char *controller_str) {
  send_control_event(0x0015, 0, "650 CLIENTS_SEEN %s\r\n", controller_str);
}


x86 assembly (clang, -O0):
<control_event_clients_seen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x15,%edi
xor    %esi,%esi
lea    0xed2(%rip),%rdx
call   1030 <send_control_event@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<control_event_clients_seen>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdx
mov    $0x15,%edi
xor    %esi,%esi
jmp    1030 <send_control_event@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"650 CLIENTS_SEEN %s\0D\0A\00"
define void @control_event_clients_seen(i8* %0) {
%2 = tail call i32 @send_control_event(i32 21, i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_C2uint32_mem(unsigned int *val) {
  return ((*val) & (0xC2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C2uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 194
%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_C2uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 194
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int getresgid(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int main(void) {
  gid_t rgid, egid, sgid;
  return getresgid(&rgid, &egid, &sgid);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <getresgid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <getresgid@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @getresgid(i32* %1, i32* %2, i32* %3)
ret i32 %7
}
/* Type definitions */
struct varmap {
  int dummy;
};

/* Variables and functions */
scalar_t__ strlen(char const *);
int /*<<< orphan*/ varmap_append_no_term(struct varmap **, char const *,
                                         scalar_t__, int const);
void varmap_append_nt_chain(struct varmap **b, const char *ptr,
                            const int sync) {
  varmap_append_no_term(b, ptr, strlen(ptr) + 1, sync);
}


x86 assembly (clang, -O0):
<varmap_append_nt_chain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    -0x14(%rbp),%ecx
call   1040 <varmap_append_no_term@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<varmap_append_nt_chain>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <varmap_append_no_term@plt>

LLVM IR (-O0):
%struct.varmap = type { i32 }
define void @varmap_append_nt_chain(%struct.varmap** %0, i8* %1, i32 %2) {
%4 = alloca %struct.varmap**
%5 = alloca i8*
%6 = alloca i32
store %struct.varmap** %0, %struct.varmap*** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.varmap**, %struct.varmap*** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = load i32, i32* %6
%13 = call i32 @varmap_append_no_term(%struct.varmap** %7, i8* %8, i64 %11, i32 %12)
ret void
}

LLVM IR (-O2):
%struct.varmap = type { i32 }
define void @varmap_append_nt_chain(%struct.varmap** %0, i8* %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add nsw i64 %4, 1
%6 = tail call i32 @varmap_append_no_term(%struct.varmap** %0, i8* %1, i64 %5, i32 %2)
ret void
}
int isnonzero(int n) { return n != 0; }


x86 assembly (clang, -O0):
<isnonzero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnonzero>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @isnonzero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isnonzero(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int thermal_notify_tz_disable(int tz_id) { return 0; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @uartinit() {
ret void
}
/* Variables and functions */
double floor(double);
double dRound(double dNum) { return floor(0.5 + dNum); }


x86 assembly (clang, -O0):
<dRound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dRound>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @dRound(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double 5.000000e-01, %3
%5 = call double @llvm.floor.f64(double %4)
ret double %5
}

LLVM IR (-O2):
define double @dRound(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call double @llvm.floor.f64(double %2)
ret double %3
}
/* Variables and functions */
int strncmp(char *, char *, int);
void strncmp_2() {
  char *x = "123";
  char *y = "234";
  if (strncmp(x, y, 3) != -1)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strncmp_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0xffffffff,%eax
je     1149 <strncmp_2+0x39>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_2>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    $0x3,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [4 x i8] c"234\00"
define void @strncmp_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncmp(i8* %3, i8* %4, i32 3)
%6 = icmp ne i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i8, i8* null
br label %9
9: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
@.str.1 = [4 x i8] c"234\00"
define void @strncmp_2() {
%1 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}