xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int jpc_firstone(int const arg) {
  int n;
  int x;
  assert(arg >= 0);
  n = -1;
  x = arg;
  while (x > 0) {
    x >>= 1;
    ++n;
  }
  return n;
}


x86 assembly (clang, -O0):
<jpc_firstone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115a <jpc_firstone+0x4a>
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <jpc_firstone+0x29>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jpc_firstone>:
push   %rbx
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
mov    $0xffffffff,%eax
test   %ebx,%ebx
jle    113c <jpc_firstone+0x2c>
mov    %ebx,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%ebx
mov    %ecx,%ebx
ja     1130 <jpc_firstone+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @jpc_firstone(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
store i32 -1, i32* %3
%9 = load i32, i32* %2
store i32 %9, i32* %4
br label %10
10: ; preds = %13, %1
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i32, i32* %4
%15 = ashr i32 %14, 1
store i32 %15, i32* %4
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %10
18: ; preds = %10
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @jpc_firstone(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
%4 = tail call i32 @assert(i32 %3)
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %12
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ %0, %1 ]
%8 = phi i32 [ %10, %6 ], [ -1, %1 ]
%9 = lshr i32 %7, 1
%10 = add nsw i32 %8, 1
%11 = icmp ult i32 %7, 2
br i1 %11, label %12, label %6
12: ; preds = %6, %1
%13 = phi i32 [ -1, %1 ], [ %10, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void kalapalo() { printf("kopp-kopp\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"kopp-kopp\00"
define void @kalapalo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ HsFreeFile(struct file *);
void fput(struct file *f) {
  HsFreeFile(f);
  return;
}


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

x86 assembly (clang, -O2):
<fput>:
jmp    1030 <HsFreeFile@plt>

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

LLVM IR (-O2):
%struct.file = type { i32 }
define void @fput(%struct.file* %0) {
%2 = tail call i32 @HsFreeFile(%struct.file* %0)
ret void
}
int makeColor(int r, int g, int b) {
  return ((r / 8) << 11) | ((g / 4) << 5) | (b / 8);
}


x86 assembly (clang, -O0):
<makeColor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
shl    $0xb,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    $0x5,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeColor>:
lea    0x7(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
and    $0xfffffff8,%eax
shl    $0x8,%eax
lea    0x3(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
shl    $0x3,%ecx
and    $0xffffffe0,%ecx
or     %eax,%ecx
lea    0x7(%rdx),%eax
test   %edx,%edx
cmovns %edx,%eax
sar    $0x3,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @makeColor(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 8
%9 = shl i32 %8, 11
%10 = load i32, i32* %5
%11 = sdiv i32 %10, 4
%12 = shl i32 %11, 5
%13 = or i32 %9, %12
%14 = load i32, i32* %6
%15 = sdiv i32 %14, 8
%16 = or i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @makeColor(i32 %0, i32 %1, i32 %2) {
%4 = sdiv i32 %0, 8
%5 = shl i32 %4, 11
%6 = sdiv i32 %1, 4
%7 = shl i32 %6, 5
%8 = or i32 %7, %5
%9 = sdiv i32 %2, 8
%10 = or i32 %8, %9
ret i32 %10
}
unsigned int hash_32(unsigned int val, unsigned int bits) {
  unsigned int hash = val * 0x9e370001UL;
  return hash >> (32 - bits);
}


x86 assembly (clang, -O0):
<hash_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
movabs $0x9e370001,%rcx
imul   %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_32>:
mov    %esi,%ecx
imul   $0x9e370001,%edi,%eax
neg    %cl
shr    %cl,%eax
ret

LLVM IR (-O0):
define i32 @hash_32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = mul i64 %7, 2654404609
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = sub i32 32, %11
%13 = lshr i32 %10, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @hash_32(i32 %0, i32 %1) {
%3 = mul i32 %0, -1640562687
%4 = sub i32 32, %1
%5 = lshr i32 %3, %4
ret i32 %5
}
void __attribute__((weak)) _board_exit(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<_board_exit>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <_board_exit+0x9>
jmp    1109 <_board_exit+0x9>

x86 assembly (clang, -O2):
<_board_exit>:
jmp    1100 <_board_exit>

LLVM IR (-O0):
define weak void @_board_exit() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @_board_exit() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ENDIAN_REVERSE_32(uint32_t src) {
  return (((src << 8) & 0x00ff0000) | ((src << 24) & 0xff000000) |
          ((src >> 8) & 0x0000ff00) | ((src >> 24) & 0x000000ff));
}


x86 assembly (clang, -O0):
<ENDIAN_REVERSE_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
and    $0xff0000,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ENDIAN_REVERSE_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = and i32 %4, 16711680
%6 = load i32, i32* %2
%7 = shl i32 %6, 24
%8 = and i32 %7, -16777216
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = ashr i32 %10, 8
%12 = and i32 %11, 65280
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = ashr i32 %14, 24
%16 = and i32 %15, 255
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @ENDIAN_REVERSE_32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
void foo_2_1_1_2_1_1_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_1_1_2_2_1() {
ret void
}
int picolcd_resume_backlight(struct picolcd_data *data) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.picolcd_data = type opaque
define i32 @picolcd_resume_backlight(%struct.picolcd_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
unsigned long _LE_to_BE_long(unsigned long);
unsigned long outl(unsigned long val, int port) {
  *((unsigned long *)(((unsigned long)0x80000000) + port)) =
      _LE_to_BE_long(val);
  return (val);
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_LE_to_BE_long@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
movabs $0x80000000,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outl>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <_LE_to_BE_long@plt>
movslq %ebp,%rcx
mov    $0x80000000,%edx
mov    %rax,(%rcx,%rdx,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @outl(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = call i64 @_LE_to_BE_long(i64 %5)
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = add i64 2147483648, %8
%10 = inttoptr i64 %9 to i64*
store i64 %6, i64* %10
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
define i64 @outl(i64 returned %0, i32 %1) {
%3 = tail call i64 @_LE_to_BE_long(i64 %0)
%4 = sext i32 %1 to i64
%5 = add nsw i64 %4, 2147483648
%6 = inttoptr i64 %5 to i64*
store i64 %3, i64* %6
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ alias_mod_bad(int *, int /*<<< orphan*/, int);
void call_impure_with_local_ok(int size) {
  int arr[size];
  alias_mod_bad(arr, 0, 9);
}


x86 assembly (clang, -O0):
<call_impure_with_local_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <alias_mod_bad@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_impure_with_local_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,%eax
mov    %rsp,%rdi
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <alias_mod_bad@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define void @call_impure_with_local_ok(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i32, i64 %6
store i64 %6, i64* %4
%9 = call i32 @alias_mod_bad(i32* %8, i32 0, i32 9)
%10 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @call_impure_with_local_ok(i32 %0) {
%2 = zext i32 %0 to i64
%3 = alloca i32, i64 %2
%4 = call i32 @alias_mod_bad(i32* %3, i32 0, i32 9)
ret void
}
char *xmalloc(n)
unsigned n;
{
  char *p;
  p = malloc(n);
  if (p == 0)
    error(2, 0, "virtual memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1159 <xmalloc+0x39>
mov    $0x2,%edi
xor    %esi,%esi
lea    0xeae(%rip),%rdx
mov    $0x0,%al
call   1040 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %edi,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1145 <xmalloc+0x25>
lea    0xec9(%rip),%rdx
mov    $0x2,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @error to i32 (i32, i32, i8*, ...)*)(i32 2, i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xmalloc(i32 %0) {
%2 = zext i32 %0 to i64
%3 = tail call i8* @malloc(i64 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @error to i32 (i32, i32, i8*, ...)*)(i32 2, i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ini_getdouble_id(double *, char *);
double ini_getdouble_id_def(char *param, double def) {
  double value;
  if (!ini_getdouble_id(&value, param))
    return def;
  return value;
}


x86 assembly (clang, -O0):
<ini_getdouble_id_def>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdi
call   1030 <ini_getdouble_id@plt>
cmp    $0x0,%eax
jne    1146 <ini_getdouble_id_def+0x36>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1150 <ini_getdouble_id_def+0x40>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_getdouble_id_def>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rsi
lea    0x10(%rsp),%rdi
call   1030 <ini_getdouble_id@plt>
movsd  0x8(%rsp),%xmm0
test   %eax,%eax
je     1137 <ini_getdouble_id_def+0x27>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @ini_getdouble_id_def(i8* %0, double %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call i32 @ini_getdouble_id(double* %3, i8* %0)
%6 = icmp eq i32 %5, 0
%7 = load double, double* %3
%8 = select i1 %6, double %1, double %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() { printf("Usage:	nako <command> [arguments]\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Usage:\09nako <command> [arguments]\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Usage:\09nako <command> [arguments]\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ecc_ecdsa_verify(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/ *);
uint8_t ECC_ECDSA_verify(uint32_t *publicKey_x, uint32_t *publicKey_y,
                         uint32_t *text, uint32_t *sign1, uint32_t *sign2) {
  return (uint8_t)ecc_ecdsa_verify((uint32_t *)publicKey_x,
                                   (uint32_t *)publicKey_y, (uint32_t *)text,
                                   (uint32_t *)sign1, (uint32_t *)sign2);
}


x86 assembly (clang, -O0):
<ECC_ECDSA_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <ecc_ecdsa_verify@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECC_ECDSA_verify>:
jmp    1030 <ecc_ecdsa_verify@plt>

LLVM IR (-O0):
define i32 @ECC_ECDSA_verify(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i32*, i32** %10
%16 = call i32 @ecc_ecdsa_verify(i32* %11, i32* %12, i32* %13, i32* %14, i32* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @ECC_ECDSA_verify(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = tail call i32 @ecc_ecdsa_verify(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4)
ret i32 %6
}
/* Variables and functions */
float tanf(float);
__attribute__((__weak__, __always___)) float softboundmpx_tanf(float x) {
  return tanf(x);
}


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

x86 assembly (clang, -O2):
<softboundmpx_tanf>:
jmp    1030 <tanf@plt>

LLVM IR (-O0):
define weak float @softboundmpx_tanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @tanf(float %3)
ret float %4
}

LLVM IR (-O2):
define weak float @softboundmpx_tanf(float %0) {
%2 = tail call float @tanf(float %0)
ret float %2
}
/* Type definitions */
struct sol_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct sol_buffer *);
int /*<<< orphan*/ sol_buffer_fini(struct sol_buffer *);
void sol_buffer_free(struct sol_buffer *buf) {
  sol_buffer_fini(buf);
  free(buf);
}


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

x86 assembly (clang, -O2):
<sol_buffer_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <sol_buffer_fini@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.sol_buffer = type { i32 }
define void @sol_buffer_free(%struct.sol_buffer* %0) {
%2 = alloca %struct.sol_buffer*
store %struct.sol_buffer* %0, %struct.sol_buffer** %2
%3 = load %struct.sol_buffer*, %struct.sol_buffer** %2
%4 = call i32 @sol_buffer_fini(%struct.sol_buffer* %3)
%5 = load %struct.sol_buffer*, %struct.sol_buffer** %2
%6 = call i32 @free(%struct.sol_buffer* %5)
ret void
}

LLVM IR (-O2):
%struct.sol_buffer = type { i32 }
define void @sol_buffer_free(%struct.sol_buffer* %0) {
%2 = tail call i32 @sol_buffer_fini(%struct.sol_buffer* %0)
%3 = tail call i32 @free(%struct.sol_buffer* %0)
ret void
}
void RTAvlrUIntPtrDoWithAll(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrUIntPtrDoWithAll() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int ftoi(float const);
float itof(int);
float absf(const float x) { return itof(ftoi(x) & ((uint32_t)2147483647ULL)); }


x86 assembly (clang, -O0):
<absf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <ftoi@plt>
mov    %eax,%edi
and    $0x7fffffff,%edi
call   1040 <itof@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<absf>:
push   %rax
call   1030 <ftoi@plt>
and    $0x7fffffff,%eax
mov    %eax,%edi
pop    %rax
jmp    1040 <itof@plt>

LLVM IR (-O0):
define float @absf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @ftoi(float %3)
%5 = and i32 %4, 2147483647
%6 = call float @itof(i32 %5)
ret float %6
}

LLVM IR (-O2):
define float @absf(float %0) {
%2 = tail call i32 @ftoi(float %0)
%3 = and i32 %2, 2147483647
%4 = tail call float @itof(i32 %3)
ret float %4
}
/* Variables and functions */
void *malloc(size_t);
void *mm_malloc(void *ctx, size_t n) {
  (void)ctx;
  return malloc(n);
}


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

x86 assembly (clang, -O2):
<mm_malloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @mm_malloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
void dns_cache_clear(struct dns_cache *cache) {
  (void)cache;
  return;
}


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

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

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

LLVM IR (-O2):
%struct.dns_cache = type opaque
define void @dns_cache_clear(%struct.dns_cache* nocapture %0) {
ret void
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
scalar_t__ _ttime_number(char **, int *);
int _ttime_month(char **p, time_t *time) {
  time_t res;
  if (_ttime_number(p, &res) != 0)
    return 1;
  *time = res * 60 * 60 * 24 * 30;
  return 0;
}


x86 assembly (clang, -O0):
<_ttime_month>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1030 <_ttime_number@plt>
cmp    $0x0,%rax
je     1143 <_ttime_month+0x33>
movl   $0x1,-0x4(%rbp)
jmp    115d <_ttime_month+0x4d>
imul   $0x3c,-0x1c(%rbp),%eax
imul   $0x3c,%eax,%eax
imul   $0x18,%eax,%eax
imul   $0x1e,%eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ttime_month>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0xc(%rsp),%rsi
call   1030 <_ttime_number@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    113b <_ttime_month+0x2b>
imul   $0x278d00,0xc(%rsp),%eax
mov    %eax,(%rbx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_ttime_month(i8** %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca i32
store i8** %0, i8*** %4
store i32* %1, i32** %5
%7 = load i8**, i8*** %4
%8 = call i64 @_ttime_number(i8** %7, i32* %6)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %18
11: ; preds = %2
%12 = load i32, i32* %6
%13 = mul nsw i32 %12, 60
%14 = mul nsw i32 %13, 60
%15 = mul nsw i32 %14, 24
%16 = mul nsw i32 %15, 30
%17 = load i32*, i32** %5
store i32 %16, i32* %17
store i32 0, i32* %3
br label %18
18: ; preds = %11, %10
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @_ttime_month(i8** %0, i32* nocapture writeonly %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @_ttime_number(i8** %0, i32* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = mul i32 %8, 2592000
store i32 %9, i32* %1
br label %10
10: ; preds = %2, %7
%11 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %11
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
ssize_t charbit(ssize_t i) { return i >> 3; }


x86 assembly (clang, -O0):
<charbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charbit>:
mov    %edi,%eax
sar    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @charbit(i32 %0) {
%2 = ashr i32 %0, 3
ret i32 %2
}
void setears(long daposx, long daposy, long daxvect, long dayvect) {}


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

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

LLVM IR (-O0):
define void @setears(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
ret void
}

LLVM IR (-O2):
define void @setears(i64 %0, i64 %1, i64 %2, i64 %3) {
ret void
}
void batadv_nc_init_orig(struct batadv_orig_node *orig_node) {}


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

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

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

LLVM IR (-O2):
%struct.batadv_orig_node = type opaque
define void @batadv_nc_init_orig(%struct.batadv_orig_node* nocapture %0) {
ret void
}
XSetFunction() {}


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

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

LLVM IR (-O0):
define i32 @XSetFunction() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XSetFunction() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __maplocaltime();
int /*<<< orphan*/ __tzfile_map(int /*<<< orphan*/, int *, int /*<<< orphan*/);
int /*<<< orphan*/ timegm(struct tm *const);
time_t mktime(register struct tm *const t) {
  time_t x = timegm(t);
  int isdst;
  time_t y;
  __maplocaltime();
  x = __tzfile_map(x, &isdst, 0);
  return x;
}


x86 assembly (clang, -O0):
<mktime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <timegm@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <__maplocaltime@plt>
mov    -0xc(%rbp),%edi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <__tzfile_map@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mktime>:
push   %rbx
sub    $0x10,%rsp
call   1050 <timegm@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__maplocaltime@plt>
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   1030 <__tzfile_map@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @mktime(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store %struct.tm* %0, %struct.tm** %2
%6 = load %struct.tm*, %struct.tm** %2
%7 = call i32 @timegm(%struct.tm* %6)
store i32 %7, i32* %3
%8 = call i32 (...) @__maplocaltime()
%9 = load i32, i32* %3
%10 = call i32 @__tzfile_map(i32 %9, i32* %4, i32 0)
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @mktime(%struct.tm* %0) {
%2 = alloca i32
%3 = tail call i32 @timegm(%struct.tm* %0)
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (...) @__maplocaltime()
%6 = call i32 @__tzfile_map(i32 %3, i32* %2, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void get_resource_type(char *data, char *buf) {
  strncpy(buf, data, 4);
  buf[4] = 0;
  return;
}


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

x86 assembly (clang, -O2):
<get_resource_type>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x4(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @get_resource_type(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strncpy(i8* %5, i8* %6, i32 4)
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 4
store i8 0, i8* %9
ret void
}

LLVM IR (-O2):
define void @get_resource_type(i8* %0, i8* %1) {
%3 = tail call i32 @strncpy(i8* %1, i8* %0, i32 4)
%4 = getelementptr inbounds i8, i8* %1, i64 4
store i8 0, i8* %4
ret void
}
int zzTraceGuessOption(int delta) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @zzTraceGuessOption(i32 %0) {
ret i32 0
}
int tor_is_using_nss(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tor_is_using_nss() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int32_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int32_t slti(int32_t reg1, int16_t kte) {
  if (reg1 < kte) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<slti>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1127 <slti+0x27>
movq   $0x1,-0x8(%rbp)
jmp    112f <slti+0x2f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slti>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i64 @slti(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp slt i64 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i64 1, i64* %3
br label %11
10: ; preds = %2
store i64 0, i64* %3
br label %11
11: ; preds = %10, %9
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @slti(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void outInt(int *x) {
  if (x)
    printf("%d ", *x);
}


x86 assembly (clang, -O0):
<outInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <outInt+0x29>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outInt>:
test   %rdi,%rdi
je     1123 <outInt+0x13>
mov    (%rdi),%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @outInt(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @outInt(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double pi = 3.1415;
  printf("PI nin degeri: %f\n", pi);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"PI nin degeri: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 3.141500e+00, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"PI nin degeri: %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double 3.141500e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
int message_free_string(unsigned char *data) {
  if (data != NULL) {
    free(data);
    data = NULL;
  }
  return 0;
}


x86 assembly (clang, -O0):
<message_free_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <message_free_string+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<message_free_string>:
test   %rdi,%rdi
je     111f <message_free_string+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @message_free_string(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void read_flashram_statusb() { printf("read_flashram_statusb\n"); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, unsigned int *);
cl_int clReleaseSampler(cl_sampler sampler) {
  unsigned int sys_args[1];
  sys_args[0] = (unsigned int)sampler;
  return (cl_int)syscall(325, 1026, sys_args);
}


x86 assembly (clang, -O0):
<clReleaseSampler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdx
mov    $0x145,%edi
mov    $0x402,%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clReleaseSampler>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x145,%edi
mov    $0x402,%esi
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clReleaseSampler(i64 %0) {
%2 = alloca i64
%3 = alloca [1 x i32]
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 %5, i32* %6
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
%8 = call i32 @syscall(i32 325, i32 1026, i32* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @clReleaseSampler(i64 %0) {
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %2 to i8*
%4 = trunc i64 %0 to i32
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 %4, i32* %5
%6 = call i32 @syscall(i32 325, i32 1026, i32* %5)
ret i32 %6
}
/* Variables and functions */
int musmidi_getflag(int, int);
int mus_midi_get_flag(int mode, int index) {
  return musmidi_getflag(mode, index);
}


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

x86 assembly (clang, -O2):
<mus_midi_get_flag>:
jmp    1030 <musmidi_getflag@plt>

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

LLVM IR (-O2):
define i32 @mus_midi_get_flag(i32 %0, i32 %1) {
%3 = tail call i32 @musmidi_getflag(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ serial_dec32(int);
void serial_int32(int n) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  serial_dec32(n);
}


x86 assembly (clang, -O0):
<serial_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1147 <serial_int32+0x27>
mov    $0x2d,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <serial_dec32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_int32>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jns    1133 <serial_int32+0x13>
mov    $0x2d,%edi
call   1040 <putchar@plt>
neg    %ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <serial_dec32@plt>

LLVM IR (-O0):
define void @serial_int32(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 %9
5: ; preds = %1
%6 = call i32 @putchar(i8 signext 45)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* %2
%11 = call i32 @serial_dec32(i32 %10)
ret void
}

LLVM IR (-O2):
define void @serial_int32(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @putchar(i8 signext 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @serial_dec32(i32 %7)
ret void
}
void mouseButton(int button, int state, int x, int y) {}


x86 assembly (clang, -O0):
<mouseButton>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mouseButton(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @mouseButton(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
scalar_t__ COND_VS();
int /*<<< orphan*/ EA_A7_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_svs_8_pd7(void) {
  m68ki_write_8(EA_A7_PD_8(), COND_VS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_svs_8_pd7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_A7_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_VS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_svs_8_pd7>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_A7_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_VS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_svs_8_pd7() {
%1 = call i32 (...) @EA_A7_PD_8()
%2 = call i64 (...) @COND_VS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_svs_8_pd7() {
%1 = tail call i32 (...) @EA_A7_PD_8()
%2 = tail call i64 (...) @COND_VS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *progname) {
  printf("usage: %s [-b <buf>] [-f <fmt>] [-d <div>] [-h] <str>\n", progname);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"usage: %s [-b <buf>] [-f <fmt>] [-d <div>] [-h] <str>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [55 x i8] c"usage: %s [-b <buf>] [-f <fmt>] [-d <div>] [-h] <str>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void doing() {
  printf(__func__);
  printf("\n");
}


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

x86 assembly (clang, -O2):
<doing>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@__func__.doing = [6 x i8] c"doing\00"
define void @doing() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.doing, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
ret void
}
int installNum() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @installNum() {
ret i32 0
}
unsigned long int Motor_Board_valueRangeTest(unsigned char typeValue,
                                             void *value) {
  switch (typeValue) {
  case 0x9F:
    if (*(unsigned char *)value != (unsigned char)0)
      return 0x06090030;
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Motor_Board_valueRangeTest>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x9(%rbp),%al
sub    $0x9f,%al
jne    1140 <Motor_Board_valueRangeTest+0x40>
jmp    111e <Motor_Board_valueRangeTest+0x1e>
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     113b <Motor_Board_valueRangeTest+0x3b>
movq   $0x6090030,-0x8(%rbp)
06
jmp    1148 <Motor_Board_valueRangeTest+0x48>
jmp    1140 <Motor_Board_valueRangeTest+0x40>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Motor_Board_valueRangeTest>:
cmp    $0x9f,%dil
jne    1111 <Motor_Board_valueRangeTest+0x11>
mov    $0x6090030,%eax
cmpb   $0x0,(%rsi)
je     1111 <Motor_Board_valueRangeTest+0x11>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @Motor_Board_valueRangeTest(i8 zeroext %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8
%5 = alloca i8*
store i8 %0, i8* %4
store i8* %1, i8** %5
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
switch i32 %7, label %15 [
i32 159, label %8
]
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
store i64 101253168, i64* %3
br label %16
14: ; preds = %8
br label %15
15: ; preds = %2, %14
store i64 0, i64* %3
br label %16
16: ; preds = %15, %13
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @Motor_Board_valueRangeTest(i8 zeroext %0, i8* nocapture %1) {
%3 = icmp eq i8 %0, -97
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4, %2
br label %8
8: ; preds = %4, %7
%9 = phi i64 [ 0, %7 ], [ 101253168, %4 ]
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ exp(double);
double luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
void math_exp(void) {
  double d = luaL_check_number(1);
  lua_pushnumber(exp(d));
}


x86 assembly (clang, -O0):
<math_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <exp@plt>
mov    %eax,%edi
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_exp>:
push   %rax
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
call   1050 <exp@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_exp() {
%1 = alloca double
%2 = call double @luaL_check_number(i32 1)
store double %2, double* %1
%3 = load double, double* %1
%4 = call i32 @exp(double %3)
%5 = call i32 @lua_pushnumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @math_exp() {
%1 = tail call double @luaL_check_number(i32 1)
%2 = tail call i32 @exp(double %1)
%3 = tail call i32 @lua_pushnumber(i32 %2)
ret void
}