xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ getCurrentDir(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char dir[1024];
  getCurrentDir(dir);
  printf("Seu diretorio atual é:%s\n", dir);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <getCurrentDir@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Seu diretorio atual \C3\A9:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @getCurrentDir(i8* %3)
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Seu diretorio atual \C3\A9:%s\0A\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @getCurrentDir(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bannner(void) {
  printf("Spoon <-> Brain Converter\nWritten by S.Goodwin 1998\n\n");
  printf("Usage: spoon [/h /s /b /p /i /0 /1 /l] <source filename> "
         "[destination filename]\n\n");
}


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

x86 assembly (clang, -O2):
<bannner>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf11(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"Spoon <-> Brain Converter\0AWritten by S.Goodwin 1998\0A\0A\00"
@.str.1 = [82 x i8] c"Usage: spoon [/h /s /b /p /i /0 /1 /l] <source filename> [destination filename]\0A\0A\00"
define void @bannner() {
%1 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [53 x i8] c"Spoon <-> Brain Converter\0AWritten by S.Goodwin 1998\0A\00"
@str.2 = [81 x i8] c"Usage: spoon [/h /s /b /p /i /0 /1 /l] <source filename> [destination filename]\0A\00"
define void @bannner() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct diag {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ diag_clear(struct diag *);
void diag_destroy(struct diag *diag) { diag_clear(diag); }


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

x86 assembly (clang, -O2):
<diag_destroy>:
jmp    1030 <diag_clear@plt>

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

LLVM IR (-O2):
%struct.diag = type { i32 }
define void @diag_destroy(%struct.diag* %0) {
%2 = tail call i32 @diag_clear(%struct.diag* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ morse_decode(char const);
int /*<<< orphan*/ morse_ditdat_sound_blocking(int /*<<< orphan*/);
void morse_sound(const char *str) {
  while (*str != 0) {
    morse_ditdat_sound_blocking(morse_decode(*str));
    str++;
  }
}


x86 assembly (clang, -O0):
<morse_sound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1160 <morse_sound+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <morse_decode@plt>
mov    %eax,%edi
call   1030 <morse_ditdat_sound_blocking@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <morse_sound+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<morse_sound>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     114a <morse_sound+0x2a>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1040 <morse_decode@plt>
mov    %eax,%edi
call   1030 <morse_ditdat_sound_blocking@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <morse_sound+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @morse_sound(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @morse_decode(i8 signext %10)
%12 = call i32 @morse_ditdat_sound_blocking(i32 %11)
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @morse_sound(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = tail call i32 @morse_decode(i8 signext %5)
%8 = tail call i32 @morse_ditdat_sound_blocking(i32 %7)
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int get_stshdep_value();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int val;
  val = get_stshdep_value();
  if (val != 1) {
    printf("st1 value was %i instead of 1\n", val);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <get_stshdep_value@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     1165 <main+0x45>
mov    -0x14(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <main+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <get_stshdep_value@plt>
cmp    $0x1,%eax
je     1142 <main+0x22>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"st1 value was %i instead of 1\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @get_stshdep_value()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %11)
store i32 -1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [31 x i8] c"st1 value was %i instead of 1\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @get_stshdep_value()
%4 = icmp eq i32 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %8
}
void pacemaker_to_heart_systolic_pace() {}


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

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

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

LLVM IR (-O2):
define void @pacemaker_to_heart_systolic_pace() {
ret void
}
void rte_smp_wmb(void) {}


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

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

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

LLVM IR (-O2):
define void @rte_smp_wmb() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trace_printk(char *, unsigned int, unsigned int);
void cpu_frequency(unsigned int frequency, unsigned int cpu_id) {
  trace_printk("state=%d cpu_id=%d\n", frequency, cpu_id);
}


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

x86 assembly (clang, -O2):
<cpu_frequency>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <trace_printk@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"state=%d cpu_id=%d\0A\00"
define void @cpu_frequency(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 @trace_printk(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"state=%d cpu_id=%d\0A\00"
define void @cpu_frequency(i32 %0, i32 %1) {
%3 = tail call i32 @trace_printk(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
void flush_workqueue(struct workqueue_struct *wq) { return; }


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

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

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

LLVM IR (-O2):
%struct.workqueue_struct = type opaque
define void @flush_workqueue(%struct.workqueue_struct* nocapture %0) {
ret void
}
int ordenado(int src[], int n) {
  int i, a = src[0];
  for (i = 1; i < n; i++) {
    if (src[i] < a) {
      return 0;
    }
    a = src[i];
  }
  return 1;
}


x86 assembly (clang, -O0):
<ordenado>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1163 <ordenado+0x63>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x1c(%rbp),%eax
jge    1147 <ordenado+0x47>
movl   $0x0,-0x4(%rbp)
jmp    116a <ordenado+0x6a>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111b <ordenado+0x1b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ordenado>:
mov    $0x1,%eax
cmp    $0x2,%esi
jl     1132 <ordenado+0x32>
mov    (%rdi),%edx
mov    %esi,%r8d
mov    $0x1,%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ecx
mov    (%rdi,%rsi,4),%edx
cmp    %ecx,%edx
jl     1133 <ordenado+0x33>
add    $0x1,%rsi
cmp    %rsi,%r8
jne    1120 <ordenado+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ordenado(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = load i32, i32* %0
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %15, %6
br i1 %8, label %16, label %9
9: ; preds = %4, %7
%10 = phi i64 [ 1, %4 ], [ %15, %7 ]
%11 = phi i32 [ %5, %4 ], [ %13, %7 ]
%12 = getelementptr inbounds i32, i32* %0, i64 %10
%13 = load i32, i32* %12
%14 = icmp slt i32 %13, %11
%15 = add nuw nsw i64 %10, 1
br i1 %14, label %16, label %7
16: ; preds = %9, %7, %2
%17 = phi i32 [ 1, %2 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_get_property_reply_t;
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ xcb_ewmh_get_cardinal_from_reply(int /*<<< orphan*/ *,
                                                    int /*<<< orphan*/ *);
uint8_t xcb_ewmh_get_wm_handled_icons_from_reply(uint32_t *handled_icons,
                                                 xcb_get_property_reply_t *r) {
  return xcb_ewmh_get_cardinal_from_reply(handled_icons, r);
}


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

x86 assembly (clang, -O2):
<xcb_ewmh_get_wm_handled_icons_from_reply>:
jmp    1030 <xcb_ewmh_get_cardinal_from_reply@plt>

LLVM IR (-O0):
define i32 @xcb_ewmh_get_wm_handled_icons_from_reply(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 @xcb_ewmh_get_cardinal_from_reply(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @xcb_ewmh_get_wm_handled_icons_from_reply(i32* %0, i32* %1) {
%3 = tail call i32 @xcb_ewmh_get_cardinal_from_reply(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int yas_bma250_read_reg(unsigned char, unsigned char *, int);
int yas_bma250_read_reg_byte(unsigned char adr) {
  unsigned char buf = 0xff;
  int err;
  err = yas_bma250_read_reg(adr, &buf, 1);
  if (err == 0)
    return buf;
  return 0;
}


x86 assembly (clang, -O0):
<yas_bma250_read_reg_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movb   $0xff,-0x6(%rbp)
lea    -0x6(%rbp),%rsi
mov    $0x1,%edx
movzbl -0x5(%rbp),%edi
call   1030 <yas_bma250_read_reg@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114d <yas_bma250_read_reg_byte+0x3d>
movzbl -0x6(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <yas_bma250_read_reg_byte+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_bma250_read_reg_byte>:
push   %rax
movb   $0xff,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <yas_bma250_read_reg@plt>
xor    %ecx,%ecx
test   %eax,%eax
movzbl 0x7(%rsp),%eax
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_bma250_read_reg_byte(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
store i8 %0, i8* %3
store i8 -1, i8* %4
%6 = load i8, i8* %3
%7 = call i32 @yas_bma250_read_reg(i8 zeroext %6, i8* %4, i32 1)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @yas_bma250_read_reg_byte(i8 zeroext %0) {
%2 = alloca i8
store i8 -1, i8* %2
%3 = call i32 @yas_bma250_read_reg(i8 zeroext %0, i8* %2, i32 1)
%4 = icmp eq i32 %3, 0
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = select i1 %4, i32 %6, i32 0
ret i32 %7
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int file_size(const char *filename) {
  struct stat file_stat;
  int err = stat(filename, &file_stat);
  return err == 0 ? file_stat.st_size : -1;
}


x86 assembly (clang, -O0):
<file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1141 <file_size+0x31>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114e <file_size+0x3e>
mov    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    114e <file_size+0x3e>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
neg    %eax
sbb    %eax,%eax
or     (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_size(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%11 = load i32, i32* %10
br label %13
12: ; preds = %1
br label %13
13: ; preds = %12, %9
%14 = phi i32 [ %11, %9 ], [ -1, %12 ]
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_size(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %7, i32 -1
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ *initscr();
int /*<<< orphan*/ nodelay(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void screen_init(WINDOW **screen) {
  (*screen) = initscr();
  noecho();
  cbreak();
  nodelay((*screen), TRUE);
  refresh();
  wrefresh((*screen));
}


x86 assembly (clang, -O0):
<screen_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <initscr@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1080 <noecho@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    0x2e4f(%rip),%rax
mov    (%rax),%esi
call   1060 <nodelay@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <wrefresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_init>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <initscr@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
call   1080 <noecho@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
mov    (%rbx),%rdi
mov    0x2e62(%rip),%rax
mov    (%rax),%esi
call   1060 <nodelay@plt>
xor    %eax,%eax
call   1070 <refresh@plt>
mov    (%rbx),%rdi
pop    %rbx
jmp    1040 <wrefresh@plt>

LLVM IR (-O0):
@TRUE = global i32 0
define void @screen_init(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = call i32* (...) @initscr()
%4 = load i32**, i32*** %2
store i32* %3, i32** %4
%5 = call i32 (...) @noecho()
%6 = call i32 (...) @cbreak()
%7 = load i32**, i32*** %2
%8 = load i32*, i32** %7
%9 = load i32, i32* @TRUE
%10 = call i32 @nodelay(i32* %8, i32 %9)
%11 = call i32 (...) @refresh()
%12 = load i32**, i32*** %2
%13 = load i32*, i32** %12
%14 = call i32 @wrefresh(i32* %13)
ret void
}

LLVM IR (-O2):
@TRUE = global i32 0
define void @screen_init(i32** nocapture %0) {
%2 = tail call i32* (...) @initscr()
store i32* %2, i32** %0
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @cbreak()
%5 = load i32*, i32** %0
%6 = load i32, i32* @TRUE
%7 = tail call i32 @nodelay(i32* %5, i32 %6)
%8 = tail call i32 (...) @refresh()
%9 = load i32*, i32** %0
%10 = tail call i32 @wrefresh(i32* %9)
ret void
}
int clip_to(int x, int low, int high) {
  if (x < low)
    return low;
  else if (x > high)
    return high;
  else
    return x;
}


x86 assembly (clang, -O0):
<clip_to>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <clip_to+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <clip_to+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <clip_to+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <clip_to+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @clip_to(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
int fun1157() { return 1157; }


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

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

LLVM IR (-O0):
define i32 @fun1157() {
ret i32 1157
}

LLVM IR (-O2):
define i32 @fun1157() {
ret i32 1157
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup2(const char *s) {
  if (!s)
    return NULL;
  char *n = malloc(strlen(s) + 1);
  if (n) {
    strcpy(n, s);
  }
  return n;
}


x86 assembly (clang, -O0):
<strdup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <strdup2+0x24>
movq   $0x0,-0x8(%rbp)
jmp    118d <strdup2+0x5d>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1185 <strdup2+0x55>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup2>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115f <strdup2+0x2f>
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115f <strdup2+0x2f>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1161 <strdup2+0x31>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup2(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %21
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %19
15: ; preds = %8
%16 = load i8*, i8** %4
%17 = load i8*, i8** %3
%18 = call i32 @strcpy(i8* %16, i8* %17)
br label %19
19: ; preds = %15, %8
%20 = load i8*, i8** %4
store i8* %20, i8** %2
br label %21
21: ; preds = %19, %7
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define i8* @strdup2(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @malloc(i64 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %10
10: ; preds = %3, %8, %1
%11 = phi i8* [ null, %1 ], [ %6, %8 ], [ null, %3 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
long next_hexagonal_num();
void next_hexagonal_num_test(void) {
  long num = 0;
  for (size_t i = 0; i < 10; i++)
    num = next_hexagonal_num();
  assert(num == 190);
}


x86 assembly (clang, -O0):
<next_hexagonal_num_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0xa,-0x10(%rbp)
jae    115f <next_hexagonal_num_test+0x3f>
mov    $0x0,%al
call   1030 <next_hexagonal_num@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1138 <next_hexagonal_num_test+0x18>
cmpq   $0xbe,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_hexagonal_num_test>:
push   %rax
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %eax,%eax
call   1030 <next_hexagonal_num@plt>
xor    %edi,%edi
cmp    $0xbe,%rax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @next_hexagonal_num_test() {
%1 = alloca i64
%2 = alloca i64
store i64 0, i64* %1
store i64 0, i64* %2
br label %3
3: ; preds = %8, %0
%4 = load i64, i64* %2
%5 = icmp ult i64 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i64 (...) @next_hexagonal_num()
store i64 %7, i64* %1
br label %8
8: ; preds = %6
%9 = load i64, i64* %2
%10 = add i64 %9, 1
store i64 %10, i64* %2
br label %3
11: ; preds = %3
%12 = load i64, i64* %1
%13 = icmp eq i64 %12, 190
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
define void @next_hexagonal_num_test() {
%1 = tail call i64 (...) @next_hexagonal_num()
%2 = tail call i64 (...) @next_hexagonal_num()
%3 = tail call i64 (...) @next_hexagonal_num()
%4 = tail call i64 (...) @next_hexagonal_num()
%5 = tail call i64 (...) @next_hexagonal_num()
%6 = tail call i64 (...) @next_hexagonal_num()
%7 = tail call i64 (...) @next_hexagonal_num()
%8 = tail call i64 (...) @next_hexagonal_num()
%9 = tail call i64 (...) @next_hexagonal_num()
%10 = tail call i64 (...) @next_hexagonal_num()
%11 = icmp eq i64 %10, 190
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void debug_arr(unsigned char data[], int length) {
  int i;
  for (i = 0; i < length; i++) {
    printf("%02x ", data[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<debug_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <debug_arr+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <debug_arr+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_arr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1158 <debug_arr+0x38>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <debug_arr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%02x \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @debug_arr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02x \00"
define void @debug_arr(i8* 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 %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @putchar(i32 10)
ret void
}
int add(int quant1, int quant2) { return (quant1 + quant2); }


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void roadmap_download_format_size(char *image, int value) {
  if (value > (10 * 1024 * 1024)) {
    sprintf(image, "%dMB", value / (1024 * 1024));
  } else {
    sprintf(image, "%dKB", value / 1024);
  }
}


x86 assembly (clang, -O0):
<roadmap_download_format_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xa00000,-0xc(%rbp)
jle    114e <roadmap_download_format_size+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    $0x100000,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xebc(%rip),%rsi
call   1030 <sprintf@plt>
jmp    116b <roadmap_download_format_size+0x5b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xe9f(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_download_format_size>:
mov    %esi,%eax
cmp    $0xa00001,%esi
jl     112b <roadmap_download_format_size+0x1b>
shr    $0x14,%eax
lea    0xedc(%rip),%rsi
mov    %eax,%edx
jmp    1030 <sprintf@plt>
lea    0x3ff(%rax),%edx
test   %eax,%eax
cmovns %eax,%edx
sar    $0xa,%edx
lea    0xec5(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%dMB\00"
@.str.1 = [5 x i8] c"%dKB\00"
define void @roadmap_download_format_size(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 = icmp sgt i32 %5, 10485760
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = sdiv i32 %9, 1048576
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %17
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sdiv i32 %14, 1024
%16 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %12, %7
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%dMB\00"
@.str.1 = [5 x i8] c"%dKB\00"
define void @roadmap_download_format_size(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 10485760
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = lshr i32 %1, 20
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %10
7: ; preds = %2
%8 = sdiv i32 %1, 1024
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ heap_shutdown();
void teardown() { heap_shutdown(); }


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

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

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

LLVM IR (-O2):
define void @teardown() {
%1 = tail call i32 (...) @heap_shutdown()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void yyerror(const char *s) { fprintf(stderr, "parse error!!!"); }


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"parse error!!!\00"
define void @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"parse error!!!\00"
define void @yyerror(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int yahoo_M1ObfuscatedTableCommon(int, int, unsigned char *);
int yahoo_f01_05(int Salt, int Parameter) {
  static unsigned char LUT[32] = {
      0x1F, 0x0B, 0x00, 0x1E, 0x03, 0x0E, 0x15, 0x01, 0x1A, 0x17, 0x1D,
      0x1B, 0x11, 0x0F, 0x0A, 0x12, 0x13, 0x18, 0x02, 0x04, 0x09, 0x06,
      0x0D, 0x07, 0x08, 0x05, 0x10, 0x19, 0x0C, 0x14, 0x16, 0x1C,
  };
  return yahoo_M1ObfuscatedTableCommon(Salt, Parameter, LUT);
}


x86 assembly (clang, -O0):
<yahoo_f01_05>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0x2f05(%rip),%rdx
call   1030 <yahoo_M1ObfuscatedTableCommon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_05>:
lea    0x2f19(%rip),%rdx
jmp    1030 <yahoo_M1ObfuscatedTableCommon@plt>

LLVM IR (-O0):
@yahoo_f01_05.LUT = internal global [32 x i8] c"\1F\0B\00\1E\03\0E\15\01\1A\17\1D\1B\11\0F\0A\12\13\18\02\04\09\06\0D\07\08\05\10\19\0C\14\16\1C"
define i32 @yahoo_f01_05(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 @yahoo_M1ObfuscatedTableCommon(i32 %5, i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_05.LUT, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@yahoo_f01_05.LUT = internal global [32 x i8] c"\1F\0B\00\1E\03\0E\15\01\1A\17\1D\1B\11\0F\0A\12\13\18\02\04\09\06\0D\07\08\05\10\19\0C\14\16\1C"
define i32 @yahoo_f01_05(i32 %0, i32 %1) {
%3 = tail call i32 @yahoo_M1ObfuscatedTableCommon(i32 %0, i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_05.LUT, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ WriteEeprom(int /*<<< orphan*/, unsigned long);
void WriteEepromWord(int WordAddress, unsigned long data) {
  int i;
  for (i = 0; i < 2; i++, data >>= 8)
    WriteEeprom(WordAddress++, data & 0xff);
}


x86 assembly (clang, -O0):
<WriteEepromWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1165 <WriteEepromWord+0x55>
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
and    $0xff,%rsi
call   1030 <WriteEeprom@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1126 <WriteEepromWord+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteEepromWord>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
lea    0x1(%rdi),%ebp
movzbl %bl,%esi
call   1030 <WriteEeprom@plt>
movzbl %bh,%esi
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <WriteEeprom@plt>

LLVM IR (-O0):
define void @WriteEepromWord(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
store i32 %0, i32* %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
%12 = load i64, i64* %4
%13 = and i64 %12, 255
%14 = call i32 @WriteEeprom(i32 %10, i64 %13)
br label %15
15: ; preds = %9
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
%18 = load i64, i64* %4
%19 = lshr i64 %18, 8
store i64 %19, i64* %4
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @WriteEepromWord(i32 %0, i64 %1) {
%3 = add nsw i32 %0, 1
%4 = and i64 %1, 255
%5 = tail call i32 @WriteEeprom(i32 %0, i64 %4)
%6 = lshr i64 %1, 8
%7 = and i64 %6, 255
%8 = tail call i32 @WriteEeprom(i32 %3, i64 %7)
ret void
}
void _Z9_Jv_equalP13_Jv_Utf8ConstPN4java4lang6StringEi(void) {}


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

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

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

LLVM IR (-O2):
define void @_Z9_Jv_equalP13_Jv_Utf8ConstPN4java4lang6StringEi() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void i2c_close(int device) { close(device); }


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

x86 assembly (clang, -O2):
<i2c_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @i2c_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
int UAX_Asm_RegIsByteP(int reg) {
  if (((reg & 0xF0) == 0x30) || ((reg >= 0xF4) && (reg <= 0xF7)))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<UAX_Asm_RegIsByteP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf0,%eax
cmp    $0x30,%eax
je     1132 <UAX_Asm_RegIsByteP+0x32>
cmpl   $0xf4,-0x8(%rbp)
jl     113e <UAX_Asm_RegIsByteP+0x3e>
cmpl   $0xf7,-0x8(%rbp)
jg     113e <UAX_Asm_RegIsByteP+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <UAX_Asm_RegIsByteP+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UAX_Asm_RegIsByteP>:
mov    %edi,%eax
and    $0xf0,%eax
cmp    $0x30,%eax
sete   %al
and    $0xfffffffc,%edi
cmp    $0xf4,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @UAX_Asm_RegIsByteP(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 240
%6 = icmp eq i32 %5, 48
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 244
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 247
br i1 %12, label %13, label %14
13: ; preds = %10, %1
store i32 1, i32* %2
br label %15
14: ; preds = %10, %7
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @UAX_Asm_RegIsByteP(i32 %0) {
%2 = and i32 %0, 240
%3 = icmp eq i32 %2, 48
%4 = and i32 %0, -4
%5 = icmp eq i32 %4, 244
%6 = or i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(
    *dyn_create_function)(const char *file, int line)) {
  return;
}


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

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

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

LLVM IR (-O2):
%struct.CRYPTO_dynlock_value = type opaque
define void @CRYPTO_set_dynlock_create_callback(%struct.CRYPTO_dynlock_value* (i8*, i32)* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_free(int);
int /*<<< orphan*/ gpio_set_value(int, int /*<<< orphan*/);
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ printk(char *);
void off_hw_setting(void) {
  gpio_set_value(51, 0);
  printk("(touch)set GPIO_TOUCH_POWER High.\n");
  msleep(10);
  gpio_free(11);
  msleep(100);
}


x86 assembly (clang, -O0):
<off_hw_setting>:
push   %rbp
mov    %rsp,%rbp
mov    $0x33,%edi
xor    %esi,%esi
call   1060 <gpio_set_value@plt>
lea    0xea9(%rip),%rdi
call   1030 <printk@plt>
mov    $0xa,%edi
call   1050 <msleep@plt>
mov    $0xb,%edi
call   1040 <gpio_free@plt>
mov    $0x64,%edi
call   1050 <msleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<off_hw_setting>:
push   %rax
mov    $0x33,%edi
xor    %esi,%esi
call   1060 <gpio_set_value@plt>
lea    0xeac(%rip),%rdi
call   1030 <printk@plt>
mov    $0xa,%edi
call   1050 <msleep@plt>
mov    $0xb,%edi
call   1040 <gpio_free@plt>
mov    $0x64,%edi
pop    %rax
jmp    1050 <msleep@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"(touch)set GPIO_TOUCH_POWER High.\0A\00"
define void @off_hw_setting() {
%1 = call i32 @gpio_set_value(i32 51, i32 0)
%2 = call i32 @printk(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @msleep(i32 10)
%4 = call i32 @gpio_free(i32 11)
%5 = call i32 @msleep(i32 100)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"(touch)set GPIO_TOUCH_POWER High.\0A\00"
define void @off_hw_setting() {
%1 = tail call i32 @gpio_set_value(i32 51, i32 0)
%2 = tail call i32 @printk(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @msleep(i32 10)
%4 = tail call i32 @gpio_free(i32 11)
%5 = tail call i32 @msleep(i32 100)
ret void
}
/* Variables and functions */
float ceil(float);
float floor(float);
float fa_roundf(float x) { return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5); }


x86 assembly (clang, -O0):
<fa_roundf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1166 <fa_roundf+0x46>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <floor@plt>
movss  %xmm0,-0x8(%rbp)
jmp    1189 <fa_roundf+0x69>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe89(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <ceil@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fa_roundf>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1135 <fa_roundf+0x15>
addss  0xed4(%rip),%xmm0
jmp    1030 <floorf@plt>
addss  0xec3(%rip),%xmm0
jmp    1040 <ceilf@plt>

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

LLVM IR (-O2):
define float @fa_roundf(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = fadd float %0, 5.000000e-01
%5 = tail call float @llvm.floor.f32(float %4)
br label %9
6: ; preds = %1
%7 = fadd float %0, -5.000000e-01
%8 = tail call float @llvm.ceil.f32(float %7)
br label %9
9: ; preds = %6, %3
%10 = phi float [ %5, %3 ], [ %8, %6 ]
ret float %10
}
void boundaries_check(void) {}


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

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

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

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