xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
double pow2_u64(int);
double from_msr_pu_default(uint64_t msrval) {
  return 1.0 / pow2_u64((msrval >> 0) & 0xF);
}


x86 assembly (clang, -O0):
<from_msr_pu_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x0,%edi
and    $0xf,%edi
call   1030 <pow2_u64@plt>
movaps %xmm0,%xmm1
movsd  0xecc(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<from_msr_pu_default>:
push   %rax
and    $0xf,%edi
call   1030 <pow2_u64@plt>
movsd  0xedf(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @from_msr_pu_default(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 0
%5 = and i32 %4, 15
%6 = call double @pow2_u64(i32 %5)
%7 = fdiv double 1.000000e+00, %6
ret double %7
}

LLVM IR (-O2):
define double @from_msr_pu_default(i32 %0) {
%2 = and i32 %0, 15
%3 = tail call double @pow2_u64(i32 %2)
%4 = fdiv double 1.000000e+00, %3
ret double %4
}
/* Variables and functions */
unsigned char GetBlue88(unsigned long);
unsigned char getblue(unsigned long c) { return GetBlue88(c); }


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

x86 assembly (clang, -O2):
<getblue>:
jmp    1030 <GetBlue88@plt>

LLVM IR (-O0):
define zeroext i8 @getblue(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call zeroext i8 @GetBlue88(i64 %3)
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @getblue(i64 %0) {
%2 = tail call zeroext i8 @GetBlue88(i64 %0)
ret i8 %2
}
int f(int n) { return (n << 24) / (1 << 23); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    $0x800000,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
shl    $0x18,%edi
lea    0x7fffff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x17,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = sdiv i32 %4, 8388608
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = shl i32 %0, 24
%3 = sdiv i32 %2, 8388608
ret i32 %3
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double second() {
  double t;
  struct timeval tv;
  gettimeofday(&tv, NULL);
  t = (double)(tv.tv_sec) + ((double)(tv.tv_usec)) / 1.0e6;
  return t;
}


x86 assembly (clang, -O0):
<second>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x10(%rbp),%xmm0
cvtsi2sdq -0x18(%rbp),%xmm1
movsd  0xec7(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<second>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
divsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @second() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %6, %10
store double %11, double* %1
%12 = load double, double* %1
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @second() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %10, %6
ret double %11
}
void foo803(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo803(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VLM_loxo_distance_angle(double, double, double, double,
                                           double *, double *);
double VLM_loxo_distance(double latitude, double longitude, double target_lat,
                         double target_long) {
  double distance, heading;
  VLM_loxo_distance_angle(latitude, longitude, target_lat, target_long,
                          &distance, &heading);
  return distance;
}


x86 assembly (clang, -O0):
<VLM_loxo_distance>:
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  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <VLM_loxo_distance_angle@plt>
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VLM_loxo_distance>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <VLM_loxo_distance_angle@plt>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @VLM_loxo_distance(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %5 to i8*
%8 = bitcast double* %6 to i8*
%9 = call i32 @VLM_loxo_distance_angle(double %0, double %1, double %2, double %3, double* %5, double* %6)
%10 = load double, double* %5
ret double %10
}
void set_parameter_as_integer(int _parameterIndex, int _value) {}


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

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

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

LLVM IR (-O2):
define void @set_parameter_as_integer(i32 %0, i32 %1) {
ret void
}
int calcZeroVal(int val1, int val2) {
  val2 += 0x10000;
  return (int)(val1 - (((val2 - val1) / (2.5 - 0.833)) * 0.833));
}


x86 assembly (clang, -O0):
<calcZeroVal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10000,%eax
mov    %eax,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xedc(%rip),%xmm2
divsd  %xmm2,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xeb1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcZeroVal>:
cvtsi2sd %edi,%xmm0
sub    %edi,%esi
add    $0x10000,%esi
cvtsi2sd %esi,%xmm1
divsd  0xee8(%rip),%xmm1
mulsd  0xee8(%rip),%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @calcZeroVal(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 = add nsw i32 %5, 65536
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = sitofp i32 %11 to double
%13 = fdiv double %12, 1.667000e+00
%14 = fneg double %13
%15 = call double @llvm.fmuladd.f64(double %14, double 0x3FEAA7EF9DB22D0E, double %8)
%16 = fptosi double %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @calcZeroVal(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sub i32 65536, %0
%5 = add i32 %4, %1
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, -1.667000e+00
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3FEAA7EF9DB22D0E, double %3)
%9 = fptosi double %8 to i32
ret i32 %9
}
/* Variables and functions */
int ide_do_packet_command_pio(char *, char *, int);
int ide_play_cd(char *buf, int length) {
  char cmd[12] = {0x21, 0x04, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  return ide_do_packet_command_pio(cmd, buf, length);
}


x86 assembly (clang, -O0):
<ide_play_cd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <ide_do_packet_command_pio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ide_play_cd>:
sub    $0x18,%rsp
mov    %esi,%edx
mov    %rdi,%rsi
mov    0xee9(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xed6(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <ide_do_packet_command_pio@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.ide_play_cd.cmd = <{ i8, i8, [10 x i8] }> <{ i8 33, i8 4, [10 x i8] zeroinitializer }>
define i32 @ide_play_cd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [12 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = bitcast [12 x i8]* %5 to i8*
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @ide_do_packet_command_pio(i8* %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@__const.ide_play_cd.cmd = <{ i8, i8, [10 x i8] }> <{ i8 33, i8 4, [10 x i8] zeroinitializer }>
define i32 @ide_play_cd(i8* %0, i32 %1) {
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%5 = call i32 @ide_do_packet_command_pio(i8* %4, i8* %0, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ getName(char *);
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int main() {
  puts(getName("abc.png"));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"abc.png\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @getName(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"abc.png\00"
define i32 @main() {
%1 = tail call i32 @getName(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double a;
  printf("Podaj zmienna %s: ", "a");
  scanf("%"
        "lf",
        &a);
  ;
  printf("\n%lf\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xeb9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee4(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
lea    0xec8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"Podaj zmienna %s: \00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [6 x i8] c"\0A%lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %5)
ret i32 0
}
void INT_Excep_USB1_D1FIFO1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_USB1_D1FIFO1() {
ret void
}
void R_ClearLevelSplats(void) {}


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

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

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

LLVM IR (-O2):
define void @R_ClearLevelSplats() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void callSleep(double time) { usleep(1000 * time); }


x86 assembly (clang, -O0):
<callSleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callSleep>:
mulsd  0xee8(%rip),%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @callSleep(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 1.000000e+03, %3
%5 = fptosi double %4 to i32
%6 = call i32 @usleep(i32 %5)
ret void
}

LLVM IR (-O2):
define void @callSleep(double %0) {
%2 = fmul double %0, 1.000000e+03
%3 = fptosi double %2 to i32
%4 = tail call i32 @usleep(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_log_set_level() {
  printf("NOT IMPLEMENTED:"
         "pa_log_set_level"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_log_set_level\0A\00"
define i32 @pa_log_set_level() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_log_set_level\00"
define i32 @pa_log_set_level() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct VectorVectorBase {
  int dummy;
};
struct PosTagger {
  int dummy;
};

/* Variables and functions */
struct VectorVectorBase *GetPosTaggerVectorVector(struct PosTagger *,
                                                  char const *);
struct VectorVectorBase *tag_vector_vector_result(struct PosTagger *handle,
                                                  const char *code) {
  return GetPosTaggerVectorVector(handle, code);
}


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

x86 assembly (clang, -O2):
<tag_vector_vector_result>:
jmp    1030 <GetPosTaggerVectorVector@plt>

LLVM IR (-O0):
%struct.VectorVectorBase = type { i32 }
%struct.PosTagger = type { i32 }
define %struct.VectorVectorBase* @tag_vector_vector_result(%struct.PosTagger* %0, i8* %1) {
%3 = alloca %struct.PosTagger*
%4 = alloca i8*
store %struct.PosTagger* %0, %struct.PosTagger** %3
store i8* %1, i8** %4
%5 = load %struct.PosTagger*, %struct.PosTagger** %3
%6 = load i8*, i8** %4
%7 = call %struct.VectorVectorBase* @GetPosTaggerVectorVector(%struct.PosTagger* %5, i8* %6)
ret %struct.VectorVectorBase* %7
}

LLVM IR (-O2):
%struct.VectorVectorBase = type { i32 }
%struct.PosTagger = type { i32 }
define %struct.VectorVectorBase* @tag_vector_vector_result(%struct.PosTagger* %0, i8* %1) {
%3 = tail call %struct.VectorVectorBase* @GetPosTaggerVectorVector(%struct.PosTagger* %0, i8* %1)
ret %struct.VectorVectorBase* %3
}
/* Variables and functions */
scalar_t__ rand();
unsigned int random_rand32(void) { return (unsigned int)rand(); }


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

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

LLVM IR (-O0):
define i32 @random_rand32() {
%1 = call i64 (...) @rand()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @random_rand32() {
%1 = tail call i64 (...) @rand()
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
size_t strlen(const char *str) {
  const char *s;
  for (s = str; *s; s++)
    ;
  return (size_t)(s - str);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1133 <strlen+0x33>
jmp    1122 <strlen+0x22>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
void debug(__attribute__((unused)) const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @debug(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vcall(float *, int);
void v4d(double *vec) {
  float v[4];
  v[0] = vec[0];
  v[1] = vec[1];
  v[2] = vec[2];
  v[3] = vec[3];
  vcall(v, 4);
}


x86 assembly (clang, -O0):
<v4d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1030 <vcall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4d>:
sub    $0x18,%rsp
movupd (%rdi),%xmm0
movupd 0x10(%rdi),%xmm1
cvtpd2ps %xmm1,%xmm1
cvtpd2ps %xmm0,%xmm0
unpcklpd %xmm1,%xmm0
movapd %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1030 <vcall@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @v4d(double* nocapture %0) {
%2 = alloca <4 x float>
%3 = bitcast <4 x float>* %2 to i8*
%4 = getelementptr inbounds <4 x float>, <4 x float>* %2, i64 0, i64 0
%5 = bitcast double* %0 to <4 x double>*
%6 = load <4 x double>, <4 x double>* %5
%7 = fptrunc <4 x double> %6 to <4 x float>
store <4 x float> %7, <4 x float>* %2
%8 = call i32 @vcall(float* %4, i32 4)
ret void
}
void Memory_Rethink(void) {}


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

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

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

LLVM IR (-O2):
define void @Memory_Rethink() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_message(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void log_xfer(int size) {
  char buffer[100];
  sprintf(buffer, "Transferred file (%u bytes)", size);
  log_message(buffer);
}


x86 assembly (clang, -O0):
<log_xfer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <log_message@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_xfer>:
push   %rbx
sub    $0x70,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <log_message@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Transferred file (%u bytes)\00"
define void @log_xfer(i32 %0) {
%2 = alloca i32
%3 = alloca [100 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = call i32 @log_message(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Transferred file (%u bytes)\00"
define void @log_xfer(i32 %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @log_message(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int k;
  scanf("%d", &k);
  printf("%d\n", k * 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
imul   $0x3,-0x8(%rbp),%esi
lea    0xeb9(%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
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    (%rax,%rax,2),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, 3
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int cos(double);
int sin(double);
double EDDtan(double x) {
  double c = 1. / cos(x);
  double y = -2 * sin(x) * c * c * c;
  return (y * y);
}


x86 assembly (clang, -O0):
<EDDtan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
cvtsi2sd %eax,%xmm1
movsd  0xebd(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
imul   $0xfffffffe,%eax,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EDDtan>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xec2(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
add    %eax,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @EDDtan(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call i32 @cos(double %5)
%7 = sitofp i32 %6 to double
%8 = fdiv double 1.000000e+00, %7
store double %8, double* %3
%9 = load double, double* %2
%10 = call i32 @sin(double %9)
%11 = mul nsw i32 -2, %10
%12 = sitofp i32 %11 to double
%13 = load double, double* %3
%14 = fmul double %12, %13
%15 = load double, double* %3
%16 = fmul double %14, %15
%17 = load double, double* %3
%18 = fmul double %16, %17
store double %18, double* %4
%19 = load double, double* %4
%20 = load double, double* %4
%21 = fmul double %19, %20
ret double %21
}

LLVM IR (-O2):
define double @EDDtan(double %0) {
%2 = tail call i32 @cos(double %0)
%3 = sitofp i32 %2 to double
%4 = fdiv double 1.000000e+00, %3
%5 = tail call i32 @sin(double %0)
%6 = mul nsw i32 %5, -2
%7 = sitofp i32 %6 to double
%8 = fmul double %4, %7
%9 = fmul double %4, %8
%10 = fmul double %4, %9
%11 = fmul double %10, %10
ret double %11
}
int test_imm_15uint8_mem(unsigned char *val) {
  return ((*val) & (0x15 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_15uint8_mem>:
testb  $0x15,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_15uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 21
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

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


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

x86 assembly (clang, -O2):
<ivory_serialize_pack_prim_1_be>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @ivory_serialize_pack_prim_1_be(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
ret void
}
int bitAnd(int x, int y) {
  int negx = ~x;
  int negy = ~y;
  int bitand = ~(negx | negy);
  return bitand;
}


x86 assembly (clang, -O0):
<bitAnd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitAnd>:
mov    %edi,%eax
and    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @bitAnd(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
/* Variables and functions */
char const *os_get_name();
const char *lovrSystemGetOS() { return os_get_name(); }


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

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

LLVM IR (-O0):
define i8* @lovrSystemGetOS() {
%1 = call i8* (...) @os_get_name()
ret i8* %1
}

LLVM IR (-O2):
define i8* @lovrSystemGetOS() {
%1 = tail call i8* (...) @os_get_name()
ret i8* %1
}
double mu_timer_real(void) { return -1.0; }


x86 assembly (clang, -O0):
<mu_timer_real>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @mu_timer_real() {
ret double -1.000000e+00
}

LLVM IR (-O2):
define double @mu_timer_real() {
ret double -1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ f(int);
main() {
  if (f(1))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <f@plt>
cmp    $0x0,%rax
je     115a <main+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <f@plt>
test   %rax,%rax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @f(i32 1)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @f(i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
void list_free_fake(void *data) { (void)data; }


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

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

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

LLVM IR (-O2):
define void @list_free_fake(i8* nocapture %0) {
ret void
}
/* Variables and functions */
double rndNormal();
double rndu();
double sqrt(int);
double rndBactrian(void) {
  double z = 0.95 + rndNormal() * sqrt(1 - 0.95 * 0.95);
  if (rndu() < 0.5)
    z = -z;
  return (z);
}


x86 assembly (clang, -O0):
<rndBactrian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rndNormal@plt>
movsd  %xmm0,-0x10(%rbp)
xor    %edi,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rndu@plt>
movaps %xmm0,%xmm1
movsd  0xe86(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11a5 <rndBactrian+0x75>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rndBactrian>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1040 <rndNormal@plt>
movsd  %xmm0,(%rsp)
xor    %edi,%edi
call   1050 <sqrt@plt>
mulsd  (%rsp),%xmm0
addsd  0xeac(%rip),%xmm0
movapd %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rndu@plt>
movapd 0xea8(%rip),%xmm1
cmpltsd 0xe97(%rip),%xmm0
movapd (%rsp),%xmm2
xorpd  %xmm2,%xmm1
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @rndBactrian() {
%1 = alloca double
%2 = call double (...) @rndNormal()
%3 = call double @sqrt(i32 0)
%4 = call double @llvm.fmuladd.f64(double %2, double %3, double 0x3FEE666666666666)
store double %4, double* %1
%5 = call double (...) @rndu()
%6 = fcmp olt double %5, 5.000000e-01
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load double, double* %1
%9 = fneg double %8
store double %9, double* %1
br label %10
10: ; preds = %7, %0
%11 = load double, double* %1
ret double %11
}

LLVM IR (-O2):
define double @rndBactrian() {
%1 = tail call double (...) @rndNormal()
%2 = tail call double @sqrt(i32 0)
%3 = tail call double @llvm.fmuladd.f64(double %1, double %2, double 0x3FEE666666666666)
%4 = tail call double (...) @rndu()
%5 = fcmp olt double %4, 5.000000e-01
%6 = fneg double %3
%7 = select i1 %5, double %6, double %3
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
void __attribute__((noreturn)) __die_harder(void) { _exit(EXIT_FAILURE); }


x86 assembly (clang, -O0):
<__die_harder>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<__die_harder>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @__die_harder() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = call i32 @_exit(i32 %1)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @__die_harder() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = tail call i32 @_exit(i32 %1)
unreachable
}
int nofill(void *buffer, unsigned int len) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @nofill(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int send(int, long const *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int sendPosition(int fd, long const posn) {
  int rv;
  rv = send(fd, &posn, sizeof(long), 0);
  if (rv != sizeof(long)) {
    fprintf(stderr, "error sending posn\n");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sendPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x8,%rax
je     1174 <sendPosition+0x54>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <sendPosition+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendPosition>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,0x8(%rsp)
lea    0x8(%rsp),%rsi
xor    %ebx,%ebx
mov    $0x8,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
cmp    $0x8,%eax
je     115c <sendPosition+0x3c>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"error sending posn\0A\00"
define i32 @sendPosition(i32 %0, i64 %1) {
%3 = alloca i64
store i64 %1, i64* %3
%4 = call i32 @send(i32 %0, i64* %3, i32 8, i32 0)
%5 = icmp eq i32 %4, 8
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %2, %6
%10 = phi i32 [ -1, %6 ], [ 0, %2 ]
ret i32 %10
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int l_pipecmp(void *tag1, void *tag2) {
  return (*((pid_t *)tag1)) == (*((pid_t *)tag2));
}


x86 assembly (clang, -O0):
<l_pipecmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_pipecmp>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @l_pipecmp(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 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = icmp eq i64 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @l_pipecmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
zz_bind_match(s) const char *s;
{
  append_nt_bead(zlex_strsave(s), 0);
  return 1;
}


x86 assembly (clang, -O0):
<zz_bind_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <zlex_strsave@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <append_nt_bead@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @zz_bind_match(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @zlex_strsave to i32 (i8*, ...)*)(i8* %3)
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @append_nt_bead to i32 (i32, i32, ...)*)(i32 %4, i32 0)
ret i32 1
}

LLVM IR (-O2):
define i32 @zz_bind_match(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @zlex_strsave to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @append_nt_bead to i32 (i32, i32, ...)*)(i32 %2, i32 0)
ret i32 1
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_container_to_start_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(8, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_container_to_start_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x8,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_container_to_start_solutions>:
mov    $0x8,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_container_to_start_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 8, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_container_to_start_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 8, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ test_case(int);
int main() {
  int c, n;
  scanf("%d", &c);
  while (c--) {
    scanf("%d", &n);
    test_case(n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1170 <main+0x50>
lea    0xea6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%edi
call   1030 <test_case@plt>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
subl   $0x1,(%rsp)
jb     116a <main+0x4a>
lea    0xec0(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <test_case@plt>
subl   $0x1,(%rsp)
jae    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp eq i32 %6, 0
br i1 %8, label %16, label %9
9: ; preds = %0, %9
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = call i32 @test_case(i32 %11)
%13 = load i32, i32* %1
%14 = add nsw i32 %13, -1
store i32 %14, i32* %1
%15 = icmp eq i32 %13, 0
br i1 %15, label %16, label %9
16: ; preds = %9, %0
ret i32 0
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll46(struct __test_metadata *);
void wrapper_epoll46(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll46(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll46>:
jmp    1030 <epoll46@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll46(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll46(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll46(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll46(%struct.__test_metadata* %0)
ret void
}