xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  char text[6] = "FGHIJ";
  puts("ABCDE");
  puts(text);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    -0xa(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x4a,0x4(%rsp)
movl   $0x49484746,(%rsp)
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.text = [6 x i8] c"FGHIJ\00"
@.str = [6 x i8] c"ABCDE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
store i32 0, i32* %1
%3 = bitcast [6 x i8]* %2 to i8*
%4 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%6 = call i32 @puts(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.text = [6 x i8] c"FGHIJ\00"
@.str = [6 x i8] c"ABCDE\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @puts(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t set_low_0(uint64_t u) { return (u + 1) | u; }


x86 assembly (clang, -O0):
<set_low_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
or     -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_low_0>:
lea    0x1(%rdi),%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @set_low_0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @set_low_0(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = or i32 %2, %0
ret i32 %3
}
int test_imm_D6uint8_reg(unsigned char val) {
  return ((val) & (0xD6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D6uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xd6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_D6uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 214
%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_D6uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -42
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void trocaProximo(int *v, int pos) {
  int aux = v[pos];
  v[pos] = v[pos + 1];
  v[pos + 1] = aux;
}


x86 assembly (clang, -O0):
<trocaProximo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<trocaProximo>:
movslq %esi,%rax
rolq   $0x20,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @trocaProximo(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 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = load i32, i32* %9
store i32 %10, i32* %5
%11 = load i32*, i32** %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %11, i64 %14
%16 = load i32, i32* %15
%17 = load i32*, i32** %3
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
store i32 %16, i32* %20
%21 = load i32, i32* %5
%22 = load i32*, i32** %3
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %22, i64 %25
store i32 %21, i32* %26
ret void
}

LLVM IR (-O2):
define void @trocaProximo(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = add nsw i32 %1, 1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %4
store i32 %5, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Hello World!/n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello World!/n\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello World!/n\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dsb();
int /*<<< orphan*/ isb();
void barrier(void) {
  dsb();
  isb();
}


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

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

LLVM IR (-O0):
define void @barrier() {
%1 = call i32 (...) @dsb()
%2 = call i32 (...) @isb()
ret void
}

LLVM IR (-O2):
define void @barrier() {
%1 = tail call i32 (...) @dsb()
%2 = tail call i32 (...) @isb()
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syspool_standard_refiner(int k, int n, int *m, double *c) {
  int fail, a[2];
  a[0] = k;
  a[1] = n;
  fail = _ada_use_c2phc4c(305, a, m, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syspool_standard_refiner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x131,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syspool_standard_refiner>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x131,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syspool_standard_refiner(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca double*
%9 = alloca i32
%10 = alloca [2 x i32]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store double* %3, double** %8
%11 = load i32, i32* %5
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i32, i32* %6
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
store i32 %13, i32* %14
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%16 = load i32*, i32** %7
%17 = load double*, double** %8
%18 = call i32 @_ada_use_c2phc4c(i32 305, i32* %15, i32* %16, double* %17, i32 0)
store i32 %18, i32* %9
%19 = load i32, i32* %9
ret i32 %19
}

LLVM IR (-O2):
define i32 @syspool_standard_refiner(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 305, i32* %7, i32* %2, double* %3, i32 0)
ret i32 %9
}
/* Type definitions */
struct timeval {
  double tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double d2mce_stime() {
  struct timeval now;
  gettimeofday(&now, 0);
  return now.tv_sec;
}


x86 assembly (clang, -O0):
<d2mce_stime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2mce_stime>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { double }
define double @d2mce_stime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
%struct.timeval = type { double }
define double @d2mce_stime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
ret double %5
}
void PtoK(x, y, u, v) double *x, *y, u, v;
{
  *x = 2 * u / (1 + u * u + v * v);
  *y = 2 * v / (1 + u * u + v * v);
}


x86 assembly (clang, -O0):
<PtoK>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  0xeea(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xec7(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xea5(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe82(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PtoK>:
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm0
addsd  0xef0(%rip),%xmm0
addsd  %xmm2,%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm0,%xmm3
divsd  %xmm3,%xmm2
movsd  %xmm2,(%rdi)
addsd  %xmm1,%xmm1
divsd  %xmm3,%xmm1
movsd  %xmm1,(%rsi)
ret

LLVM IR (-O0):
define void @PtoK(double* %0, double* %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = fmul double 2.000000e+00, %9
%11 = load double, double* %7
%12 = load double, double* %7
%13 = call double @llvm.fmuladd.f64(double %11, double %12, double 1.000000e+00)
%14 = load double, double* %8
%15 = load double, double* %8
%16 = call double @llvm.fmuladd.f64(double %14, double %15, double %13)
%17 = fdiv double %10, %16
%18 = load double*, double** %5
store double %17, double* %18
%19 = load double, double* %8
%20 = fmul double 2.000000e+00, %19
%21 = load double, double* %7
%22 = load double, double* %7
%23 = call double @llvm.fmuladd.f64(double %21, double %22, double 1.000000e+00)
%24 = load double, double* %8
%25 = load double, double* %8
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double %23)
%27 = fdiv double %20, %26
%28 = load double*, double** %6
store double %27, double* %28
ret void
}

LLVM IR (-O2):
define void @PtoK(double* nocapture writeonly %0, double* nocapture writeonly %1, double %2, double %3) {
%5 = fmul double %2, 2.000000e+00
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double 1.000000e+00)
%7 = tail call double @llvm.fmuladd.f64(double %3, double %3, double %6)
%8 = fdiv double %5, %7
store double %8, double* %0
%9 = fmul double %3, 2.000000e+00
%10 = fdiv double %9, %7
store double %10, double* %1
ret void
}
int compare(char *str1, char *str2, int length) {
  int i;
  i = 0;
  while ((str1[i] == str2[i]) && (i < length))
    i++;
  return i;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rdx
movsbl (%rax,%rdx,1),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x19(%rbp)
jne    1147 <compare+0x47>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
setl   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1157 <compare+0x57>
jmp    1165 <compare+0x65>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <compare+0x16>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
movslq %edx,%r8
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rdi,%rdx,1),%ecx
lea    0x1(%rdx),%rax
cmp    (%rsi,%rdx,1),%cl
jne    1125 <compare+0x25>
cmp    %r8,%rdx
mov    %rax,%rdx
jl     1110 <compare+0x10>
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
br label %5
5: ; preds = %5, %3
%6 = phi i64 [ %14, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %1, i64 %6
%10 = load i8, i8* %9
%11 = icmp eq i8 %8, %10
%12 = icmp slt i64 %6, %4
%13 = select i1 %11, i1 %12, i1 false
%14 = add nuw nsw i64 %6, 1
br i1 %13, label %5, label %15
15: ; preds = %5
%16 = trunc i64 %6 to i32
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ __mriPlatform_CommSendChar(char);
void sendPacketHeaderByte(void) { __mriPlatform_CommSendChar('$'); }


x86 assembly (clang, -O0):
<sendPacketHeaderByte>:
push   %rbp
mov    %rsp,%rbp
mov    $0x24,%edi
call   1030 <__mriPlatform_CommSendChar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendPacketHeaderByte>:
mov    $0x24,%edi
jmp    1030 <__mriPlatform_CommSendChar@plt>

LLVM IR (-O0):
define void @sendPacketHeaderByte() {
%1 = call i32 @__mriPlatform_CommSendChar(i8 signext 36)
ret void
}

LLVM IR (-O2):
define void @sendPacketHeaderByte() {
%1 = tail call i32 @__mriPlatform_CommSendChar(i8 signext 36)
ret void
}
/* Type definitions */
struct RNAalifold_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
RNAalifold_cmdline_parser_release(struct RNAalifold_args_info *);
void RNAalifold_cmdline_parser_free(struct RNAalifold_args_info *args_info) {
  RNAalifold_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<RNAalifold_cmdline_parser_free>:
jmp    1030 <RNAalifold_cmdline_parser_release@plt>

LLVM IR (-O0):
%struct.RNAalifold_args_info = type { i32 }
define void @RNAalifold_cmdline_parser_free(%struct.RNAalifold_args_info* %0) {
%2 = alloca %struct.RNAalifold_args_info*
store %struct.RNAalifold_args_info* %0, %struct.RNAalifold_args_info** %2
%3 = load %struct.RNAalifold_args_info*, %struct.RNAalifold_args_info** %2
%4 = call i32 @RNAalifold_cmdline_parser_release(%struct.RNAalifold_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.RNAalifold_args_info = type { i32 }
define void @RNAalifold_cmdline_parser_free(%struct.RNAalifold_args_info* %0) {
%2 = tail call i32 @RNAalifold_cmdline_parser_release(%struct.RNAalifold_args_info* %0)
ret void
}
int LIB1() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @LIB1() {
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_length_solution_vector(int k, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(204, &k, n, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_solution_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xcc,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_solution_vector>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xcc,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_length_solution_vector(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** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 204, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_length_solution_vector(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 204, i32* %3, i32* %1, double* undef)
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char *, struct stat *);
int db_exists(void) {
  struct stat st;
  int r;
  r = stat("../../data/inventory.txt", &st);
  return r == 0;
}


x86 assembly (clang, -O0):
<db_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_exists>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [25 x i8] c"../../data/inventory.txt\00"
define i32 @db_exists() {
%1 = alloca %struct.stat
%2 = alloca i32
%3 = call i32 @stat(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [25 x i8] c"../../data/inventory.txt\00"
define i32 @db_exists() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = call i32 @stat(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int test(unsigned int n) {
  if (n > 100)
    n = n - 10;
  else
    n = test(test(n + 11));
  return n;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jbe    1133 <test+0x23>
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <test+0x38>
mov    -0x4(%rbp),%edi
add    $0xb,%edi
call   1030 <test@plt>
mov    %eax,%edi
call   1030 <test@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    %edi,%eax
cmp    $0x64,%edi
ja     112f <test+0x1f>
nopl   0x0(%rax,%rax,1)
add    $0xb,%eax
mov    %eax,%edi
call   1030 <test@plt>
cmp    $0x64,%eax
jbe    1120 <test+0x10>
add    $0xfffffff6,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test(i32 %0) {
%2 = icmp ugt i32 %0, 100
br i1 %2, label %3, label %6
3: ; preds = %6, %1
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = add i32 %4, -10
ret i32 %5
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ %0, %1 ]
%8 = add nuw nsw i32 %7, 11
%9 = tail call i32 @test(i32 %8)
%10 = icmp ugt i32 %9, 100
br i1 %10, label %3, label %6
}
void vector3d_sub(double u[3], double v[3], double w[3]) {
  int i;
  for (i = 0; i < 3; i++)
    u[i] = v[i] - w[i];
}


x86 assembly (clang, -O0):
<vector3d_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1156 <vector3d_sub+0x56>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <vector3d_sub+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector3d_sub>:
movsd  (%rsi),%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
subsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
subsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @vector3d_sub(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %0, i64 2
store double %17, double* %18
ret void
}
int gcd(int u, int v) {
  int temp;
  while (v != 0) {
    temp = u % v;
    u = v;
    v = temp;
  }
  return u;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <gcd+0x2f>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
int gcd(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", gcd(252, 198));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xfc,%edi
mov    $0xc6,%esi
call   1040 <gcd@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xfc,%edi
mov    $0xc6,%esi
call   1040 <gcd@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @gcd(i32 252, i32 198)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ ui_create_window();
int /*<<< orphan*/ ui_have_window();
void rd_create_ui() {
  if (!ui_have_window()) {
    if (!ui_create_window())
      exit(71);
  }
}


x86 assembly (clang, -O0):
<rd_create_ui>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ui_have_window@plt>
cmp    $0x0,%eax
jne    1163 <rd_create_ui+0x33>
mov    $0x0,%al
call   1040 <ui_create_window@plt>
cmp    $0x0,%eax
jne    115e <rd_create_ui+0x2e>
mov    $0x47,%edi
call   1050 <exit@plt>
jmp    1163 <rd_create_ui+0x33>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_create_ui>:
push   %rax
xor    %eax,%eax
call   1030 <ui_have_window@plt>
test   %eax,%eax
jne    1147 <rd_create_ui+0x17>
xor    %eax,%eax
call   1040 <ui_create_window@plt>
test   %eax,%eax
je     1149 <rd_create_ui+0x19>
pop    %rax
ret
mov    $0x47,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @rd_create_ui() {
%1 = call i32 (...) @ui_have_window()
%2 = icmp ne i32 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = call i32 (...) @ui_create_window()
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = call i32 @exit(i32 71)
unreachable
8: ; preds = %3
br label %9
9: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
define void @rd_create_ui() {
%1 = tail call i32 (...) @ui_have_window()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i32 (...) @ui_create_window()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @exit(i32 71)
unreachable
8: ; preds = %3, %0
ret void
}
/* Variables and functions */
size_t strlen(char const *);
char *strstr(char const *, char const *);
size_t strstrlen(const char *string, const char *stop) {
  const char *end = strstr(string, stop);
  return end ? (size_t)(end - string) : strlen(string);
}


x86 assembly (clang, -O0):
<strstrlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <strstrlen+0x40>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    116d <strstrlen+0x4d>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strstrlen>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strstr@plt>
test   %rax,%rax
je     1133 <strstrlen+0x13>
sub    %rbx,%rax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i64 @strstrlen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @strstr(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = load i8*, i8** %3
%14 = ptrtoint i8* %12 to i64
%15 = ptrtoint i8* %13 to i64
%16 = sub i64 %14, %15
br label %20
17: ; preds = %2
%18 = load i8*, i8** %3
%19 = call i64 @strlen(i8* %18)
br label %20
20: ; preds = %17, %11
%21 = phi i64 [ %16, %11 ], [ %19, %17 ]
ret i64 %21
}

LLVM IR (-O2):
define i64 @strstrlen(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = ptrtoint i8* %3 to i64
%7 = ptrtoint i8* %0 to i64
%8 = sub i64 %6, %7
br label %11
9: ; preds = %2
%10 = tail call i64 @strlen(i8* dereferenceable(1) %0)
br label %11
11: ; preds = %9, %5
%12 = phi i64 [ %8, %5 ], [ %10, %9 ]
ret i64 %12
}
void board_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @board_reset() {
ret void
}
int do_341() { return 341; }


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

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

LLVM IR (-O0):
define i32 @do_341() {
ret i32 341
}

LLVM IR (-O2):
define i32 @do_341() {
ret i32 341
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *program_name) {
  fprintf(
      stderr,
      "USAGE: %s data_filename index_filename entry name(s)\n"
      "-n\tuse index of entry instead of entry name\n"
      "\nDesigned and implemented by Andy Hauser <hauser@genzentrum.lmu.de>.\n",
      program_name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [167 x i8] c"USAGE: %s data_filename index_filename entry name(s)\0A-n\09use index of entry instead of entry name\0A\0ADesigned and implemented by Andy Hauser <hauser@genzentrum.lmu.de>.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [167 x i8] c"USAGE: %s data_filename index_filename entry name(s)\0A-n\09use index of entry instead of entry name\0A\0ADesigned and implemented by Andy Hauser <hauser@genzentrum.lmu.de>.\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ cpu_to_le32(int /*<<< orphan*/);
__u32 le32_to_cpu(__u32 val) { return cpu_to_le32(val); }


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

x86 assembly (clang, -O2):
<le32_to_cpu>:
jmp    1030 <cpu_to_le32@plt>

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

LLVM IR (-O2):
define i32 @le32_to_cpu(i32 %0) {
%2 = tail call i32 @cpu_to_le32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
FILE *try_to_open(const char *name, int decompress, int noise_mode) {
  FILE *fp;
  fp = fopen(name, "rb");
  if (!fp)
    return 0;
  return fp;
}


x86 assembly (clang, -O0):
<try_to_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed3(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    114e <try_to_open+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    1156 <try_to_open+0x46>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_to_open>:
lea    0xee9(%rip),%rsi
jmp    1030 <fopen@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define i32* @try_to_open(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i8*, i8** %5
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %8
%11 = load i32*, i32** %8
%12 = icmp ne i32* %11, null
br i1 %12, label %14, label %13
13: ; preds = %3
store i32* null, i32** %4
br label %16
14: ; preds = %3
%15 = load i32*, i32** %8
store i32* %15, i32** %4
br label %16
16: ; preds = %14, %13
%17 = load i32*, i32** %4
ret i32* %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define noalias i32* @try_to_open(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32* %4
}
void Delay() {
  unsigned int i = 99999999;
  while (i-- > 0) {
  }
}


x86 assembly (clang, -O0):
<Delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5f5e0ff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jbe    1124 <Delay+0x24>
jmp    110b <Delay+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Delay() {
%1 = alloca i32
store i32 99999999, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = add i32 %3, -1
store i32 %4, i32* %1
%5 = icmp ugt i32 %3, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @Delay() {
ret void
}
void __attribute__((no, noclone)) check(int i, int j) {
  if (i != j)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     112f <check+0x1f>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
cmp    %esi,%edi
jne    1115 <check+0x5>
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @check(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
unreachable
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @check(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %5, label %4
4: ; preds = %2
tail call void @abort()
unreachable
5: ; preds = %2
ret void
}
int fun669() { return 669; }


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

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

LLVM IR (-O0):
define i32 @fun669() {
ret i32 669
}

LLVM IR (-O2):
define i32 @fun669() {
ret i32 669
}
long foo(long a, long b) {
  if (a == 0)
    return 0;
  return a / b;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1124 <foo+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1132 <foo+0x32>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %rdi,%rdi
je     111a <foo+0x1a>
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     111d <foo+0x1d>
mov    %rdi,%rax
cqto
idiv   %rsi
ret
xor    %eax,%eax
ret
mov    %edi,%eax
xor    %edx,%edx
div    %esi
ret

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

LLVM IR (-O2):
define i64 @foo(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = sdiv i64 %0, %1
br label %6
6: ; preds = %2, %4
%7 = phi i64 [ %5, %4 ], [ 0, %2 ]
ret i64 %7
}
int tmul_ok_64(long long int x, long long int y) {
  long long int p = x * y;
  return !x || p / x == y;
}


x86 assembly (clang, -O0):
<tmul_ok_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     113d <tmul_ok_64+0x3d>
mov    -0x18(%rbp),%rax
cqto
idivq  -0x8(%rbp)
cmp    -0x10(%rbp),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @tmul_ok_64(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = mul nsw i64 %6, %7
store i64 %8, i64* %5
%9 = load i64, i64* %3
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i64, i64* %5
%13 = load i64, i64* %3
%14 = sdiv i64 %12, %13
%15 = load i64, i64* %4
%16 = icmp eq i64 %14, %15
br label %17
17: ; preds = %11, %2
%18 = phi i1 [ true, %2 ], [ %16, %11 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @tmul_ok_64(i64 %0, i64 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ set_size(int);
void size4(void) { set_size(4); }


x86 assembly (clang, -O0):
<size4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1030 <set_size@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<size4>:
mov    $0x4,%edi
jmp    1030 <set_size@plt>

LLVM IR (-O0):
define void @size4() {
%1 = call i32 @set_size(i32 4)
ret void
}

LLVM IR (-O2):
define void @size4() {
%1 = tail call i32 @set_size(i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ logical_and(unsigned short, int *);
bool logical_nand(unsigned short array_size, bool *boolean_list) {
  return !logical_and(array_size, boolean_list);
}


x86 assembly (clang, -O0):
<logical_nand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x10(%rbp),%rsi
movzwl %ax,%edi
call   1030 <logical_and@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logical_nand>:
push   %rax
call   1030 <logical_and@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @logical_nand(i16 zeroext %0, i32* %1) {
%3 = alloca i16
%4 = alloca i32*
store i16 %0, i16* %3
store i32* %1, i32** %4
%5 = load i16, i16* %3
%6 = load i32*, i32** %4
%7 = call i32 @logical_and(i16 zeroext %5, i32* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @logical_nand(i16 zeroext %0, i32* %1) {
%3 = tail call i32 @logical_and(i16 zeroext %0, i32* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ __syscall(int, char const *, char *const *, char *const *,
                     int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
                     int /*<<< orphan*/, int /*<<< orphan*/);
int execve(const char *path, char *const argv[], char *const envp[]) {
  return (int)__syscall(14, (path), (argv), (envp), (0), (0), (0), (0), (0));
}


x86 assembly (clang, -O0):
<execve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0xe,%edi
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <__syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execve>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
sub    $0x8,%rsp
mov    $0xe,%edi
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x0
call   1030 <__syscall@plt>
add    $0x20,%rsp
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @execve(i8* %0, i8** %1, i8** %2) {
%4 = tail call i64 @__syscall(i32 14, i8* %0, i8** %1, i8** %2, i32 0, i32 0, i32 0, i32 0, i32 0)
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ optarg;
scalar_t__ strtol(int /*<<< orphan*/, char **, int /*<<< orphan*/);
int /*<<< orphan*/ usage();
int opt_number(void) {
  int result;
  char *tmp;
  errno = 0;
  result = (int)strtol(optarg, &tmp, 0);
  if (errno != 0 || *tmp != 0)
    usage();
  return result;
}


x86 assembly (clang, -O0):
<opt_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
movq   $0x0,(%rax)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %eax,-0x4(%rbp)
mov    0x2e84(%rip),%rax
cmpq   $0x0,(%rax)
jne    116e <opt_number+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1175 <opt_number+0x55>
mov    $0x0,%al
call   1040 <usage@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_number>:
push   %r14
push   %rbx
push   %rax
mov    0x2ead(%rip),%r14
movq   $0x0,(%r14)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %rax,%rbx
cmpq   $0x0,(%r14)
jne    1157 <opt_number+0x37>
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
je     115e <opt_number+0x3e>
xor    %eax,%eax
call   1040 <usage@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@errno = global i64 0
@optarg = global i32 0
define i32 @opt_number() {
%1 = alloca i32
%2 = alloca i8*
store i64 0, i64* @errno
%3 = load i32, i32* @optarg
%4 = call i64 @strtol(i32 %3, i8** %2, i32 0)
%5 = trunc i64 %4 to i32
store i32 %5, i32* %1
%6 = load i64, i64* @errno
%7 = icmp ne i64 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %0
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %8, %0
%14 = call i32 (...) @usage()
br label %15
15: ; preds = %13, %8
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@errno = global i64 0
@optarg = global i32 0
define i32 @opt_number() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i64 0, i64* @errno
%3 = load i32, i32* @optarg
%4 = call i64 @strtol(i32 %3, i8** %1, i32 0)
%5 = load i64, i64* @errno
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i8*, i8** %1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %7, %0
%12 = call i32 (...) @usage()
br label %13
13: ; preds = %11, %7
%14 = trunc i64 %4 to i32
ret i32 %14
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t IntToFixedPlusHalf(int val) { return (val << 12) + 0x800; }


x86 assembly (clang, -O0):
<IntToFixedPlusHalf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xc,%eax
add    $0x800,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntToFixedPlusHalf>:
shl    $0xc,%edi
lea    0x800(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @IntToFixedPlusHalf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 12
%5 = add nsw i32 %4, 2048
ret i32 %5
}

LLVM IR (-O2):
define i32 @IntToFixedPlusHalf(i32 %0) {
%2 = shl i32 %0, 12
%3 = or i32 %2, 2048
ret i32 %3
}
int tst_avx_aux(void) { return 77; }


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

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

LLVM IR (-O0):
define i32 @tst_avx_aux() {
ret i32 77
}

LLVM IR (-O2):
define i32 @tst_avx_aux() {
ret i32 77
}
void element_password_erase_data(char *data) {
  while (*data)
    *data++ = '*';
}


x86 assembly (clang, -O0):
<element_password_erase_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112c <element_password_erase_data+0x2c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x2a,(%rax)
jmp    1108 <element_password_erase_data+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<element_password_erase_data>:
cmpb   $0x0,(%rdi)
je     111d <element_password_erase_data+0x1d>
add    $0x1,%rdi
nopl   0x0(%rax)
movb   $0x2a,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <element_password_erase_data+0x10>
ret

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

LLVM IR (-O2):
define void @element_password_erase_data(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %6, %4 ], [ %0, %1 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8 42, i8* %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}