xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  while (1)
    sleep(16);
  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)
mov    $0x10,%edi
call   1030 <sleep@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x10,%edi
call   1030 <sleep@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
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
br label %6
6: ; preds = %2, %6
%7 = call i32 @sleep(i32 16)
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 @sleep(i32 16)
br label %3
}
/* Type definitions */
struct vec3i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec3i_cross(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
__attribute__((always_)) struct vec3i *
psvec3i_cross(struct vec3i *result, struct vec3i *a, struct vec3i *b) {
  vec3i_cross((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


x86 assembly (clang, -O0):
<psvec3i_cross>:
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
call   1030 <vec3i_cross@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec3i_cross>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3i_cross@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_cross(%struct.vec3i* returned %0, %struct.vec3i* %1, %struct.vec3i* %2) {
%4 = getelementptr %struct.vec3i, %struct.vec3i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec3i, %struct.vec3i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec3i, %struct.vec3i* %2, i64 0, i32 0
%7 = tail call i32 @vec3i_cross(i32* %4, i32* %5, i32* %6)
ret %struct.vec3i* %0
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int /*<<< orphan*/ perror(char *);
int shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
void shmDelete(int shmid) {
  if (shmctl(shmid, IPC_RMID, NULL) == -1) {
    perror("Fehler beim Loeschen des Shared Memory Segments");
  }
}


x86 assembly (clang, -O0):
<shmDelete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <shmctl@plt>
cmp    $0xffffffff,%eax
jne    1155 <shmDelete+0x35>
lea    0xeb0(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmDelete>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <shmctl@plt>
cmp    $0xffffffff,%eax
je     1138 <shmDelete+0x18>
pop    %rax
ret
lea    0xec1(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

LLVM IR (-O0):
@IPC_RMID = global i32 0
@.str = [48 x i8] c"Fehler beim Loeschen des Shared Memory Segments\00"
define void @shmDelete(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @IPC_RMID
%5 = call i32 @shmctl(i32 %3, i32 %4, i32* null)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
@.str = [48 x i8] c"Fehler beim Loeschen des Shared Memory Segments\00"
define void @shmDelete(i32 %0) {
%2 = load i32, i32* @IPC_RMID
%3 = tail call i32 @shmctl(i32 %0, i32 %2, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}
double sub4(double f, double g, double h) { return -((f * g) - h); }


x86 assembly (clang, -O0):
<sub4>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub4>:
mulsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
xorpd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @sub4(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* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fneg double %9
%11 = call double @llvm.fmuladd.f64(double %7, double %8, double %10)
%12 = fneg double %11
ret double %12
}

LLVM IR (-O2):
define double @sub4(double %0, double %1, double %2) {
%4 = fneg double %2
%5 = tail call double @llvm.fmuladd.f64(double %0, double %1, double %4)
%6 = fneg double %5
ret double %6
}
/* Variables and functions */
scalar_t__ strncpy(char *, char const *, size_t);
int strncpy_s(char *str, size_t size, const char *src, size_t len) {
  return strncpy(str, src, size < len ? size : len) ? 0 : -1;
}


x86 assembly (clang, -O0):
<strncpy_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1153 <strncpy_s+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    115b <strncpy_s+0x4b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
call   1030 <strncpy@plt>
mov    %rax,%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_s>:
push   %rax
cmp    %rcx,%rsi
cmovb  %rsi,%rcx
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <strncpy@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @strncpy_s(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %7
%11 = load i64, i64* %6
%12 = load i64, i64* %8
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %4
%15 = load i64, i64* %6
br label %18
16: ; preds = %4
%17 = load i64, i64* %8
br label %18
18: ; preds = %16, %14
%19 = phi i64 [ %15, %14 ], [ %17, %16 ]
%20 = call i64 @strncpy(i8* %9, i8* %10, i64 %19)
%21 = icmp ne i64 %20, 0
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 0, i32 -1
ret i32 %23
}

LLVM IR (-O2):
define i32 @strncpy_s(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = icmp ult i64 %1, %3
%6 = select i1 %5, i64 %1, i64 %3
%7 = tail call i64 @strncpy(i8* %0, i8* %2, i64 %6)
%8 = icmp eq i64 %7, 0
%9 = sext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int tolower(int);
int trio_to_lower(int source) { return tolower(source); }


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

x86 assembly (clang, -O2):
<trio_to_lower>:
jmp    1030 <tolower@plt>

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

LLVM IR (-O2):
define i32 @trio_to_lower(i32 %0) {
%2 = tail call i32 @tolower(i32 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ MP_sema(int);
int /*<<< orphan*/ MP_semaset(int, scalar_t__);
void MP_p3wait4(void) {
  MP_semaset(2, MP_sema(2) + 1);
  while (MP_sema(2) != 0)
    ;
}


x86 assembly (clang, -O0):
<MP_p3wait4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <MP_sema@plt>
mov    %rax,%rsi
add    $0x1,%rsi
mov    $0x2,%edi
call   1030 <MP_semaset@plt>
mov    $0x2,%edi
call   1040 <MP_sema@plt>
cmp    $0x0,%rax
je     1158 <MP_p3wait4+0x38>
jmp    113f <MP_p3wait4+0x1f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MP_p3wait4>:
push   %rax
mov    $0x2,%edi
call   1040 <MP_sema@plt>
lea    0x1(%rax),%rsi
mov    $0x2,%edi
call   1030 <MP_semaset@plt>
nopl   0x0(%rax)
mov    $0x2,%edi
call   1040 <MP_sema@plt>
test   %rax,%rax
jne    1140 <MP_p3wait4+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @MP_p3wait4() {
%1 = call i64 @MP_sema(i32 2)
%2 = add nsw i64 %1, 1
%3 = call i32 @MP_semaset(i32 2, i64 %2)
br label %4
4: ; preds = %7, %0
%5 = call i64 @MP_sema(i32 2)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
br label %4
8: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @MP_p3wait4() {
%1 = tail call i64 @MP_sema(i32 2)
%2 = add nsw i64 %1, 1
%3 = tail call i32 @MP_semaset(i32 2, i64 %2)
br label %4
4: ; preds = %4, %0
%5 = tail call i64 @MP_sema(i32 2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
ret void
}
void testClosureLLLLrV(void (*closure)(long long, long long), long long a1,
                       long long a2) {
  (*closure)(a1, a2);
}


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

x86 assembly (clang, -O2):
<testClosureLLLLrV>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    *%rax

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

LLVM IR (-O2):
define void @testClosureLLLLrV(void (i64, i64)* nocapture %0, i64 %1, i64 %2) {
tail call void %0(i64 %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __tcu_disable_pwm_output(int);
int /*<<< orphan*/ __tcu_set_pwm_output_shutdown_abrupt(int);
int /*<<< orphan*/ __tcu_stop_counter(int);
void __lcd_pwm_stop(void) {
  __tcu_stop_counter(2);
  __tcu_set_pwm_output_shutdown_abrupt(2);
  __tcu_disable_pwm_output(2);
  return;
}


x86 assembly (clang, -O0):
<__lcd_pwm_stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1050 <__tcu_stop_counter@plt>
mov    $0x2,%edi
call   1030 <__tcu_set_pwm_output_shutdown_abrupt@plt>
mov    $0x2,%edi
call   1040 <__tcu_disable_pwm_output@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__lcd_pwm_stop>:
push   %rax
mov    $0x2,%edi
call   1050 <__tcu_stop_counter@plt>
mov    $0x2,%edi
call   1030 <__tcu_set_pwm_output_shutdown_abrupt@plt>
mov    $0x2,%edi
pop    %rax
jmp    1040 <__tcu_disable_pwm_output@plt>

LLVM IR (-O0):
define void @__lcd_pwm_stop() {
%1 = call i32 @__tcu_stop_counter(i32 2)
%2 = call i32 @__tcu_set_pwm_output_shutdown_abrupt(i32 2)
%3 = call i32 @__tcu_disable_pwm_output(i32 2)
ret void
}

LLVM IR (-O2):
define void @__lcd_pwm_stop() {
%1 = tail call i32 @__tcu_stop_counter(i32 2)
%2 = tail call i32 @__tcu_set_pwm_output_shutdown_abrupt(i32 2)
%3 = tail call i32 @__tcu_disable_pwm_output(i32 2)
ret void
}
void foo352() {}


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

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

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

LLVM IR (-O2):
define void @foo352() {
ret void
}
int test_003(int a, int c, int b, int d) { return (b & 1) + a; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
and    $0x1,%edx
lea    (%rdx,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @test_003(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %2, 1
%6 = add nsw i32 %5, %0
ret i32 %6
}
void uninitmultiplayers(void) {}


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

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

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

LLVM IR (-O2):
define void @uninitmultiplayers() {
ret void
}
void applegcr_process_data53() {}


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

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

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

LLVM IR (-O2):
define void @applegcr_process_data53() {
ret void
}
/* Variables and functions */
int foo();
int main() { return foo() - 4; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = add nsw i32 %1, -4
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void assert1(void) { assert(1 == 2); }


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

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

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

LLVM IR (-O2):
define void @assert1() {
%1 = tail call i32 @assert(i32 0)
ret void
}
int _lseek_r(struct _reent *r, int file, int ptr, int dir) {
  r = r;
  file = file;
  ptr = ptr;
  dir = dir;
  return 0;
}


x86 assembly (clang, -O0):
<_lseek_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_lseek_r(%struct._reent* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct._reent*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct._reent* %0, %struct._reent** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct._reent*, %struct._reent** %5
store %struct._reent* %9, %struct._reent** %5
%10 = load i32, i32* %6
store i32 %10, i32* %6
%11 = load i32, i32* %7
store i32 %11, i32* %7
%12 = load i32, i32* %8
store i32 %12, i32* %8
ret i32 0
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_lseek_r(%struct._reent* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime(const time_t *timer) {
  if (*timer)
    return 0;
  else
    return 0;
}


x86 assembly (clang, -O0):
<gmtime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1123 <gmtime+0x23>
movq   $0x0,-0x8(%rbp)
jmp    112b <gmtime+0x2b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @gmtime(i64* %0) {
%2 = alloca %struct.tm*
%3 = alloca i64*
store i64* %0, i64** %3
%4 = load i64*, i64** %3
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store %struct.tm* null, %struct.tm** %2
br label %9
8: ; preds = %1
store %struct.tm* null, %struct.tm** %2
br label %9
9: ; preds = %8, %7
%10 = load %struct.tm*, %struct.tm** %2
ret %struct.tm* %10
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define noalias %struct.tm* @gmtime(i64* nocapture readnone %0) {
ret %struct.tm* null
}
void fd17(int n) {
a : {
  typedef int(*b)[n];
p01A:
  goto p01A;
  goto a;
P01A:
  goto P01A;
  {
    typedef int(*c)[n];
  P012A:
    goto P012A;
    0;
  }
P01B:
  goto P01B;
  {
    typedef int(*d)[n];
  P013A:
    goto P013A;
    0;
  }
P01C:
  goto P01C;
  ;
  typedef int(*e)[n];
P014A:
  goto P014A;
  0;
};
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd17>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd17+0x7>

x86 assembly (clang, -O2):
<fd17>:
jmp    1100 <fd17>

LLVM IR (-O0):
define void @fd17(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
br label %6
6: ; preds = %6, %3
br label %6
7: ; preds = %7
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd17(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello World!");
  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 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_9Cuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x9C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_9Cuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 156
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct s_rule {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printz(char *, struct s_rule *);
void print_rule(struct s_rule *rule) { printz("  %r\n", rule); }


x86 assembly (clang, -O0):
<print_rule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printz@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_rule>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printz@plt>

LLVM IR (-O0):
%struct.s_rule = type { i32 }
@.str = [6 x i8] c" %r\0A\00"
define void @print_rule(%struct.s_rule* %0) {
%2 = alloca %struct.s_rule*
store %struct.s_rule* %0, %struct.s_rule** %2
%3 = load %struct.s_rule*, %struct.s_rule** %2
%4 = call i32 @printz(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.s_rule* %3)
ret void
}

LLVM IR (-O2):
%struct.s_rule = type { i32 }
@.str = [6 x i8] c" %r\0A\00"
define void @print_rule(%struct.s_rule* %0) {
%2 = tail call i32 @printz(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.s_rule* %0)
ret void
}
void circ_(x, y, radius) float *x, *y, *radius;
{ circ(*x, *y, *radius); }


x86 assembly (clang, -O0):
<circ_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
call   1030 <circ@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circ_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
movss  (%rdx),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <circ@plt>

LLVM IR (-O0):
define void @circ_(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fpext float %8 to double
%10 = load float*, float** %5
%11 = load float, float* %10
%12 = fpext float %11 to double
%13 = load float*, float** %6
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = call i32 (double, double, double, ...) bitcast (i32 (...)* @circ to i32 (double, double, double, ...)*)(double %9, double %12, double %15)
ret void
}

LLVM IR (-O2):
define void @circ_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = fpext float %4 to double
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @circ to i32 (double, double, double, ...)*)(double %5, double %7, double %9)
ret void
}
/* Type definitions */
struct pc_temp_ocv_lut {
  int dummy;
};

/* Variables and functions */
int EINVAL;
int interpolate_slope(struct pc_temp_ocv_lut *pc_temp_ocv, int batt_temp,
                      int pc) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<interpolate_slope>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ec9(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolate_slope>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.pc_temp_ocv_lut = type { i32 }
@EINVAL = global i32 0
define i32 @interpolate_slope(%struct.pc_temp_ocv_lut* %0, i32 %1, i32 %2) {
%4 = alloca %struct.pc_temp_ocv_lut*
%5 = alloca i32
%6 = alloca i32
store %struct.pc_temp_ocv_lut* %0, %struct.pc_temp_ocv_lut** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
%struct.pc_temp_ocv_lut = type { i32 }
@EINVAL = global i32 0
define i32 @interpolate_slope(%struct.pc_temp_ocv_lut* nocapture readnone %0, i32 %1, i32 %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int matches_value(int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
int matches_ip(uint32_t ip, int perc11, int perc10, int perc01) {
  return matches_value(ntohl(ip), perc11, perc10, perc01);
}


x86 assembly (clang, -O0):
<matches_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <ntohl@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <matches_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matches_ip>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
call   1040 <ntohl@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <matches_value@plt>

LLVM IR (-O0):
define i32 @matches_ip(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = call i32 @ntohl(i32 %9)
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @matches_value(i32 %10, i32 %11, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @matches_ip(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @ntohl(i32 %0)
%6 = tail call i32 @matches_value(i32 %5, i32 %1, i32 %2, i32 %3)
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int UINT32_MAX;
uint32_t rotl32(uint32_t x, int n) {
  return ((x << n) | (x >> (32 - n))) & UINT32_MAX;
}


x86 assembly (clang, -O0):
<rotl32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    0x2ece(%rip),%rcx
and    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl32>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
mov    0x2ee5(%rip),%rcx
and    (%rcx),%eax
ret

LLVM IR (-O0):
@UINT32_MAX = global i32 0
define i32 @rotl32(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
%13 = load i32, i32* @UINT32_MAX
%14 = and i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
@UINT32_MAX = global i32 0
define i32 @rotl32(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
%7 = load i32, i32* @UINT32_MAX
%8 = and i32 %7, %6
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
void fputh(long h, FILE *f) {
  putc((int)h, f);
  putc((int)(h >> 8), f);
  putc((int)(h >> 16), f);
  putc((int)(h >> 24), f);
}


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

x86 assembly (clang, -O2):
<fputh>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <putc@plt>
mov    %rbx,%rdi
shr    $0x8,%rdi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %rbx,%rdi
shr    $0x10,%rdi
mov    %r14,%rsi
call   1030 <putc@plt>
shr    $0x18,%rbx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @fputh(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i32*, i32** %4
%8 = call i32 @putc(i32 %6, i32* %7)
%9 = load i64, i64* %3
%10 = ashr i64 %9, 8
%11 = trunc i64 %10 to i32
%12 = load i32*, i32** %4
%13 = call i32 @putc(i32 %11, i32* %12)
%14 = load i64, i64* %3
%15 = ashr i64 %14, 16
%16 = trunc i64 %15 to i32
%17 = load i32*, i32** %4
%18 = call i32 @putc(i32 %16, i32* %17)
%19 = load i64, i64* %3
%20 = ashr i64 %19, 24
%21 = trunc i64 %20 to i32
%22 = load i32*, i32** %4
%23 = call i32 @putc(i32 %21, i32* %22)
ret void
}

LLVM IR (-O2):
define void @fputh(i64 %0, i32* nocapture %1) {
%3 = trunc i64 %0 to i32
%4 = tail call i32 @putc(i32 %3, i32* %1)
%5 = lshr i64 %0, 8
%6 = trunc i64 %5 to i32
%7 = tail call i32 @putc(i32 %6, i32* %1)
%8 = lshr i64 %0, 16
%9 = trunc i64 %8 to i32
%10 = tail call i32 @putc(i32 %9, i32* %1)
%11 = lshr i64 %0, 24
%12 = trunc i64 %11 to i32
%13 = tail call i32 @putc(i32 %12, i32* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
scalar_t__ ntohs(int /*<<< orphan*/ const);
int stun_get_command_message_len_str(const unsigned char *buf, size_t len) {
  if (len < (20))
    return -1;
  return (int)(ntohs(((const uint16_t *)(buf))[1]) + (20));
}


x86 assembly (clang, -O0):
<stun_get_command_message_len_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x14,-0x18(%rbp)
jae    1137 <stun_get_command_message_len_str+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    114a <stun_get_command_message_len_str+0x3a>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edi
call   1030 <ntohs@plt>
add    $0x14,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stun_get_command_message_len_str>:
mov    $0xffffffff,%eax
cmp    $0x14,%rsi
jb     112b <stun_get_command_message_len_str+0x1b>
push   %rax
mov    0x4(%rdi),%edi
call   1030 <ntohs@plt>
add    $0x14,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @stun_get_command_message_len_str(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = icmp ult i64 %6, 20
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %17
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = call i64 @ntohs(i32 %13)
%15 = add nsw i64 %14, 20
%16 = trunc i64 %15 to i32
store i32 %16, i32* %3
br label %17
17: ; preds = %9, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @stun_get_command_message_len_str(i8* nocapture %0, i64 %1) {
%3 = icmp ult i64 %1, 20
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = tail call i64 @ntohs(i32 %7)
%9 = trunc i64 %8 to i32
%10 = add i32 %9, 20
br label %11
11: ; preds = %2, %4
%12 = phi i32 [ %10, %4 ], [ -1, %2 ]
ret i32 %12
}
/* Type definitions */
struct test_loader {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct test_loader *);
void test_loader_free(struct test_loader *loader) { free(loader); }


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

x86 assembly (clang, -O2):
<test_loader_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.test_loader = type { i32 }
define void @test_loader_free(%struct.test_loader* nocapture %0) {
%2 = tail call i32 @free(%struct.test_loader* %0)
ret void
}
int do_590() { return 590; }


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

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

LLVM IR (-O0):
define i32 @do_590() {
ret i32 590
}

LLVM IR (-O2):
define i32 @do_590() {
ret i32 590
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
__m128d __attribute__((__always___, __nodebug__)) _mm_castsi128_pd(__m128i in) {
  return (__m128d)in;
}


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

x86 assembly (clang, -O2):
<_mm_castsi128_pd>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @_mm_castsi128_pd(i32 returned %0) {
ret i32 %0
}
short htoxs(short in) {
  char r[2];
  r[0] = in;
  r[1] = in >> 8;
  return *((short *)r);
}


x86 assembly (clang, -O0):
<htoxs>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,-0x4(%rbp)
movswl -0x2(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0x3(%rbp)
movswl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<htoxs>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @htoxs(i16 signext %0) {
%2 = alloca i16
%3 = alloca [2 x i8]
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = trunc i16 %4 to i8
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %5, i8* %6
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = ashr i32 %8, 8
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %10, i8* %11
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%13 = bitcast i8* %12 to i16*
%14 = load i16, i16* %13
ret i16 %14
}

LLVM IR (-O2):
define signext i16 @htoxs(i16 returned signext %0) {
ret i16 %0
}
int ld_le_rc2(long double a1) { return !(((a1) <= (100))); }


x86 assembly (clang, -O0):
<ld_le_rc2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_le_rc2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setb   %al
ret

LLVM IR (-O0):
define i32 @ld_le_rc2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp ole x86_fp80 %3, 0xK4005C800000000000000
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_le_rc2(x86_fp80 %0) {
%2 = fcmp ugt x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int rs274ngc_sequence_number();
int rs274ngc_line() { return rs274ngc_sequence_number(); }


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

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

LLVM IR (-O0):
define i32 @rs274ngc_line() {
%1 = call i32 (...) @rs274ngc_sequence_number()
ret i32 %1
}

LLVM IR (-O2):
define i32 @rs274ngc_line() {
%1 = tail call i32 (...) @rs274ngc_sequence_number()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ m68k_read_memory_64(int /*<<< orphan*/);
void m68k_read_to_64(uint32_t address, uint64_t *dest) {
  *dest = m68k_read_memory_64(address);
}


x86 assembly (clang, -O0):
<m68k_read_to_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <m68k_read_memory_64@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @m68k_read_to_64(i32 %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @m68k_read_memory_64(i32 %0)
store i32 %3, i32* %1
ret void
}
int getopt_long(int argc, char *const *argv, const char *options,
                const struct option *longopts, int *longidx) {
  int _getopt_internal(int, char *const *, const char *, const struct option *,
                       int *, int);
  return _getopt_internal(argc, argv, options, longopts, longidx, 0);
}


x86 assembly (clang, -O0):
<getopt_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
call   1030 <_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long>:
xor    %r9d,%r9d
jmp    1030 <_getopt_internal@plt>

LLVM IR (-O0):
%struct.option = type opaque
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 @_getopt_internal(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type opaque
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 @_getopt_internal(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 0)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ XReparentEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XReparentEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XReparentEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XReparentEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XReparentEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XReparentEvent>:
test   %rdi,%rdi
je     112a <free_XReparentEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XReparentEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XReparentEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
int oa_end_record(struct oarchive *oa, const char *tag) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.oarchive = type opaque
define i32 @oa_end_record(%struct.oarchive* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bits(int, int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, unsigned short);
void cc2400_synch(unsigned short v) {
  char description[64];
  sprintf(description, "0x%04X", v);
  bits(15, 0, "SYNCWORD_UPPER", "RW", description);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec6(%rip),%rsi
movzwl -0x2(%rbp),%edx
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%r8
mov    $0xf,%edi
xor    %esi,%esi
lea    0xeb2(%rip),%rdx
lea    0xeba(%rip),%rcx
call   1030 <bits@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbx
sub    $0x40,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0xec7(%rip),%rdx
lea    0xecf(%rip),%rcx
mov    $0xf,%edi
xor    %esi,%esi
mov    %rbx,%r8
call   1030 <bits@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"0x%04X\00"
@.str.1 = [15 x i8] c"SYNCWORD_UPPER\00"
@.str.2 = [3 x i8] c"RW\00"
define void @cc2400_synch(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca [64 x i8]
store i16 %0, i16* %2
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = load i16, i16* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i16 zeroext %5)
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%8 = call i32 @bits(i32 15, i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"0x%04X\00"
@.str.1 = [15 x i8] c"SYNCWORD_UPPER\00"
@.str.2 = [3 x i8] c"RW\00"
define void @cc2400_synch(i16 zeroext %0) {
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i16 zeroext %0)
%5 = call i32 @bits(i32 15, i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _TimerBaseValid(int);
void TimerMatchSet64(uint32_t ui32Base, uint64_t ui64Value) {
  ASSERT(_TimerBaseValid(ui32Base));
  (*((volatile uint32_t *)(ui32Base + 0x00000034))) = ui64Value >> 32;
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) = ui64Value & 0xffffffff;
}


x86 assembly (clang, -O0):
<TimerMatchSet64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_TimerBaseValid@plt>
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x34,%eax
cltq
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
and    $0xffffffff,%ecx
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerMatchSet64>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <_TimerBaseValid@plt>
mov    %eax,%edi
call   1030 <ASSERT@plt>
movslq %ebp,%rax
mov    %ebx,0x30(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @TimerMatchSet64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @_TimerBaseValid(i32 %5)
%7 = call i32 @ASSERT(i32 %6)
%8 = load i32, i32* %4
%9 = ashr i32 %8, 32
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 52
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %9, i32* %13
%14 = load i32, i32* %4
%15 = and i32 %14, -1
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 48
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
store volatile i32 %15, i32* %19
ret void
}

LLVM IR (-O2):
define void @TimerMatchSet64(i32 %0, i32 %1) {
%3 = tail call i32 @_TimerBaseValid(i32 %0)
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 52
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
store volatile i32 poison, i32* %7
%8 = add nsw i32 %0, 48
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %1, i32* %10
ret void
}