xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int main(void) {
  foo(0, 0, 0, 0, 0, 0, 5, 6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x5,(%rsp)
movl   $0x6,0x8(%rsp)
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x6
push   $0x5
call   1030 <foo@plt>
add    $0x10,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 5, i32 6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 5, i32 6)
ret i32 0
}
/* Type definitions */
struct group {
  int /*<<< orphan*/ gr_name;
};
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ fputs(int /*<<< orphan*/, int /*<<< orphan*/);
struct group *getgrgid(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_group_name(gid_t gid) {
  struct group *group_obj = getgrgid(gid);
  fputs(group_obj->gr_name, stdout);
}


x86 assembly (clang, -O0):
<print_group_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <getgrgid@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_group_name>:
push   %rax
call   1030 <getgrgid@plt>
mov    (%rax),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
pop    %rax
jmp    1040 <fputs@plt>

LLVM IR (-O0):
%struct.group = type { i32 }
@stdout = global i32 0
define void @print_group_name(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.group*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call %struct.group* @getgrgid(i32 %4)
store %struct.group* %5, %struct.group** %3
%6 = load %struct.group*, %struct.group** %3
%7 = getelementptr inbounds %struct.group, %struct.group* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load i32, i32* @stdout
%10 = call i32 @fputs(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.group = type { i32 }
@stdout = global i32 0
define void @print_group_name(i32 %0) {
%2 = tail call %struct.group* @getgrgid(i32 %0)
%3 = getelementptr inbounds %struct.group, %struct.group* %2, i64 0, i32 0
%4 = load i32, i32* %3
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i32 %4, i32 %5)
ret void
}
void sortByNomeEquipe() {}


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

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

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

LLVM IR (-O2):
define void @sortByNomeEquipe() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ fts_name;
};
typedef TYPE_1__ FTSENT;

/* Variables and functions */
int strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int compare(const FTSENT **one, const FTSENT **two) {
  return (strcmp((*one)->fts_name, (*two)->fts_name));
}


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

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rax
mov    (%rax),%edi
mov    (%rsi),%rax
mov    (%rax),%esi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32 }
define i32 @compare(%struct.TYPE_4__** %0, %struct.TYPE_4__** %1) {
%3 = alloca %struct.TYPE_4__**
%4 = alloca %struct.TYPE_4__**
store %struct.TYPE_4__** %0, %struct.TYPE_4__*** %3
store %struct.TYPE_4__** %1, %struct.TYPE_4__*** %4
%5 = load %struct.TYPE_4__**, %struct.TYPE_4__*** %3
%6 = load %struct.TYPE_4__*, %struct.TYPE_4__** %5
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load %struct.TYPE_4__**, %struct.TYPE_4__*** %4
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %9
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i32 @strcmp(i32 %8, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32 }
define i32 @compare(%struct.TYPE_4__** nocapture %0, %struct.TYPE_4__** nocapture %1) {
%3 = load %struct.TYPE_4__*, %struct.TYPE_4__** %0
%4 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 0
%5 = load i32, i32* %4
%6 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %6, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @strcmp(i32 %5, i32 %8)
ret i32 %9
}
void vscale(float *v, float div) {
  {
    *(v + 0) *= div;
    *(v + 1) *= div;
    *(v + 2) *= div;
    return;
  }
}


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

x86 assembly (clang, -O2):
<vscale>:
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @vscale(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float*, float** %3
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = fmul float %8, %5
store float %9, float* %7
%10 = load float, float* %4
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = fmul float %13, %10
store float %14, float* %12
%15 = load float, float* %4
%16 = load float*, float** %3
%17 = getelementptr inbounds float, float* %16, i64 2
%18 = load float, float* %17
%19 = fmul float %18, %15
store float %19, float* %17
ret void
}

LLVM IR (-O2):
define void @vscale(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fmul float %3, %1
store float %4, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fmul float %6, %1
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fmul float %9, %1
store float %10, float* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void down(int *sem) {
retry:
  while (*sem)
    sleep(5);
  (*sem)++;
  if (*sem > 1) {
    (*sem)--;
    goto retry;
  }
  return;
}


x86 assembly (clang, -O0):
<down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
jmp    1121 <down+0x11>
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     113d <down+0x2d>
mov    $0x5,%edi
call   1030 <sleep@plt>
jmp    1121 <down+0x11>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jle    1165 <down+0x55>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
jmp    111c <down+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<down>:
push   %rbx
mov    %rdi,%rbx
cmpl   $0x0,(%rdi)
je     112f <down+0x1f>
nopl   0x0(%rax)
mov    $0x5,%edi
call   1030 <sleep@plt>
cmpl   $0x0,(%rbx)
jne    1120 <down+0x10>
movl   $0x1,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @down(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1, %4
%5 = tail call i32 @sleep(i32 5)
%6 = load i32, i32* %0
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %1
store i32 1, i32* %0
ret void
}
/* Variables and functions */
int atan(double);
int sqrt(int);
double asin(double x) { return 2. * atan(x / (1. + sqrt(1. - x * x))); }


x86 assembly (clang, -O0):
<asin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  0xe86(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <atan@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe65(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asin>:
push   %rax
movsd  %xmm0,(%rsp)
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xeca(%rip),%xmm1
subsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
addsd  0xeae(%rip),%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <atan@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @asin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fneg double %4
%7 = call double @llvm.fmuladd.f64(double %6, double %5, double 1.000000e+00)
%8 = fptosi double %7 to i32
%9 = call i32 @sqrt(i32 %8)
%10 = sitofp i32 %9 to double
%11 = fadd double 1.000000e+00, %10
%12 = fdiv double %3, %11
%13 = call i32 @atan(double %12)
%14 = sitofp i32 %13 to double
%15 = fmul double 2.000000e+00, %14
ret double %15
}

LLVM IR (-O2):
define double @asin(double %0) {
%2 = fneg double %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
%4 = fptosi double %3 to i32
%5 = tail call i32 @sqrt(i32 %4)
%6 = sitofp i32 %5 to double
%7 = fadd double %6, 1.000000e+00
%8 = fdiv double %0, %7
%9 = tail call i32 @atan(double %8)
%10 = sitofp i32 %9 to double
%11 = fmul double %10, 2.000000e+00
ret double %11
}
void RTSemRWGetWriterReadRecursion(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemRWGetWriterReadRecursion() {
ret void
}
int g(int x) {
  if (x == 0)
    return 0;
  else
    return g(g(x - 1));
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <g+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1146 <g+0x36>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <g@plt>
mov    %eax,%edi
call   1030 <g@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @g(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ find_audio_driver();
int /*<<< orphan*/ find_input_driver();
int /*<<< orphan*/ find_video_driver();
void init_drivers_pre(void) {
  find_audio_driver();
  find_video_driver();
  find_input_driver();
}


x86 assembly (clang, -O0):
<init_drivers_pre>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <find_audio_driver@plt>
mov    $0x0,%al
call   1050 <find_video_driver@plt>
mov    $0x0,%al
call   1040 <find_input_driver@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_drivers_pre>:
push   %rax
xor    %eax,%eax
call   1030 <find_audio_driver@plt>
xor    %eax,%eax
call   1050 <find_video_driver@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <find_input_driver@plt>

LLVM IR (-O0):
define void @init_drivers_pre() {
%1 = call i32 (...) @find_audio_driver()
%2 = call i32 (...) @find_video_driver()
%3 = call i32 (...) @find_input_driver()
ret void
}

LLVM IR (-O2):
define void @init_drivers_pre() {
%1 = tail call i32 (...) @find_audio_driver()
%2 = tail call i32 (...) @find_video_driver()
%3 = tail call i32 (...) @find_input_driver()
ret void
}
void batadv_dat_init_own_addr(struct batadv_priv *bat_priv,
                              struct batadv_hard_iface *iface) {}


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

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

LLVM IR (-O0):
%struct.batadv_priv = type opaque
%struct.batadv_hard_iface = type opaque
define void @batadv_dat_init_own_addr(%struct.batadv_priv* %0, %struct.batadv_hard_iface* %1) {
%3 = alloca %struct.batadv_priv*
%4 = alloca %struct.batadv_hard_iface*
store %struct.batadv_priv* %0, %struct.batadv_priv** %3
store %struct.batadv_hard_iface* %1, %struct.batadv_hard_iface** %4
ret void
}

LLVM IR (-O2):
%struct.batadv_priv = type opaque
%struct.batadv_hard_iface = type opaque
define void @batadv_dat_init_own_addr(%struct.batadv_priv* nocapture %0, %struct.batadv_hard_iface* nocapture %1) {
ret void
}
/* Variables and functions */
int exact_square(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, c;
  scanf("%d", &n);
  c = exact_square(n);
  printf("%d\n", c);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @exact_square(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @exact_square(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
void printAsciiArt() {}


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

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

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

LLVM IR (-O2):
define void @printAsciiArt() {
ret void
}
/* Variables and functions */
int doubles_argextreme(double *, int, int /*<<< orphan*/);
int doubles_argmax(double *doubles, int size) {
  return doubles_argextreme(doubles, size, 0);
}


x86 assembly (clang, -O0):
<doubles_argmax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <doubles_argextreme@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubles_argmax>:
xor    %edx,%edx
jmp    1030 <doubles_argextreme@plt>

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

LLVM IR (-O2):
define i32 @doubles_argmax(double* %0, i32 %1) {
%3 = tail call i32 @doubles_argextreme(double* %0, i32 %1, i32 0)
ret i32 %3
}
void addDeferredMultiBulkLength(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               16, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<addDeferredMultiBulkLength>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x10,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addDeferredMultiBulkLength>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x10,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addDeferredMultiBulkLength = [27 x i8] c"addDeferredMultiBulkLength\00"
define void @addDeferredMultiBulkLength() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @__func__.addDeferredMultiBulkLength, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addDeferredMultiBulkLength = [27 x i8] c"addDeferredMultiBulkLength\00"
define void @addDeferredMultiBulkLength() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @__func__.addDeferredMultiBulkLength, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare(const void *a, const void *b, void *context) {
  const char *s1 = *(char **)a;
  const char *s2 = *(char **)b;
  (void)context;
  return strcmp(s2, s1);
}


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

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rax
mov    (%rsi),%rdi
mov    %rax,%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i8**
%5 = load i8*, i8** %4
%6 = bitcast i8* %1 to i8**
%7 = load i8*, i8** %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(1) %5)
ret i32 %8
}
long PIPE(fds)
long *fds;
{ return ((long)pipe(fds)); }


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

x86 assembly (clang, -O2):
<PIPE>:
push   %rax
xor    %eax,%eax
call   1030 <pipe@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @PIPE(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = call i32 (i64*, ...) bitcast (i32 (...)* @pipe to i32 (i64*, ...)*)(i64* %3)
%5 = sext i32 %4 to i64
ret i64 %5
}

LLVM IR (-O2):
define i64 @PIPE(i64* %0) {
%2 = tail call i32 (i64*, ...) bitcast (i32 (...)* @pipe to i32 (i64*, ...)*)(i64* %0)
%3 = sext i32 %2 to i64
ret i64 %3
}
void I400ToARGBRow_NEON() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @I400ToARGBRow_NEON() {
ret void
}
/* Variables and functions */
int __res_msend(int, unsigned char const **, int *, unsigned char **, int *,
                int);
int __res_send(const unsigned char *msg, int msglen, unsigned char *answer,
               int anslen) {
  int r = __res_msend(1, &msg, &msglen, &answer, &anslen, anslen);
  return r < 0 ? r : anslen;
}


x86 assembly (clang, -O0):
<__res_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%r9d
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
call   1030 <__res_msend@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    115c <__res_send+0x4c>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1162 <__res_send+0x52>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__res_send>:
sub    $0x18,%rsp
mov    %ecx,%r9d
mov    %rdi,0x10(%rsp)
mov    %esi,0x4(%rsp)
mov    %rdx,0x8(%rsp)
mov    %ecx,(%rsp)
lea    0x10(%rsp),%rsi
lea    0x4(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rsp,%r8
mov    $0x1,%edi
call   1030 <__res_msend@plt>
test   %eax,%eax
js     114b <__res_send+0x3b>
mov    (%rsp),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @__res_send(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = call i32 @__res_msend(i32 1, i8** %5, i32* %6, i8** %7, i32* %8, i32 %3)
%10 = icmp slt i32 %9, 0
%11 = load i32, i32* %8
%12 = select i1 %10, i32 %9, i32 %11
ret i32 %12
}
int ft_tolower(int c) {
  if (c <= 90 && c >= 65)
    return (c + 32);
  return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5a,-0x8(%rbp)
jg     1129 <ft_tolower+0x29>
cmpl   $0x41,-0x8(%rbp)
jl     1129 <ft_tolower+0x29>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <ft_tolower+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 90
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 65
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int transform_hex(char);
int to_decimal(char a, char b) {
  return transform_hex(a) * 16 + transform_hex(b);
}


x86 assembly (clang, -O0):
<to_decimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <transform_hex@plt>
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <transform_hex@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_decimal>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <transform_hex@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
mov    %ebx,%edi
call   1030 <transform_hex@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @to_decimal(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = call i32 @transform_hex(i8 signext %5)
%7 = mul nsw i32 %6, 16
%8 = load i8, i8* %4
%9 = call i32 @transform_hex(i8 signext %8)
%10 = add nsw i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @to_decimal(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @transform_hex(i8 signext %0)
%4 = shl nsw i32 %3, 4
%5 = tail call i32 @transform_hex(i8 signext %1)
%6 = add nsw i32 %4, %5
ret i32 %6
}
int printf(const char *fmt, ...) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @printf(i8* nocapture readnone %0, ...) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ UpdateStatus();
void bp_UpdateLogging(void) { UpdateStatus(); }


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

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

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

LLVM IR (-O2):
define void @bp_UpdateLogging() {
%1 = tail call i32 (...) @UpdateStatus()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void *Conta(void *arg) {
  long soma = 0, tid = (long)arg;
  while (soma < tid)
    soma++;
  pthread_exit((void *)(soma));
}


x86 assembly (clang, -O0):
<Conta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    114b <Conta+0x3b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112c <Conta+0x1c>
mov    -0x18(%rbp),%rdi
call   1030 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Conta>:
xor    %eax,%eax
test   %rdi,%rdi
cmovle %rax,%rdi
jmp    1030 <pthread_exit@plt>

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

LLVM IR (-O2):
define noalias i8* @Conta(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = call i64 @llvm.smax.i64(i64 %2, i64 0)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @pthread_exit(i8* %4)
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct tcphdr {
  int /*<<< orphan*/ window;
};

/* Variables and functions */
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
uint16_t _tcphdr_window_ntohs(struct tcphdr *h) { return ntohs(h->window); }


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

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

LLVM IR (-O0):
%struct.tcphdr = type { i32 }
define i32 @_tcphdr_window_ntohs(%struct.tcphdr* %0) {
%2 = alloca %struct.tcphdr*
store %struct.tcphdr* %0, %struct.tcphdr** %2
%3 = load %struct.tcphdr*, %struct.tcphdr** %2
%4 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @ntohs(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.tcphdr = type { i32 }
define i32 @_tcphdr_window_ntohs(%struct.tcphdr* nocapture %0) {
%2 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @ntohs(i32 %3)
ret i32 %4
}
int test_imm_A0int16_mem(short *val) {
  return ((*val) & (-0xA0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A0int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff60,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A0int16_mem>:
movzwl (%rdi),%eax
test   $0xff60,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A0int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -160
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_A0int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -160
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void zcb_onArrayComplete(char *name) {}


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

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

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

LLVM IR (-O2):
define void @zcb_onArrayComplete(i8* nocapture %0) {
ret void
}
int f12c(int y) {
  int x = y;
  x = 1;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @f12c(i32 %0) {
ret i32 1
}
/* Variables and functions */
int gdGdcChangeDataType(unsigned int *);
int cdops_set_audio_read_mode() {
  unsigned int param[4];
  param[0] = 0;
  param[1] = 4096;
  param[2] = 512;
  param[3] = 2352;
  return gdGdcChangeDataType(param);
}


x86 assembly (clang, -O0):
<cdops_set_audio_read_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x10(%rbp)
movl   $0x1000,-0xc(%rbp)
movl   $0x200,-0x8(%rbp)
movl   $0x930,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <gdGdcChangeDataType@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdops_set_audio_read_mode>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <gdGdcChangeDataType@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cdops_set_audio_read_mode() {
%1 = alloca [4 x i32]
%2 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
store i32 0, i32* %2
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
store i32 4096, i32* %3
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
store i32 512, i32* %4
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
store i32 2352, i32* %5
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%7 = call i32 @gdGdcChangeDataType(i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cdops_set_audio_read_mode() {
%1 = alloca <4 x i32>
%2 = bitcast <4 x i32>* %1 to i8*
%3 = getelementptr inbounds <4 x i32>, <4 x i32>* %1, i64 0, i64 0
store <4 x i32> <i32 0, i32 4096, i32 512, i32 2352>, <4 x i32>* %1
%4 = call i32 @gdGdcChangeDataType(i32* %3)
ret i32 %4
}
/* Variables and functions */
int f();
no_stmts() { int i = f(); }


x86 assembly (clang, -O0):
<no_stmts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @no_stmts() {
%1 = tail call i32 (...) @f()
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t EMACDMAStateGet(uint32_t ui32Base) {
  return ((*((volatile uint32_t *)(ui32Base + 0x00000C14))) &
          (0x00002000 | 0x03800000 | 0x000E0000 | 0x00700000));
}


x86 assembly (clang, -O0):
<EMACDMAStateGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc14,%eax
cltq
mov    (%rax),%eax
and    $0x3fe2000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACDMAStateGet>:
movslq %edi,%rcx
mov    $0x3fe2000,%eax
and    0xc14(%rcx),%eax
ret

LLVM IR (-O0):
define i32 @EMACDMAStateGet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 3092
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 66985984
ret i32 %8
}

LLVM IR (-O2):
define i32 @EMACDMAStateGet(i32 %0) {
%2 = add nsw i32 %0, 3092
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 66985984
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void ivory_serialize_pack_prim_4_le(uint8_t *dst, const uint8_t *src) {
  dst[0] = src[0];
  dst[1] = src[1];
  dst[2] = src[2];
  dst[3] = src[3];
}


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

x86 assembly (clang, -O2):
<ivory_serialize_pack_prim_4_le>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0x8(%rdi)
mov    0xc(%rsi),%eax
mov    %eax,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @ivory_serialize_pack_prim_4_le(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %1, i64 2
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
%10 = getelementptr inbounds i32, i32* %1, i64 3
%11 = load i32, i32* %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %11, i32* %12
ret void
}
int msm_routing_get_dolby_dap_param_visualizer_control(
    struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.snd_kcontrol = type opaque
%struct.snd_ctl_elem_value = type opaque
define i32 @msm_routing_get_dolby_dap_param_visualizer_control(%struct.snd_kcontrol* nocapture readnone %0, %struct.snd_ctl_elem_value* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_create_pointer_stack();
int /*<<< orphan*/ test_extended();
int /*<<< orphan*/ test_io();
int /*<<< orphan*/ test_limitation();
int /*<<< orphan*/ test_main();
int /*<<< orphan*/ test_optimization();
int /*<<< orphan*/ test_private();
int /*<<< orphan*/ test_protection();
int main() {
  test_create_pointer_stack();
  test_main();
  test_extended();
  test_io();
  test_limitation();
  test_optimization();
  test_private();
  test_protection();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_create_pointer_stack@plt>
mov    $0x0,%al
call   1050 <test_main@plt>
mov    $0x0,%al
call   1090 <test_extended@plt>
mov    $0x0,%al
call   10a0 <test_io@plt>
mov    $0x0,%al
call   1070 <test_limitation@plt>
mov    $0x0,%al
call   1080 <test_optimization@plt>
mov    $0x0,%al
call   1040 <test_private@plt>
mov    $0x0,%al
call   1060 <test_protection@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_create_pointer_stack@plt>
xor    %eax,%eax
call   1050 <test_main@plt>
xor    %eax,%eax
call   1090 <test_extended@plt>
xor    %eax,%eax
call   10a0 <test_io@plt>
xor    %eax,%eax
call   1070 <test_limitation@plt>
xor    %eax,%eax
call   1080 <test_optimization@plt>
xor    %eax,%eax
call   1040 <test_private@plt>
xor    %eax,%eax
call   1060 <test_protection@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_create_pointer_stack()
%3 = call i32 (...) @test_main()
%4 = call i32 (...) @test_extended()
%5 = call i32 (...) @test_io()
%6 = call i32 (...) @test_limitation()
%7 = call i32 (...) @test_optimization()
%8 = call i32 (...) @test_private()
%9 = call i32 (...) @test_protection()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_create_pointer_stack()
%2 = tail call i32 (...) @test_main()
%3 = tail call i32 (...) @test_extended()
%4 = tail call i32 (...) @test_io()
%5 = tail call i32 (...) @test_limitation()
%6 = tail call i32 (...) @test_optimization()
%7 = tail call i32 (...) @test_private()
%8 = tail call i32 (...) @test_protection()
ret i32 0
}
double prv_process_fpa_rsub_real64(double a, double b) { return b - a; }


x86 assembly (clang, -O0):
<prv_process_fpa_rsub_real64>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_process_fpa_rsub_real64>:
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @prv_process_fpa_rsub_real64(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @prv_process_fpa_rsub_real64(double %0, double %1) {
%3 = fsub double %1, %0
ret double %3
}
int CheckCharInArray(char Uniqueletters[], int size, char CharToCheck) {
  int i;
  for (i = 0; i < size; i++)
    if (Uniqueletters[i] == CharToCheck)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<CheckCharInArray>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %al,-0x15(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115a <CheckCharInArray+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
jne    1147 <CheckCharInArray+0x47>
movl   $0x1,-0x4(%rbp)
jmp    1161 <CheckCharInArray+0x61>
jmp    114c <CheckCharInArray+0x4c>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <CheckCharInArray+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckCharInArray>:
test   %esi,%esi
jle    111e <CheckCharInArray+0x1e>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %dl,(%rdi,%rcx,1)
je     1121 <CheckCharInArray+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <CheckCharInArray+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @CheckCharInArray(i8* nocapture %0, i32 %1, i8 signext %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, %2
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
int isgraph(int c) { return c >= 0x21 && c <= 0x7e; }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x21,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isgraph+0x20>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 33
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gc_init();
int /*<<< orphan*/ test_garbage_collect();
int /*<<< orphan*/ test_garbage_collect_load_test();
int /*<<< orphan*/ test_mini_gc_malloc_free();
void test(void) {
  gc_init();
  test_mini_gc_malloc_free();
  test_garbage_collect();
  test_garbage_collect_load_test();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gc_init@plt>
mov    $0x0,%al
call   1050 <test_mini_gc_malloc_free@plt>
mov    $0x0,%al
call   1060 <test_garbage_collect@plt>
mov    $0x0,%al
call   1040 <test_garbage_collect_load_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
xor    %eax,%eax
call   1030 <gc_init@plt>
xor    %eax,%eax
call   1050 <test_mini_gc_malloc_free@plt>
xor    %eax,%eax
call   1060 <test_garbage_collect@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_garbage_collect_load_test@plt>

LLVM IR (-O0):
define void @test() {
%1 = call i32 (...) @gc_init()
%2 = call i32 (...) @test_mini_gc_malloc_free()
%3 = call i32 (...) @test_garbage_collect()
%4 = call i32 (...) @test_garbage_collect_load_test()
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @gc_init()
%2 = tail call i32 (...) @test_mini_gc_malloc_free()
%3 = tail call i32 (...) @test_garbage_collect()
%4 = tail call i32 (...) @test_garbage_collect_load_test()
ret void
}