xunge/DecIR huggingface dataset:
main() {
  int pulo[] = {1, 2, 3, 4, 5, 6};
  printf("%d\n", *(pulo + 2));
  printf("%d", pulo + 2);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%esi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
add    $0x8,%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getch@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xee4(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x8(%rsp),%rbx
lea    0xed0(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getch@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.pulo = [6 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6]
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 2
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%6 = call i32 (...) @getch()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *const);
int /*<<< orphan*/ *substitute_specsw(int /*<<< orphan*/ *const);
int /*<<< orphan*/ *to_wide(char const *);
wchar_t *substitute_specs(const char cmd[]) {
  wchar_t *result;
  wchar_t *const cmdw = to_wide(cmd);
  if (cmdw == NULL) {
    return NULL;
  }
  result = substitute_specsw(cmdw);
  free(cmdw);
  return result;
}


x86 assembly (clang, -O0):
<substitute_specs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <to_wide@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1161 <substitute_specs+0x31>
movq   $0x0,-0x8(%rbp)
jmp    117f <substitute_specs+0x4f>
mov    -0x20(%rbp),%rdi
call   1040 <substitute_specsw@plt>
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<substitute_specs>:
push   %r14
push   %rbx
push   %rax
call   1050 <to_wide@plt>
test   %rax,%rax
je     1159 <substitute_specs+0x29>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <substitute_specsw@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
jmp    115b <substitute_specs+0x2b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32* @substitute_specs(i8* %0) {
%2 = tail call i32* @to_wide(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32* @substitute_specsw(i32* %2)
%6 = tail call i32 @free(i32* %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32* [ %5, %4 ], [ null, %1 ]
ret i32* %8
}
int hostprog_lib_mk_option(void *data, const char *name, const char *value) {
  (void)data;
  (void)name;
  (void)value;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @hostprog_lib_mk_option(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @hostprog_lib_mk_option(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
int msm_xo_print_voters_suspend(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm_xo_print_voters_suspend() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int find_machine_endiness();
int main() {
  assert(1 == find_machine_endiness());
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <find_machine_endiness@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <find_machine_endiness@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @find_machine_endiness()
%3 = icmp eq i32 1, %2
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @find_machine_endiness()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
void error_exit_(Status) int *Status;
{ exit(*Status); }


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

x86 assembly (clang, -O2):
<error_exit_>:
push   %rax
mov    (%rdi),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @error_exit_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
unreachable
}

LLVM IR (-O2):
define void @error_exit_(i32* nocapture %0) {
%2 = load i32, i32* %0
tail call void @exit(i32 %2)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
pid_t vfork(void) {
  fprintf(stderr, "\nAccess to dangerous function %s() denied.\n", "vfork");
  assert(0);
  ;
}


x86 assembly (clang, -O0):
<vfork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
lea    0xeed(%rip),%rdx
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfork>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xef4(%rip),%rdx
call   1040 <fprintf@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"\0AAccess to dangerous function %s() denied.\0A\00"
@.str.1 = [6 x i8] c"vfork\00"
define i32 @vfork() {
%1 = alloca i32
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @assert(i32 0)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"\0AAccess to dangerous function %s() denied.\0A\00"
@.str.1 = [6 x i8] c"vfork\00"
define i32 @vfork() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @assert(i32 0)
ret i32 undef
}
float map_f(const float x, const float in_min, const float in_max,
            const float out_min, const float out_max) {
  return ((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min);
}


x86 assembly (clang, -O0):
<map_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
addss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_f>:
subss  %xmm1,%xmm0
subss  %xmm3,%xmm4
mulss  %xmm4,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
addss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @map_f(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %6
%12 = load float, float* %7
%13 = fsub float %11, %12
%14 = load float, float* %10
%15 = load float, float* %9
%16 = fsub float %14, %15
%17 = fmul float %13, %16
%18 = load float, float* %8
%19 = load float, float* %7
%20 = fsub float %18, %19
%21 = fdiv float %17, %20
%22 = load float, float* %9
%23 = fadd float %21, %22
ret float %23
}

LLVM IR (-O2):
define float @map_f(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %0, %1
%7 = fsub float %4, %3
%8 = fmul float %6, %7
%9 = fsub float %2, %1
%10 = fdiv float %8, %9
%11 = fadd float %10, %3
ret float %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ fputs(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void _vs_print_buf(uint8_t *buf) { fputs(buf, stdout); }


x86 assembly (clang, -O0):
<_vs_print_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_vs_print_buf>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @_vs_print_buf(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i32* %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @_vs_print_buf(i32* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i32* %0, i32 %2)
ret void
}
double KPHtoFPS(double KPH) {
  double FPS = 0.911344 * KPH;
  return FPS;
}


x86 assembly (clang, -O0):
<KPHtoFPS>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<KPHtoFPS>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @KPHtoFPS(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 9.113440e-01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @KPHtoFPS(double %0) {
%2 = fmul double %0, 9.113440e-01
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ _assert_true(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ free(void *);
void free_value(const void *value, void *cleanup_value_data) {
  _assert_true(((uint64_t)((unsigned)(value))), "value",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/"
               "heads/master/cmockery.c",
               379);
  free((void *)value);
}


x86 assembly (clang, -O0):
<free_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
lea    0xec3(%rip),%rsi
lea    0xec2(%rip),%rdx
mov    $0x17b,%ecx
call   1040 <_assert_true@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_value>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
lea    0xed4(%rip),%rdx
mov    $0x17b,%ecx
call   1040 <_assert_true@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"value\00"
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/cmockery.c\00"
define void @free_value(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i32
%7 = call i32 @_assert_true(i32 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 379)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"value\00"
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/cmockery.c\00"
define void @free_value(i8* %0, i8* nocapture readnone %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @_assert_true(i32 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 379)
%6 = tail call i32 @free(i8* %0)
ret void
}
float add3(float n, float m, float p) { return n + m + p; }


x86 assembly (clang, -O0):
<add3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<add3>:
addss  %xmm1,%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @add3(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fadd float %7, %8
%10 = load float, float* %6
%11 = fadd float %9, %10
ret float %11
}

LLVM IR (-O2):
define float @add3(float %0, float %1, float %2) {
%4 = fadd float %0, %1
%5 = fadd float %4, %2
ret float %5
}
/* Variables and functions */
void *ft_memset(void *s, int c, size_t n) {
  unsigned char *b;
  size_t i;
  i = 0;
  b = (unsigned char *)s;
  while (i < n) {
    *b++ = (unsigned char)c;
    i++;
  }
  return (s);
}


x86 assembly (clang, -O0):
<ft_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1154 <ft_memset+0x54>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    111f <ft_memset+0x1f>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memset>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     1121 <ft_memset+0x11>
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %3
ret i8* %0
}
void ADCComparatorIntEnable(unsigned long ulBase, unsigned long ulSequenceNum) {
  ;
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000008))) |= 0x10000
                                                          << ulSequenceNum;
}


x86 assembly (clang, -O0):
<ADCComparatorIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x10000,%eax
shl    %cl,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCComparatorIntEnable>:
mov    %rsi,%rcx
mov    $0x10000,%eax
shl    %cl,%eax
cltq
or     %rax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @ADCComparatorIntEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 65536, %6
%8 = sext i32 %7 to i64
%9 = load i64, i64* %3
%10 = add i64 %9, 8
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = or i64 %12, %8
store volatile i64 %13, i64* %11
ret void
}

LLVM IR (-O2):
define void @ADCComparatorIntEnable(i64 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl i32 65536, %3
%5 = sext i32 %4 to i64
%6 = add i64 %0, 8
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = or i64 %8, %5
store volatile i64 %9, i64* %7
ret void
}
double ho_recognize_font_1_plus(const double *array_in) {
  double return_value = 0.0;
  return return_value;
}


x86 assembly (clang, -O0):
<ho_recognize_font_1_plus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ho_recognize_font_1_plus>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @ho_recognize_font_1_plus(double* %0) {
%2 = alloca double*
%3 = alloca double
store double* %0, double** %2
store double 0.000000e+00, double* %3
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
define double @ho_recognize_font_1_plus(double* nocapture readnone %0) {
ret double 0.000000e+00
}
vbpkg(pkg) char pkg[];
{}


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

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

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

LLVM IR (-O2):
define i32 @vbpkg(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int clut_internal_get_error_state();
int clutErrorOccurred(void) { return clut_internal_get_error_state(); }


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

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

LLVM IR (-O0):
define i32 @clutErrorOccurred() {
%1 = call i32 (...) @clut_internal_get_error_state()
ret i32 %1
}

LLVM IR (-O2):
define i32 @clutErrorOccurred() {
%1 = tail call i32 (...) @clut_internal_get_error_state()
ret i32 %1
}
int pop(int *a, int *top1) { return *(a + (*top1)--); }


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    (%rdx),%ecx
mov    %ecx,%esi
add    $0xffffffff,%esi
mov    %esi,(%rdx)
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
movslq (%rsi),%rax
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsi)
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @pop(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 = load i32, i32* %6
%8 = add nsw i32 %7, -1
store i32 %8, i32* %6
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds i32, i32* %5, i64 %9
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @pop(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, -1
store i32 %4, i32* %1
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ result(char *);
int main() {
  result("new test");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"new test\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @result(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"new test\00"
define i32 @main() {
%1 = tail call i32 @result(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int worker() {
#pragma acc loop worker vector
  for (int i = 0; i < 10; i++) {
  }
  return 1;
}


x86 assembly (clang, -O0):
<worker>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1128 <worker+0x28>
jmp    111a <worker+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <worker+0xb>
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @worker() {
ret i32 1
}
/* Variables and functions */
int KMPSearch(char *, char *);
int strlen(char *);
int valIndex(char *text, char *pattern) {
  int matchedIndex = KMPSearch(text, pattern);
  return matchedIndex + strlen(pattern) + 1;
}


x86 assembly (clang, -O0):
<valIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <KMPSearch@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valIndex>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <KMPSearch@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    %r14d,%eax
add    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @valIndex(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @KMPSearch(i8* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = add nsw i32 %9, %11
%13 = add nsw i32 %12, 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @valIndex(i8* %0, i8* %1) {
%3 = tail call i32 @KMPSearch(i8* %0, i8* %1)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 1
%6 = add i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ execute(char *);
char *strsep(char **, char *);
void multexec(char *s) {
  while (s != NULL) {
    char *this = strsep(&s, ";");
    if (*this != 0)
      execute(this);
  }
}


x86 assembly (clang, -O0):
<multexec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1169 <multexec+0x49>
lea    -0x8(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1040 <strsep@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1164 <multexec+0x44>
mov    -0x10(%rbp),%rdi
call   1030 <execute@plt>
jmp    112c <multexec+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multexec>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,(%rsp)
test   %rdi,%rdi
je     1161 <multexec+0x41>
lea    0xecc(%rip),%r14
mov    %rsp,%rbx
jmp    1147 <multexec+0x27>
nopl   0x0(%rax)
cmpq   $0x0,(%rsp)
je     1161 <multexec+0x41>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strsep@plt>
cmpb   $0x0,(%rax)
je     1140 <multexec+0x20>
mov    %rax,%rdi
call   1030 <execute@plt>
jmp    1140 <multexec+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c";\00"
define void @multexec(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = call i8* @strsep(i8** %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = call i32 @execute(i8* %14)
br label %16
16: ; preds = %13, %7
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c";\00"
define void @multexec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = icmp eq i8* %0, null
br i1 %3, label %13, label %4
4: ; preds = %1, %10
%5 = call i8* @strsep(i8** %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = call i32 @execute(i8* %5)
br label %10
10: ; preds = %8, %4
%11 = load i8*, i8** %2
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %4
13: ; preds = %10, %1
ret void
}
double laPression(double V) { return ((V / 5) + 0.04) / 0.004; }


x86 assembly (clang, -O0):
<laPression>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<laPression>:
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @laPression(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 5.000000e+00
%5 = fadd double %4, 4.000000e-02
%6 = fdiv double %5, 4.000000e-03
ret double %6
}

LLVM IR (-O2):
define double @laPression(double %0) {
%2 = fdiv double %0, 5.000000e+00
%3 = fadd double %2, 4.000000e-02
%4 = fdiv double %3, 4.000000e-03
ret double %4
}
int fun250() { return 250; }


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

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

LLVM IR (-O0):
define i32 @fun250() {
ret i32 250
}

LLVM IR (-O2):
define i32 @fun250() {
ret i32 250
}
int kill(int pid, int sig) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @kill(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ExitEvent(int /*<<< orphan*/);
void QuitProc() { ExitEvent(0); }


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

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

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

LLVM IR (-O2):
define void @QuitProc() {
%1 = tail call i32 @ExitEvent(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glb_error(char *);
int glbSetFilterState(int on_off) {
  glb_error("Function glbSetFilterState is deprecated.");
  return -1.0;
}


x86 assembly (clang, -O0):
<glbSetFilterState>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <glb_error@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glbSetFilterState>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <glb_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Function glbSetFilterState is deprecated.\00"
define i32 @glbSetFilterState(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @glb_error(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [42 x i8] c"Function glbSetFilterState is deprecated.\00"
define i32 @glbSetFilterState(i32 %0) {
%2 = tail call i32 @glb_error(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
long long load64_reverse_5(long long dummy __attribute__((unused)),
                           long long *p) {
  return __builtin_bswap64(p[1]);
}


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

x86 assembly (clang, -O2):
<load64_reverse_5>:
mov    0x8(%rsi),%rax
bswap  %rax
ret

LLVM IR (-O0):
define i64 @load64_reverse_5(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = getelementptr inbounds i64, i64* %5, i64 1
%7 = load i64, i64* %6
%8 = call i64 @llvm.bswap.i64(i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @load64_reverse_5(i64 %0, i64* nocapture %1) {
%3 = getelementptr inbounds i64, i64* %1, i64 1
%4 = load i64, i64* %3
%5 = tail call i64 @llvm.bswap.i64(i64 %4)
ret i64 %5
}
int squares(int n) { return (n * (n + 1) * (2 * n + 1)) / 6; }


x86 assembly (clang, -O0):
<squares>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<squares>:
lea    0x1(%rdi),%eax
imul   %edi,%eax
lea    (%rdi,%rdi,1),%ecx
add    $0x1,%ecx
imul   %eax,%ecx
movslq %ecx,%rax
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @squares(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = mul nsw i32 %3, %5
%7 = load i32, i32* %2
%8 = mul nsw i32 2, %7
%9 = add nsw i32 %8, 1
%10 = mul nsw i32 %6, %9
%11 = sdiv i32 %10, 6
ret i32 %11
}

LLVM IR (-O2):
define i32 @squares(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = mul nsw i32 %2, %0
%4 = shl nsw i32 %0, 1
%5 = or i32 %4, 1
%6 = mul nsw i32 %3, %5
%7 = sdiv i32 %6, 6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ gluPerspective(double, double, double, double);
void handle_resize(int width, int height) {
  glViewport(0, 0, width, height);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(45.0, (double)width / (double)height, 1.0, 200.0);
}


x86 assembly (clang, -O0):
<handle_resize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glViewport@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
cvtsi2sdl -0x4(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe78(%rip),%xmm0
movsd  0xe78(%rip),%xmm2
movsd  0xe78(%rip),%xmm3
call   1040 <gluPerspective@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_resize>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1060 <glViewport@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
cvtsi2sd %ebp,%xmm1
cvtsi2sd %ebx,%xmm0
divsd  %xmm0,%xmm1
movsd  0xe83(%rip),%xmm0
movsd  0xe83(%rip),%xmm2
movsd  0xe83(%rip),%xmm3
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <gluPerspective@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
define void @handle_resize(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* @GL_PROJECTION
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to double
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to double
%15 = fdiv double %12, %14
%16 = call i32 @gluPerspective(double 4.500000e+01, double %15, double 1.000000e+00, double 2.000000e+02)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
define void @handle_resize(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = sitofp i32 %0 to double
%8 = sitofp i32 %1 to double
%9 = fdiv double %7, %8
%10 = tail call i32 @gluPerspective(double 4.500000e+01, double %9, double 1.000000e+00, double 2.000000e+02)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
unsigned int __if_nametoindex(const char *ifname) {
  __set_errno(ENOSYS);
  return 0;
}


x86 assembly (clang, -O0):
<__if_nametoindex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__if_nametoindex>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__if_nametoindex(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 0
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__if_nametoindex(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 0
}
int main(void) {
  int a[4][3] = {};
  int z = a[0][0];
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
mov    -0x40(%rbp),%eax
mov    %eax,-0x44(%rbp)
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int gethugepagesize();
void *next_chunk(void *addr) {
  return ((void *)((((unsigned long)(addr)) + ((gethugepagesize())) - 1) &
                   ~(((gethugepagesize())) - 1)));
}


x86 assembly (clang, -O0):
<next_chunk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <gethugepagesize@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <gethugepagesize@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_chunk>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <gethugepagesize@plt>
cltq
add    %rax,%rbx
add    $0xffffffffffffffff,%rbx
xor    %eax,%eax
call   1030 <gethugepagesize@plt>
neg    %eax
cltq
and    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @next_chunk(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = call i32 (...) @gethugepagesize()
%6 = sext i32 %5 to i64
%7 = add i64 %4, %6
%8 = sub i64 %7, 1
%9 = call i32 (...) @gethugepagesize()
%10 = sub nsw i32 %9, 1
%11 = xor i32 %10, -1
%12 = sext i32 %11 to i64
%13 = and i64 %8, %12
%14 = inttoptr i64 %13 to i8*
ret i8* %14
}

LLVM IR (-O2):
define i8* @next_chunk(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i32 (...) @gethugepagesize()
%4 = sext i32 %3 to i64
%5 = add i64 %2, -1
%6 = add i64 %5, %4
%7 = tail call i32 (...) @gethugepagesize()
%8 = sub i32 0, %7
%9 = sext i32 %8 to i64
%10 = and i64 %6, %9
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int __attribute__((unused)) argc, char *argv[]) {
  printf("%s\n", argv[0]);
  return (0);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
void atomic_init_foo() {
  _Atomic(int) j = 12;
  __c11_atomic_init(&j, 42);
}


x86 assembly (clang, -O0):
<atomic_init_foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0xc,-0x4(%rbp)
movl   $0x2a,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @atomic_init_foo() {
%1 = alloca i32
store i32 12, i32* %1
store i32 42, i32* %1
ret void
}

LLVM IR (-O2):
define void @atomic_init_foo() {
ret void
}
void XFreePixmap() {}


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

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

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

LLVM IR (-O2):
define void @XFreePixmap() {
ret void
}
/* Variables and functions */
int pth_select(int, int, int, int, int);
int pth_pth_select(int p1, int p2, int p3, int p4, int p5) {
  return pth_select(p1, p2, p3, p4, p5);
}


x86 assembly (clang, -O0):
<pth_pth_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1030 <pth_select@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pth_pth_select>:
jmp    1030 <pth_select@plt>

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

LLVM IR (-O2):
define i32 @pth_pth_select(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @pth_select(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 %6
}
double Sleef_rint(double x) { return __builtin_rint(x); }


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

x86 assembly (clang, -O2):
<Sleef_rint>:
jmp    1030 <rint@plt>

LLVM IR (-O0):
define double @Sleef_rint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.rint.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @Sleef_rint(double %0) {
%2 = tail call double @llvm.rint.f64(double %0)
ret double %2
}
/* Variables and functions */
int daemon(int, int /*<<< orphan*/);
int /*<<< orphan*/ dns_error(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int daemonrize(int dm) {
  if (dm == 1) {
    if (daemon(1, 0) == -1)
      dns_error(0, "daemonrize");
    else
      printf("daemon!!!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<daemonrize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    117e <daemonrize+0x4e>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <daemon@plt>
cmp    $0xffffffff,%eax
jne    116d <daemonrize+0x3d>
xor    %edi,%edi
lea    0xe9d(%rip),%rsi
call   1050 <dns_error@plt>
jmp    1179 <daemonrize+0x49>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
jmp    117e <daemonrize+0x4e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daemonrize>:
push   %rax
cmp    $0x1,%edi
jne    1163 <daemonrize+0x33>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <daemon@plt>
cmp    $0xffffffff,%eax
je     1155 <daemonrize+0x25>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
jmp    1163 <daemonrize+0x33>
lea    0xea4(%rip),%rsi
xor    %edi,%edi
call   1050 <dns_error@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"daemonrize\00"
@str = [10 x i8] c"daemon!!!\00"
define i32 @daemonrize(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %10
3: ; preds = %1
%4 = tail call i32 @daemon(i32 1, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @dns_error(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %3
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %6, %8, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  char cards[] = "JQK";
  char a_card = cards[2];
  cards[2] = cards[1];
  cards[1] = cards[0];
  cards[0] = cards[2];
  cards[2] = cards[1];
  cards[1] = a_card;
  puts(cards);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x8(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x7(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x4a4b51,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.cards = [4 x i8] c"JQK\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i8
store i32 0, i32* %1
%4 = bitcast [4 x i8]* %2 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
%8 = load i8, i8* %7
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %8, i8* %9
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%11 = load i8, i8* %10
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 %11, i8* %12
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
%14 = load i8, i8* %13
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
store i8 %14, i8* %15
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
%17 = load i8, i8* %16
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %17, i8* %18
%19 = load i8, i8* %3
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 %19, i8* %20
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%22 = call i32 @puts(i8* %21)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 4868945, i32* %1
%3 = call i32 @puts(i8* %2)
ret i32 0
}