xunge/DecIR huggingface dataset:
/* Type definitions */
struct ambapp_dev_hdr {
  int dummy;
};
struct ambapp_apb_info {
  int dummy;
};

/* Variables and functions */
int ambapp_find_apbslvs_next(struct ambapp_dev_hdr *, int, int,
                             struct ambapp_apb_info *, int /*<<< orphan*/, int);
int ambapp_find_apbslvs(struct ambapp_dev_hdr *root, int vendor, int device,
                        struct ambapp_apb_info *dev, int maxno) {
  return ambapp_find_apbslvs_next(root, vendor, device, dev, 0, maxno);
}


x86 assembly (clang, -O0):
<ambapp_find_apbslvs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r9d
xor    %r8d,%r8d
call   1030 <ambapp_find_apbslvs_next@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ambapp_find_apbslvs>:
mov    %r8d,%r9d
xor    %r8d,%r8d
jmp    1030 <ambapp_find_apbslvs_next@plt>

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

LLVM IR (-O2):
%struct.ambapp_dev_hdr = type { i32 }
%struct.ambapp_apb_info = type { i32 }
define i32 @ambapp_find_apbslvs(%struct.ambapp_dev_hdr* %0, i32 %1, i32 %2, %struct.ambapp_apb_info* %3, i32 %4) {
%6 = tail call i32 @ambapp_find_apbslvs_next(%struct.ambapp_dev_hdr* %0, i32 %1, i32 %2, %struct.ambapp_apb_info* %3, i32 0, i32 %4)
ret i32 %6
}
int irrelevant(unsigned long long foo) {
  if (foo <= 42ull)
    return foo <= 42ULL;
}


x86 assembly (clang, -O0):
<irrelevant>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x2a,-0x10(%rbp)
ja     1123 <irrelevant+0x23>
cmpq   $0x2a,-0x10(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @irrelevant(i64 %0) {
ret i32 1
}
void av_encryption_info_free() {}


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

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

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

LLVM IR (-O2):
define void @av_encryption_info_free() {
ret void
}
unsigned int initialize_crc_32(void) { return 0xffffffffL; }


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

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

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

LLVM IR (-O2):
define i32 @initialize_crc_32() {
ret i32 -1
}
unsigned long rho_ruby_create_string_withlen(int len) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @rho_ruby_create_string_withlen(i32 %0) {
ret i64 0
}
int h3(int key, int length) { return key % length; }


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

x86 assembly (clang, -O2):
<h3>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @h3(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_dl_solve(long, long *, long *, double *, double *,
                                    double *, void *, double *, double *);
void umf4solr(long *sys, long Ap[], long Ai[], double Ax[], double x[],
              double b[], void **Numeric, double Control[20], double Info[90]) {
  (void)umfpack_dl_solve(*sys, Ap, Ai, Ax, x, b, *Numeric, Control, Info);
}


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

x86 assembly (clang, -O2):
<umf4solr>:
sub    $0x18,%rsp
movups 0x28(%rsp),%xmm0
mov    0x20(%rsp),%rax
mov    (%rdi),%rdi
mov    (%rax),%rax
movups %xmm0,0x8(%rsp)
mov    %rax,(%rsp)
call   1030 <umfpack_dl_solve@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @umf4solr(i64* %0, i64* %1, i64* %2, double* %3, double* %4, double* %5, i8** %6, double* %7, double* %8) {
%10 = alloca i64*
%11 = alloca i64*
%12 = alloca i64*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca i8**
%17 = alloca double*
%18 = alloca double*
store i64* %0, i64** %10
store i64* %1, i64** %11
store i64* %2, i64** %12
store double* %3, double** %13
store double* %4, double** %14
store double* %5, double** %15
store i8** %6, i8*** %16
store double* %7, double** %17
store double* %8, double** %18
%19 = load i64*, i64** %10
%20 = load i64, i64* %19
%21 = load i64*, i64** %11
%22 = load i64*, i64** %12
%23 = load double*, double** %13
%24 = load double*, double** %14
%25 = load double*, double** %15
%26 = load i8**, i8*** %16
%27 = load i8*, i8** %26
%28 = load double*, double** %17
%29 = load double*, double** %18
%30 = call i32 @umfpack_dl_solve(i64 %20, i64* %21, i64* %22, double* %23, double* %24, double* %25, i8* %27, double* %28, double* %29)
ret void
}

LLVM IR (-O2):
define void @umf4solr(i64* nocapture %0, i64* %1, i64* %2, double* %3, double* %4, double* %5, i8** nocapture %6, double* %7, double* %8) {
%10 = load i64, i64* %0
%11 = load i8*, i8** %6
%12 = tail call i32 @umfpack_dl_solve(i64 %10, i64* %1, i64* %2, double* %3, double* %4, double* %5, i8* %11, double* %7, double* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ signedFactor();
int /*<<< orphan*/ term1();
void firstTerm() {
  signedFactor();
  term1();
}


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

x86 assembly (clang, -O2):
<firstTerm>:
push   %rax
xor    %eax,%eax
call   1030 <signedFactor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <term1@plt>

LLVM IR (-O0):
define void @firstTerm() {
%1 = call i32 (...) @signedFactor()
%2 = call i32 (...) @term1()
ret void
}

LLVM IR (-O2):
define void @firstTerm() {
%1 = tail call i32 (...) @signedFactor()
%2 = tail call i32 (...) @term1()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int height_inc;
};
typedef TYPE_1__ XIconSize;

/* Variables and functions */
void set_XIconSize_height_inc(void *_p, int _v) {
  ((XIconSize *)_p)->height_inc = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XIconSize_height_inc>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XIconSize_height_inc(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
float __nv_normcdfinvf(float);
float normcdfinvf(float __a) { return __nv_normcdfinvf(__a); }


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

x86 assembly (clang, -O2):
<normcdfinvf>:
jmp    1030 <__nv_normcdfinvf@plt>

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

LLVM IR (-O2):
define float @normcdfinvf(float %0) {
%2 = tail call float @__nv_normcdfinvf(float %0)
ret float %2
}
/* Variables and functions */
int *func_do_something();
int main() {
  int *p = func_do_something();
  *p += 1;
  return *p;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func_do_something@plt>
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* (...) @func_do_something()
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
ret i32 %3
}
int f5_bis(char l, int r, int n) {
  int result = 1;
  int tmp = 2;
  if (tmp == 0)
    return 1;
  while (tmp--) {
    result *= l;
  }
  return result;
}


x86 assembly (clang, -O0):
<f5_bis>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1134 <f5_bis+0x34>
movl   $0x1,-0x4(%rbp)
jmp    1163 <f5_bis+0x63>
jmp    1139 <f5_bis+0x39>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     115d <f5_bis+0x5d>
movsbl -0x5(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <f5_bis+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f5_bis(i8 signext %0, i32 %1, i32 %2) {
%4 = sext i8 %0 to i32
%5 = mul nsw i32 %4, %4
ret i32 %5
}
/* Variables and functions */
int find_digital_root(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int num;
  printf("Input an integer: ");
  scanf("%d", &num);
  printf("%d is the digital product root of %d.\n", find_digital_root(num),
         num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <find_digital_root@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%edx
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <find_digital_root@plt>
mov    0x4(%rsp),%edx
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Input an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [39 x i8] c"%d is the digital product root of %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @find_digital_root(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Input an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [39 x i8] c"%d is the digital product root of %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @find_digital_root(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_string(char *);
void print_info(char *str) { __console_tx_string(str); }


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

x86 assembly (clang, -O2):
<print_info>:
jmp    1030 <__console_tx_string@plt>

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

LLVM IR (-O2):
define void @print_info(i8* %0) {
%2 = tail call i32 @__console_tx_string(i8* %0)
ret void
}
clearall(job) char job[150];
{
  int i;
  unload_all();
  unmark_all();
  clear_rot();
}


x86 assembly (clang, -O0):
<clearall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <unload_all@plt>
mov    $0x0,%al
call   1040 <unmark_all@plt>
mov    $0x0,%al
call   1030 <clear_rot@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearall>:
push   %rax
xor    %eax,%eax
call   1050 <unload_all@plt>
xor    %eax,%eax
call   1040 <unmark_all@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <clear_rot@plt>

LLVM IR (-O0):
define i32 @clearall(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = call i32 (...) @unload_all()
%6 = call i32 (...) @unmark_all()
%7 = call i32 (...) @clear_rot()
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @clearall(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @unload_all()
%3 = tail call i32 (...) @unmark_all()
%4 = tail call i32 (...) @clear_rot()
ret i32 undef
}
void init_long(long *lo1, long *lo2) {
  int i;
  for (i = 0; i < 5; i++) {
    lo1[i] = 0;
    lo2[i] = 0;
  }
}


x86 assembly (clang, -O0):
<init_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    114b <init_long+0x4b>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <init_long+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_long>:
movq   $0x0,(%rdi)
movq   $0x0,(%rsi)
movq   $0x0,0x8(%rdi)
movq   $0x0,0x8(%rsi)
movq   $0x0,0x10(%rdi)
movq   $0x0,0x10(%rsi)
movq   $0x0,0x18(%rdi)
movq   $0x0,0x18(%rsi)
movq   $0x0,0x20(%rdi)
movq   $0x0,0x20(%rsi)
ret

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

LLVM IR (-O2):
define void @init_long(i64* nocapture writeonly %0, i64* nocapture writeonly %1) {
store i64 0, i64* %0
store i64 0, i64* %1
%3 = getelementptr inbounds i64, i64* %0, i64 1
store i64 0, i64* %3
%4 = getelementptr inbounds i64, i64* %1, i64 1
store i64 0, i64* %4
%5 = getelementptr inbounds i64, i64* %0, i64 2
store i64 0, i64* %5
%6 = getelementptr inbounds i64, i64* %1, i64 2
store i64 0, i64* %6
%7 = getelementptr inbounds i64, i64* %0, i64 3
store i64 0, i64* %7
%8 = getelementptr inbounds i64, i64* %1, i64 3
store i64 0, i64* %8
%9 = getelementptr inbounds i64, i64* %0, i64 4
store i64 0, i64* %9
%10 = getelementptr inbounds i64, i64* %1, i64 4
store i64 0, i64* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lua_error(char *);
void orderFB(void) { lua_error("unexpected type at comparison"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"unexpected type at comparison\00"
define void @orderFB() {
%1 = call i32 @lua_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"unexpected type at comparison\00"
define void @orderFB() {
%1 = tail call i32 @lua_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct terminal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _xymodem_send_file(struct terminal *, int, char *);
int cmd_ymodem_send(struct terminal *tm, int argc, char **argv) {
  if (argc != 2)
    return -1;
  _xymodem_send_file(tm, 1024, argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<cmd_ymodem_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x2,-0x14(%rbp)
je     1139 <cmd_ymodem_send+0x29>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <cmd_ymodem_send+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdx
mov    $0x400,%esi
call   1030 <_xymodem_send_file@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_ymodem_send>:
mov    $0xffffffff,%eax
cmp    $0x2,%esi
jne    112f <cmd_ymodem_send+0x1f>
push   %rax
mov    0x8(%rdx),%rdx
mov    $0x400,%esi
call   1030 <_xymodem_send_file@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
%struct.terminal = type { i32 }
define i32 @cmd_ymodem_send(%struct.terminal* %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca %struct.terminal*
%6 = alloca i32
%7 = alloca i8**
store %struct.terminal* %0, %struct.terminal** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 -1, i32* %4
br label %17
11: ; preds = %3
%12 = load %struct.terminal*, %struct.terminal** %5
%13 = load i8**, i8*** %7
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @_xymodem_send_file(%struct.terminal* %12, i32 1024, i8* %15)
store i32 0, i32* %4
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
%struct.terminal = type { i32 }
define i32 @cmd_ymodem_send(%struct.terminal* %0, i32 %1, i8** nocapture %2) {
%4 = icmp eq i32 %1, 2
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = getelementptr inbounds i8*, i8** %2, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @_xymodem_send_file(%struct.terminal* %0, i32 1024, i8* %7)
br label %9
9: ; preds = %3, %5
%10 = phi i32 [ 0, %5 ], [ -1, %3 ]
ret i32 %10
}
B(e) { return s(233, e); }


x86 assembly (clang, -O0):
<B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xe9,%edi
mov    $0x0,%al
call   1030 <s@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<B>:
mov    %edi,%esi
mov    $0xe9,%edi
xor    %eax,%eax
jmp    1030 <s@plt>

LLVM IR (-O0):
define i32 @B(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @s to i32 (i32, i32, ...)*)(i32 233, i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @B(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @s to i32 (i32, i32, ...)*)(i32 233, i32 %0)
ret i32 %2
}
/* Variables and functions */
int strnlen(char *, int);
void strnlen_constant4() {
  if (strnlen("123456", 3) != 3)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strnlen_constant4>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
cmp    $0x3,%eax
je     112e <strnlen_constant4+0x1e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen_constant4>:
lea    0xee9(%rip),%rdi
mov    $0x3,%esi
jmp    1030 <strnlen@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"123456\00"
define void @strnlen_constant4() {
%1 = tail call i32 @strnlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
double f1(x, y)
double x, y;
{ return exp(x * y); }


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

x86 assembly (clang, -O2):
<f1>:
mulsd  %xmm1,%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @f1(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fmul double %5, %6
%8 = call double @exp(double %7)
ret double %8
}

LLVM IR (-O2):
define double @f1(double %0, double %1) {
%3 = fmul double %0, %1
%4 = tail call double @exp(double %3)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ fenv_t;

/* Variables and functions */
int feupdateenv(const fenv_t *envp) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @feupdateenv(i32* nocapture readnone %0) {
ret i32 -1
}
void glFogfv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glFogfv() {
ret void
}
/* Variables and functions */
char **calloc(int, int);
size_t mx_strvec_length_cache(char **, int);
char **mx_strvec_new(void) {
  char **strvec;
  size_t len;
  strvec = calloc(sizeof(*strvec), 1);
  if (!strvec)
    return NULL;
  len = mx_strvec_length_cache(strvec, -1);
  if (len != -1)
    mx_strvec_length_cache(strvec, 0);
  return strvec;
}


x86 assembly (clang, -O0):
<mx_strvec_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x8,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1153 <mx_strvec_new+0x33>
movq   $0x0,-0x8(%rbp)
jmp    1183 <mx_strvec_new+0x63>
mov    -0x10(%rbp),%rdi
mov    $0xffffffff,%esi
call   1040 <mx_strvec_length_cache@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0xffffffffffffffff,-0x18(%rbp)
je     117b <mx_strvec_new+0x5b>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <mx_strvec_length_cache@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mx_strvec_new>:
push   %rbx
mov    $0x8,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1155 <mx_strvec_new+0x35>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   1040 <mx_strvec_length_cache@plt>
cmp    $0xffffffffffffffff,%rax
je     1155 <mx_strvec_new+0x35>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <mx_strvec_length_cache@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8** @mx_strvec_new() {
%1 = tail call i8** @calloc(i32 8, i32 1)
%2 = icmp eq i8** %1, null
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i64 @mx_strvec_length_cache(i8** %1, i32 -1)
%5 = icmp eq i64 %4, -1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i64 @mx_strvec_length_cache(i8** %1, i32 0)
br label %8
8: ; preds = %3, %6, %0
ret i8** %1
}
char *decode(char *shortUrl) { return shortUrl; }


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

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

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

LLVM IR (-O2):
define i8* @decode(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
long long pow_up(long long);
int /*<<< orphan*/ printf(char *, long long);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  long long n;
  scanf("%lld", &n);
  n = n + 1;
  long long base;
  base = pow_up(n);
  base = (base - 1) * 500000004 % 1000000007;
  printf("%lld\n", base);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <pow_up@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
imul   $0x1dcd6504,%rax,%rax
mov    $0x3b9aca07,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%rdi
add    $0x1,%rdi
mov    %rdi,(%rsp)
call   1050 <pow_up@plt>
imul   $0x1dcd6504,%rax,%rcx
lea    -0x1dcd6504(%rcx),%rsi
movabs $0x89705f3112a28fe5,%rdx
5f 70 89
mov    %rsi,%rax
imul   %rdx
lea    (%rdx,%rcx,1),%rax
add    $0xffffffffe2329afc,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x1d,%rax
add    %rcx,%rax
imul   $0x3b9aca07,%rax,%rax
sub    %rax,%rsi
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%5 = load i64, i64* %2
%6 = add nsw i64 %5, 1
store i64 %6, i64* %2
%7 = load i64, i64* %2
%8 = call i64 @pow_up(i64 %7)
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = sub nsw i64 %9, 1
%11 = mul nsw i64 %10, 500000004
%12 = srem i64 %11, 1000000007
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = add nsw i64 %4, 1
store i64 %5, i64* %1
%6 = call i64 @pow_up(i64 %5)
%7 = mul i64 %6, 500000004
%8 = add i64 %7, -500000004
%9 = srem i64 %8, 1000000007
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %9)
ret i32 0
}
/* Variables and functions */
float cos(float);
float f(float x, float y) {
  return (cos(4.f * 3.f * (x + y)) - cos(11.f * (x - y) + 0.5f)) / 2.f;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
addss  -0x8(%rbp),%xmm1
movss  0xed8(%rip),%xmm0
mulss  %xmm1,%xmm0
call   1030 <cos@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  0xeb0(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xea8(%rip),%xmm1
addss  %xmm1,%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  0xe83(%rip),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
sub    $0x18,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x10(%rsp)
addss  %xmm1,%xmm0
mulss  0xed4(%rip),%xmm0
call   1030 <cos@plt>
movss  %xmm0,0x14(%rsp)
movss  0x10(%rsp),%xmm0
subss  0xc(%rsp),%xmm0
mulss  0xeb9(%rip),%xmm0
addss  0xeb5(%rip),%xmm0
call   1030 <cos@plt>
movss  0x14(%rsp),%xmm1
subss  %xmm0,%xmm1
mulss  0xe9e(%rip),%xmm1
movaps %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fadd float %5, %6
%8 = fmul float 1.200000e+01, %7
%9 = call float @cos(float %8)
%10 = load float, float* %3
%11 = load float, float* %4
%12 = fsub float %10, %11
%13 = call float @llvm.fmuladd.f32(float 1.100000e+01, float %12, float 5.000000e-01)
%14 = call float @cos(float %13)
%15 = fsub float %9, %14
%16 = fdiv float %15, 2.000000e+00
ret float %16
}

LLVM IR (-O2):
define float @f(float %0, float %1) {
%3 = fadd float %0, %1
%4 = fmul float %3, 1.200000e+01
%5 = tail call float @cos(float %4)
%6 = fsub float %0, %1
%7 = tail call float @llvm.fmuladd.f32(float %6, float 1.100000e+01, float 5.000000e-01)
%8 = tail call float @cos(float %7)
%9 = fsub float %5, %8
%10 = fmul float %9, 5.000000e-01
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ q(int *);
void p(int *i) {
  if (*i)
    printf("%d\n", *i);
  else {
    int a;
    q(&a);
  }
}


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1150 <p+0x30>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    1159 <p+0x39>
lea    -0xc(%rbp),%rdi
call   1040 <q@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p>:
push   %rax
mov    (%rdi),%esi
test   %esi,%esi
je     1134 <p+0x14>
lea    0xed2(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>
lea    0x4(%rsp),%rdi
call   1040 <q@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @p(i32* nocapture %0) {
%2 = alloca i32
%3 = load i32, i32* %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %10
7: ; preds = %1
%8 = bitcast i32* %2 to i8*
%9 = call i32 @q(i32* %2)
br label %10
10: ; preds = %7, %5
ret void
}
int fibonacci(int n) {
  if (n < 2) {
    return n;
  } else {
    return fibonacci(n - 2) + fibonacci(n - 1);
  }
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <fibonacci+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fibonacci+0x43>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     1147 <fibonacci+0x37>
add    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x3(%rbx),%edi
call   1030 <fibonacci@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1130 <fibonacci+0x20>
mov    $0x1,%ebx
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -2
%7 = tail call i32 @fibonacci(i32 %6)
%8 = add nsw i32 %4, -1
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 3
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ 1, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
int line_length(char *data) {
  unsigned int i = 0;
  while (*data != '\n') {
    i++;
    data++;
  }
  return i;
}


x86 assembly (clang, -O0):
<line_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1139 <line_length+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <line_length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_length>:
xor    %eax,%eax
cmpb   $0xa,(%rdi)
je     111b <line_length+0x1b>
xor    %eax,%eax
nopl   0x0(%rax)
cmpb   $0xa,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <line_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @line_length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 10
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add i32 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
int mod2add(int x, int y) { return (x == y ? 0 : 1); }


x86 assembly (clang, -O0):
<mod2add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod2add>:
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @mod2add(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 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 0, i32 1
ret i32 %9
}

LLVM IR (-O2):
define i32 @mod2add(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void printCodeBlockMeta(void *code) {}


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

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

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

LLVM IR (-O2):
define void @printCodeBlockMeta(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int /*<<< orphan*/ strlcpy(char *, char *, int);
void size_1() {
  char z[1];
  char str[] = "hi";
  strlcpy(z, str, sizeof(str));
}


x86 assembly (clang, -O0):
<size_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%ax
mov    %ax,-0x4(%rbp)
mov    0xed9(%rip),%al
mov    %al,-0x2(%rbp)
lea    -0x1(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strlcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_1>:
push   %rax
movb   $0x0,0x6(%rsp)
movw   $0x6968,0x4(%rsp)
lea    0x7(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    $0x3,%edx
call   1030 <strlcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.size_1.str = [3 x i8] c"hi\00"
define void @size_1() {
%1 = alloca [1 x i8]
%2 = alloca [3 x i8]
%3 = bitcast [3 x i8]* %2 to i8*
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%6 = call i32 @strlcpy(i8* %4, i8* %5, i32 3)
ret void
}

LLVM IR (-O2):
@__const.size_1.str = [3 x i8] c"hi\00"
define void @size_1() {
%1 = alloca [1 x i8]
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = call i32 @strlcpy(i8* %3, i8* %4, i32 3)
ret void
}
void writel_es(unsigned short offset, unsigned int val) {
  asm("" : : : "memory");
  asm("addr32 "
      "movl %0, %%es:(%1)"
      :
      : "r"(val), "r"((unsigned int)offset));
}


x86 assembly (clang, -O0):
<writel_es>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzwl -0x2(%rbp),%ecx
addr32 es mov %eax,(%ecx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writel_es>:
addr32 es mov %esi,(%edi)
ret

LLVM IR (-O0):
define void @writel_es(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
ret void
}

LLVM IR (-O2):
define void @writel_es(i16 zeroext %0, i32 %1) {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
%3 = zext i16 %0 to i32
tail call void asm sideeffect "addr32 movl $0, %es:($1)", "r,r,~{dirflag},~{fpsr},~{flags}"(i32 %1, i32 %3)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int encode_unsigned16(uint8_t *apdu, uint16_t value) {
  apdu[0] = (uint8_t)((value & 0xff00) >> 8);
  apdu[1] = (uint8_t)(value & 0x00ff);
  return 2;
}


x86 assembly (clang, -O0):
<encode_unsigned16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_unsigned16>:
mov    %esi,%eax
movzbl %ah,%ecx
mov    %rcx,(%rdi)
movzbl %al,%eax
mov    %rax,0x8(%rdi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @encode_unsigned16(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 65280
%7 = ashr i32 %6, 8
%8 = sext i32 %7 to i64
%9 = load i64*, i64** %3
%10 = getelementptr inbounds i64, i64* %9, i64 0
store i64 %8, i64* %10
%11 = load i32, i32* %4
%12 = and i32 %11, 255
%13 = sext i32 %12 to i64
%14 = load i64*, i64** %3
%15 = getelementptr inbounds i64, i64* %14, i64 1
store i64 %13, i64* %15
ret i32 2
}

LLVM IR (-O2):
define i32 @encode_unsigned16(i64* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = and i32 %3, 255
%5 = zext i32 %4 to i64
store i64 %5, i64* %0
%6 = and i32 %1, 255
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %7, i64* %8
ret i32 2
}
void yy_1_Garbage(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_Garbage(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int objc_compare_strings(const void *k1, const void *k2) {
  if (k1 == k2)
    return 1;
  else if (k1 == 0 || k2 == 0)
    return 0;
  else
    return !strcmp((const char *)k1, (const char *)k2);
}


x86 assembly (clang, -O0):
<objc_compare_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113a <objc_compare_strings+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1179 <objc_compare_strings+0x69>
cmpq   $0x0,-0x10(%rbp)
je     1150 <objc_compare_strings+0x40>
cmpq   $0x0,-0x18(%rbp)
jne    115c <objc_compare_strings+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1179 <objc_compare_strings+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<objc_compare_strings>:
cmp    %rsi,%rdi
je     1135 <objc_compare_strings+0x25>
xor    %eax,%eax
test   %rdi,%rdi
je     1134 <objc_compare_strings+0x24>
test   %rsi,%rsi
je     1134 <objc_compare_strings+0x24>
push   %rax
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @objc_compare_strings(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
%6 = icmp eq i8* %1, null
%7 = or i1 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %2, %8
%13 = phi i32 [ %11, %8 ], [ 1, %2 ], [ 0, %4 ]
ret i32 %13
}