xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ funCalAreaOfTriangle();
int main() {
  funCalAreaOfTriangle();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @funCalAreaOfTriangle()
ret i32 0
}
void dispatch_release(void *obj) {}


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

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

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

LLVM IR (-O2):
define void @dispatch_release(i8* nocapture %0) {
ret void
}
void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) {}


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

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

LLVM IR (-O0):
%struct.mutex = type opaque
%struct.mutex_waiter = type opaque
define void @debug_mutex_lock_common(%struct.mutex* %0, %struct.mutex_waiter* %1) {
%3 = alloca %struct.mutex*
%4 = alloca %struct.mutex_waiter*
store %struct.mutex* %0, %struct.mutex** %3
store %struct.mutex_waiter* %1, %struct.mutex_waiter** %4
ret void
}

LLVM IR (-O2):
%struct.mutex = type opaque
%struct.mutex_waiter = type opaque
define void @debug_mutex_lock_common(%struct.mutex* nocapture %0, %struct.mutex_waiter* nocapture %1) {
ret void
}
/* Variables and functions */
double fabs(float);
int fdirection(float r, float p) {
  if (fabs(r - p) < 0.0001)
    return 0;
  if (p < r)
    return 1;
  if (p > r)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<fdirection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xec4(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1152 <fdirection+0x42>
movl   $0x0,-0x4(%rbp)
jmp    1193 <fdirection+0x83>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1171 <fdirection+0x61>
movl   $0x1,-0x4(%rbp)
jmp    1193 <fdirection+0x83>
movss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    118c <fdirection+0x7c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1193 <fdirection+0x83>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdirection>:
push   %rax
movss  %xmm0,(%rsp)
movss  %xmm1,0x4(%rsp)
subss  %xmm1,%xmm0
call   1030 <fabs@plt>
xor    %eax,%eax
movsd  0xed1(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1157 <fdirection+0x47>
mov    $0x1,%eax
movss  (%rsp),%xmm0
ucomiss 0x4(%rsp),%xmm0
ja     1157 <fdirection+0x47>
xor    %eax,%eax
movss  0x4(%rsp),%xmm0
ucomiss (%rsp),%xmm0
seta   %al
neg    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fdirection(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fsub float %6, %7
%9 = call double @fabs(float %8)
%10 = fcmp olt double %9, 1.000000e-04
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %23
12: ; preds = %2
%13 = load float, float* %5
%14 = load float, float* %4
%15 = fcmp olt float %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %3
br label %23
17: ; preds = %12
%18 = load float, float* %5
%19 = load float, float* %4
%20 = fcmp ogt float %18, %19
br i1 %20, label %21, label %22
21: ; preds = %17
store i32 -1, i32* %3
br label %23
22: ; preds = %17
store i32 0, i32* %3
br label %23
23: ; preds = %22, %21, %16, %11
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @fdirection(float %0, float %1) {
%3 = fsub float %0, %1
%4 = tail call double @fabs(float %3)
%5 = fcmp olt double %4, 1.000000e-04
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = fcmp olt float %1, %0
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = fcmp ogt float %1, %0
%10 = sext i1 %9 to i32
br label %11
11: ; preds = %8, %6, %2
%12 = phi i32 [ 0, %2 ], [ 1, %6 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
float ikitwin_fps();
float iscreen_fps(void) { return ikitwin_fps(); }


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

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

LLVM IR (-O0):
define float @iscreen_fps() {
%1 = call float (...) @ikitwin_fps()
ret float %1
}

LLVM IR (-O2):
define float @iscreen_fps() {
%1 = tail call float (...) @ikitwin_fps()
ret float %1
}
/* Variables and functions */
int /*<<< orphan*/ sync();
int fdatasync(int fd) { sync(); }


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

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

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

LLVM IR (-O2):
define i32 @fdatasync(i32 %0) {
%2 = tail call i32 (...) @sync()
ret i32 undef
}
/* Type definitions */
typedef int pthread_t;

/* Variables and functions */
pthread_t pthread_self() { return 1; }


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

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

LLVM IR (-O0):
define i32 @pthread_self() {
ret i32 1
}

LLVM IR (-O2):
define i32 @pthread_self() {
ret i32 1
}
/* Variables and functions */
int syscall3(int, int, int);
int ftruncate(int fd, int length) { return syscall3(93, fd, length); }


x86 assembly (clang, -O0):
<ftruncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x5d,%edi
call   1030 <syscall3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftruncate>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x5d,%edi
jmp    1030 <syscall3@plt>

LLVM IR (-O0):
define i32 @ftruncate(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 = call i32 @syscall3(i32 93, i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ftruncate(i32 %0, i32 %1) {
%3 = tail call i32 @syscall3(i32 93, i32 %0, i32 %1)
ret i32 %3
}
signed char convert_unsigned_int_to_signed_char(unsigned int x) { return x; }


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

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

LLVM IR (-O0):
define signext i8 @convert_unsigned_int_to_signed_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @convert_unsigned_int_to_signed_char(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
float celsius_to_celsius(float temperature) { return temperature; }


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

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

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

LLVM IR (-O2):
define float @celsius_to_celsius(float returned %0) {
ret float %0
}
unsigned xrop3_244_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S & stk3;
  stk1 = T | stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_244_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_244_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %7
%44 = and i32 %42, %43
%45 = or i32 %41, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_244_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
double XrtConvertGtoDfloat(double gfloat) { return gfloat; }


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

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

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

LLVM IR (-O2):
define double @XrtConvertGtoDfloat(double returned %0) {
ret double %0
}
/* Variables and functions */
double GetReal();
int /*<<< orphan*/ printf(char *, ...);
main() {
  double inch, cm;
  printf("This program converts inches to centimeters.\n");
  printf("Length in inches? ");
  inch = GetReal();
  cm = inch * 2.54;
  printf("%g in = %g cm\n", inch, cm);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <GetReal@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  0xea8(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xed6(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef2(%rip),%rdi
call   1040 <puts@plt>
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <GetReal@plt>
movsd  0xea6(%rip),%xmm1
mulsd  %xmm0,%xmm1
lea    0xeb6(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"This program converts inches to centimeters.\0A\00"
@.str.1 = [19 x i8] c"Length in inches? \00"
@.str.2 = [15 x i8] c"%g in = %g cm\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%5 = call double (...) @GetReal()
store double %5, double* %1
%6 = load double, double* %1
%7 = fmul double %6, 2.540000e+00
store double %7, double* %2
%8 = load double, double* %1
%9 = load double, double* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"Length in inches? \00"
@.str.2 = [15 x i8] c"%g in = %g cm\0A\00"
@str = [45 x i8] c"This program converts inches to centimeters.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call double (...) @GetReal()
%4 = fmul double %3, 2.540000e+00
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %3, double %4)
ret i32 0
}
/* Variables and functions */
int caf_unit_delete(void *);
int caf_unit_delete_callback(void *r) { return caf_unit_delete(r); }


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

x86 assembly (clang, -O2):
<caf_unit_delete_callback>:
jmp    1030 <caf_unit_delete@plt>

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

LLVM IR (-O2):
define i32 @caf_unit_delete_callback(i8* %0) {
%2 = tail call i32 @caf_unit_delete(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ rules_set(char *);
void rules_set_conway() { rules_set("23/3"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"23/3\00"
define void @rules_set_conway() {
%1 = call i32 @rules_set(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"23/3\00"
define void @rules_set_conway() {
%1 = tail call i32 @rules_set(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void __attribute__((weak)) tim1_trg_com_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<tim1_trg_com_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tim1_trg_com_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.tim1_trg_com_isr = [17 x i8] c"tim1_trg_com_isr\00"
define weak void @tim1_trg_com_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.tim1_trg_com_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.tim1_trg_com_isr = [17 x i8] c"tim1_trg_com_isr\00"
define weak void @tim1_trg_com_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.tim1_trg_com_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int jutf8_strlen(unsigned short, unsigned char *);
char *jutf8_strncpy(char *, unsigned short, unsigned char *, int);
char *jutf8_strcpy(char *dest, unsigned short length, unsigned char *source) {
  int cslen, size, ridx = 0;
  cslen = jutf8_strlen(length, source);
  return jutf8_strncpy(dest, length, source, cslen);
}


x86 assembly (clang, -O0):
<jutf8_strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0xa(%rbp),%ax
mov    -0x18(%rbp),%rsi
movzwl %ax,%edi
call   1030 <jutf8_strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%ax
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
movzwl %ax,%esi
call   1040 <jutf8_strncpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jutf8_strcpy>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
mov    %rdx,%rsi
call   1030 <jutf8_strlen@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <jutf8_strncpy@plt>

LLVM IR (-O0):
define i8* @jutf8_strcpy(i8* %0, i16 zeroext %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %4
store i16 %1, i16* %5
store i8* %2, i8** %6
store i32 0, i32* %9
%10 = load i16, i16* %5
%11 = load i8*, i8** %6
%12 = call i32 @jutf8_strlen(i16 zeroext %10, i8* %11)
store i32 %12, i32* %7
%13 = load i8*, i8** %4
%14 = load i16, i16* %5
%15 = load i8*, i8** %6
%16 = load i32, i32* %7
%17 = call i8* @jutf8_strncpy(i8* %13, i16 zeroext %14, i8* %15, i32 %16)
ret i8* %17
}

LLVM IR (-O2):
define i8* @jutf8_strcpy(i8* %0, i16 zeroext %1, i8* %2) {
%4 = tail call i32 @jutf8_strlen(i16 zeroext %1, i8* %2)
%5 = tail call i8* @jutf8_strncpy(i8* %0, i16 zeroext %1, i8* %2, i32 %4)
ret i8* %5
}
void *test_anti_range_113(long n) {
  extern void *alloc_anti_range_113(long) __attribute__((alloc_size(1)));
  if ((-0x7fffffffffffffffL - 1) + 2 <= n && n <= -1)
    n = (-0x7fffffffffffffffL - 1) + 2 - 1;
  return alloc_anti_range_113(n);
}


x86 assembly (clang, -O0):
<test_anti_range_113>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0x8000000000000002,%rax
cmp    -0x8(%rbp),%rax
jg     1149 <test_anti_range_113+0x39>
cmpq   $0xffffffffffffffff,-0x8(%rbp)
jg     1149 <test_anti_range_113+0x39>
movabs $0x8000000000000001,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_113@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_113>:
movabs $0x8000000000000001,%rax
cmp    %rax,%rdi
cmovae %rax,%rdi
jmp    1030 <alloc_anti_range_113@plt>

LLVM IR (-O0):
define i8* @test_anti_range_113(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sle i64 -9223372036854775806, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 -9223372036854775807, i64* %2
br label %9
9: ; preds = %8, %5, %1
%10 = load i64, i64* %2
%11 = call i8* @alloc_anti_range_113(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_anti_range_113(i64 %0) {
%2 = icmp ult i64 %0, -9223372036854775807
%3 = select i1 %2, i64 %0, i64 -9223372036854775807
%4 = tail call i8* @alloc_anti_range_113(i64 %3)
ret i8* %4
}
int test_imm_9Cint32_mem(int *val) {
  return ((*val) & (0x9C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_9Cint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 156
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XFocusChangeEvent;

/* Variables and functions */
void *get_XFocusChangeEvent_display(void *_p) {
  return (void *)((XFocusChangeEvent *)_p)->display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XFocusChangeEvent_display(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
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XFocusChangeEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
struct _arrow_mem {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct _arrow_mem *);
scalar_t__ malloc(int);
struct _arrow_mem *_arrow_alloc() {
  struct _arrow_mem *_alloc;
  _alloc = (struct _arrow_mem *)malloc(sizeof(struct _arrow_mem *));
  assert(_alloc);
  return _alloc;
}


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

x86 assembly (clang, -O2):
<_arrow_alloc>:
push   %rbx
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct._arrow_mem = type { i32 }
define %struct._arrow_mem* @_arrow_alloc() {
%1 = alloca %struct._arrow_mem*
%2 = call i64 @malloc(i32 8)
%3 = inttoptr i64 %2 to %struct._arrow_mem*
store %struct._arrow_mem* %3, %struct._arrow_mem** %1
%4 = load %struct._arrow_mem*, %struct._arrow_mem** %1
%5 = call i32 @assert(%struct._arrow_mem* %4)
%6 = load %struct._arrow_mem*, %struct._arrow_mem** %1
ret %struct._arrow_mem* %6
}

LLVM IR (-O2):
%struct._arrow_mem = type { i32 }
define %struct._arrow_mem* @_arrow_alloc() {
%1 = tail call i64 @malloc(i32 8)
%2 = inttoptr i64 %1 to %struct._arrow_mem*
%3 = tail call i32 @assert(%struct._arrow_mem* %2)
ret %struct._arrow_mem* %2
}
int is_anyone_alive(int *x, int length) {
  int j = 0;
  while (j < length) {
    if (*(x + j) != 0)
      return 1;
    j++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_anyone_alive>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114a <is_anyone_alive+0x4a>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     113c <is_anyone_alive+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1151 <is_anyone_alive+0x51>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <is_anyone_alive+0x12>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_anyone_alive>:
test   %esi,%esi
jle    111f <is_anyone_alive+0x1f>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,(%rdi,%rcx,4)
jne    1122 <is_anyone_alive+0x22>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <is_anyone_alive+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_anyone_alive(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %6, label %14
14: ; preds = %8, %6, %2
%15 = phi i32 [ 0, %2 ], [ 0, %6 ], [ 1, %8 ]
ret i32 %15
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
main() {
  int c, lastc;
  lastc = 'a';
  while ((c = getchar()) != EOF) {
    putchar(c);
    lastc = c;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x61,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1162 <main+0x42>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 97, i32* %3
br label %4
4: ; preds = %8, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i32, i32* %2
%10 = call i32 @putchar(i32 %9)
%11 = load i32, i32* %2
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret i32 0
}
void ptrace_sandbox_permit_mmap(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_mmap(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
void ra_argv_free(char **argv) { free(argv); }


x86 assembly (clang, -O0):
<ra_argv_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):
<ra_argv_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ra_argv_free(i8** nocapture %0) {
%2 = tail call i32 @free(i8** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() { fprintf(stderr, "Usage:\n\tstat filepaths...\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Usage:\0A\09stat filepaths...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Usage:\0A\09stat filepaths...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
void free_double_matrix(double **m, long nrl, long ncl) {
  free((m[nrl] + ncl - 1));
  free((m + nrl - 1));
}


x86 assembly (clang, -O0):
<free_double_matrix>:
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),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x18(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_double_matrix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi,%rsi,8),%rax
lea    (%rax,%rdx,8),%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
lea    (%rbx,%r14,8),%rdi
add    $0xfffffffffffffff8,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_double_matrix(double** nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds double*, double** %0, i64 %1
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 %2
%7 = getelementptr inbounds double, double* %6, i64 -1
%8 = bitcast double* %7 to i8*
tail call void @free(i8* %8)
%9 = getelementptr inbounds double*, double** %4, i64 -1
%10 = bitcast double** %9 to i8*
tail call void @free(i8* %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_iochannel_socket_set_sndbuf() {
  printf("NOT IMPLEMENTED:"
         "pa_iochannel_socket_set_sndbuf"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"NOT IMPLEMENTED:pa_iochannel_socket_set_sndbuf\0A\00"
define i32 @pa_iochannel_socket_set_sndbuf() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [47 x i8] c"NOT IMPLEMENTED:pa_iochannel_socket_set_sndbuf\00"
define i32 @pa_iochannel_socket_set_sndbuf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int is_gzipped(char *name) {
  int len = strlen(name);
  return len >= 4 && strcmp(&name[len - 3], ".gz") == 0;
}


x86 assembly (clang, -O0):
<is_gzipped>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x4,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jl     116c <is_gzipped+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
cltq
add    %rax,%rdi
lea    0xea3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_gzipped>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x4,%ecx
jl     1152 <is_gzipped+0x32>
add    $0xfffffffd,%ecx
add    %rcx,%rbx
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c".gz\00"
define i32 @is_gzipped(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 4
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br label %16
16: ; preds = %8, %1
%17 = phi i1 [ false, %1 ], [ %15, %8 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@.str = [4 x i8] c".gz\00"
define i32 @is_gzipped(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 3
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = add nsw i32 %2, -3
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = tail call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %12
}
unsigned char trans(unsigned char mem39212, unsigned char mem39213) {
  return (mem39212 * mem39213) >> 7;
}


x86 assembly (clang, -O0):
<trans>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
imul   %ecx,%eax
sar    $0x7,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trans>:
mov    %edi,%eax
imul   %esi,%eax
shr    $0x7,%eax
ret

LLVM IR (-O0):
define zeroext i8 @trans(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = mul nsw i32 %6, %8
%10 = ashr i32 %9, 7
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @trans(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i16
%4 = zext i8 %1 to i16
%5 = mul nuw i16 %4, %3
%6 = lshr i16 %5, 7
%7 = trunc i16 %6 to i8
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ dalibc_helix_deinitialize();
int /*<<< orphan*/ dalibc_helix_initialize();
int main(int, char **, char **);
int dalibc_helix_enter_program(int argc, char *argv[], char *envp[]) {
  int ret;
  dalibc_helix_initialize();
  ret = main(argc, argv, envp);
  dalibc_helix_deinitialize();
  return ret;
}


x86 assembly (clang, -O0):
<dalibc_helix_enter_program>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <dalibc_helix_initialize@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <main@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1050 <dalibc_helix_deinitialize@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dalibc_helix_enter_program>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <dalibc_helix_initialize@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <main@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dalibc_helix_deinitialize@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @dalibc_helix_enter_program(i32 %0, i8** %1, i8** %2) {
%4 = tail call i32 (...) @dalibc_helix_initialize()
%5 = tail call i32 @main(i32 %0, i8** %1, i8** %2)
%6 = tail call i32 (...) @dalibc_helix_deinitialize()
ret i32 %5
}
/* Variables and functions */
unsigned int strtoul(char *, char **, int);
int readbyte(char **ptr) {
  char *tmp;
  unsigned val = strtoul(*ptr, &tmp, 10);
  if (tmp == *ptr || val > 255) {
    return -1;
  }
  *ptr = tmp;
  return val;
}


x86 assembly (clang, -O0):
<readbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
je     1152 <readbyte+0x42>
cmpl   $0xff,-0x1c(%rbp)
jbe    115e <readbyte+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <readbyte+0x5f>
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readbyte>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rdi
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    0x8(%rsp),%rdx
mov    $0xffffffff,%ecx
cmp    (%rbx),%rdx
je     1145 <readbyte+0x35>
cmp    $0xff,%eax
ja     1145 <readbyte+0x35>
mov    %rdx,(%rbx)
mov    %eax,%ecx
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @readbyte(i8** nocapture %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = load i8*, i8** %0
%5 = call i32 @strtoul(i8* %4, i8** %2, i32 10)
%6 = load i8*, i8** %2
%7 = load i8*, i8** %0
%8 = icmp eq i8* %6, %7
%9 = icmp ugt i32 %5, 255
%10 = select i1 %8, i1 true, i1 %9
br i1 %10, label %12, label %11
11: ; preds = %1
store i8* %6, i8** %0
br label %12
12: ; preds = %1, %11
%13 = phi i32 [ %5, %11 ], [ -1, %1 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ max_element(int *, int);
void main() {
  int i[] = {2, 4, 1, 6, 4, 7};
  int *arr = i;
  max_element(arr, sizeof(i) / 4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x6,%esi
call   1030 <max_element@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
call   1030 <max_element@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.i = [6 x i32] [i32 2, i32 4, i32 1, i32 6, i32 4, i32 7]
define void @main() {
%1 = alloca [6 x i32]
%2 = alloca i32*
%3 = bitcast [6 x i32]* %1 to i8*
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @max_element(i32* %5, i32 6)
ret void
}

LLVM IR (-O2):
@__const.main.i = [6 x i32] [i32 2, i32 4, i32 1, i32 6, i32 4, i32 7]
define void @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @max_element(i32* %3, i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void uxmi_cfg() { printf("\nConfig\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"\0AConfig\0A\00"
define void @uxmi_cfg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"\0AConfig\00"
define void @uxmi_cfg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwaddstr(int /*<<< orphan*/ *, int, int, char *);
void midtop(WINDOW *win) {
  mvwaddstr(win, 0, 2, "yy");
  mvwaddstr(win, 1, 2, "0(=)~");
}


x86 assembly (clang, -O0):
<midtop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
lea    0xed2(%rip),%rcx
call   1030 <mvwaddstr@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
lea    0xebb(%rip),%rcx
call   1030 <mvwaddstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<midtop>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rcx
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <mvwaddstr@plt>
lea    0xed5(%rip),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
pop    %rbx
jmp    1030 <mvwaddstr@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"yy\00"
@.str.1 = [6 x i8] c"0(=)~\00"
define void @midtop(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @mvwaddstr(i32* %3, i32 0, i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @mvwaddstr(i32* %5, i32 1, i32 2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"yy\00"
@.str.1 = [6 x i8] c"0(=)~\00"
define void @midtop(i32* %0) {
%2 = tail call i32 @mvwaddstr(i32* %0, i32 0, i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @mvwaddstr(i32* %0, i32 1, i32 2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("Under construction!");
  puts("Pardon our mess!");
  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)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"Under construction!\00"
@.str.1 = [17 x i8] c"Pardon our mess!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Under construction!\00"
@.str.1 = [17 x i8] c"Pardon our mess!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct value {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ collect(struct value *);
int get_int(struct value *);
struct value *pop();
int pop_int() {
  struct value *v = pop();
  int i = get_int(v);
  collect(v);
  return i;
}


x86 assembly (clang, -O0):
<pop_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <pop@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <get_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <collect@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop_int>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <pop@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <get_int@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <collect@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.value = type { i32 }
define i32 @pop_int() {
%1 = alloca %struct.value*
%2 = alloca i32
%3 = call %struct.value* (...) @pop()
store %struct.value* %3, %struct.value** %1
%4 = load %struct.value*, %struct.value** %1
%5 = call i32 @get_int(%struct.value* %4)
store i32 %5, i32* %2
%6 = load %struct.value*, %struct.value** %1
%7 = call i32 @collect(%struct.value* %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
%struct.value = type { i32 }
define i32 @pop_int() {
%1 = tail call %struct.value* (...) @pop()
%2 = tail call i32 @get_int(%struct.value* %1)
%3 = tail call i32 @collect(%struct.value* %1)
ret i32 %2
}
int msm_hsusb_disable_pmic_ulpidata0(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm_hsusb_disable_pmic_ulpidata0() {
ret i32 0
}