xunge/DecIR huggingface dataset:
double full_VaryIntegral(xoff, yoff, zoff, rmin, rmax)
double xoff, yoff, zoff, rmin, rmax;
{
  double VolumeIntegral(), VPintegrand();
  return VolumeIntegral(VPintegrand, rmin, rmax, xoff, yoff, zoff, 0.0, 0.0,
                        0.0, 0.0, 0);
}


x86 assembly (clang, -O0):
<full_VaryIntegral>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
mov    0x2e8f(%rip),%rdi
xorps  %xmm8,%xmm8
xor    %esi,%esi
movaps %xmm8,%xmm5
movaps %xmm8,%xmm6
movaps %xmm8,%xmm7
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1030 <VolumeIntegral@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<full_VaryIntegral>:
push   %rax
movaps %xmm4,%xmm8
movaps %xmm3,%xmm4
movaps %xmm2,%xmm9
movaps %xmm1,%xmm3
movaps %xmm0,%xmm2
movq   $0x0,(%rsp)
mov    0x2eaf(%rip),%rdi
xorps  %xmm5,%xmm5
xorps  %xmm6,%xmm6
xorps  %xmm7,%xmm7
movaps %xmm4,%xmm0
movaps %xmm8,%xmm1
movaps %xmm9,%xmm4
xor    %esi,%esi
mov    $0x8,%al
call   1030 <VolumeIntegral@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @full_VaryIntegral(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %9
%12 = load double, double* %10
%13 = load double, double* %6
%14 = load double, double* %7
%15 = load double, double* %8
%16 = call double (double (...)*, double, double, double, double, double, double, double, double, double, i32, ...) bitcast (double (...)* @VolumeIntegral to double (double (...)*, double, double, double, double, double, double, double, double, double, i32, ...)*)(double (...)* @VPintegrand, double %11, double %12, double %13, double %14, double %15, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
ret double %16
}

LLVM IR (-O2):
define double @full_VaryIntegral(double %0, double %1, double %2, double %3, double %4) {
%6 = tail call double (double (...)*, double, double, double, double, double, double, double, double, double, i32, ...) bitcast (double (...)* @VolumeIntegral to double (double (...)*, double, double, double, double, double, double, double, double, double, i32, ...)*)(double (...)* @VPintegrand, double %3, double %4, double %0, double %1, double %2, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 0)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_ajuda() {
  printf("\nInstructions:\n\n\tbuild <mode> [<names>]\n\n<mode>\t\\c\tTo"
         " compress a file. Should be followed <name>.\n\t\\d\tTo"
         " descompress a file. Should be followed <name>.\n\t\\h\tTo show "
         "help function. Shouldn't be followed <name>.\n\n<names>\tFile "
         "relative addres "
         " or file(s) absolut which will be compress/de"
         "scompress with the extesion.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [315 x i8] c"\0AInstructions:\0A\0A\09build <mode> [<names>]\0A\0A<mode>\09\\c\09To compress a file. Should be followed <name>.\0A\09\\d\09To descompress a file. Should be followed <name>.\0A\09\\h\09To show help function. Shouldn't be followed <name>.\0A\0A<names>\09File relative addres or file(s) absolut which will be compress/descompress with the extesion.\0A\0A\00"
define void @print_ajuda() {
%1 = call i32 @printf(i8* getelementptr inbounds ([315 x i8], [315 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [314 x i8] c"\0AInstructions:\0A\0A\09build <mode> [<names>]\0A\0A<mode>\09\\c\09To compress a file. Should be followed <name>.\0A\09\\d\09To descompress a file. Should be followed <name>.\0A\09\\h\09To show help function. Shouldn't be followed <name>.\0A\0A<names>\09File relative addres or file(s) absolut which will be compress/descompress with the extesion.\0A\00"
define void @print_ajuda() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([314 x i8], [314 x i8]* @str, i64 0, i64 0))
ret void
}
float lb_to_kg(float value) { return value * 0.45359237f; }


x86 assembly (clang, -O0):
<lb_to_kg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @lb_to_kg(float %0) {
%2 = fmul float %0, 0x3FDD07A840000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
badfile() { die("Defective Intel hex file"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Defective Intel hex file\00"
define i32 @badfile() {
%1 = alloca i32
%2 = call i32 @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [25 x i8] c"Defective Intel hex file\00"
define i32 @badfile() {
%1 = tail call i32 @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *string_date_time(char *buffer_time) {
  time_t rawtime;
  struct tm *timeinfo;
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  strftime(buffer_time, 30, "[%Y-%m-%d %H:%M:%S]", timeinfo);
  return buffer_time;
}


x86 assembly (clang, -O0):
<string_date_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1e,%esi
lea    0xe9a(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_date_time>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
lea    0xead(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [20 x i8] c"[%Y-%m-%d %H:%M:%S]\00"
define i8* @string_date_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 30, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [20 x i8] c"[%Y-%m-%d %H:%M:%S]\00"
define i8* @string_date_time(i8* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 30, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* %0
}
void miami_stop_instrumentation_() {}


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

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

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

LLVM IR (-O2):
define void @miami_stop_instrumentation_() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ cpuHlInc();
int /*<<< orphan*/ cpuSThl(int /*<<< orphan*/ *);
void cpuSThlInc(uint8_t *reg) {
  cpuSThl(reg);
  cpuHlInc();
}


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

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

LLVM IR (-O0):
define void @cpuSThlInc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @cpuSThl(i32* %3)
%5 = call i32 (...) @cpuHlInc()
ret void
}

LLVM IR (-O2):
define void @cpuSThlInc(i32* %0) {
%2 = tail call i32 @cpuSThl(i32* %0)
%3 = tail call i32 (...) @cpuHlInc()
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
__attribute__((always_)) uint64_t profile_timestamp(void) {
  uint64_t tsc;
  __asm__ __volatile__("rdtsc" : "=A"(tsc));
  return tsc;
}


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

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

LLVM IR (-O0):
define i8* @profile_timestamp() {
%1 = alloca i8*
%2 = call i8* asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @profile_timestamp() {
%1 = tail call i8* asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i8* %1
}
void ff_me_cmp_init_mips() {}


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

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

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

LLVM IR (-O2):
define void @ff_me_cmp_init_mips() {
ret void
}
int _mutex_tryacquire(unsigned int tid, unsigned int mid) {
  unsigned int cmd;
  unsigned int sta;
  cmd = (((0x13000000)) | ((2 & ((1 << 3) - 1)) << (8 + (6 + 2))) |
         ((tid & ((1 << 8) - 1)) << (6 + 2)) | ((mid & ((1 << 6) - 1)) << 2));
  sta = (*(volatile unsigned int *)(cmd));
  if (((sta) != 0))
    return (-1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<_mutex_tryacquire>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
or     $0x13020000,%eax
mov    -0xc(%rbp),%ecx
and    $0x3f,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1146 <_mutex_tryacquire+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <_mutex_tryacquire+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mutex_tryacquire>:
shl    $0x8,%edi
movzwl %di,%eax
and    $0x3f,%esi
lea    (%rax,%rsi,4),%eax
xor    %ecx,%ecx
cmp    0x13020000(%rax),%ecx
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @_mutex_tryacquire(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = load i32, i32* %4
%9 = and i32 %8, 255
%10 = shl i32 %9, 8
%11 = or i32 318898176, %10
%12 = load i32, i32* %5
%13 = and i32 %12, 63
%14 = shl i32 %13, 2
%15 = or i32 %11, %14
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = zext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load volatile i32, i32* %18
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %2
store i32 -1, i32* %3
br label %24
23: ; preds = %2
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @_mutex_tryacquire(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = and i32 %3, 65280
%5 = shl i32 %1, 2
%6 = and i32 %5, 252
%7 = or i32 %4, %6
%8 = or i32 %7, 318898176
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = icmp ne i32 %11, 0
%13 = sext i1 %12 to i32
ret i32 %13
}
int test_imm_29int64_lowword_reg(long long val) {
  return ((val) & (0x29 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_29int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x29,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_29int64_lowword_reg>:
test   $0x29,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_29int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 41
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gtk_text_iter_get_bytes_in_line() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_bytes_in_line() {
ret void
}
unsigned f2u(float n) {
  float *p = &n;
  return *((unsigned *)p);
}


x86 assembly (clang, -O0):
<f2u>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2u>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @f2u(float %0) {
%2 = alloca float
%3 = alloca float*
store float %0, float* %2
store float* %2, float** %3
%4 = load float*, float** %3
%5 = bitcast float* %4 to i32*
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @f2u(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
void smCallTraceStop() {}


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

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

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

LLVM IR (-O2):
define void @smCallTraceStop() {
ret void
}
/* Variables and functions */
double par_getd_def(char *, char *, double);
void par_getd_def_f_(char *block, char *name, double *def, double *value) {
  *value = par_getd_def(block, name, *def);
}


x86 assembly (clang, -O0):
<par_getd_def_f_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <par_getd_def@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<par_getd_def_f_>:
push   %rbx
mov    %rcx,%rbx
movsd  (%rdx),%xmm0
call   1030 <par_getd_def@plt>
movsd  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @par_getd_def_f_(i8* %0, i8* %1, double* %2, double* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca double*
%8 = alloca double*
store i8* %0, i8** %5
store i8* %1, i8** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load double*, double** %7
%12 = load double, double* %11
%13 = call double @par_getd_def(i8* %9, i8* %10, double %12)
%14 = load double*, double** %8
store double %13, double* %14
ret void
}

LLVM IR (-O2):
define void @par_getd_def_f_(i8* %0, i8* %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = load double, double* %2
%6 = tail call double @par_getd_def(i8* %0, i8* %1, double %5)
store double %6, double* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ _system_depended_path(char const *);
int /*<<< orphan*/ *freopen(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/ *);
FILE *wide_system_freopen(const char *filename, const char *mode,
                          FILE *stream) {
  return freopen(_system_depended_path(filename), mode, stream);
}


x86 assembly (clang, -O0):
<wide_system_freopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_system_depended_path@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <freopen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wide_system_freopen>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1040 <_system_depended_path@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <freopen@plt>

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

LLVM IR (-O2):
define i32* @wide_system_freopen(i8* %0, i8* %1, i32* %2) {
%4 = tail call i32 @_system_depended_path(i8* %0)
%5 = tail call i32* @freopen(i32 %4, i8* %1, i32* %2)
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
unsigned char msg_send(int, unsigned char *, int);
unsigned char ANT_SendAcknowledgedData(unsigned char chan,
                                       unsigned char *data) {
  unsigned char buf[9];
  buf[0] = chan;
  memcpy(buf + 1, data, 8);
  return msg_send(0x4f, buf, 9);
}


x86 assembly (clang, -O0):
<ANT_SendAcknowledgedData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x19(%rbp)
lea    -0x19(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
lea    -0x19(%rbp),%rsi
mov    $0x4f,%edi
mov    $0x9,%edx
call   1040 <msg_send@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANT_SendAcknowledgedData>:
sub    $0x18,%rsp
mov    %dil,0xf(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
lea    0xf(%rsp),%rsi
mov    $0x4f,%edi
mov    $0x9,%edx
call   1040 <msg_send@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define zeroext i8 @ANT_SendAcknowledgedData(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca [9 x i8]
store i8 %0, i8* %3
store i8* %1, i8** %4
%6 = load i8, i8* %3
%7 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
store i8 %6, i8* %7
%8 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8*, i8** %4
%11 = call i32 @memcpy(i8* %9, i8* %10, i32 8)
%12 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%13 = call zeroext i8 @msg_send(i32 79, i8* %12, i32 9)
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @ANT_SendAcknowledgedData(i8 zeroext %0, i8* %1) {
%3 = alloca [9 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
store i8 %0, i8* %4
%5 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 1
%6 = call i32 @memcpy(i8* %5, i8* %1, i32 8)
%7 = call zeroext i8 @msg_send(i32 79, i8* %4, i32 9)
ret i8 %7
}
/* Type definitions */
struct state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(void *);
void state_delete(const struct state *s) { free((void *)s); }


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

x86 assembly (clang, -O2):
<state_delete>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.state = type { i32 }
define void @state_delete(%struct.state* %0) {
%2 = alloca %struct.state*
store %struct.state* %0, %struct.state** %2
%3 = load %struct.state*, %struct.state** %2
%4 = bitcast %struct.state* %3 to i8*
%5 = call i32 @free(i8* %4)
ret void
}

LLVM IR (-O2):
%struct.state = type { i32 }
define void @state_delete(%struct.state* nocapture %0) {
%2 = bitcast %struct.state* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int intel_ich_gpio_set(int, int);
int intel_ich_gpio34_raise(void) { return intel_ich_gpio_set(34, 1); }


x86 assembly (clang, -O0):
<intel_ich_gpio34_raise>:
push   %rbp
mov    %rsp,%rbp
mov    $0x22,%edi
mov    $0x1,%esi
call   1030 <intel_ich_gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_ich_gpio34_raise>:
mov    $0x22,%edi
mov    $0x1,%esi
jmp    1030 <intel_ich_gpio_set@plt>

LLVM IR (-O0):
define i32 @intel_ich_gpio34_raise() {
%1 = call i32 @intel_ich_gpio_set(i32 34, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @intel_ich_gpio34_raise() {
%1 = tail call i32 @intel_ich_gpio_set(i32 34, i32 1)
ret i32 %1
}
/* Variables and functions */
void Reserved_Handler20(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @Reserved_Handler20() {
br label %1
1: ; preds = %0, %1
br label %1
}
void slang_keypad(int set) {}


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

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

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

LLVM IR (-O2):
define void @slang_keypad(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ acc_on_device_(int const *);
int f(void) {
  const int dev = 4;
  return !acc_on_device_(&dev);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <acc_on_device_@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movl   $0x4,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <acc_on_device_@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
store i32 4, i32* %1
%2 = call i32 @acc_on_device_(i32* %1)
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 4, i32* %1
%3 = call i32 @acc_on_device_(i32* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
double RAND_MAX;
double rand();
int rng_randint(int min, int max) {
  return (int)(((double)(max - min + 1)) *
               (rand() / (RAND_MAX + ((double)min))));
}


x86 assembly (clang, -O0):
<rng_randint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mov    0x2ea2(%rip),%rax
movsd  (%rax),%xmm2
cvtsi2sdl -0x4(%rbp),%xmm3
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rng_randint>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
sub    %edi,%esi
add    $0x1,%esi
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2eb4(%rip),%rax
cvtsi2sd %ebx,%xmm1
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @rng_randint(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 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
%8 = add nsw i32 %7, 1
%9 = sitofp i32 %8 to double
%10 = call double (...) @rand()
%11 = load double, double* @RAND_MAX
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to double
%14 = fadd double %11, %13
%15 = fdiv double %10, %14
%16 = fmul double %9, %15
%17 = fptosi double %16 to i32
ret i32 %17
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @rng_randint(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = sitofp i32 %4 to double
%6 = tail call double (...) @rand()
%7 = load double, double* @RAND_MAX
%8 = sitofp i32 %0 to double
%9 = fadd double %7, %8
%10 = fdiv double %6, %9
%11 = fmul double %10, %5
%12 = fptosi double %11 to i32
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int array[10];
  int size = sizeof(array) / sizeof(array[0]);
  printf("The size of the array is: %d\n", size);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"The size of the array is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"The size of the array is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
int main(int argc, char **argv) {
  int *ret;
  ret = (int *)&ret + 2;
  (*ret) = (int)argv[1];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast i32** %5 to i32*
%7 = getelementptr inbounds i32, i32* %6, i64 2
store i32* %7, i32** %5
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = ptrtoint i8* %10 to i32
%12 = load i32*, i32** %5
store i32 %11, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
ret i32 0
}
char *str2(void) { return "test02\n"; }


x86 assembly (clang, -O0):
<str2>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"test02\0A\00"
define i8* @str2() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"test02\0A\00"
define i8* @str2() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main() {
  int i;
  for (i = 0; i < 10; i++) {
    __VERIFIER_assert(i < 9);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114f <main+0x3f>
cmpl   $0x9,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
%2 = tail call i32 @__VERIFIER_assert(i32 1)
%3 = tail call i32 @__VERIFIER_assert(i32 1)
%4 = tail call i32 @__VERIFIER_assert(i32 1)
%5 = tail call i32 @__VERIFIER_assert(i32 1)
%6 = tail call i32 @__VERIFIER_assert(i32 1)
%7 = tail call i32 @__VERIFIER_assert(i32 1)
%8 = tail call i32 @__VERIFIER_assert(i32 1)
%9 = tail call i32 @__VERIFIER_assert(i32 1)
%10 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
int arch_get_random_int(unsigned int *v) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @arch_get_random_int(i32* nocapture readnone %0) {
ret i32 0
}
double test_ldexp(double x, int y) { return __builtin_ldexp(x, y); }


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

x86 assembly (clang, -O2):
<test_ldexp>:
jmp    1030 <ldexp@plt>

LLVM IR (-O0):
define double @test_ldexp(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 double @ldexp(double %5, i32 %6)
ret double %7
}

LLVM IR (-O2):
define double @test_ldexp(double %0, i32 %1) {
%3 = tail call double @ldexp(double %0, i32 %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main() {
  printf("start...................\n");
  sleep(5);
  printf("end.....................\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"start...................\0A\00"
@.str.1 = [26 x i8] c"end.....................\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @sleep(i32 5)
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"start...................\00"
@str.2 = [25 x i8] c"end.....................\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @sleep(i32 5)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
float cvInvSqrt(float arg) {
  float x, y;
  unsigned iarg = *((unsigned *)&arg);
  *((unsigned *)&x) = (0xbe6f0000 - iarg) >> 1;
  y = arg * 0.5f;
  x *= 1.5f - y * x * x;
  x *= 1.5f - y * x * x;
  return x;
}


x86 assembly (clang, -O0):
<cvInvSqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0xbe6f0000,%eax
sub    -0x10(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
movss  0xedf(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xea9(%rip),%xmm1
addss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xe73(%rip),%xmm1
addss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvInvSqrt>:
movd   %xmm0,%eax
mov    $0xbe6f0000,%ecx
sub    %eax,%ecx
shr    %ecx
movd   %ecx,%xmm1
mulss  0xee7(%rip),%xmm0
movaps %xmm0,%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm1,%xmm2
movss  0xed8(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm3,%xmm0
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @cvInvSqrt(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %2
%6 = bitcast float* %2 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = sub i32 -1100021760, %8
%10 = lshr i32 %9, 1
%11 = bitcast float* %3 to i32*
store i32 %10, i32* %11
%12 = load float, float* %2
%13 = fmul float %12, 5.000000e-01
store float %13, float* %4
%14 = load float, float* %4
%15 = load float, float* %3
%16 = fmul float %14, %15
%17 = load float, float* %3
%18 = fneg float %16
%19 = call float @llvm.fmuladd.f32(float %18, float %17, float 1.500000e+00)
%20 = load float, float* %3
%21 = fmul float %20, %19
store float %21, float* %3
%22 = load float, float* %4
%23 = load float, float* %3
%24 = fmul float %22, %23
%25 = load float, float* %3
%26 = fneg float %24
%27 = call float @llvm.fmuladd.f32(float %26, float %25, float 1.500000e+00)
%28 = load float, float* %3
%29 = fmul float %28, %27
store float %29, float* %3
%30 = load float, float* %3
ret float %30
}

LLVM IR (-O2):
define float @cvInvSqrt(float %0) {
%2 = bitcast float %0 to i32
%3 = sub i32 -1100021760, %2
%4 = lshr i32 %3, 1
%5 = bitcast i32 %4 to float
%6 = fmul float %0, -5.000000e-01
%7 = fmul float %6, %5
%8 = tail call float @llvm.fmuladd.f32(float %7, float %5, float 1.500000e+00)
%9 = fmul float %8, %5
%10 = fmul float %6, %9
%11 = tail call float @llvm.fmuladd.f32(float %10, float %9, float 1.500000e+00)
%12 = fmul float %9, %11
ret float %12
}
/* Variables and functions */
int DT_RPATH;
int elf_dynpath_tag(int tag) { return (tag == DT_RPATH); }


x86 assembly (clang, -O0):
<elf_dynpath_tag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_dynpath_tag>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
cmp    %edi,(%rcx)
sete   %al
ret

LLVM IR (-O0):
@DT_RPATH = global i32 0
define i32 @elf_dynpath_tag(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @DT_RPATH
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@DT_RPATH = global i32 0
define i32 @elf_dynpath_tag(i32 %0) {
%2 = load i32, i32* @DT_RPATH
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void error(char *msg) {
  fprintf(stderr, "⚠ %s: %s\n", msg, strerror(errno));
  exit(0);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeac(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"\E2\9A\A0 %s: %s\0A\00"
@errno = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"\E2\9A\A0 %s: %s\0A\00"
@errno = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
%6 = tail call i32 @exit(i32 0)
unreachable
}
void DoDummy(void) {}


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

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

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

LLVM IR (-O2):
define void @DoDummy() {
ret void
}
int GCD(int x, int y) {
  if (x % y == 0) {
    return y;
  } else {
    return GCD(y, x % y);
  }
}


x86 assembly (clang, -O0):
<GCD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1139 <GCD+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <GCD+0x3d>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <GCD@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCD>:
mov    %esi,%edx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <GCD+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @GCD(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %5, %3 ]
%5 = phi i32 [ %1, %2 ], [ %6, %3 ]
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %5
}
void foo464() {}


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

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

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

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

/* Variables and functions */
long char_to_int32(uint8_t *c) {
  long ret = 0;
  ret = c[0];
  ret |= c[1] << 8;
  ret |= c[2] << 16;
  ret |= c[3] << 24;
  return ret;
}


x86 assembly (clang, -O0):
<char_to_int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x8,%eax
cltq
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x10,%eax
cltq
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x18,%eax
cltq
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_to_int32>:
mov    0x4(%rdi),%eax
mov    0x8(%rdi),%ecx
shl    $0x8,%eax
or     (%rdi),%eax
shl    $0x10,%ecx
mov    0xc(%rdi),%edx
shl    $0x18,%edx
or     %ecx,%edx
or     %eax,%edx
movslq %edx,%rax
ret

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

LLVM IR (-O2):
define i64 @char_to_int32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl i32 %4, 8
%6 = or i32 %5, %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = shl i32 %8, 16
%10 = or i32 %6, %9
%11 = getelementptr inbounds i32, i32* %0, i64 3
%12 = load i32, i32* %11
%13 = shl i32 %12, 24
%14 = or i32 %10, %13
%15 = sext i32 %14 to i64
ret i64 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ findPairs(int *, int, int);
int main() {
  int array[] = {1, 2, 3, 4, 5, 6, 7, 8};
  int n = sizeof(array) / sizeof(int);
  int x = 7;
  findPairs(array, n, x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed1(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x8,-0x34(%rbp)
movl   $0x7,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
call   1030 <findPairs@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
mov    $0x7,%edx
call   1030 <findPairs@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
@__const.main.array = [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @findPairs(i32* %3, i32 8, i32 7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ message(char *);
__attribute__((no)) void res_S(void) {
  message("RESERVED.");
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"RESERVED.\00"
define void @res_S() {
%1 = tail call i32 @message(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int x(int, int);
int y(int z) { return x(z, z + 1) + x(z, z + 2); }


x86 assembly (clang, -O0):
<y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
add    $0x1,%esi
call   1030 <x@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
add    $0x2,%esi
call   1030 <x@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<y>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x1(%rbx),%esi
call   1030 <x@plt>
mov    %eax,%ebp
lea    0x2(%rbx),%esi
mov    %ebx,%edi
call   1030 <x@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @y(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 = call i32 @x(i32 %3, i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 2
%10 = call i32 @x(i32 %7, i32 %9)
%11 = add nsw i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @y(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @x(i32 %0, i32 %2)
%4 = add nsw i32 %0, 2
%5 = tail call i32 @x(i32 %0, i32 %4)
%6 = add nsw i32 %5, %3
ret i32 %6
}
void S_ClearPrecache(void) {}


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

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

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

LLVM IR (-O2):
define void @S_ClearPrecache() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, void *, size_t);
void sendBuf(int s, void *b, size_t no) { write(s, b, no); }


x86 assembly (clang, -O0):
<sendBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendBuf>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @sendBuf(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret void
}