xunge/DecIR huggingface dataset:
/* Variables and functions */
bool is_sorted(int *a, int n) {
  while (--n >= 1)
    if (a[n] < a[n - 1])
      return false;
  return true;
}


x86 assembly (clang, -O0):
<is_sorted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x1,%eax
jl     114f <is_sorted+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    114a <is_sorted+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1156 <is_sorted+0x56>
jmp    110b <is_sorted+0xb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sorted>:
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x2,%eax
jl     1128 <is_sorted+0x28>
mov    -0x4(%rdi,%rax,4),%ecx
lea    -0x2(%rax),%edx
add    $0xffffffffffffffff,%rax
cmp    (%rdi,%rdx,4),%ecx
jge    1110 <is_sorted+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_sorted(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %9, %2
%5 = phi i64 [ %6, %9 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %17
9: ; preds = %4
%10 = getelementptr inbounds i32, i32* %0, i64 %6
%11 = load i32, i32* %10
%12 = add i64 %5, 4294967294
%13 = and i64 %12, 4294967295
%14 = getelementptr inbounds i32, i32* %0, i64 %13
%15 = load i32, i32* %14
%16 = icmp slt i32 %11, %15
br i1 %16, label %17, label %4
17: ; preds = %4, %9
%18 = phi i32 [ 0, %9 ], [ 1, %4 ]
ret i32 %18
}
/* Variables and functions */
scalar_t__ wpa_key_mgmt_sae(int);
scalar_t__ wpa_key_mgmt_wpa_ieee8021x(int);
scalar_t__ wpa_key_mgmt_wpa_psk(int);
int wpa_key_mgmt_wpa(int akm) {
  return wpa_key_mgmt_wpa_ieee8021x(akm) || wpa_key_mgmt_wpa_psk(akm) ||
         wpa_key_mgmt_sae(akm);
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_wpa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <wpa_key_mgmt_wpa_ieee8021x@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1181 <wpa_key_mgmt_wpa+0x51>
mov    -0x4(%rbp),%edi
call   1040 <wpa_key_mgmt_wpa_psk@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1181 <wpa_key_mgmt_wpa+0x51>
mov    -0x4(%rbp),%edi
call   1030 <wpa_key_mgmt_sae@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_wpa>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <wpa_key_mgmt_wpa_ieee8021x@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    115f <wpa_key_mgmt_wpa+0x2f>
mov    %ebp,%edi
call   1040 <wpa_key_mgmt_wpa_psk@plt>
test   %rax,%rax
jne    115f <wpa_key_mgmt_wpa+0x2f>
mov    %ebp,%edi
call   1030 <wpa_key_mgmt_sae@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_wpa(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @wpa_key_mgmt_wpa_ieee8021x(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @wpa_key_mgmt_wpa_psk(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i64 @wpa_key_mgmt_sae(i32 %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_wpa(i32 %0) {
%2 = tail call i64 @wpa_key_mgmt_wpa_ieee8021x(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i64 @wpa_key_mgmt_wpa_psk(i32 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @wpa_key_mgmt_sae(i32 %0)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %10, %7 ]
ret i32 %12
}
__attribute__((always_)) void tracing_off(void) {}


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

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

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

LLVM IR (-O2):
define void @tracing_off() {
ret void
}
void HXMutexUnInit(volatile int *volatile pLock) {}


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

x86 assembly (clang, -O2):
<HXMutexUnInit>:
mov    %rdi,-0x8(%rsp)
ret

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

LLVM IR (-O2):
define void @HXMutexUnInit(i32* %0) {
%2 = alloca i32*
store volatile i32* %0, i32** %2
ret void
}
/* Variables and functions */
float cosf(float);
float sinf(float);
float tanf(float x) { return (sinf(x) / cosf(x)); }


x86 assembly (clang, -O0):
<tanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanf>:
push   %rax
movss  %xmm0,(%rsp)
call   1030 <sinf@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
call   1040 <cosf@plt>
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @tanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sinf(float %3)
%5 = load float, float* %2
%6 = call float @cosf(float %5)
%7 = fdiv float %4, %6
ret float %7
}

LLVM IR (-O2):
define float @tanf(float %0) {
%2 = tail call float @sinf(float %0)
%3 = tail call float @cosf(float %0)
%4 = fdiv float %2, %3
ret float %4
}
double physmem_total(void) { return 64 * 1024 * 1024; }


x86 assembly (clang, -O0):
<physmem_total>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @physmem_total() {
ret double 0x4190000000000000
}

LLVM IR (-O2):
define double @physmem_total() {
ret double 0x4190000000000000
}
int max(int a, int b) { return (a >= b) ? a : b; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
float *malloc(unsigned int);
float *create_iarray(unsigned int length, unsigned int row) {
  return malloc(length * row * sizeof(int));
}


x86 assembly (clang, -O0):
<create_iarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,%eax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_iarray>:
imul   %esi,%edi
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define float* @create_iarray(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 = mul i32 %5, %6
%8 = zext i32 %7 to i64
%9 = mul i64 %8, 4
%10 = trunc i64 %9 to i32
%11 = call float* @malloc(i32 %10)
ret float* %11
}

LLVM IR (-O2):
define noalias float* @create_iarray(i32 %0, i32 %1) {
%3 = shl i32 %0, 2
%4 = mul i32 %3, %1
%5 = tail call float* @malloc(i32 %4)
ret float* %5
}
void pipeline_scheduler_simple_free_internal(
    struct pipeline_scheduler_simple *sched) {}


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

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

LLVM IR (-O0):
%struct.pipeline_scheduler_simple = type opaque
define void @pipeline_scheduler_simple_free_internal(%struct.pipeline_scheduler_simple* %0) {
%2 = alloca %struct.pipeline_scheduler_simple*
store %struct.pipeline_scheduler_simple* %0, %struct.pipeline_scheduler_simple** %2
ret void
}

LLVM IR (-O2):
%struct.pipeline_scheduler_simple = type opaque
define void @pipeline_scheduler_simple_free_internal(%struct.pipeline_scheduler_simple* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cbuf_AddText(char *);
int /*<<< orphan*/ Cbuf_Execute();
int /*<<< orphan*/ ControlsSetMenuItemValues();
void ControlsResetDefaultsFunc(void *unused) {
  Cbuf_AddText("exec DEFAULT.CFG\n");
  Cbuf_Execute();
  ControlsSetMenuItemValues();
}


x86 assembly (clang, -O0):
<ControlsResetDefaultsFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
mov    $0x0,%al
call   1050 <Cbuf_Execute@plt>
mov    $0x0,%al
call   1040 <ControlsSetMenuItemValues@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ControlsResetDefaultsFunc>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
xor    %eax,%eax
call   1050 <Cbuf_Execute@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ControlsSetMenuItemValues@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"exec DEFAULT.CFG\0A\00"
define void @ControlsResetDefaultsFunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Cbuf_AddText(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @Cbuf_Execute()
%5 = call i32 (...) @ControlsSetMenuItemValues()
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"exec DEFAULT.CFG\0A\00"
define void @ControlsResetDefaultsFunc(i8* nocapture readnone %0) {
%2 = tail call i32 @Cbuf_AddText(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @Cbuf_Execute()
%4 = tail call i32 (...) @ControlsSetMenuItemValues()
ret void
}
/* Variables and functions */
scalar_t__ INT_MIN;
unsigned int test2u(unsigned int x) { return ~(x + (unsigned int)INT_MIN); }


x86 assembly (clang, -O0):
<test2u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
mov    (%rcx),%rcx
add    %ecx,%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2u>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
add    (%rcx),%eax
not    %eax
ret

LLVM IR (-O0):
@INT_MIN = global i64 0
define i32 @test2u(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i64, i64* @INT_MIN
%5 = trunc i64 %4 to i32
%6 = add i32 %3, %5
%7 = xor i32 %6, -1
ret i32 %7
}

LLVM IR (-O2):
@INT_MIN = global i64 0
define i32 @test2u(i32 %0) {
%2 = load i64, i64* @INT_MIN
%3 = trunc i64 %2 to i32
%4 = add i32 %3, %0
%5 = xor i32 %4, -1
ret i32 %5
}
double r2d(double angleInRads) {
  return angleInRads * 180 / 3.14159265358979323846;
}


x86 assembly (clang, -O0):
<r2d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @r2d(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB54442D18
ret double %5
}

LLVM IR (-O2):
define double @r2d(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = fdiv double %2, 0x400921FB54442D18
ret double %3
}
void multiset_list_set_tls_features() {}


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

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

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

LLVM IR (-O2):
define void @multiset_list_set_tls_features() {
ret void
}
/* Type definitions */
typedef unsigned short time_t;
typedef int /*<<< orphan*/ t;
struct timeb {
  unsigned short time;
  unsigned short millitm;
};

/* Variables and functions */
int /*<<< orphan*/ ftime(struct timeb *);
int /*<<< orphan*/ memset(struct timeb *, int /*<<< orphan*/, int);
double time_hires() {
  struct timeb t;
  memset(&t, 0, sizeof(t));
  ftime(&t);
  time_t time = t.time;
  unsigned short millitm = t.millitm;
  double c = time + millitm / 1000.0;
  return c;
}


x86 assembly (clang, -O0):
<time_hires>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    -0x8(%rbp),%rdi
call   1040 <ftime@plt>
mov    -0x8(%rbp),%ax
mov    %ax,-0xa(%rbp)
mov    -0x6(%rbp),%ax
mov    %ax,-0xc(%rbp)
movzwl -0xa(%rbp),%eax
cvtsi2sd %eax,%xmm0
movzwl -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xe97(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_hires>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    %rbx,%rdi
call   1040 <ftime@plt>
movzwl 0x8(%rsp),%eax
movzwl 0xa(%rsp),%ecx
cvtsi2sd %eax,%xmm1
cvtsi2sd %ecx,%xmm0
divsd  0xea5(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeb = type { i16, i16 }
define double @time_hires() {
%1 = alloca %struct.timeb
%2 = alloca i16
%3 = alloca i16
%4 = alloca double
%5 = call i32 @memset(%struct.timeb* %1, i32 0, i32 4)
%6 = call i32 @ftime(%struct.timeb* %1)
%7 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i32 0, i32 0
%8 = load i16, i16* %7
store i16 %8, i16* %2
%9 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i32 0, i32 1
%10 = load i16, i16* %9
store i16 %10, i16* %3
%11 = load i16, i16* %2
%12 = zext i16 %11 to i32
%13 = sitofp i32 %12 to double
%14 = load i16, i16* %3
%15 = zext i16 %14 to i32
%16 = sitofp i32 %15 to double
%17 = fdiv double %16, 1.000000e+03
%18 = fadd double %13, %17
store double %18, double* %4
%19 = load double, double* %4
ret double %19
}

LLVM IR (-O2):
%struct.timeb = type { i16, i16 }
define double @time_hires() {
%1 = alloca %struct.timeb
%2 = bitcast %struct.timeb* %1 to i8*
%3 = call i32 @memset(%struct.timeb* %1, i32 0, i32 4)
%4 = call i32 @ftime(%struct.timeb* %1)
%5 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i64 0, i32 0
%6 = load i16, i16* %5
%7 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i64 0, i32 1
%8 = load i16, i16* %7
%9 = uitofp i16 %6 to double
%10 = uitofp i16 %8 to double
%11 = fdiv double %10, 1.000000e+03
%12 = fadd double %11, %9
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ print_str(char *);
void busy_loop(void *str) {
  while (1) {
    print_str(str);
    print_str(": Running...\n");
    delay(1000);
  }
}


x86 assembly (clang, -O0):
<busy_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <print_str@plt>
lea    0xec4(%rip),%rdi
call   1040 <print_str@plt>
mov    $0x3e8,%edi
call   1030 <delay@plt>
jmp    112c <busy_loop+0xc>

x86 assembly (clang, -O2):
<busy_loop>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <print_str@plt>
mov    %r14,%rdi
call   1040 <print_str@plt>
mov    $0x3e8,%edi
call   1030 <delay@plt>
jmp    1130 <busy_loop+0x10>

LLVM IR (-O0):
@.str = [14 x i8] c": Running...\0A\00"
define void @busy_loop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = load i8*, i8** %2
%5 = call i32 @print_str(i8* %4)
%6 = call i32 @print_str(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @delay(i32 1000)
br label %3
}

LLVM IR (-O2):
@.str = [14 x i8] c": Running...\0A\00"
define void @busy_loop(i8* %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @print_str(i8* %0)
%4 = tail call i32 @print_str(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @delay(i32 1000)
br label %2
}
int dfs(int **graph, int x, int y, int **visited, int type, int rows,
        int cols) {
  return 0;
}


x86 assembly (clang, -O0):
<dfs>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @dfs(i32** nocapture readnone %0, i32 %1, i32 %2, i32** nocapture readnone %3, i32 %4, i32 %5, i32 %6) {
ret i32 0
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int connect(int, struct sockaddr const *, int /*<<< orphan*/);
void Connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen) {
  int retval;
  retval = connect(sockfd, serv_addr, addrlen);
  if (retval == -1)
    Sys_failure("connect");
}


x86 assembly (clang, -O0):
<Connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <connect@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    115a <Connect+0x3a>
lea    0xeab(%rip),%rdi
call   1030 <Sys_failure@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Connect>:
push   %rax
call   1040 <connect@plt>
cmp    $0xffffffff,%eax
je     112d <Connect+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <Sys_failure@plt>

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

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [8 x i8] c"connect\00"
define void @Connect(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = tail call i32 @connect(i32 %0, %struct.sockaddr* %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ time;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
unsigned long get_XLeaveWindowEvent_time(void *_p) {
  return (unsigned long)((XLeaveWindowEvent *)_p)->time;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XLeaveWindowEvent_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int recv(int, void *, int, int);
int /*<<< orphan*/ set_socket_blocking_enabled(int, int);
int recv_wrapper(int sock, void *recv_data, int len, int flag) {
  int rv = -1;
  set_socket_blocking_enabled(sock, 0);
  while ((rv = recv(sock, recv_data, len, flag)) < 0)
    ;
  set_socket_blocking_enabled(sock, 1);
  return rv;
}


x86 assembly (clang, -O0):
<recv_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <set_socket_blocking_enabled@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <recv@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    1169 <recv_wrapper+0x49>
jmp    1146 <recv_wrapper+0x26>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <set_socket_blocking_enabled@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recv_wrapper>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %rsi,%rbp
mov    %edi,%r12d
xor    %esi,%esi
call   1040 <set_socket_blocking_enabled@plt>
nopl   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %rbp,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <recv@plt>
test   %eax,%eax
js     1140 <recv_wrapper+0x20>
mov    %eax,%ebx
mov    %r12d,%edi
mov    $0x1,%esi
call   1040 <set_socket_blocking_enabled@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @recv_wrapper(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @set_socket_blocking_enabled(i32 %0, i32 0)
br label %6
6: ; preds = %6, %4
%7 = tail call i32 @recv(i32 %0, i8* %1, i32 %2, i32 %3)
%8 = icmp slt i32 %7, 0
br i1 %8, label %6, label %9
9: ; preds = %6
%10 = tail call i32 @set_socket_blocking_enabled(i32 %0, i32 1)
ret i32 %7
}
int test_imm_C1uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xC1 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C1uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 193
%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_C1uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 828928688128
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int _getopt_internal(int, char *const *, char const *, struct option const *,
                     int *, int);
int getopt_long_only(int argc, char *const *argv, const char *shortopts,
                     const struct option *longopts, int *longind) {
  return _getopt_internal(argc, argv, shortopts, longopts, longind, 1);
}


x86 assembly (clang, -O0):
<getopt_long_only>:
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
mov    $0x1,%r9d
call   1030 <_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long_only>:
mov    $0x1,%r9d
jmp    1030 <_getopt_internal@plt>

LLVM IR (-O0):
%struct.option = type { i32 }
define i32 @getopt_long_only(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 1)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type { i32 }
define i32 @getopt_long_only(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 1)
ret i32 %6
}
void put_4_be(unsigned char *ptr, unsigned int data) {
  ptr[3] = data & 0xff;
  ptr[2] = (data >> 8) & 0xff;
  ptr[1] = (data >> 16) & 0xff;
  ptr[0] = (data >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<put_4_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_4_be>:
bswap  %esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @put_4_be(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %3, i8* %4
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %6, i8* %7
%8 = lshr i32 %1, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %9, i8* %10
%11 = lshr i32 %1, 24
%12 = trunc i32 %11 to i8
store i8 %12, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
struct tm *get_tm(time_t sec) {
  struct tm *tm;
  time_t t;
  t = sec;
  tm = localtime(&t);
  return tm;
}


x86 assembly (clang, -O0):
<get_tm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tm>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @get_tm(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %4
%6 = call %struct.tm* @localtime(i32* %4)
store %struct.tm* %6, %struct.tm** %3
%7 = load %struct.tm*, %struct.tm** %3
ret %struct.tm* %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @get_tm(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 %0, i32* %2
%4 = call %struct.tm* @localtime(i32* %2)
ret %struct.tm* %4
}
/* Variables and functions */
int /*<<< orphan*/ pana_debug(char *);
void eapRespTimerStop() { pana_debug("eapRespTimerStop function"); }


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

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

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

LLVM IR (-O2):
@.str = [26 x i8] c"eapRespTimerStop function\00"
define void @eapRespTimerStop() {
%1 = tail call i32 @pana_debug(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
double SWITCH_POWER(int connections) {
  return 0.273665 + 0.213109 * connections;
}


x86 assembly (clang, -O0):
<SWITCH_POWER>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee8(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SWITCH_POWER>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @SWITCH_POWER(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call double @llvm.fmuladd.f64(double 2.131090e-01, double %4, double 2.736650e-01)
ret double %5
}

LLVM IR (-O2):
define double @SWITCH_POWER(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 2.131090e-01, double 2.736650e-01)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() { printf("%s\n", "helloworld"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [11 x i8] c"helloworld\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [11 x i8] c"helloworld\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void statistics_print(void) {}


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

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

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

LLVM IR (-O2):
define void @statistics_print() {
ret void
}
void rop3_51_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = ~S;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_51_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_51_0_1>:
not    %sil
not    %dl
or     (%rdi),%dl
and    %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_51_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = xor i32 %9, -1
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
%12 = load i8, i8* %7
%13 = zext i8 %12 to i32
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = and i32 %13, %15
%17 = load i8, i8* %7
%18 = zext i8 %17 to i32
%19 = load i8, i8* %6
%20 = zext i8 %19 to i32
%21 = xor i32 %20, -1
%22 = and i32 %18, %21
%23 = or i32 %16, %22
%24 = load i8, i8* %6
%25 = zext i8 %24 to i32
%26 = load i8, i8* %5
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = and i32 %25, %28
%30 = load i8*, i8** %4
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = and i32 %29, %32
%34 = or i32 %23, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_51_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = load i8, i8* %0
%6 = xor i8 %2, -1
%7 = or i8 %5, %6
%8 = and i8 %7, %4
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int bar[5];
  assert(sizeof *bar == sizeof(int));
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fsitos(int s, int d) {
  assem_debug("fsitos s%d,s%d\n", d, s);
  output_w32(0xeeb80ac0 | ((d & 14) << 11) | ((d & 1) << 22) | ((s & 14) >> 1) |
             ((s & 1) << 5));
}


x86 assembly (clang, -O0):
<emit_fsitos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <assem_debug@plt>
mov    -0x8(%rbp),%edi
and    $0xe,%edi
shl    $0xb,%edi
or     $0xeeb80ac0,%edi
mov    -0x8(%rbp),%eax
and    $0x1,%eax
shl    $0x16,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
and    $0xe,%eax
sar    $0x1,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
and    $0x1,%eax
shl    $0x5,%eax
or     %eax,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fsitos>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%edx
call   1030 <assem_debug@plt>
mov    %ebx,%eax
and    $0xe,%eax
shl    $0xb,%eax
and    $0x1,%ebx
shl    $0x16,%ebx
mov    %ebp,%ecx
shr    %ecx
and    $0x7,%ecx
shl    $0x5,%ebp
movzbl %bpl,%edi
or     %ecx,%edi
or     %ebx,%edi
or     %eax,%edi
or     $0xeeb80ac0,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"fsitos s%d,s%d\0A\00"
define void @emit_fsitos(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @assem_debug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = and i32 %8, 14
%10 = shl i32 %9, 11
%11 = or i32 -289928512, %10
%12 = load i32, i32* %4
%13 = and i32 %12, 1
%14 = shl i32 %13, 22
%15 = or i32 %11, %14
%16 = load i32, i32* %3
%17 = and i32 %16, 14
%18 = ashr i32 %17, 1
%19 = or i32 %15, %18
%20 = load i32, i32* %3
%21 = and i32 %20, 1
%22 = shl i32 %21, 5
%23 = or i32 %19, %22
%24 = call i32 @output_w32(i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"fsitos s%d,s%d\0A\00"
define void @emit_fsitos(i32 %0, i32 %1) {
%3 = tail call i32 @assem_debug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
%4 = shl i32 %1, 11
%5 = and i32 %4, 28672
%6 = shl i32 %1, 22
%7 = and i32 %6, 4194304
%8 = lshr i32 %0, 1
%9 = and i32 %8, 7
%10 = shl i32 %0, 5
%11 = and i32 %10, 32
%12 = or i32 %9, %11
%13 = or i32 %12, %7
%14 = or i32 %13, %5
%15 = or i32 %14, -289928512
%16 = tail call i32 @output_w32(i32 %15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void printHelpAndQuitPrinter() {
  printf("Usage: ezparse <filename>\n");
  exit(0);
}


x86 assembly (clang, -O0):
<printHelpAndQuitPrinter>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: ezparse <filename>\0A\00"
define void @printHelpAndQuitPrinter() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [26 x i8] c"Usage: ezparse <filename>\00"
define void @printHelpAndQuitPrinter() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
unsigned long ADCPhaseDelayGet(unsigned long ulBase) {
  DEBUG_ASSERT((ulBase == 0x40038000) || (ulBase == 0x40039000));
  return ((*((volatile unsigned long *)(ulBase + 0x00000024))));
}


x86 assembly (clang, -O0):
<ADCPhaseDelayGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x40038000,-0x8(%rbp)
40
mov    %al,-0x9(%rbp)
je     113d <ADCPhaseDelayGet+0x2d>
cmpq   $0x40039000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCPhaseDelayGet>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40038000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x24(%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @ADCPhaseDelayGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1073971200
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 1073975296
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @DEBUG_ASSERT(i32 %10)
%12 = load i64, i64* %2
%13 = add i64 %12, 36
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @ADCPhaseDelayGet(i64 %0) {
%2 = and i64 %0, -4097
%3 = icmp eq i64 %2, 1073971200
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = add i64 %0, 36
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
ret i64 %8
}
/* Variables and functions */
int snprintf(char *, int, char *, int);
int uwsgi_num2str2n(int num, char *ptr, int size) {
  return snprintf(ptr, size, "%d", num);
}


x86 assembly (clang, -O0):
<uwsgi_num2str2n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x4(%rbp),%ecx
lea    0xecd(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_num2str2n>:
mov    %edi,%ecx
lea    0xee7(%rip),%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @uwsgi_num2str2n(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 %10
}

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


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

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

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

LLVM IR (-O2):
define void @gpio_gps_active() {
ret void
}
void rct_pll_init(void) {}


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

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

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

LLVM IR (-O2):
define void @rct_pll_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ mkdir(char *, int);
int /*<<< orphan*/ printf(char *);
int main() {
  int a;
  printf("Interstellar\n");
  chdir("/home/shahas/Desktop/");
  mkdir("new_dir", 0777);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1050 <printf@plt>
lea    0xec3(%rip),%rdi
call   1040 <chdir@plt>
lea    0xecd(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee6(%rip),%rdi
call   1040 <puts@plt>
lea    0xebc(%rip),%rdi
call   1050 <chdir@plt>
lea    0xec6(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Interstellar\0A\00"
@.str.1 = [22 x i8] c"/home/shahas/Desktop/\00"
@.str.2 = [8 x i8] c"new_dir\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @chdir(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @mkdir(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 511)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"/home/shahas/Desktop/\00"
@.str.2 = [8 x i8] c"new_dir\00"
@str = [13 x i8] c"Interstellar\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @chdir(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @mkdir(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 511)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ psy_dbtable_init();
void llz_psychomodel1_rom_init() { psy_dbtable_init(); }


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

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

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

LLVM IR (-O2):
define void @llz_psychomodel1_rom_init() {
%1 = tail call i32 (...) @psy_dbtable_init()
ret void
}
/* Variables and functions */
double *malloc(int);
int /*<<< orphan*/ my_task(double *, double *);
void zero_unregistered_pointers(void) {
  double *p, *q;
  p = malloc(12 * sizeof *p);
  q = malloc(23 * sizeof *q);
#pragma starpu register p 12
#pragma starpu register q 23
  my_task(p, q);
}


x86 assembly (clang, -O0):
<zero_unregistered_pointers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x60,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0xb8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <my_task@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_unregistered_pointers>:
push   %rbx
mov    $0x60,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0xb8,%edi
call   1040 <malloc@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <my_task@plt>

LLVM IR (-O0):
define void @zero_unregistered_pointers() {
%1 = alloca double*
%2 = alloca double*
%3 = call double* @malloc(i32 96)
store double* %3, double** %1
%4 = call double* @malloc(i32 184)
store double* %4, double** %2
%5 = load double*, double** %1
%6 = load double*, double** %2
%7 = call i32 @my_task(double* %5, double* %6)
ret void
}

LLVM IR (-O2):
define void @zero_unregistered_pointers() {
%1 = tail call double* @malloc(i32 96)
%2 = tail call double* @malloc(i32 184)
%3 = tail call i32 @my_task(double* %1, double* %2)
ret void
}