xunge/DecIR huggingface dataset:
int abs(int i) { return (i < 0) ? -i : i; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ tmp;

/* Variables and functions */
int /*<<< orphan*/ Term_addstr(int, int, char *);
int /*<<< orphan*/ ascii_to_text(char *, int, char *);
int /*<<< orphan*/ flush();
char inkey();
void do_cmd_macro_aux_keymap(char *buf) {
  char tmp[1024];
  flush();
  buf[0] = inkey();
  buf[1] = '\0';
  ascii_to_text(tmp, sizeof(tmp), buf);
  Term_addstr(-1, 1, tmp);
  flush();
}


x86 assembly (clang, -O0):
<do_cmd_macro_aux_keymap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <flush@plt>
mov    $0x0,%al
call   1060 <inkey@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x400,%esi
call   1040 <ascii_to_text@plt>
lea    -0x410(%rbp),%rdx
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1050 <Term_addstr@plt>
mov    $0x0,%al
call   1030 <flush@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_cmd_macro_aux_keymap>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <flush@plt>
xor    %eax,%eax
call   1060 <inkey@plt>
mov    %al,(%rbx)
movb   $0x0,0x1(%rbx)
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1040 <ascii_to_text@plt>
mov    $0xffffffff,%edi
mov    $0x1,%esi
mov    %r14,%rdx
call   1050 <Term_addstr@plt>
xor    %eax,%eax
call   1030 <flush@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @do_cmd_macro_aux_keymap(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = call i32 (...) @flush()
%5 = call signext i8 (...) @inkey()
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
store i8 %5, i8* %7
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 0, i8* %9
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%11 = load i8*, i8** %2
%12 = call i32 @ascii_to_text(i8* %10, i32 1024, i8* %11)
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%14 = call i32 @Term_addstr(i32 -1, i32 1, i8* %13)
%15 = call i32 (...) @flush()
ret void
}

LLVM IR (-O2):
define void @do_cmd_macro_aux_keymap(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = tail call i32 (...) @flush()
%5 = tail call signext i8 (...) @inkey()
store i8 %5, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %6
%7 = call i32 @ascii_to_text(i8* %3, i32 1024, i8* %0)
%8 = call i32 @Term_addstr(i32 -1, i32 1, i8* %3)
%9 = call i32 (...) @flush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ update_status(char *);
int main(void) {
  char *message =
      "poazertoauiapozuiauezfhaeiuvenvoenvoenzovfnezaofnaeoigjnzepig "
      "iezhvncuephnriuchnazoiecoah$"
      "jnzefijcazoenficjazeorfiocjoapezriacpjozijcpoazijcpoaizjrecpoinazjrfazoi"
      "ecjnaozirghearncupanzocfnorauhfnoacuhnfĉaozuhfncoazuehfncoauzehfnxoauzhe"
      "fnaoizufehnazoufhnaozufhnaozufhnaozufhnaôzuehfoâzuefhnoaczufhnoazuefhnco"
      "azufhnuozrhfvubhbarhabzhfobaoẑfazoeufhbzaoiuhazbfuoihabzôieufhazoiufĥbcû"
      "zbhvcruozhtâourhnôzehcnoazuehrfoaczuehnxzao";
  update_status(message);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [432 x i8] c"poazertoauiapozuiauezfhaeiuvenvoenvoenzovfnezaofnaeoigjnzepig iezhvncuephnriuchnazoiecoah$jnzefijcazoenficjazeorfiocjoapezriacpjozijcpoazijcpoaizjrecpoinazjrfazoiecjnaozirghearncupanzocfnorauhfnoacuhnf\C4\89aozuhfncoazuehfncoauzehfnxoauzhefnaoizufehnazoufhnaozufhnaozufhnaozufhna\C3\B4zuehfo\C3\A2zuefhnoaczufhnoazuefhncoazufhnuozrhfvubhbarhabzhfobao\E1\BA\91fazoeufhbzaoiuhazbfuoihabz\C3\B4ieufhazoiuf\C4\A5bc\C3\BBzbhvcruozht\C3\A2ourhn\C3\B4zehcnoazuehrfoaczuehnxzao\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([432 x i8], [432 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @update_status(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [432 x i8] c"poazertoauiapozuiauezfhaeiuvenvoenvoenzovfnezaofnaeoigjnzepig iezhvncuephnriuchnazoiecoah$jnzefijcazoenficjazeorfiocjoapezriacpjozijcpoazijcpoaizjrecpoinazjrfazoiecjnaozirghearncupanzocfnorauhfnoacuhnf\C4\89aozuhfncoazuehfncoauzehfnxoauzhefnaoizufehnazoufhnaozufhnaozufhnaozufhna\C3\B4zuehfo\C3\A2zuefhnoaczufhnoazuefhncoazufhnuozrhfvubhbarhabzhfobao\E1\BA\91fazoeufhbzaoiuhazbfuoihabz\C3\B4ieufhazoiuf\C4\A5bc\C3\BBzbhvcruozht\C3\A2ourhn\C3\B4zehcnoazuehrfoaczuehnxzao\00"
define i32 @main() {
%1 = tail call i32 @update_status(i8* getelementptr inbounds ([432 x i8], [432 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int dwarf_get_OP_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_OP_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_OP_name(val_in, &v);
  return ellipname(res, val_in, v, "OP", printonerr);
}


x86 assembly (clang, -O0):
<get_OP_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <dwarf_get_OP_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1030 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_OP_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1040 <dwarf_get_OP_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1030 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"OP\00"
define i8* @get_OP_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_OP_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"OP\00"
define i8* @get_OP_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_OP_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void two(void) { printf("Hello from two()\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"Hello from two()\00"
define void @two() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i430nx_write(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/ *);
void i430nx_pci_reset(void) { i430nx_write(0, 0x59, 0xf, NULL); }


x86 assembly (clang, -O0):
<i430nx_pci_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x59,%esi
mov    $0xf,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <i430nx_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i430nx_pci_reset>:
xor    %edi,%edi
mov    $0x59,%esi
mov    $0xf,%edx
xor    %ecx,%ecx
jmp    1030 <i430nx_write@plt>

LLVM IR (-O0):
define void @i430nx_pci_reset() {
%1 = call i32 @i430nx_write(i32 0, i32 89, i32 15, i32* null)
ret void
}

LLVM IR (-O2):
define void @i430nx_pci_reset() {
%1 = tail call i32 @i430nx_write(i32 0, i32 89, i32 15, i32* null)
ret void
}
/* Variables and functions */
float sqrt(float);
float dist_to_dxdy(float dx, float dy) { return sqrt(dx * dx + dy * dy); }


x86 assembly (clang, -O0):
<dist_to_dxdy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist_to_dxdy>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1129 <dist_to_dxdy+0x19>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define float @dist_to_dxdy(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %3
%7 = load float, float* %4
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = call float @llvm.fmuladd.f32(float %5, float %6, float %9)
%11 = call float @sqrt(float %10)
ret float %11
}

LLVM IR (-O2):
define float @dist_to_dxdy(float %0, float %1) {
%3 = fmul float %1, %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %3)
%5 = tail call float @sqrt(float %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ atan(double);
double sin(int /*<<< orphan*/);
double __attribute__((no)) sinatan_(double x) { return sin(atan(x)); }


x86 assembly (clang, -O0):
<sinatan_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <atan@plt>
mov    %eax,%edi
call   1030 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinatan_>:
push   %rax
call   1040 <atan@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <sin@plt>

LLVM IR (-O0):
define double @sinatan_(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @atan(double %3)
%5 = call double @sin(i32 %4)
ret double %5
}

LLVM IR (-O2):
define double @sinatan_(double %0) {
%2 = tail call i32 @atan(double %0)
%3 = tail call double @sin(i32 %2)
ret double %3
}
void dirnotify_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @dirnotify_cleanup() {
ret void
}
void LedsP$Led1$makeOutput(void) { HplAtm128GeneralIOPinP$1$IO$makeOutput(); }


x86 assembly (clang, -O0):
<LedsP$Led1$makeOutput>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplAtm128GeneralIOPinP$1$IO$makeOutput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedsP$Led1$makeOutput>:
xor    %eax,%eax
jmp    1030 <HplAtm128GeneralIOPinP$1$IO$makeOutput@plt>

LLVM IR (-O0):
define void @"LedsP$Led1$makeOutput"() {
%1 = call i32 (...) @"HplAtm128GeneralIOPinP$1$IO$makeOutput"()
ret void
}

LLVM IR (-O2):
define void @"LedsP$Led1$makeOutput"() {
%1 = tail call i32 (...) @"HplAtm128GeneralIOPinP$1$IO$makeOutput"()
ret void
}
int get_id(void) {
  static int id = 0;
  return --id;
}


x86 assembly (clang, -O0):
<get_id>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2f11(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_id>:
mov    0x2f1e(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2f15(%rip)
ret

LLVM IR (-O0):
@get_id.id = internal global i32 0
define i32 @get_id() {
%1 = load i32, i32* @get_id.id
%2 = add nsw i32 %1, -1
store i32 %2, i32* @get_id.id
ret i32 %2
}

LLVM IR (-O2):
@get_id.id = internal unnamed_addr global i32 0
define i32 @get_id() {
%1 = load i32, i32* @get_id.id
%2 = add nsw i32 %1, -1
store i32 %2, i32* @get_id.id
ret i32 %2
}
void null_set_state(int is_muted, int unmute_volume) {}


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

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

LLVM IR (-O0):
define void @null_set_state(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @null_set_state(i32 %0, i32 %1) {
ret void
}
double pathcon_nm7_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<pathcon_nm7_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <pathcon_nm7_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <pathcon_nm7_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <pathcon_nm7_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <pathcon_nm7_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm7_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @pathcon_nm7_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @pathcon_nm7_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Type definitions */
struct timex {
  long tick;
};

/* Variables and functions */
void setter_tick(struct timex *txc, long v) { txc->tick = v; }


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

x86 assembly (clang, -O2):
<setter_tick>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.timex = type { i64 }
define void @setter_tick(%struct.timex* %0, i64 %1) {
%3 = alloca %struct.timex*
%4 = alloca i64
store %struct.timex* %0, %struct.timex** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load %struct.timex*, %struct.timex** %3
%7 = getelementptr inbounds %struct.timex, %struct.timex* %6, i32 0, i32 0
store i64 %5, i64* %7
ret void
}

LLVM IR (-O2):
%struct.timex = type { i64 }
define void @setter_tick(%struct.timex* nocapture writeonly %0, i64 %1) {
%3 = getelementptr inbounds %struct.timex, %struct.timex* %0, i64 0, i32 0
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ blinkdash();
int /*<<< orphan*/ blinkdot();
int /*<<< orphan*/ sleep(double);
int blinkV() {
  int c = 0;
  while (c != 3) {
    blinkdot();
    c++;
  }
  blinkdash();
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blinkV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
je     115e <blinkV+0x2e>
mov    $0x0,%al
call   1030 <blinkdot@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <blinkV+0xf>
mov    $0x0,%al
call   1040 <blinkdash@plt>
movsd  0xe93(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blinkV>:
push   %rax
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1040 <blinkdash@plt>
movsd  0xeab(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blinkV() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 3
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = call i32 (...) @blinkdot()
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
%10 = call i32 (...) @blinkdash()
%11 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blinkV() {
%1 = tail call i32 (...) @blinkdot()
%2 = tail call i32 (...) @blinkdot()
%3 = tail call i32 (...) @blinkdot()
%4 = tail call i32 (...) @blinkdash()
%5 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
void ff_hevc_put_hevc_uni_pel_pixels24_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels24_10_sse4() {
ret void
}
int get_left_index(int i) { return (i << 1) + 1; }


x86 assembly (clang, -O0):
<get_left_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_left_index>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @get_left_index(i32 %0) {
%2 = shl i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
void gtk_check_button_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_check_button_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pnp_write_config(unsigned char, unsigned int, int);
void pnp_set_irq1(unsigned char port, unsigned irq) {
  pnp_write_config(port, irq, 0x72);
}


x86 assembly (clang, -O0):
<pnp_set_irq1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
mov    $0x72,%edx
movzbl %al,%edi
call   1030 <pnp_write_config@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pnp_set_irq1>:
mov    $0x72,%edx
jmp    1030 <pnp_write_config@plt>

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

LLVM IR (-O2):
define void @pnp_set_irq1(i8 zeroext %0, i32 %1) {
%3 = tail call i32 @pnp_write_config(i8 zeroext %0, i32 %1, i32 114)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hybla_register();
int /*<<< orphan*/ set_linux_file_name(char *);
void module_register(void) {
  hybla_register();
  set_linux_file_name("tcp_hybla.c");
}


x86 assembly (clang, -O0):
<module_register>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <hybla_register@plt>
lea    0xece(%rip),%rdi
call   1040 <set_linux_file_name@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_register>:
push   %rax
xor    %eax,%eax
call   1030 <hybla_register@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <set_linux_file_name@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"tcp_hybla.c\00"
define void @module_register() {
%1 = call i32 (...) @hybla_register()
%2 = call i32 @set_linux_file_name(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"tcp_hybla.c\00"
define void @module_register() {
%1 = tail call i32 (...) @hybla_register()
%2 = tail call i32 @set_linux_file_name(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
signed short signedshort_ignoring_longint(signed short x, long int y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshort_ignoring_longint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @signedshort_ignoring_longint(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshort_ignoring_longint(i16 returned signext %0, i64 %1) {
ret i16 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ value;

/* Variables and functions */
int fsetxattr(int, char *, char *, int, int /*<<< orphan*/);
int main(void) {
  int fd = 3;
  char value[] = "valuestring";
  return fsetxattr(fd, "name", value, sizeof(value), 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    0xed1(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x14(%rbp),%rdx
lea    0xec4(%rip),%rsi
mov    $0xc,%ecx
xor    %r8d,%r8d
call   1030 <fsetxattr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x72747365756c6176,%rax
73 74 72
mov    %rax,0x8(%rsp)
movl   $0x676e69,0x10(%rsp)
lea    0xeda(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    $0x3,%edi
mov    $0xc,%ecx
xor    %r8d,%r8d
call   1030 <fsetxattr@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.value = [12 x i8] c"valuestring\00"
@.str = [5 x i8] c"name\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [12 x i8]
store i32 0, i32* %1
store i32 3, i32* %2
%4 = bitcast [12 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%7 = call i32 @fsetxattr(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6, i32 12, i32 0)
ret i32 %7
}

LLVM IR (-O2):
@__const.main.value = [12 x i8] c"valuestring\00"
@.str = [5 x i8] c"name\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @fsetxattr(i32 3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2, i32 12, i32 0)
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_length_multprec_solution_string(int k, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(480, &k, n, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_multprec_solution_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1e0,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_multprec_solution_string>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1e0,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_length_multprec_solution_string(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 480, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_length_multprec_solution_string(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 480, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
/* Variables and functions */
int arch_irqs_disabled_flags(unsigned long);
unsigned long arch_local_save_flags();
int arch_irqs_disabled(void) {
  unsigned long flags = arch_local_save_flags();
  return arch_irqs_disabled_flags(flags);
}


x86 assembly (clang, -O0):
<arch_irqs_disabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <arch_local_save_flags@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <arch_irqs_disabled_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_irqs_disabled>:
push   %rax
xor    %eax,%eax
call   1040 <arch_local_save_flags@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <arch_irqs_disabled_flags@plt>

LLVM IR (-O0):
define i32 @arch_irqs_disabled() {
%1 = alloca i64
%2 = call i64 (...) @arch_local_save_flags()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @arch_irqs_disabled_flags(i64 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @arch_irqs_disabled() {
%1 = tail call i64 (...) @arch_local_save_flags()
%2 = tail call i32 @arch_irqs_disabled_flags(i64 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void up_arrow(void) { printf("Hey, you pressed the up arrow! \n"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"Hey, you pressed the up arrow! \0A\00"
define void @up_arrow() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"Hey, you pressed the up arrow! \00"
define void @up_arrow() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
int insertSorted(int array[], int n, int key, int capacity) {
  if (n >= capacity)
    return n;
  array[n] = key;
  return (n + 1);
}


x86 assembly (clang, -O0):
<insertSorted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     1128 <insertSorted+0x28>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113f <insertSorted+0x3f>
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insertSorted>:
mov    %esi,%eax
cmp    %ecx,%esi
jge    110f <insertSorted+0xf>
movslq %eax,%rcx
mov    %edx,(%rdi,%rcx,4)
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @insertSorted(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %1, %3
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %2, i32* %8
%9 = add nsw i32 %1, 1
br label %10
10: ; preds = %4, %6
%11 = phi i32 [ %9, %6 ], [ %1, %4 ]
ret i32 %11
}
/* Type definitions */
struct st_options {
  int dummy;
};

/* Variables and functions */
int network_grep_file(char *, struct st_options *, char *);
int run_grep(int argc, char **argv, void *st_options) {
  struct st_options *nof = st_options;
  int res;
  res = network_grep_file(argv[2], nof, argv[3]);
  if (res < 0)
    return res;
  return 0;
}


x86 assembly (clang, -O0):
<run_grep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
call   1030 <network_grep_file@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    115c <run_grep+0x4c>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <run_grep+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_grep>:
push   %rax
mov    0x10(%rsi),%rdi
mov    0x18(%rsi),%rax
mov    %rdx,%rsi
mov    %rax,%rdx
call   1030 <network_grep_file@plt>
mov    %eax,%ecx
sar    $0x1f,%ecx
and    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.st_options = type { i32 }
define i32 @run_grep(i32 %0, i8** %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca %struct.st_options*
%9 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8* %2, i8** %7
%10 = load i8*, i8** %7
%11 = bitcast i8* %10 to %struct.st_options*
store %struct.st_options* %11, %struct.st_options** %8
%12 = load i8**, i8*** %6
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = load %struct.st_options*, %struct.st_options** %8
%16 = load i8**, i8*** %6
%17 = getelementptr inbounds i8*, i8** %16, i64 3
%18 = load i8*, i8** %17
%19 = call i32 @network_grep_file(i8* %14, %struct.st_options* %15, i8* %18)
store i32 %19, i32* %9
%20 = load i32, i32* %9
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %3
%23 = load i32, i32* %9
store i32 %23, i32* %4
br label %25
24: ; preds = %3
store i32 0, i32* %4
br label %25
25: ; preds = %24, %22
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
%struct.st_options = type { i32 }
define i32 @run_grep(i32 %0, i8** nocapture %1, i8* %2) {
%4 = bitcast i8* %2 to %struct.st_options*
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8*, i8** %1, i64 3
%8 = load i8*, i8** %7
%9 = tail call i32 @network_grep_file(i8* %6, %struct.st_options* %4, i8* %8)
%10 = icmp slt i32 %9, 0
%11 = select i1 %10, i32 %9, i32 0
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ finish_packet(int /*<<< orphan*/);
void finish_packet_ok() { finish_packet(0); }


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

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

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

LLVM IR (-O2):
define void @finish_packet_ok() {
%1 = tail call i32 @finish_packet(i32 0)
ret void
}
void motor_init(void) {}


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

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

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

LLVM IR (-O2):
define void @motor_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stic_simple_test_result(int, char *, char const *,
                                           char const *, unsigned int);
void stic_assert_true(int test, const char *function, const char file[],
                      unsigned int line) {
  stic_simple_test_result(test, "Should have been true", function, file, line);
}


x86 assembly (clang, -O0):
<stic_assert_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
lea    0xec4(%rip),%rsi
call   1030 <stic_simple_test_result@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stic_assert_true>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee0(%rip),%rsi
jmp    1030 <stic_simple_test_result@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Should have been true\00"
define void @stic_assert_true(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @stic_simple_test_result(i32 %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Should have been true\00"
define void @stic_assert_true(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @stic_simple_test_result(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i32 %3)
ret void
}
/* Variables and functions */
float __nv_fadd_rn(float, float);
float __fadd_rn(float __a, float __b) { return __nv_fadd_rn(__a, __b); }


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

x86 assembly (clang, -O2):
<__fadd_rn>:
jmp    1030 <__nv_fadd_rn@plt>

LLVM IR (-O0):
define float @__fadd_rn(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @__nv_fadd_rn(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @__fadd_rn(float %0, float %1) {
%3 = tail call float @__nv_fadd_rn(float %0, float %1)
ret float %3
}
/* Variables and functions */
void strncpy(char *s, char *t, size_t n) {
  while (n && (*s++ = *t++)) {
    n--;
  }
}


x86 assembly (clang, -O0):
<strncpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
je     114e <strncpy+0x4e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    115e <strncpy+0x5e>
jmp    116f <strncpy+0x6f>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <strncpy+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy>:
test   %rdx,%rdx
je     1127 <strncpy+0x27>
add    $0xffffffffffffffff,%rdx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
test   %cl,%cl
je     1127 <strncpy+0x27>
lea    0x1(%rax),%rcx
cmp    %rax,%rdx
mov    %rcx,%rax
jne    1110 <strncpy+0x10>
ret

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

LLVM IR (-O2):
define void @strncpy(i8* nocapture writeonly %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %13, %5 ], [ %2, %3 ]
%7 = phi i8* [ %12, %5 ], [ %1, %3 ]
%8 = phi i8* [ %11, %5 ], [ %0, %3 ]
%9 = load i8, i8* %7
store i8 %9, i8* %8
%10 = icmp eq i8 %9, 0
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = add i64 %6, -1
%14 = icmp eq i64 %13, 0
%15 = select i1 %10, i1 true, i1 %14
br i1 %15, label %16, label %5
16: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void ad_str(char **pbuf, char *instr, int count) {
  strncpy(*pbuf, instr, count);
  *pbuf += count;
  **pbuf = (char)0;
}


x86 assembly (clang, -O0):
<ad_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ad_str>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <strncpy@plt>
mov    (%rbx),%rax
movslq %ebp,%rcx
lea    (%rax,%rcx,1),%rdx
mov    %rdx,(%rbx)
movb   $0x0,(%rax,%rcx,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ad_str(i8** nocapture %0, i8* %1, i32 %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @strncpy(i8* %4, i8* %1, i32 %2)
%6 = load i8*, i8** %0
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %6, i64 %7
store i8* %8, i8** %0
store i8 0, i8* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_OBJECT;

/* Variables and functions */
int ln_cmp(int /*<<< orphan*/ const *const *, unsigned int const *);
int ln_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) {
  const ASN1_OBJECT *const *a = a_;
  unsigned int const *b = b_;
  return ln_cmp(a, b);
}


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

x86 assembly (clang, -O2):
<ln_cmp_BSEARCH_CMP_FN>:
jmp    1030 <ln_cmp@plt>

LLVM IR (-O0):
define i32 @ln_cmp_BSEARCH_CMP_FN(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32**
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32**
store i32** %8, i32*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32**, i32*** %5
%12 = load i32*, i32** %6
%13 = call i32 @ln_cmp(i32** %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @ln_cmp_BSEARCH_CMP_FN(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32**
%4 = bitcast i8* %1 to i32*
%5 = tail call i32 @ln_cmp(i32** %3, i32* %4)
ret i32 %5
}
/* Type definitions */
struct slist_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __slist_del(struct slist_node *, struct slist_node *);
void slist_del(struct slist_node *prev, struct slist_node *entry) {
  __slist_del(prev, entry);
}


x86 assembly (clang, -O0):
<slist_del>:
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 <__slist_del@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slist_del>:
jmp    1030 <__slist_del@plt>

LLVM IR (-O0):
%struct.slist_node = type { i32 }
define void @slist_del(%struct.slist_node* %0, %struct.slist_node* %1) {
%3 = alloca %struct.slist_node*
%4 = alloca %struct.slist_node*
store %struct.slist_node* %0, %struct.slist_node** %3
store %struct.slist_node* %1, %struct.slist_node** %4
%5 = load %struct.slist_node*, %struct.slist_node** %3
%6 = load %struct.slist_node*, %struct.slist_node** %4
%7 = call i32 @__slist_del(%struct.slist_node* %5, %struct.slist_node* %6)
ret void
}

LLVM IR (-O2):
%struct.slist_node = type { i32 }
define void @slist_del(%struct.slist_node* %0, %struct.slist_node* %1) {
%3 = tail call i32 @__slist_del(%struct.slist_node* %0, %struct.slist_node* %1)
ret void
}
char *test_return_stack_memory_bad() {
  char stack_buf[100];
  char *x = stack_buf;
  return x;
}


x86 assembly (clang, -O0):
<test_return_stack_memory_bad>:
push   %rbp
mov    %rsp,%rbp
lea    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_return_stack_memory_bad>:
lea    -0x68(%rsp),%rax
ret

LLVM IR (-O0):
define i8* @test_return_stack_memory_bad() {
%1 = alloca [100 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
store i8* %3, i8** %2
%4 = load i8*, i8** %2
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @test_return_stack_memory_bad() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
ret i8* %2
}
void packetio_tx_hello(void) {}


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

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

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

LLVM IR (-O2):
define void @packetio_tx_hello() {
ret void
}
/* Variables and functions */
int close(int);
int dlib_close(void *self) { return close(*(int *)self); }


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

x86 assembly (clang, -O2):
<dlib_close>:
mov    (%rdi),%edi
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @dlib_close(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @close(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @dlib_close(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @close(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print_perl_unsupported_msg();
int perl_start_script_unsupported(const char *script __attribute__((unused)),
                                  int argc __attribute__((unused)),
                                  const char **argv __attribute__((unused))) {
  print_perl_unsupported_msg();
  return -1;
}


x86 assembly (clang, -O0):
<perl_start_script_unsupported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <print_perl_unsupported_msg@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perl_start_script_unsupported>:
push   %rax
xor    %eax,%eax
call   1030 <print_perl_unsupported_msg@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @perl_start_script_unsupported(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8**
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = call i32 (...) @print_perl_unsupported_msg()
ret i32 -1
}

LLVM IR (-O2):
define i32 @perl_start_script_unsupported(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @print_perl_unsupported_msg()
ret i32 -1
}
long IS_ERR(const void *ptr) {
  return (unsigned long)ptr > (unsigned long)-1000L;
}


x86 assembly (clang, -O0):
<IS_ERR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0xfffffffffffffc18,%rax
seta   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<IS_ERR>:
xor    %eax,%eax
cmp    $0xfffffffffffffc19,%rdi
setae  %al
ret

LLVM IR (-O0):
define i64 @IS_ERR(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = icmp ugt i64 %4, -1000
%6 = zext i1 %5 to i32
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @IS_ERR(i8* readnone %0) {
%2 = icmp ugt i8* %0, inttoptr (i64 -1000 to i8*)
%3 = zext i1 %2 to i64
ret i64 %3
}
main() {
  int a, b, c;
  a = b + c;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double __ocml_y1_f64(double);
double y1(double x) { return __ocml_y1_f64(x); }


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

x86 assembly (clang, -O2):
<y1>:
jmp    1030 <__ocml_y1_f64@plt>

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

LLVM IR (-O2):
define double @y1(double %0) {
%2 = tail call double @__ocml_y1_f64(double %0)
ret double %2
}
/* Variables and functions */
int execvp(char const *, char **);
int g_execvp(const char *p1, char *args[]) { return execvp(p1, args); }


x86 assembly (clang, -O0):
<g_execvp>:
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 <execvp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_execvp>:
jmp    1030 <execvp@plt>

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

LLVM IR (-O2):
define i32 @g_execvp(i8* %0, i8** %1) {
%3 = tail call i32 @execvp(i8* %0, i8** %1)
ret i32 %3
}