xunge/DecIR huggingface dataset:
void testClosureSLLSrV(void (*closure)(short, long long, short), short a1,
                       long long a2, short a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureSLLSrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%cx
mov    -0x18(%rbp),%rsi
movswl %cx,%edi
movswl -0x1a(%rbp),%edx
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureSLLSrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    *%rax

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

LLVM IR (-O2):
define void @testClosureSLLSrV(void (i16, i64, i16)* nocapture %0, i16 signext %1, i64 %2, i16 signext %3) {
tail call void %0(i16 signext %1, i64 %2, i16 signext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_ivector(int *v, long nl) { free((char *)(v + nl - 1)); }


x86 assembly (clang, -O0):
<free_ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_ivector>:
lea    (%rdi,%rsi,4),%rdi
add    $0xfffffffffffffffc,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_ivector(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = getelementptr inbounds i32, i32* %5, i64 %6
%8 = getelementptr inbounds i32, i32* %7, i64 -1
%9 = bitcast i32* %8 to i8*
%10 = call i32 @free(i8* %9)
ret void
}

LLVM IR (-O2):
define void @free_ivector(i32* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 %1
%4 = getelementptr inbounds i32, i32* %3, i64 -1
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 @free(i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ factorial(int);
int main() {
  factorial(5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1030 <factorial@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <factorial@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @factorial(i32 5)
ret i32 0
}
int dummy_lockmutex(void *m) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dummy_lockmutex(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct zint_symbol {
  int dummy;
};

/* Variables and functions */
int c25inter_common(struct zint_symbol *, unsigned char *, int,
                    int /*<<< orphan*/);
__attribute__((visibility("hidden"))) int
interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[],
                        int length) {
  return c25inter_common(symbol, source, length, 0);
}


x86 assembly (clang, -O0):
<interleaved_two_of_five>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <c25inter_common@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interleaved_two_of_five>:
xor    %ecx,%ecx
jmp    1030 <c25inter_common@plt>

LLVM IR (-O0):
%struct.zint_symbol = type { i32 }
define hidden i32 @interleaved_two_of_five(%struct.zint_symbol* %0, i8* %1, i32 %2) {
%4 = alloca %struct.zint_symbol*
%5 = alloca i8*
%6 = alloca i32
store %struct.zint_symbol* %0, %struct.zint_symbol** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.zint_symbol*, %struct.zint_symbol** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @c25inter_common(%struct.zint_symbol* %7, i8* %8, i32 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.zint_symbol = type { i32 }
define hidden i32 @interleaved_two_of_five(%struct.zint_symbol* %0, i8* %1, i32 %2) {
%4 = tail call i32 @c25inter_common(%struct.zint_symbol* %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
unsigned int gcd(unsigned int, unsigned int);
unsigned lcm(unsigned m, unsigned n) {
  unsigned lcm;
  lcm = (m * n) / gcd(m, n);
  return lcm;
}


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rbx
mov    %esi,%ebx
imul   %edi,%ebx
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @lcm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul i32 %6, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @gcd(i32 %9, i32 %10)
%12 = udiv i32 %8, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @lcm(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
%4 = tail call i32 @gcd(i32 %0, i32 %1)
%5 = udiv i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int factorial(int);
int allfact(int top) {
  int x;
  int sum;
  sum = 0;
  for (x = 1; x <= top; x++) {
    sum = sum + factorial(x);
  }
  return sum;
}


x86 assembly (clang, -O0):
<allfact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     115b <allfact+0x4b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <allfact+0x19>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allfact>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    114e <allfact+0x3e>
mov    %edi,%r14d
neg    %r14d
mov    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <factorial@plt>
add    %eax,%ebp
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <allfact+0x20>
jmp    1150 <allfact+0x40>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @allfact(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 1, %1 ]
%6 = tail call i32 @factorial(i32 %5)
%7 = add nsw i32 %6, %4
%8 = add nuw i32 %5, 1
%9 = icmp eq i32 %5, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int create_dobldobl_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(172, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<create_dobldobl_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xac,%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):
<create_dobldobl_homotopy>:
mov    $0xac,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @create_dobldobl_homotopy() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 172, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int get_LoG_mw(float sigma) {
  int mw;
  mw = (int)(5.0 * sigma + 0.5);
  mw = (mw / 2) * 2 + 1;
  return mw;
}


x86 assembly (clang, -O0):
<get_LoG_mw>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_LoG_mw>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_LoG_mw(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double 5.000000e+00, double %5, double 5.000000e-01)
%7 = fptosi double %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sdiv i32 %8, 2
%10 = mul nsw i32 %9, 2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @get_LoG_mw(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 5.000000e+00, double 5.000000e-01)
%4 = fptosi double %3 to i32
%5 = sdiv i32 %4, 2
%6 = shl nsw i32 %5, 1
%7 = or i32 %6, 1
ret i32 %7
}
int test_imm_60int16_reg(short val) {
  return ((val) & (-0x60 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_60int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -96
%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_60int16_reg(i16 signext %0) {
%2 = and i16 %0, -96
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ io_configure(int, int);
int /*<<< orphan*/ io_set_pgc(int);
int /*<<< orphan*/ io_set_pgd(int);
int /*<<< orphan*/ io_set_pgm(int);
int /*<<< orphan*/ io_set_vpp(int);
int /*<<< orphan*/ io_usleep(int);
void pic12_program_verify(void) {
  io_set_vpp((0x00));
  io_usleep(1000);
  io_set_pgd((0x00));
  io_set_pgc((0x00));
  io_set_pgm((0x00));
  io_usleep(1000);
  io_configure(((0x00)), ((0x00)));
  io_set_vpp((0x01));
  io_usleep(250);
}


x86 assembly (clang, -O0):
<pic12_program_verify>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1060 <io_set_vpp@plt>
mov    $0x3e8,%edi
call   1050 <io_usleep@plt>
xor    %edi,%edi
call   1070 <io_set_pgd@plt>
xor    %edi,%edi
call   1080 <io_set_pgc@plt>
xor    %edi,%edi
call   1030 <io_set_pgm@plt>
mov    $0x3e8,%edi
call   1050 <io_usleep@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <io_configure@plt>
mov    $0x1,%edi
call   1060 <io_set_vpp@plt>
mov    $0xfa,%edi
call   1050 <io_usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic12_program_verify>:
push   %rax
xor    %edi,%edi
call   1060 <io_set_vpp@plt>
mov    $0x3e8,%edi
call   1050 <io_usleep@plt>
xor    %edi,%edi
call   1070 <io_set_pgd@plt>
xor    %edi,%edi
call   1080 <io_set_pgc@plt>
xor    %edi,%edi
call   1030 <io_set_pgm@plt>
mov    $0x3e8,%edi
call   1050 <io_usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <io_configure@plt>
mov    $0x1,%edi
call   1060 <io_set_vpp@plt>
mov    $0xfa,%edi
pop    %rax
jmp    1050 <io_usleep@plt>

LLVM IR (-O0):
define void @pic12_program_verify() {
%1 = call i32 @io_set_vpp(i32 0)
%2 = call i32 @io_usleep(i32 1000)
%3 = call i32 @io_set_pgd(i32 0)
%4 = call i32 @io_set_pgc(i32 0)
%5 = call i32 @io_set_pgm(i32 0)
%6 = call i32 @io_usleep(i32 1000)
%7 = call i32 @io_configure(i32 0, i32 0)
%8 = call i32 @io_set_vpp(i32 1)
%9 = call i32 @io_usleep(i32 250)
ret void
}

LLVM IR (-O2):
define void @pic12_program_verify() {
%1 = tail call i32 @io_set_vpp(i32 0)
%2 = tail call i32 @io_usleep(i32 1000)
%3 = tail call i32 @io_set_pgd(i32 0)
%4 = tail call i32 @io_set_pgc(i32 0)
%5 = tail call i32 @io_set_pgm(i32 0)
%6 = tail call i32 @io_usleep(i32 1000)
%7 = tail call i32 @io_configure(i32 0, i32 0)
%8 = tail call i32 @io_set_vpp(i32 1)
%9 = tail call i32 @io_usleep(i32 250)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ StateEstimationHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void StateEstimationUpdated() { UAVObjUpdated(StateEstimationHandle()); }


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

x86 assembly (clang, -O2):
<StateEstimationUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <StateEstimationHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @StateEstimationUpdated() {
%1 = call i32 (...) @StateEstimationHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @StateEstimationUpdated() {
%1 = tail call i32 (...) @StateEstimationHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_jmp_T0(int);
int /*<<< orphan*/ gen_op_set_T0_ns32(int);
void gen_op_jmp_ns32(int val, int label) {
  gen_op_set_T0_ns32(val);
  gen_op_jmp_T0(label);
}


x86 assembly (clang, -O0):
<gen_op_jmp_ns32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gen_op_set_T0_ns32@plt>
mov    -0x8(%rbp),%edi
call   1040 <gen_op_jmp_T0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_op_jmp_ns32>:
push   %rbx
mov    %esi,%ebx
call   1030 <gen_op_set_T0_ns32@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <gen_op_jmp_T0@plt>

LLVM IR (-O0):
define void @gen_op_jmp_ns32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @gen_op_set_T0_ns32(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @gen_op_jmp_T0(i32 %7)
ret void
}

LLVM IR (-O2):
define void @gen_op_jmp_ns32(i32 %0, i32 %1) {
%3 = tail call i32 @gen_op_set_T0_ns32(i32 %0)
%4 = tail call i32 @gen_op_jmp_T0(i32 %1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, unsigned char *, int);
uint32_t h2nl(uint32_t h) {
  unsigned char c[4];
  uint32_t rv;
  c[0] = (h >> 24) & 0xff;
  c[1] = (h >> 16) & 0xff;
  c[2] = (h >> 8) & 0xff;
  c[3] = (h >> 0) & 0xff;
  memcpy(&rv, c, sizeof rv);
  return (rv);
}


x86 assembly (clang, -O0):
<h2nl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,-0x7(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x0,%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
lea    -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):
<h2nl>:
push   %rax
bswap  %edi
mov    %edi,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @h2nl(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 %8, i8* %9
%10 = load i32, i32* %2
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 %13, i8* %14
%15 = load i32, i32* %2
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 %18, i8* %19
%20 = load i32, i32* %2
%21 = ashr i32 %20, 0
%22 = and i32 %21, 255
%23 = trunc i32 %22 to i8
%24 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 %23, i8* %24
%25 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%26 = call i32 @memcpy(i32* %4, i8* %25, i32 4)
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
define i32 @h2nl(i32 %0) {
%2 = alloca [4 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%5 = bitcast i32* %3 to i8*
%6 = lshr i32 %0, 24
%7 = trunc i32 %6 to i8
store i8 %7, i8* %4
%8 = lshr i32 %0, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 %9, i8* %10
%11 = lshr i32 %0, 8
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %12, i8* %13
%14 = trunc i32 %0 to i8
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 %14, i8* %15
%16 = call i32 @memcpy(i32* %3, i8* %4, i32 4)
%17 = load i32, i32* %3
ret i32 %17
}
double tle_fld(char *l, int from, int thru) {
  char buf[32];
  sprintf(buf, "%.*s", thru - from + 1, l + from - 1);
  return (atod(buf));
}


x86 assembly (clang, -O0):
<tle_fld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%edx
sub    -0xc(%rbp),%edx
add    $0x1,%edx
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rax
add    %rax,%rcx
add    $0xffffffffffffffff,%rcx
lea    0xeab(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1030 <atod@plt>
cvtsi2sd %eax,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tle_fld>:
push   %rbx
sub    $0x20,%rsp
sub    %esi,%edx
add    $0x1,%edx
movslq %esi,%rax
lea    (%rdi,%rax,1),%rcx
add    $0xffffffffffffffff,%rcx
lea    0xec4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <atod@plt>
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.*s\00"
define double @tle_fld(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [32 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
%12 = add nsw i32 %11, 1
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = getelementptr inbounds i8, i8* %16, i64 -1
%18 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @atod to i32 (i8*, ...)*)(i8* %19)
%21 = sitofp i32 %20 to double
ret double %21
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.*s\00"
define double @tle_fld(i8* %0, i32 %1, i32 %2) {
%4 = alloca [32 x i8]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%6 = sub i32 1, %1
%7 = add i32 %6, %2
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = getelementptr inbounds i8, i8* %9, i64 -1
%11 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %10)
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @atod to i32 (i8*, ...)*)(i8* %5)
%13 = sitofp i32 %12 to double
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x42() {
  Assert_real((isgraph(66)),
              "/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_isgraph.c",
              335, ("isgraph should be 1 for B"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x42>:
push   %rbp
mov    %rsp,%rbp
mov    $0x42,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x14f,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x42>:
push   %rax
mov    $0x42,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x14f,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for B\00"
define void @t_isgraph_0x42() {
%1 = call i32 @isgraph(i32 66)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 335, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for B\00"
define void @t_isgraph_0x42() {
%1 = tail call i32 @isgraph(i32 66)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 335, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cmov(float, float, double);
void cmov2(float x, float y) { cmov(x, y, 0.0); }


x86 assembly (clang, -O0):
<cmov2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xorps  %xmm2,%xmm2
call   1030 <cmov@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmov2>:
xorps  %xmm2,%xmm2
jmp    1030 <cmov@plt>

LLVM IR (-O0):
define void @cmov2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i32 @cmov(float %5, float %6, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @cmov2(float %0, float %1) {
%3 = tail call i32 @cmov(float %0, float %1, double 0.000000e+00)
ret void
}
int gt_non_r_cmpfunc(const void *a, const void *b, void *compar) {
  int (*cmpfunc)(const void *, const void *) = compar, rval;
  rval = (*cmpfunc)(a, b);
  return rval;
}


x86 assembly (clang, -O0):
<gt_non_r_cmpfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   *%rax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_non_r_cmpfunc>:
jmp    *%rdx

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

LLVM IR (-O2):
define i32 @gt_non_r_cmpfunc(i8* %0, i8* %1, i8* nocapture %2) {
%4 = bitcast i8* %2 to i32 (i8*, i8*)*
%5 = tail call i32 %4(i8* %0, i8* %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void CAN1_SCE_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @CAN1_SCE_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @CAN1_SCE_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_submatrix(double **m, long nrl, long nrh, long ncl, long nch) {
  free((char *)(m + nrl - 1));
}


x86 assembly (clang, -O0):
<free_submatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_submatrix>:
lea    (%rdi,%rsi,8),%rdi
add    $0xfffffffffffffff8,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_submatrix(double** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds double*, double** %0, i64 %1
%7 = getelementptr inbounds double*, double** %6, i64 -1
%8 = bitcast double** %7 to i8*
%9 = tail call i32 @free(i8* %8)
ret void
}
/* Variables and functions */
double log(double);
void CO_select_backward_0(double *prob, int N_population) {
  *prob = -log((double)N_population - 1) - log((double)N_population);
}


x86 assembly (clang, -O0):
<CO_select_backward_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CO_select_backward_0>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
cvtsi2sd %esi,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xed6(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1030 <log@plt>
xorpd  0xed5(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <log@plt>
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @CO_select_backward_0(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = fsub double %6, 1.000000e+00
%8 = call double @log(double %7)
%9 = fneg double %8
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to double
%12 = call double @log(double %11)
%13 = fsub double %9, %12
%14 = load double*, double** %3
store double %13, double* %14
ret void
}

LLVM IR (-O2):
define void @CO_select_backward_0(double* nocapture writeonly %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fadd double %3, -1.000000e+00
%5 = tail call double @log(double %4)
%6 = fneg double %5
%7 = tail call double @log(double %3)
%8 = fsub double %6, %7
store double %8, double* %0
ret void
}
void lpd_free(void) {}


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

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

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

LLVM IR (-O2):
define void @lpd_free() {
ret void
}
int isdigit(int c) { return (c >= '0' && c < '9'); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0x9,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 9
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
size_t size_t_min(size_t x, size_t y) { return x > y ? y : x; }


x86 assembly (clang, -O0):
<size_t_min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <size_t_min+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <size_t_min+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_t_min>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmova  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @size_t_min(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ugt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %4
br label %12
10: ; preds = %2
%11 = load i64, i64* %3
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @size_t_min(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
void clear(int grid[36][36]) {
  int i, j;
  for (i = 0; i < 36; i++)
    for (j = 0; j < 36; j++)
      grid[i][j] = 0;
}


x86 assembly (clang, -O0):
<clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x24,-0xc(%rbp)
jge    1168 <clear+0x68>
movl   $0x0,-0x10(%rbp)
cmpl   $0x24,-0x10(%rbp)
jge    1155 <clear+0x55>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x90,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <clear+0x20>
jmp    115a <clear+0x5a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <clear+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear>:
push   %rax
mov    $0x1440,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @clear([36 x i32]* nocapture writeonly %0) {
%2 = bitcast [36 x i32]* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xb3() {
  Assert_real((isspace(179) == 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_isspace.c",
              900, ("isspace should be 0 for 0xb3"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xb3>:
push   %rax
mov    $0xb3,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x384,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb3\00"
define void @t_isspace_0xb3() {
%1 = call i64 @isspace(i32 179)
%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 900, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb3\00"
define void @t_isspace_0xb3() {
%1 = tail call i64 @isspace(i32 179)
%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 900, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ crypto_prefork();
void subsys_crypto_prefork(void) { crypto_prefork(); }


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

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

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

LLVM IR (-O2):
define void @subsys_crypto_prefork() {
%1 = tail call i32 (...) @crypto_prefork()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ copy_memory(char *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ mu_strlen(char const *);
char *mu_strcpy(char *dest, const char *src) {
  if (src && dest)
    copy_memory(dest, src, mu_strlen(src));
  return dest;
}


x86 assembly (clang, -O0):
<mu_strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116e <mu_strcpy+0x4e>
cmpq   $0x0,-0x8(%rbp)
je     116e <mu_strcpy+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mu_strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <copy_memory@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mu_strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %rdi,%rdi
je     1149 <mu_strcpy+0x29>
mov    %rsi,%r14
test   %rsi,%rsi
je     1149 <mu_strcpy+0x29>
mov    %r14,%rdi
call   1040 <mu_strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <copy_memory@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mu_strcpy(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = load i8*, i8** %4
%14 = call i32 @mu_strlen(i8* %13)
%15 = call i32 @copy_memory(i8* %11, i8* %12, i32 %14)
br label %16
16: ; preds = %10, %7, %2
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @mu_strcpy(i8* returned %0, i8* %1) {
%3 = icmp ne i8* %1, null
%4 = icmp ne i8* %0, null
%5 = and i1 %4, %3
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @mu_strlen(i8* %1)
%8 = tail call i32 @copy_memory(i8* %0, i8* %1, i32 %7)
br label %9
9: ; preds = %6, %2
ret i8* %0
}
unsigned read_4bytes(char *val) {
  return (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) +
          (*(val + 3) << 24));
}


x86 assembly (clang, -O0):
<read_4bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_4bytes>:
movsbl (%rdi),%eax
movsbl 0x1(%rdi),%ecx
shl    $0x8,%ecx
add    %eax,%ecx
movsbl 0x2(%rdi),%edx
shl    $0x10,%edx
add    %ecx,%edx
movzbl 0x3(%rdi),%eax
shl    $0x18,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @read_4bytes(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = add nsw i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = shl i32 %22, 24
%24 = add nsw i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @read_4bytes(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = shl nsw i32 %6, 8
%8 = add nsw i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = shl nsw i32 %11, 16
%13 = add nsw i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = add nsw i32 %13, %17
ret i32 %18
}
float MIN2(float a, float b) {
  if (a < b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<MIN2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <MIN2+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <MIN2+0x3a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIN2>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @MIN2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp olt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %4
store float %10, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %5
store float %12, float* %3
br label %13
13: ; preds = %11, %9
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @MIN2(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
int test_imm_19uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x19 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_19uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1638400
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int hal_bsp_power_state(int state) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @hal_bsp_power_state(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main(int argc, const char *argv[]) {
  int a = 123;
  int b = 321;
  printf("a = %d, b = %d\n", a, b);
  swap(&a, &b);
  printf("a = %d, b = %d\n", a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x7b,-0x14(%rbp)
movl   $0x141,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x7b,0xc(%rsp)
movl   $0x141,0x8(%rsp)
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x7b,%esi
mov    $0x141,%edx
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <swap@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 123, i32* %5
store i32 321, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = call i32 @swap(i32* %5, i32* %6)
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 123, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 321, i32* %4
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 123, i32 321)
%8 = call i32 @swap(i32* %3, i32* %4)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ i2c_DisableStandardHSM(int /*<<< orphan*/);
void i2c0_DisableStandardHSM(void) { i2c_DisableStandardHSM(0); }


x86 assembly (clang, -O0):
<i2c0_DisableStandardHSM>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <i2c_DisableStandardHSM@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @i2c0_DisableStandardHSM() {
%1 = call i32 @i2c_DisableStandardHSM(i32 0)
ret void
}

LLVM IR (-O2):
define void @i2c0_DisableStandardHSM() {
%1 = tail call i32 @i2c_DisableStandardHSM(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ list_selectaddfriend();
void button_add_new_contact_onpress(void) { list_selectaddfriend(); }


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

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

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

LLVM IR (-O2):
define void @button_add_new_contact_onpress() {
%1 = tail call i32 (...) @list_selectaddfriend()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cargaFicheroTexto() { printf("Carga un fichero de texto en memoria\n"); }


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"Carga un fichero de texto en memoria\0A\00"
define void @cargaFicheroTexto() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"Carga un fichero de texto en memoria\00"
define void @cargaFicheroTexto() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret void
}