xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Com_Printf(char *);
int /*<<< orphan*/ Cvar_InfoString(int);
int /*<<< orphan*/ Info_Print(int /*<<< orphan*/);
void SV_Serverinfo_f(void) {
  Com_Printf("Server info settings:\n");
  Info_Print(Cvar_InfoString(4));
}


x86 assembly (clang, -O0):
<SV_Serverinfo_f>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <Com_Printf@plt>
mov    $0x4,%edi
call   1030 <Cvar_InfoString@plt>
mov    %eax,%edi
call   1050 <Info_Print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SV_Serverinfo_f>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <Com_Printf@plt>
mov    $0x4,%edi
call   1030 <Cvar_InfoString@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <Info_Print@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Server info settings:\0A\00"
define void @SV_Serverinfo_f() {
%1 = call i32 @Com_Printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @Cvar_InfoString(i32 4)
%3 = call i32 @Info_Print(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Server info settings:\0A\00"
define void @SV_Serverinfo_f() {
%1 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @Cvar_InfoString(i32 4)
%3 = tail call i32 @Info_Print(i32 %2)
ret void
}
void minfo(void) {}


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

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

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

LLVM IR (-O2):
define void @minfo() {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cart_init_file(char *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ stat(char *, struct stat *);
void cart_init(char *bootromName, char *cartromName) {
  struct stat s;
  if (stat(cartromName, &s) != 0) {
    printf("Couldn't stat cartrom %s\n", cartromName);
    exit(1);
  }
  cart_init_file(bootromName, cartromName);
}


x86 assembly (clang, -O0):
<cart_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <stat@plt>
cmp    $0x0,%rax
je     1181 <cart_init+0x41>
mov    -0x10(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <cart_init_file@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cart_init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <stat@plt>
test   %rax,%rax
jne    116d <cart_init+0x2d>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <cart_init_file@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe8c(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [26 x i8] c"Couldn't stat cartrom %s\0A\00"
define void @cart_init(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.stat
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @stat(i8* %6, %struct.stat* %5)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = call i32 @cart_init_file(i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [26 x i8] c"Couldn't stat cartrom %s\0A\00"
define void @cart_init(i8* %0, i8* %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = call i64 @stat(i8* %1, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %1)
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %2
%11 = call i32 @cart_init_file(i8* %0, i8* %1)
ret void
}
int sendBuffer(int length) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @sendBuffer(i32 %0) {
ret i32 0
}
/* Variables and functions */
int UINT_MAX;
unsigned int mtrandom_uint(int);
int planet_gennum() {
  int num = 1;
  unsigned int ran;
  while ((ran = mtrandom_uint(UINT_MAX)) < UINT_MAX / 2)
    num++;
  if (num > 10)
    num = 10;
  return num;
}


x86 assembly (clang, -O0):
<planet_gennum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <mtrandom_uint@plt>
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jae    115f <planet_gennum+0x4f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <planet_gennum+0xf>
cmpl   $0xa,-0x4(%rbp)
jle    1170 <planet_gennum+0x60>
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<planet_gennum>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
mov    (%r14),%edi
xor    %ebx,%ebx
call   1030 <mtrandom_uint@plt>
mov    (%r14),%edi
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
add    $0x1,%ebx
cmp    %ecx,%eax
jb     1120 <planet_gennum+0x10>
cmp    $0xa,%ebx
mov    $0xa,%eax
cmovb  %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@UINT_MAX = global i32 0
define i32 @planet_gennum() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* @UINT_MAX
%5 = call i32 @mtrandom_uint(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* @UINT_MAX
%7 = sdiv i32 %6, 2
%8 = icmp ult i32 %5, %7
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %3
12: ; preds = %3
%13 = load i32, i32* %1
%14 = icmp sgt i32 %13, 10
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 10, i32* %1
br label %16
16: ; preds = %15, %12
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@UINT_MAX = global i32 0
define i32 @planet_gennum() {
%1 = load i32, i32* @UINT_MAX
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ %1, %0 ], [ %6, %2 ]
%4 = phi i32 [ 1, %0 ], [ %9, %2 ]
%5 = tail call i32 @mtrandom_uint(i32 %3)
%6 = load i32, i32* @UINT_MAX
%7 = sdiv i32 %6, 2
%8 = icmp ult i32 %5, %7
%9 = add nuw nsw i32 %4, 1
br i1 %8, label %2, label %10
10: ; preds = %2
%11 = icmp ult i32 %4, 10
%12 = select i1 %11, i32 %4, i32 10
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__38__IO__set();
void Msp430GpioC__2__HplGeneralIO__set(void) {
  HplMsp430GeneralIOP__38__IO__set();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__2__HplGeneralIO__set() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__38__IO__set()
ret void
}
/* Type definitions */
struct function_table {
  int dummy;
};
struct function {
  int dummy;
};

/* Variables and functions */
struct function *add_function_(char *, int, struct function_table *, char *,
                               int);
struct function *add_function(char *name, int name_length,
                              struct function_table *function_table) {
  return add_function_(name, name_length, function_table, name, name_length);
}


x86 assembly (clang, -O0):
<add_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
call   1030 <add_function_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_function>:
mov    %rdi,%rcx
mov    %esi,%r8d
jmp    1030 <add_function_@plt>

LLVM IR (-O0):
%struct.function = type { i32 }
%struct.function_table = type { i32 }
define %struct.function* @add_function(i8* %0, i32 %1, %struct.function_table* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.function_table*
store i8* %0, i8** %4
store i32 %1, i32* %5
store %struct.function_table* %2, %struct.function_table** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load %struct.function_table*, %struct.function_table** %6
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = call %struct.function* @add_function_(i8* %7, i32 %8, %struct.function_table* %9, i8* %10, i32 %11)
ret %struct.function* %12
}

LLVM IR (-O2):
%struct.function = type { i32 }
%struct.function_table = type { i32 }
define %struct.function* @add_function(i8* %0, i32 %1, %struct.function_table* %2) {
%4 = tail call %struct.function* @add_function_(i8* %0, i32 %1, %struct.function_table* %2, i8* %0, i32 %1)
ret %struct.function* %4
}
void free_sp(vector) char **vector;
{
  vector--;
  free(*vector);
  free(vector);
}


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

x86 assembly (clang, -O2):
<free_sp>:
push   %rbx
mov    %rdi,%rbx
mov    -0x8(%rdi),%rdi
add    $0xfffffffffffffff8,%rbx
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_sp(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i32 -1
store i8** %4, i8*** %2
%5 = load i8**, i8*** %2
%6 = load i8*, i8** %5
%7 = load i8**, i8*** %2
%8 = bitcast i8** %7 to i8*
ret void
}

LLVM IR (-O2):
define void @free_sp(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 -1
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast i8** %2 to i8*
tail call void @free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tp1(void) { printf("Hello\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
define void @tp1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = (input[0UL] + 914778474UL) - 981234615UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      state[0UL] = state[local1] + state[0UL];
      local1++;
    }
    output[0UL] = (state[0UL] + 964964849UL) - 1156823440UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x3686696a,%rax
sub    $0x3a7c73b7,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1158 <RandomFunc+0x58>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp,%rax,8),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <RandomFunc+0x2b>
mov    -0x18(%rbp),%rcx
add    $0x398431f1,%rcx
sub    $0x44f3b990,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0xfffffffff09a6e14,%rax
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, 914778474
%11 = sub i64 %10, 981234615
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %6
br label %13
13: ; preds = %16, %2
%14 = load i64, i64* %6
%15 = icmp ult i64 %14, 0
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = load i64, i64* %6
%18 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %17
%19 = load i64, i64* %18
%20 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%21 = load i64, i64* %20
%22 = add i64 %19, %21
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %22, i64* %23
%24 = load i64, i64* %6
%25 = add i64 %24, 1
store i64 %25, i64* %6
br label %13
26: ; preds = %13
%27 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%28 = load i64, i64* %27
%29 = add i64 %28, 964964849
%30 = sub i64 %29, 1156823440
%31 = load i64*, i64** %4
%32 = getelementptr inbounds i64, i64* %31, i64 0
store i64 %30, i64* %32
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, -258314732
store i64 %4, i64* %1
ret void
}
float dist(float x) {
  if (x > 1.0) {
    return (.66666667);
  } else {
    if (x > -1.0) {
      return (x - .33333333 * x * x * x);
    } else {
      return (-.66666667);
    }
  }
}


x86 assembly (clang, -O0):
<dist>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1136 <dist+0x36>
movss  0xef0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11bf <dist+0xbf>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11b2 <dist+0xb2>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xea5(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11bf <dist+0xbf>
movss  0xe5e(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist>:
ucomiss 0xefd(%rip),%xmm0
jbe    1112 <dist+0x12>
movss  0xeef(%rip),%xmm0
ret
ucomiss 0xef3(%rip),%xmm0
jbe    113f <dist+0x3f>
cvtss2sd %xmm0,%xmm0
movsd  0xee9(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret
movss  0xec1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @dist(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fcmp ogt double %5, 1.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %1
store float 0x3FE5555560000000, float* %2
br label %27
8: ; preds = %1
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fcmp ogt double %10, -1.000000e+00
br i1 %11, label %12, label %26
12: ; preds = %8
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = fmul double 0x3FD5555551C112DA, %16
%18 = load float, float* %3
%19 = fpext float %18 to double
%20 = fmul double %17, %19
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = fneg double %20
%24 = call double @llvm.fmuladd.f64(double %23, double %22, double %14)
%25 = fptrunc double %24 to float
store float %25, float* %2
br label %27
26: ; preds = %8
store float 0xBFE5555560000000, float* %2
br label %27
27: ; preds = %26, %12, %7
%28 = load float, float* %2
ret float %28
}

LLVM IR (-O2):
define float @dist(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ogt float %0, 1.000000e+00
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = fcmp ogt float %0, -1.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %4
%7 = fmul double %2, 0xBFD5555551C112DA
%8 = fmul double %7, %2
%9 = tail call double @llvm.fmuladd.f64(double %8, double %2, double %2)
%10 = fptrunc double %9 to float
br label %11
11: ; preds = %4, %1, %6
%12 = phi float [ %10, %6 ], [ 0x3FE5555560000000, %1 ], [ 0xBFE5555560000000, %4 ]
ret float %12
}
cantopen(s) char *s;
{
  std_err("cmp: cannot open ");
  std_err(s);
  std_err("\n");
  exit(1);
}


x86 assembly (clang, -O0):
<cantopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<cantopen>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"cmp: cannot open \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @cantopen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %4)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"cmp: cannot open \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @cantopen(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
tail call void @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  char data[64];
  if (fgets(data, sizeof data, stdin)) {
    fputs(data, stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    $0x40,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     1162 <main+0x42>
lea    -0x50(%rbp),%rdi
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x40,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     1150 <main+0x30>
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdi
call   1030 <fputs@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i64 @fgets(i8* %3, i32 64, i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%9 = load i32, i32* @stdout
%10 = call i32 @fputs(i8* %8, i32 %9)
br label %11
11: ; preds = %7, %0
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i64 @fgets(i8* %2, i32 64, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i8* %2, i32 %7)
br label %9
9: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
scalar_t__ strcmp(char *, char *);
bool IsPasswordOK(void) {
  char Password[12];
  gets(Password);
  return 0 == strcmp(Password, "goodpass");
}


x86 assembly (clang, -O0):
<IsPasswordOK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1040 <gets@plt>
lea    -0xc(%rbp),%rdi
lea    0xec4(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsPasswordOK>:
push   %rbx
sub    $0x10,%rsp
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"goodpass\00"
define i32 @IsPasswordOK() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 0, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [9 x i8] c"goodpass\00"
define i32 @IsPasswordOK() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void gdk_get_default_root_window() {}


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

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

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

LLVM IR (-O2):
define void @gdk_get_default_root_window() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eval_exp(int *);
int /*<<< orphan*/ printf(char *, int);
int call_putch() {
  int value;
  eval_exp(&value);
  printf("%c", value);
  return value;
}


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

x86 assembly (clang, -O2):
<call_putch>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <eval_exp@plt>
mov    0x4(%rsp),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @call_putch() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @eval_exp(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void mcnet_write_float(uint8_t *out, float in) {
  uint8_t *t = (uint8_t *)&in;
  out[0] = t[3];
  out[1] = t[2];
  out[2] = t[1];
  out[3] = t[0];
}


x86 assembly (clang, -O0):
<mcnet_write_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcnet_write_float>:
movss  %xmm0,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @mcnet_write_float(i32* nocapture writeonly %0, float %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = bitcast i32* %3 to float*
store float %1, float* %4
ret void
}
int check_canary(unsigned long *address, unsigned long value) {}


x86 assembly (clang, -O0):
<check_canary>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @check_canary(i64* nocapture readnone %0, i64 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ test_thread();
int /*<<< orphan*/ test_thread_alt_stack();
int /*<<< orphan*/ test_thread_join_detached();
int /*<<< orphan*/ write(int, char *, int);
void test2() {
  write(1, "\nTEST 2: thread creation & attributes:\n\n",
        sizeof("\nTEST 2: thread creation & attributes:\n\n") - 1);
  test_thread();
  test_thread_join_detached();
  test_thread_alt_stack();
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
mov    $0x28,%edx
call   1040 <write@plt>
mov    $0x0,%al
call   1030 <test_thread@plt>
mov    $0x0,%al
call   1050 <test_thread_join_detached@plt>
mov    $0x0,%al
call   1060 <test_thread_alt_stack@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rax
lea    0xeb8(%rip),%rsi
mov    $0x1,%edi
mov    $0x28,%edx
call   1040 <write@plt>
xor    %eax,%eax
call   1030 <test_thread@plt>
xor    %eax,%eax
call   1050 <test_thread_join_detached@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <test_thread_alt_stack@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"\0ATEST 2: thread creation & attributes:\0A\0A\00"
define void @test2() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 40)
%2 = call i32 (...) @test_thread()
%3 = call i32 (...) @test_thread_join_detached()
%4 = call i32 (...) @test_thread_alt_stack()
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"\0ATEST 2: thread creation & attributes:\0A\0A\00"
define void @test2() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 40)
%2 = tail call i32 (...) @test_thread()
%3 = tail call i32 (...) @test_thread_join_detached()
%4 = tail call i32 (...) @test_thread_alt_stack()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int ng_getchar(char *outputreturn, int ident, void *userdata) {
  printf("%s\n", outputreturn);
  return 0;
}


x86 assembly (clang, -O0):
<ng_getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @ng_getchar(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 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @ng_getchar(i8* %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Cursor_Down(int value) {
  if (value) {
    cpc_key_press(0x02);
  } else {
    cpc_key_unpress(0x02);
  };
}


x86 assembly (clang, -O0):
<Joy_Cursor_Down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Cursor_Down+0x24>
mov    $0x2,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Cursor_Down+0x2e>
mov    $0x2,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Cursor_Down>:
test   %edi,%edi
je     112e <Joy_Cursor_Down+0xe>
mov    $0x2,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x2,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Cursor_Down(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @cpc_key_press(i32 2)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 2)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Cursor_Down(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 2)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 2)
br label %7
7: ; preds = %5, %3
ret void
}
int main() {
  int var1;
  char var2[10];
  printf("Address of var1 %x\n", &var1);
  printf("Address of array var2 %x\n", var2);
  printf("Address of 5th value in array var2 %x\n", &var2[5]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x12(%rbp),%rsi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x12(%rbp),%rsi
add    $0x5,%rsi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x13(%rsp),%rsi
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Address of var1 %x\0A\00"
@.str.1 = [26 x i8] c"Address of array var2 %x\0A\00"
@.str.2 = [39 x i8] c"Address of 5th value in array var2 %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Address of var1 %x\0A\00"
@.str.1 = [26 x i8] c"Address of array var2 %x\0A\00"
@.str.2 = [39 x i8] c"Address of 5th value in array var2 %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 5
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* %7)
ret i32 0
}
__attribute__((unused)) void diagnosis(void) {}


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

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

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

LLVM IR (-O2):
define void @diagnosis() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double const, double const, double const,
                          double const);
void glmPrintQuaterniond(const double q[4]) {
  printf("%f + %f i + %f j + %f k\n", q[0], q[1], q[2], q[3]);
}


x86 assembly (clang, -O0):
<glmPrintQuaterniond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm3
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmPrintQuaterniond>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movsd  0x10(%rdi),%xmm2
movsd  0x18(%rdi),%xmm3
lea    0xed6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"%f + %f i + %f j + %f k\0A\00"
define void @glmPrintQuaterniond(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 2
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 3
%14 = load double, double* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %5, double %8, double %11, double %14)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"%f + %f i + %f j + %f k\0A\00"
define void @glmPrintQuaterniond(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = getelementptr inbounds double, double* %0, i64 2
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %0, i64 3
%8 = load double, double* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %2, double %4, double %6, double %8)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct jffs2_raw_dirent {
  int dummy;
};

/* Variables and functions */
struct jffs2_raw_dirent *resolvedirent(char *, size_t, int /*<<< orphan*/,
                                       int /*<<< orphan*/, int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
struct jffs2_raw_dirent *resolveinode(char *o, size_t size, uint32_t ino) {
  return resolvedirent(o, size, ino, 0, NULL, 0);
}


x86 assembly (clang, -O0):
<resolveinode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %r9d,%r9d
xor    %eax,%eax
mov    %eax,%r8d
mov    %r9d,%ecx
call   1030 <resolvedirent@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resolveinode>:
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <resolvedirent@plt>

LLVM IR (-O0):
%struct.jffs2_raw_dirent = type { i32 }
define %struct.jffs2_raw_dirent* @resolveinode(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = call %struct.jffs2_raw_dirent* @resolvedirent(i8* %7, i64 %8, i32 %9, i32 0, i32* null, i32 0)
ret %struct.jffs2_raw_dirent* %10
}

LLVM IR (-O2):
%struct.jffs2_raw_dirent = type { i32 }
define %struct.jffs2_raw_dirent* @resolveinode(i8* %0, i64 %1, i32 %2) {
%4 = tail call %struct.jffs2_raw_dirent* @resolvedirent(i8* %0, i64 %1, i32 %2, i32 0, i32* null, i32 0)
ret %struct.jffs2_raw_dirent* %4
}
void clear(float v[32]) {
  int i, j, k;
  for (i = 0; i < 32; i++)
    v[i] = 0.0;
}


x86 assembly (clang, -O0):
<clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1137 <clear+0x37>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <clear+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear>:
xorps  %xmm0,%xmm0
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @clear(float* %0) {
%2 = alloca float*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
br label %6
6: ; preds = %14, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 32
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load float*, float** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds float, float* %10, i64 %12
store float 0.000000e+00, float* %13
br label %14
14: ; preds = %9
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %6
17: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @clear(float* nocapture writeonly %0) {
%2 = bitcast float* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dhcp_packet(int, char *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               char *, char *);
void dhcp_leaseactive(char *ipaddr, char *gwaddr, char *hardware) {
  dhcp_packet(13, ipaddr, NULL, NULL, NULL, gwaddr, hardware);
}


x86 assembly (clang, -O0):
<dhcp_leaseactive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%r9
mov    -0x18(%rbp),%rax
mov    $0xd,%edi
xor    %ecx,%ecx
mov    %ecx,%r8d
mov    %r8,%rdx
mov    %r8,%rcx
mov    %rax,(%rsp)
call   1030 <dhcp_packet@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dhcp_leaseactive>:
push   %rax
mov    %rsi,%r9
mov    %rdi,%rsi
mov    %rdx,(%rsp)
mov    $0xd,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <dhcp_packet@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @dhcp_leaseactive(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @dhcp_packet(i32 13, i8* %7, i32* null, i32* null, i32* null, i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
define void @dhcp_leaseactive(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @dhcp_packet(i32 13, i8* %0, i32* null, i32* null, i32* null, i8* %1, i8* %2)
ret void
}
/* Type definitions */
struct stringset {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct stringset *);
int /*<<< orphan*/ stringset_clear(struct stringset *);
void stringset_free(struct stringset *stringset) {
  if (stringset) {
    stringset_clear(stringset);
    free(stringset);
  }
}


x86 assembly (clang, -O0):
<stringset_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <stringset_free+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <stringset_clear@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringset_free>:
test   %rdi,%rdi
je     1137 <stringset_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <stringset_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
%struct.stringset = type { i32 }
define void @stringset_free(%struct.stringset* %0) {
%2 = icmp eq %struct.stringset* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @stringset_clear(%struct.stringset* %0)
%5 = tail call i32 @free(%struct.stringset* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int strncmp(char const *, char const *, int);
int gstrncmp(const char *a, const char *b, int n) {
  if (!a && !b)
    return 0;
  if (!a || !b)
    return -1;
  return strncmp(a, b, n);
}


x86 assembly (clang, -O0):
<gstrncmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1145 <gstrncmp+0x35>
cmpq   $0x0,-0x18(%rbp)
jne    1145 <gstrncmp+0x35>
movl   $0x0,-0x4(%rbp)
jmp    117a <gstrncmp+0x6a>
cmpq   $0x0,-0x10(%rbp)
je     115b <gstrncmp+0x4b>
cmpq   $0x0,-0x18(%rbp)
jne    1167 <gstrncmp+0x57>
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <gstrncmp+0x6a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gstrncmp>:
xor    %eax,%eax
mov    %rdi,%rcx
or     %rsi,%rcx
je     112e <gstrncmp+0x1e>
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     112e <gstrncmp+0x1e>
test   %rsi,%rsi
je     112e <gstrncmp+0x1e>
jmp    1030 <strncmp@plt>
ret

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

LLVM IR (-O2):
define i32 @gstrncmp(i8* %0, i8* %1, i32 %2) {
%4 = icmp ne i8* %0, null
%5 = icmp ne i8* %1, null
%6 = or i1 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = and i1 %4, %5
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %2)
br label %11
11: ; preds = %7, %3, %9
%12 = phi i32 [ %10, %9 ], [ 0, %3 ], [ -1, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
void gohome() {
  char mist[10];
  printf("done. press <return>");
  scanf(mist, "%d");
  exit(-1);
}


x86 assembly (clang, -O0):
<gohome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    -0xa(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1040 <scanf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<gohome>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rsi
lea    0xe(%rsp),%rdi
call   1040 <scanf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"done. press <return>\00"
@.str.1 = [3 x i8] c"%d\00"
define void @gohome() {
%1 = alloca [10 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"done. press <return>\00"
@.str.1 = [3 x i8] c"%d\00"
define void @gohome() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
}
int usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.usb_hcd = type opaque
%struct.urb = type opaque
define i32 @usb_hcd_unmap_urb_for_dma(%struct.usb_hcd* nocapture readnone %0, %struct.urb* nocapture readnone %1) {
ret i32 0
}