xunge/DecIR huggingface dataset:
/* Type definitions */
struct utsname {
  char *member_0;
  char *member_1;
  char *member_2;
  char *member_3;
  char *member_4;
};

/* Variables and functions */
int /*<<< orphan*/ memcpy(struct utsname *, struct utsname *, int);
int uname(struct utsname *nm) {
  static struct utsname temp = {"libUNIX", "nodename", "development", "version",
                                "machine"};
  memcpy(nm, &temp, sizeof(struct utsname));
  return 0;
}


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

x86 assembly (clang, -O2):
<uname>:
push   %rax
lea    0x2f10(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.utsname = type { i8*, i8*, i8*, i8*, i8* }
@uname.temp = internal global %struct.utsname { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0) }
@.str = [8 x i8] c"libUNIX\00"
@.str.1 = [9 x i8] c"nodename\00"
@.str.2 = [12 x i8] c"development\00"
@.str.3 = [8 x i8] c"version\00"
@.str.4 = [8 x i8] c"machine\00"
define i32 @uname(%struct.utsname* %0) {
%2 = alloca %struct.utsname*
store %struct.utsname* %0, %struct.utsname** %2
%3 = load %struct.utsname*, %struct.utsname** %2
%4 = call i32 @memcpy(%struct.utsname* %3, %struct.utsname* @uname.temp, i32 40)
ret i32 0
}

LLVM IR (-O2):
%struct.utsname = type { i8*, i8*, i8*, i8*, i8* }
@uname.temp = internal global %struct.utsname { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0) }
@.str = [8 x i8] c"libUNIX\00"
@.str.1 = [9 x i8] c"nodename\00"
@.str.2 = [12 x i8] c"development\00"
@.str.3 = [8 x i8] c"version\00"
@.str.4 = [8 x i8] c"machine\00"
define i32 @uname(%struct.utsname* %0) {
%2 = tail call i32 @memcpy(%struct.utsname* %0, %struct.utsname* @uname.temp, i32 40)
ret i32 0
}
int main(void) {
  int a = 1;
  int b = 1;
  int c;
  c = a = b;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ halt_isr();
__attribute__((weak)) void HardFault_Handler() { halt_isr(); }


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

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

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

LLVM IR (-O2):
define weak void @HardFault_Handler() {
%1 = tail call i32 (...) @halt_isr()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_le32(int, int /*<<< orphan*/ *);
void __put_unaligned_le64(uint64_t val, uint8_t *p) {
  __put_unaligned_le32(val >> 32, p + 4);
  __put_unaligned_le32(val, p);
}


x86 assembly (clang, -O0):
<__put_unaligned_le64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x20,%ecx
sar    %cl,%edi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
call   1030 <__put_unaligned_le32@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <__put_unaligned_le32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__put_unaligned_le64>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x10,%rsi
call   1030 <__put_unaligned_le32@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__put_unaligned_le32@plt>

LLVM IR (-O0):
define void @__put_unaligned_le64(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 = ashr i32 %5, 32
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 4
%9 = call i32 @__put_unaligned_le32(i32 %6, i32* %8)
%10 = load i32, i32* %3
%11 = load i32*, i32** %4
%12 = call i32 @__put_unaligned_le32(i32 %10, i32* %11)
ret void
}

LLVM IR (-O2):
define void @__put_unaligned_le64(i32 %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 4
%4 = tail call i32 @__put_unaligned_le32(i32 poison, i32* %3)
%5 = tail call i32 @__put_unaligned_le32(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
double sin(int);
float vx(float v, float x, float y, int Ind) {
  if (Ind == 0)
    return (v);
  else
    return (0.5 * sin(Ind * 3.141592 * x));
}


x86 assembly (clang, -O0):
<vx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1143 <vx+0x33>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1182 <vx+0x72>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xe8b(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vx>:
test   %edi,%edi
je     1145 <vx+0x35>
push   %rax
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd  0xedc(%rip),%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <sin@plt>
mulsd  0xecb(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x8,%rsp
ret

LLVM IR (-O0):
define float @vx(float %0, float %1, float %2, i32 %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca i32
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = load float, float* %6
store float %13, float* %5
br label %25
14: ; preds = %4
%15 = load i32, i32* %9
%16 = sitofp i32 %15 to double
%17 = fmul double %16, 0x400921FAFC8B007A
%18 = load float, float* %7
%19 = fpext float %18 to double
%20 = fmul double %17, %19
%21 = fptosi double %20 to i32
%22 = call double @sin(i32 %21)
%23 = fmul double 5.000000e-01, %22
%24 = fptrunc double %23 to float
store float %24, float* %5
br label %25
25: ; preds = %14, %12
%26 = load float, float* %5
ret float %26
}

LLVM IR (-O2):
define float @vx(float %0, float %1, float %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %15, label %6
6: ; preds = %4
%7 = sitofp i32 %3 to double
%8 = fmul double %7, 0x400921FAFC8B007A
%9 = fpext float %1 to double
%10 = fmul double %8, %9
%11 = fptosi double %10 to i32
%12 = tail call double @sin(i32 %11)
%13 = fmul double %12, 5.000000e-01
%14 = fptrunc double %13 to float
br label %15
15: ; preds = %4, %6
%16 = phi float [ %14, %6 ], [ %0, %4 ]
ret float %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("cl_ext_intel.h standalone test PASSED.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"cl_ext_intel.h standalone test PASSED.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [39 x i8] c"cl_ext_intel.h standalone test PASSED.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ fact(int);
int main() {
  int x = __VERIFIER_nondet_int();
  if (x < 0)
    return 0;
  int y = __VERIFIER_nondet_int();
  if (y < 0)
    return 0;
  int z = __VERIFIER_nondet_int();
  fact(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    114f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1181 <main+0x61>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    116f <main+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1181 <main+0x61>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fact@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
js     1147 <main+0x27>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
js     1147 <main+0x27>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %ebx,%edi
call   1040 <fact@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 (...) @__VERIFIER_nondet_int()
%8 = tail call i32 @fact(i32 %1)
br label %9
9: ; preds = %6, %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void Terminate(int sig) {
  printf("Thread not cancelled\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [22 x i8] c"Thread not cancelled\0A\00"
define void @Terminate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [21 x i8] c"Thread not cancelled\00"
define void @Terminate(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void up(int n) { printf("%c[%dA", 0x1B, n); }


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

x86 assembly (clang, -O2):
<up>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c[%dA\00"
define void @up(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 27, i32 %0)
ret void
}
unsigned int test_setbit(unsigned int val) {
  val |= (1u << 31);
  return val;
}


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

x86 assembly (clang, -O2):
<test_setbit>:
mov    %edi,%eax
or     $0x80000000,%eax
ret

LLVM IR (-O0):
define i32 @test_setbit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = or i32 %3, -2147483648
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @test_setbit(i32 %0) {
%2 = or i32 %0, -2147483648
ret i32 %2
}
double dpoly(double x) {
  double a = 3.0, b = 1.0, c = -5.0;
  return c + x * (2 * b + x * 3 * a);
}


x86 assembly (clang, -O0):
<dpoly>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xef2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xedd(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xeb9(%rip),%xmm3
mulsd  -0x8(%rbp),%xmm3
mulsd  -0x10(%rbp),%xmm3
addsd  %xmm2,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpoly>:
movsd  0xef8(%rip),%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  0xeec(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @dpoly(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
store double 3.000000e+00, double* %3
store double 1.000000e+00, double* %4
store double -5.000000e+00, double* %5
%6 = load double, double* %5
%7 = load double, double* %2
%8 = load double, double* %4
%9 = load double, double* %2
%10 = fmul double %9, 3.000000e+00
%11 = load double, double* %3
%12 = fmul double %10, %11
%13 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %8, double %12)
%14 = call double @llvm.fmuladd.f64(double %7, double %13, double %6)
ret double %14
}

LLVM IR (-O2):
define double @dpoly(double %0) {
%2 = fmul double %0, 3.000000e+00
%3 = fmul double %2, 3.000000e+00
%4 = fadd double %3, 2.000000e+00
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double -5.000000e+00)
ret double %5
}
/* Variables and functions */
int EXIT_SUCCESS;
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int status;
  status = (argc > 1) ? atoi(argv[1]) : EXIT_SUCCESS;
  exit(status);
  fprintf(stderr, "How did we get here?\n");
  return 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1155 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    1161 <main+0x41>
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1136 <main+0x16>
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
mov    %eax,%edi
call   1040 <exit@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
br label %16
14: ; preds = %2
%15 = load i32, i32* @EXIT_SUCCESS
br label %16
16: ; preds = %14, %9
%17 = phi i32 [ %13, %9 ], [ %15, %14 ]
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = call i32 @exit(i32 %18)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %10
8: ; preds = %2
%9 = load i32, i32* @EXIT_SUCCESS
br label %10
10: ; preds = %8, %4
%11 = phi i32 [ %7, %4 ], [ %9, %8 ]
%12 = tail call i32 @exit(i32 %11)
unreachable
}
void ff_hevc_put_hevc_uni_qpel_h64_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_h64_8_sse4() {
ret void
}
/* Variables and functions */
scalar_t__ erfcf(float);
int /*<<< orphan*/ link_failure_erfcf();
void test_erfcf(float f) {
  if (erfcf(f) != erfcf(f))
    link_failure_erfcf();
}


x86 assembly (clang, -O0):
<test_erfcf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <erfcf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <erfcf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_erfcf+0x3c>
mov    $0x0,%al
call   1040 <link_failure_erfcf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_erfcf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <erfcf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <erfcf@plt>
cmp    %rax,%rbx
jne    1149 <test_erfcf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_erfcf@plt>

LLVM IR (-O0):
define void @test_erfcf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @erfcf(float %3)
%5 = load float, float* %2
%6 = call i64 @erfcf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_erfcf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_erfcf(float %0) {
%2 = tail call i64 @erfcf(float %0)
%3 = tail call i64 @erfcf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_erfcf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_server_register_completion_queue() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_server_register_completion_queue>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_server_register_completion_queue() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_server_register_completion_queue() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
int xw_nint(float f) { return (int)(f >= 0.0 ? (f + 0.5) : (f - 0.5)); }


x86 assembly (clang, -O0):
<xw_nint>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     113e <xw_nint+0x3e>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1158 <xw_nint+0x58>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb1(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xw_nint>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setb   %al
cvtss2sd %xmm0,%xmm0
lea    0xeea(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @xw_nint(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fadd double %8, 5.000000e-01
br label %14
10: ; preds = %1
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fsub double %12, 5.000000e-01
br label %14
14: ; preds = %10, %6
%15 = phi double [ %9, %6 ], [ %13, %10 ]
%16 = fptosi double %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @xw_nint(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ult float %0, 0.000000e+00
%4 = select i1 %3, double -5.000000e-01, double 5.000000e-01
%5 = fadd double %4, %2
%6 = fptosi double %5 to i32
ret i32 %6
}
OP(ed, db) { illegal_2(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_2()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
void *get_nondet_ptr() {
  void *a;
  return a;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @get_nondet_ptr() {
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ read_word_data(int, int);
uint16_t io_read_bus() { return read_word_data(0x20, 0x12); }


x86 assembly (clang, -O0):
<io_read_bus>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x12,%esi
call   1030 <read_word_data@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_read_bus>:
mov    $0x20,%edi
mov    $0x12,%esi
jmp    1030 <read_word_data@plt>

LLVM IR (-O0):
define i32 @io_read_bus() {
%1 = call i32 @read_word_data(i32 32, i32 18)
ret i32 %1
}

LLVM IR (-O2):
define i32 @io_read_bus() {
%1 = tail call i32 @read_word_data(i32 32, i32 18)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ utest_control();
void utest_adts_hexdump(void) {
  utest_control();
  return;
}


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

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

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

LLVM IR (-O2):
define void @utest_adts_hexdump() {
%1 = tail call i32 (...) @utest_control()
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ property;
};
struct TYPE_4__ {
  TYPE_1__ xselectionrequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xselectionrequest_property(void *_p) {
  return (unsigned long)((XEvent *)_p)->xselectionrequest.property;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xselectionrequest_property(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void main(void) {
  puts("Hello\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
jmp    1120 <main+0x10>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [7 x i8] c"Hello\0A\00"
define void @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [7 x i8] c"Hello\0A\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
double KTStoKPH(double KTS) {
  double KPH = 1.852 * KTS;
  return KPH;
}


x86 assembly (clang, -O0):
<KTStoKPH>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @KTStoKPH(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 1.852000e+00, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @KTStoKPH(double %0) {
%2 = fmul double %0, 1.852000e+00
ret double %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ keyboard_handler();
int /*<<< orphan*/ timer_handler();
void irqDispatcher(uint64_t irq) {
  switch (irq) {
  case 0:
    timer_handler();
    break;
  case 1:
    keyboard_handler();
    break;
  }
  return;
}


x86 assembly (clang, -O0):
<irqDispatcher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     114f <irqDispatcher+0x2f>
jmp    113e <irqDispatcher+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     115b <irqDispatcher+0x3b>
jmp    1162 <irqDispatcher+0x42>
mov    $0x0,%al
call   1030 <timer_handler@plt>
jmp    1162 <irqDispatcher+0x42>
mov    $0x0,%al
call   1040 <keyboard_handler@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irqDispatcher>:
cmp    $0x1,%edi
je     1130 <irqDispatcher+0x10>
test   %edi,%edi
jne    1137 <irqDispatcher+0x17>
xor    %eax,%eax
jmp    1030 <timer_handler@plt>
xor    %eax,%eax
jmp    1040 <keyboard_handler@plt>
ret

LLVM IR (-O0):
define void @irqDispatcher(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 0, label %4
i32 1, label %6
]
4: ; preds = %1
%5 = call i32 (...) @timer_handler()
br label %8
6: ; preds = %1
%7 = call i32 (...) @keyboard_handler()
br label %8
8: ; preds = %1, %6, %4
ret void
}

LLVM IR (-O2):
define void @irqDispatcher(i32 %0) {
switch i32 %0, label %6 [
i32 0, label %2
i32 1, label %4
]
2: ; preds = %1
%3 = tail call i32 (...) @timer_handler()
br label %6
4: ; preds = %1
%5 = tail call i32 (...) @keyboard_handler()
br label %6
6: ; preds = %1, %4, %2
ret void
}
void foo_1_2_2_2_1_1_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_1_1_2_2_1() {
ret void
}
int test_imm_D6int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xD6 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D6int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 214
%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_D6int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 14024704
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double ft_clamp(double, double, double);
double ft_smoothstep(double edge1, double edge2, double x) {
  x = ft_clamp((x - edge1) / (edge2 - edge1), 0.0, 1.0);
  return (x * x * (3 - 2 * x));
}


x86 assembly (clang, -O0):
<ft_smoothstep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
movsd  0xebe(%rip),%xmm2
call   1030 <ft_clamp@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xe91(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_smoothstep>:
push   %rax
movapd %xmm2,%xmm3
subsd  %xmm0,%xmm3
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm3
movsd  0xed7(%rip),%xmm2
xorpd  %xmm1,%xmm1
movapd %xmm3,%xmm0
call   1030 <ft_clamp@plt>
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm0,%xmm0
movsd  0xebe(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ft_smoothstep(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = load double, double* %5
%11 = load double, double* %4
%12 = fsub double %10, %11
%13 = fdiv double %9, %12
%14 = call double @ft_clamp(double %13, double 0.000000e+00, double 1.000000e+00)
store double %14, double* %6
%15 = load double, double* %6
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = load double, double* %6
%19 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %18, double 3.000000e+00)
%20 = fmul double %17, %19
ret double %20
}

LLVM IR (-O2):
define double @ft_smoothstep(double %0, double %1, double %2) {
%4 = fsub double %2, %0
%5 = fsub double %1, %0
%6 = fdiv double %4, %5
%7 = tail call double @ft_clamp(double %6, double 0.000000e+00, double 1.000000e+00)
%8 = fmul double %7, %7
%9 = tail call double @llvm.fmuladd.f64(double %7, double -2.000000e+00, double 3.000000e+00)
%10 = fmul double %8, %9
ret double %10
}
/* Variables and functions */
scalar_t__ isgreater(float, float);
float fdimf(float x, float y) { return (isgreater(x, y) ? (x - y) : 0.0F); }


x86 assembly (clang, -O0):
<fdimf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <isgreater@plt>
cmp    $0x0,%rax
je     114f <fdimf+0x3f>
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    115c <fdimf+0x4c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    115c <fdimf+0x4c>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdimf>:
push   %rax
movss  %xmm0,(%rsp)
movss  %xmm1,0x4(%rsp)
call   1030 <isgreater@plt>
xorps  %xmm0,%xmm0
test   %rax,%rax
je     1134 <fdimf+0x24>
movss  (%rsp),%xmm0
subss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fdimf(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 i64 @isgreater(float %5, float %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = fsub float %10, %11
br label %14
13: ; preds = %2
br label %14
14: ; preds = %13, %9
%15 = phi float [ %12, %9 ], [ 0.000000e+00, %13 ]
ret float %15
}

LLVM IR (-O2):
define float @fdimf(float %0, float %1) {
%3 = tail call i64 @isgreater(float %0, float %1)
%4 = icmp eq i64 %3, 0
%5 = fsub float %0, %1
%6 = select i1 %4, float 0.000000e+00, float %5
ret float %6
}
int f_eq_rc1(float a1) { return (((a1) == (100))); }


x86 assembly (clang, -O0):
<f_eq_rc1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_eq_rc1>:
cmpeqss 0xef7(%rip),%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @f_eq_rc1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oeq float %3, 1.000000e+02
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f_eq_rc1(float %0) {
%2 = fcmp oeq float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_UNIVERSALSTRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_UNIVERSALSTRING_it;
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
ASN1_UNIVERSALSTRING *d2i_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING **a,
                                               const unsigned char **in,
                                               long len) {
  return (ASN1_UNIVERSALSTRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                               &ASN1_UNIVERSALSTRING_it);
}


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

x86 assembly (clang, -O2):
<d2i_ASN1_UNIVERSALSTRING>:
mov    0x2ee1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@ASN1_UNIVERSALSTRING_it = global i32 0
define i32* @d2i_ASN1_UNIVERSALSTRING(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @ASN1_UNIVERSALSTRING_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@ASN1_UNIVERSALSTRING_it = global i32 0
define i32* @d2i_ASN1_UNIVERSALSTRING(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @ASN1_UNIVERSALSTRING_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
void to_sign_int_store_4(__float128 a, int *p) { p[4] = (int)a; }


x86 assembly (clang, -O0):
<to_sign_int_store_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movaps -0x10(%rbp),%xmm0
call   1130 <__fixtfsi>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x10(%rax)
add    $0x20,%rsp
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<to_sign_int_store_4>:
push   %rbx
mov    %rdi,%rbx
call   1110 <__fixtfsi>
mov    %eax,0x10(%rbx)
pop    %rbx
ret
xchg   %ax,%ax

LLVM IR (-O0):
define void @to_sign_int_store_4(fp128 %0, i32* %1) {
%3 = alloca fp128
%4 = alloca i32*
store fp128 %0, fp128* %3
store i32* %1, i32** %4
%5 = load fp128, fp128* %3
%6 = fptosi fp128 %5 to i32
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 4
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @to_sign_int_store_4(fp128 %0, i32* nocapture writeonly %1) {
%3 = fptosi fp128 %0 to i32
%4 = getelementptr inbounds i32, i32* %1, i64 4
store i32 %3, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PRINT_ARRAY(int *, int);
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int main(void) {
  int num_elem = 5;
  int *ptr_vi = (int *)malloc(num_elem * sizeof(int));
  for (int i = 0; i < num_elem; i++) {
    ptr_vi[i] = i + 1;
  }
  PRINT_ARRAY(ptr_vi, num_elem);
  free(ptr_vi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    118b <main+0x5b>
mov    -0x14(%rbp),%edx
add    $0x1,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1160 <main+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <PRINT_ARRAY@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movaps 0xebb(%rip),%xmm0
movups %xmm0,(%rax)
movl   $0x5,0x10(%rax)
mov    %rax,%rdi
mov    $0x5,%esi
call   1050 <PRINT_ARRAY@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 20)
%2 = inttoptr i64 %1 to i32*
%3 = inttoptr i64 %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %3
%4 = getelementptr inbounds i32, i32* %2, i64 4
store i32 5, i32* %4
%5 = tail call i32 @PRINT_ARRAY(i32* %2, i32 5)
%6 = tail call i32 @free(i32* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ sleep(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc == 2) {
    sleep(strtol(argv[1], NULL, 0));
  } else {
    fprintf(stderr, "usage %s <seconds>\n", argv[0]);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    116f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
jmp    118b <main+0x5b>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe7a(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    114c <main+0x1c>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
jmp    1164 <main+0x34>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"usage %s <seconds>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @strtol(i8* %11, i32* null, i32 0)
%13 = call i32 @sleep(i32 %12)
br label %20
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %14, %8
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"usage %s <seconds>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strtol(i8* nocapture %6, i32* null, i32 0)
%8 = tail call i32 @sleep(i32 %7)
br label %13
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %1
%12 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Car_Set(int);
int /*<<< orphan*/ Car_SetAxles(int /*<<< orphan*/, int);
int /*<<< orphan*/ Car_SetAxlesType(int /*<<< orphan*/, int);
void Car_SetCarAxlesType(int carnum, int i, int type) {
  Car_SetAxlesType(Car_SetAxles(Car_Set(carnum), i), type);
}


x86 assembly (clang, -O0):
<Car_SetCarAxlesType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Car_Set@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1050 <Car_SetAxles@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1040 <Car_SetAxlesType@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Car_SetCarAxlesType>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <Car_Set@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <Car_SetAxles@plt>
mov    %eax,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <Car_SetAxlesType@plt>

LLVM IR (-O0):
define void @Car_SetCarAxlesType(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @Car_Set(i32 %7)
%9 = load i32, i32* %5
%10 = call i32 @Car_SetAxles(i32 %8, i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @Car_SetAxlesType(i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @Car_SetCarAxlesType(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Car_Set(i32 %0)
%5 = tail call i32 @Car_SetAxles(i32 %4, i32 %1)
%6 = tail call i32 @Car_SetAxlesType(i32 %5, i32 %2)
ret void
}
double Bbp4b(double x) { return 0.0; }


x86 assembly (clang, -O0):
<Bbp4b>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bbp4b>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @Bbp4b(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @Bbp4b(double %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ ldv_main1();
int main(void) {
  ldv_main1();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <ldv_main1@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ldv_main1()
ret i32 0
}
int init_dht(void) {}


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

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

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

LLVM IR (-O2):
define i32 @init_dht() {
ret i32 undef
}
/* Variables and functions */
char *getenv(char const *);
const char *getenv_nonull(const char *key) {
  const char *result = getenv(key);
  return result != NULL ? result : "";
}


x86 assembly (clang, -O0):
<getenv_nonull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1141 <getenv_nonull+0x31>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1151 <getenv_nonull+0x41>
lea    0xeb8(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1151 <getenv_nonull+0x41>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getenv_nonull>:
push   %rax
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xee0(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @getenv_nonull(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @getenv(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %8
%12 = phi i8* [ %9, %8 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %10 ]
ret i8* %12
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @getenv_nonull(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2
ret i8* %4
}