xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ enableIRQ(int /*<<< orphan*/);
int /*<<< orphan*/ outb(int, int);
void startTimer() {
  outb(0x43, 0x34);
  outb(0x40, ((1193182 + (100 / 2)) / 100) & 0xff);
  outb(0x40, (((1193182 + (100 / 2)) / 100) >> 8) & 0xff);
  enableIRQ(0);
}


x86 assembly (clang, -O0):
<startTimer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43,%edi
mov    $0x34,%esi
call   1040 <outb@plt>
mov    $0x40,%edi
mov    $0x9c,%esi
call   1040 <outb@plt>
mov    $0x40,%edi
mov    $0x2e,%esi
call   1040 <outb@plt>
xor    %edi,%edi
call   1030 <enableIRQ@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<startTimer>:
push   %rax
mov    $0x43,%edi
mov    $0x34,%esi
call   1040 <outb@plt>
mov    $0x40,%edi
mov    $0x9c,%esi
call   1040 <outb@plt>
mov    $0x40,%edi
mov    $0x2e,%esi
call   1040 <outb@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <enableIRQ@plt>

LLVM IR (-O0):
define void @startTimer() {
%1 = call i32 @outb(i32 67, i32 52)
%2 = call i32 @outb(i32 64, i32 156)
%3 = call i32 @outb(i32 64, i32 46)
%4 = call i32 @enableIRQ(i32 0)
ret void
}

LLVM IR (-O2):
define void @startTimer() {
%1 = tail call i32 @outb(i32 67, i32 52)
%2 = tail call i32 @outb(i32 64, i32 156)
%3 = tail call i32 @outb(i32 64, i32 46)
%4 = tail call i32 @enableIRQ(i32 0)
ret void
}
void stac(void) { __asm__ volatile("stac"); }


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

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

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

LLVM IR (-O2):
define void @stac() {
tail call void asm sideeffect "stac", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
short test_47_2(short *mem) { return __atomic_and_fetch(mem + 0, 1, 4); }


x86 assembly (clang, -O0):
<test_47_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x24(%rbp)
and    %esi,%edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    115d <test_47_2+0x5d>
jmp    1125 <test_47_2+0x25>
mov    -0x10(%rbp),%cx
mov    -0x1a(%rbp),%ax
and    %cx,%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_47_2>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
and    $0x1,%ecx
lock cmpxchg %cx,(%rdi)
jne    1110 <test_47_2+0x10>
and    $0x1,%eax
ret

LLVM IR (-O0):
define signext i16 @test_47_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 0
store i16 1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw and i16* %6, i16 %7 acq_rel
%9 = and i16 %8, %7
store i16 %9, i16* %4
%10 = load i16, i16* %4
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @test_47_2(i16* nocapture %0) {
%2 = atomicrmw and i16* %0, i16 1 acq_rel
%3 = and i16 %2, 1
ret i16 %3
}
int iFunSub(int iA, int iB) { return iA - iB; }


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

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

LLVM IR (-O0):
define i32 @iFunSub(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @iFunSub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
void _exit() {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

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

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
br label %3
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
double j1(double x) { return 0.0; }


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

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

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

LLVM IR (-O2):
define double @j1(double %0) {
ret double 0.000000e+00
}
/* Variables and functions */
double genrand_int32();
double genrand_real2() { return (genrand_int32() * (1.0 / 4294967296.0)); }


x86 assembly (clang, -O0):
<genrand_real2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand_int32@plt>
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_real2>:
push   %rax
xor    %eax,%eax
call   1030 <genrand_int32@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand_real2() {
%1 = call double (...) @genrand_int32()
%2 = fmul double %1, 0x3DF0000000000000
ret double %2
}

LLVM IR (-O2):
define double @genrand_real2() {
%1 = tail call double (...) @genrand_int32()
%2 = fmul double %1, 0x3DF0000000000000
ret double %2
}
float skalarprodukt(float x[], float y[]) {
  return x[0] * y[0] + x[1] * y[1] + x[2] * y[2] + x[3] * y[3];
}


x86 assembly (clang, -O0):
<skalarprodukt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<skalarprodukt>:
movss  0x4(%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
movss  (%rdi),%xmm1
mulss  (%rsi),%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm2
mulss  0x8(%rsi),%xmm2
addss  %xmm1,%xmm2
movss  0xc(%rdi),%xmm0
mulss  0xc(%rsi),%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @skalarprodukt(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
%26 = load float*, float** %3
%27 = getelementptr inbounds float, float* %26, i64 3
%28 = load float, float* %27
%29 = load float*, float** %4
%30 = getelementptr inbounds float, float* %29, i64 3
%31 = load float, float* %30
%32 = call float @llvm.fmuladd.f32(float %28, float %31, float %25)
ret float %32
}

LLVM IR (-O2):
define float @skalarprodukt(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
%16 = getelementptr inbounds float, float* %0, i64 3
%17 = load float, float* %16
%18 = getelementptr inbounds float, float* %1, i64 3
%19 = load float, float* %18
%20 = tail call float @llvm.fmuladd.f32(float %17, float %19, float %15)
ret float %20
}
/* Variables and functions */
int fchdir(int);
__attribute__((__weak__, __always___)) int softboundcets_fchdir(int fd) {
  return fchdir(fd);
}


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

x86 assembly (clang, -O2):
<softboundcets_fchdir>:
jmp    1030 <fchdir@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_fchdir(i32 %0) {
%2 = tail call i32 @fchdir(i32 %0)
ret i32 %2
}
int elapsedTime(int time, int startTime) { return (time - startTime); }


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

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

LLVM IR (-O0):
define i32 @elapsedTime(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @elapsedTime(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ time_get(int *, int *);
int t_usec(int init_t_sec, int init_t_usec) {
  int current_t_sec, current_t_usec;
  time_get(&current_t_sec, &current_t_usec);
  return 1e6 * (current_t_sec - init_t_sec) + (current_t_usec - init_t_usec);
}


x86 assembly (clang, -O0):
<t_usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <time_get@plt>
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xeb9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_usec>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <time_get@plt>
mov    0x4(%rsp),%eax
sub    %ebp,%eax
cvtsi2sd %eax,%xmm0
mov    (%rsp),%eax
sub    %ebx,%eax
cvtsi2sd %eax,%xmm1
mulsd  0xec1(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @t_usec(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = call i32 @time_get(i32* %5, i32* %6)
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = sub nsw i32 %8, %9
%11 = sitofp i32 %10 to double
%12 = load i32, i32* %6
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = sitofp i32 %14 to double
%16 = call double @llvm.fmuladd.f64(double 1.000000e+06, double %11, double %15)
%17 = fptosi double %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @t_usec(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @time_get(i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, %0
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, %1
%13 = sitofp i32 %12 to double
%14 = call double @llvm.fmuladd.f64(double %10, double 1.000000e+06, double %13)
%15 = fptosi double %14 to i32
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ drv_FW8888_send_cmd(int);
void __attribute__((unused)) drv_FW8888_display_off(void) {
  drv_FW8888_send_cmd(0x08);
}


x86 assembly (clang, -O0):
<drv_FW8888_display_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
call   1030 <drv_FW8888_send_cmd@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @drv_FW8888_display_off() {
%1 = call i32 @drv_FW8888_send_cmd(i32 8)
ret void
}

LLVM IR (-O2):
define void @drv_FW8888_display_off() {
%1 = tail call i32 @drv_FW8888_send_cmd(i32 8)
ret void
}
/* Variables and functions */
scalar_t__ _gettemp(char *, int *, int /*<<< orphan*/, int);
int mkstemps(char *path, int slen) {
  int fd;
  return (_gettemp(path, &fd, 0, slen) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkstemps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <_gettemp@plt>
cmp    $0x0,%rax
je     1146 <mkstemps+0x36>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1153 <mkstemps+0x43>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1153 <mkstemps+0x43>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemps>:
push   %rax
mov    %esi,%ecx
lea    0x4(%rsp),%rsi
xor    %edx,%edx
call   1030 <_gettemp@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkstemps(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i64 @_gettemp(i8* %6, i32* %5, i32 0, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %5
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %10
%14 = phi i32 [ %11, %10 ], [ -1, %12 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @mkstemps(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @_gettemp(i8* %0, i32* %3, i32 0, i32 %1)
%6 = icmp eq i64 %5, 0
%7 = load i32, i32* %3
%8 = select i1 %6, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ g5_get_forceMC(int /*<<< orphan*/, int, double **, double *);
void g5_get_force(int ni, double (*a)[3], double *pot) {
  g5_get_forceMC(0, ni, a, pot);
}


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

x86 assembly (clang, -O2):
<g5_get_force>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <g5_get_forceMC@plt>

LLVM IR (-O0):
define void @g5_get_force(i32 %0, [3 x double]* %1, double* %2) {
%4 = alloca i32
%5 = alloca [3 x double]*
%6 = alloca double*
store i32 %0, i32* %4
store [3 x double]* %1, [3 x double]** %5
store double* %2, double** %6
%7 = load i32, i32* %4
%8 = load [3 x double]*, [3 x double]** %5
%9 = bitcast [3 x double]* %8 to double**
%10 = load double*, double** %6
%11 = call i32 @g5_get_forceMC(i32 0, i32 %7, double** %9, double* %10)
ret void
}

LLVM IR (-O2):
define void @g5_get_force(i32 %0, [3 x double]* %1, double* %2) {
%4 = bitcast [3 x double]* %1 to double**
%5 = tail call i32 @g5_get_forceMC(i32 0, i32 %0, double** %4, double* %2)
ret void
}
void cpu_sys_init(void) {}


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

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

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

LLVM IR (-O2):
define void @cpu_sys_init() {
ret void
}
/* Variables and functions */
int random();
double drandom(void) {
  if (sizeof(int) != 2)
    return ((double)(random() & 0x7fff) / 32768.0);
  else
    return ((double)random() / 32768.0);
}


x86 assembly (clang, -O0):
<drandom>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random@plt>
and    $0x7fff,%eax
cvtsi2sd %eax,%xmm0
movsd  0xed4(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<drandom>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
and    $0x7fff,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xed7(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @drandom() {
%1 = call i32 (...) @random()
%2 = and i32 %1, 32767
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 3.276800e+04
ret double %4
}

LLVM IR (-O2):
define double @drandom() {
%1 = tail call i32 (...) @random()
%2 = and i32 %1, 32767
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3F00000000000000
ret double %4
}
int func() {
  int i;
  int c[100];
#pragma xmp align c[i] with t[i]
#pragma xmp loop on t[i]
  for (i = 0; i < 100; i++) {
    c[i] = 0;
  }
  {
    int c = 4;
    c *= 2;
    return c;
  }
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1139 <func+0x39>
movslq -0x4(%rbp),%rax
movl   $0x0,-0x1a0(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <func+0x12>
movl   $0x4,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 8
}
void answer_xboard(void) {}


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

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

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

LLVM IR (-O2):
define void @answer_xboard() {
ret void
}
void x() { printf("hi from %s\n", __func__); }


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

x86 assembly (clang, -O2):
<x>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"hi from %s\0A\00"
@__func__.x = [2 x i8] c"x\00"
define void @x() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.x, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"hi from %s\0A\00"
@__func__.x = [2 x i8] c"x\00"
define void @x() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.x, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EEPROMIntDisable(uint32_t ui32IntFlags) {
  ;
  (*((volatile uint32_t *)(0x400FD010))) &= ~0x00000004;
  (*((volatile uint32_t *)(0x400AF040))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<EEPROMIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x400fd010,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    $0x400fd010,%eax
mov    %ecx,(%rax)
mov    $0x400af040,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    $0x400af040,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMIntDisable>:
andl   $0xfffffffb,0x400fd010
fb
andl   $0xfffffffe,0x400af040
fe
ret

LLVM IR (-O0):
define void @EEPROMIntDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load volatile i32, i32* inttoptr (i64 1074778128 to i32*)
%4 = and i32 %3, -5
store volatile i32 %4, i32* inttoptr (i64 1074778128 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1074458688 to i32*)
%6 = and i32 %5, -2
store volatile i32 %6, i32* inttoptr (i64 1074458688 to i32*)
ret void
}

LLVM IR (-O2):
define void @EEPROMIntDisable(i32 %0) {
%2 = load volatile i32, i32* inttoptr (i64 1074778128 to i32*)
%3 = and i32 %2, -5
store volatile i32 %3, i32* inttoptr (i64 1074778128 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1074458688 to i32*)
%5 = and i32 %4, -2
store volatile i32 %5, i32* inttoptr (i64 1074458688 to i32*)
ret void
}
/* Variables and functions */
int close(int);
int octave_close_wrapper(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<octave_close_wrapper>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @octave_close_wrapper(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ curses_cleanup(int /*<<< orphan*/ *);
void curses_atexit(void) { curses_cleanup(NULL); }


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

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

LLVM IR (-O0):
define void @curses_atexit() {
%1 = call i32 @curses_cleanup(i32* null)
ret void
}

LLVM IR (-O2):
define void @curses_atexit() {
%1 = tail call i32 @curses_cleanup(i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_int(int);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  int x;
  x = 'Q';
  print_int(x);
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x51,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xec2(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x51,%edi
call   1040 <print_int@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <print_string@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
store i32 81, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @print_int(i32 %2)
%4 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @print_int(i32 81)
%2 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int system(char *);
int libamg_comcerto_rtp_reload(void) {
  return system("asterisk -rx \"module reload librtp-comcerto\"");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"asterisk -rx \22module reload librtp-comcerto\22\00"
define i32 @libamg_comcerto_rtp_reload() {
%1 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [45 x i8] c"asterisk -rx \22module reload librtp-comcerto\22\00"
define i32 @libamg_comcerto_rtp_reload() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
scalar_t__ fclose(int /*<<< orphan*/);
scalar_t__ ferror(int /*<<< orphan*/);
int /*<<< orphan*/ header();
int /*<<< orphan*/ main_double();
int /*<<< orphan*/ main_float();
int /*<<< orphan*/ stdout;
int main() {
  header();
  main_float();
  main_double();
  if (ferror(stdout) || fclose(stdout))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <header@plt>
mov    $0x0,%al
call   1060 <main_float@plt>
mov    $0x0,%al
call   1070 <main_double@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1040 <ferror@plt>
cmp    $0x0,%rax
jne    11a4 <main+0x54>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1050 <fclose@plt>
cmp    $0x0,%rax
je     11b0 <main+0x60>
movl   $0x1,-0x4(%rbp)
jmp    11b7 <main+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <header@plt>
xor    %eax,%eax
call   1060 <main_float@plt>
xor    %eax,%eax
call   1070 <main_double@plt>
mov    0x2e73(%rip),%rbx
mov    (%rbx),%edi
call   1040 <ferror@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1183 <main+0x33>
pop    %rbx
ret
mov    (%rbx),%edi
call   1050 <fclose@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @header()
%3 = call i32 (...) @main_float()
%4 = call i32 (...) @main_double()
%5 = load i32, i32* @stdout
%6 = call i64 @ferror(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %0
%9 = load i32, i32* @stdout
%10 = call i64 @fclose(i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8, %0
store i32 1, i32* %1
br label %14
13: ; preds = %8
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @header()
%2 = tail call i32 (...) @main_float()
%3 = tail call i32 (...) @main_double()
%4 = load i32, i32* @stdout
%5 = tail call i64 @ferror(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* @stdout
%9 = tail call i64 @fclose(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %7, %0
%13 = phi i32 [ 1, %0 ], [ %11, %7 ]
ret i32 %13
}
int ld_bge_mr1(long double *a1, long double a2) {
  return (__builtin_isgreaterequal(*a1, a2));
}


x86 assembly (clang, -O0):
<ld_bge_mr1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_bge_mr1>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setae  %al
ret

LLVM IR (-O0):
define i32 @ld_bge_mr1(x86_fp80* %0, x86_fp80 %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80
store x86_fp80* %0, x86_fp80** %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80, x86_fp80* %4
%8 = fcmp oge x86_fp80 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_bge_mr1(x86_fp80* nocapture %0, x86_fp80 %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = fcmp oge x86_fp80 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void Save(int x, char *wt) {
  printf(" *dest=tmp%s;\n", wt);
  printf(" dest++;\n");
}


x86 assembly (clang, -O0):
<Save>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Save>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c" *dest=tmp%s;\0A\00"
@str = [9 x i8] c" dest++;\00"
define void @Save(i32 %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
int test_03(unsigned char *a) { return *a == 0; }


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

x86 assembly (clang, -O2):
<test_03>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @test_03(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x32() {
  Assert_real((islower(50) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              255, ("islower should be 0 for 2"));
}


x86 assembly (clang, -O0):
<t_islower_0x32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xff,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x32>:
push   %rax
mov    $0x32,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xff,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for 2\00"
define void @t_islower_0x32() {
%1 = call i64 @islower(i32 50)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 255, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for 2\00"
define void @t_islower_0x32() {
%1 = tail call i64 @islower(i32 50)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 255, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
void exit(int code) {
  syscall(93, code, 0, 0);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x5d,%edi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <syscall@plt>
jmp    112c <exit+0x1c>

x86 assembly (clang, -O2):
<exit>:
push   %rax
mov    %edi,%esi
mov    $0x5d,%edi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <syscall@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1130 <exit+0x20>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @syscall(i32 93, i32 %3, i32 0, i32 0)
br label %5
5: ; preds = %1, %5
br label %5
}

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @syscall(i32 93, i32 %0, i32 0, i32 0)
br label %3
3: ; preds = %1, %3
br label %3
}
void setVec4f(float *out, float x, float y, float z, float w) {
  out[0] = x;
  out[1] = y;
  out[2] = z;
  out[3] = w;
}


x86 assembly (clang, -O0):
<setVec4f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setVec4f>:
movss  %xmm0,(%rdi)
movss  %xmm1,0x4(%rdi)
movss  %xmm2,0x8(%rdi)
movss  %xmm3,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @setVec4f(float* nocapture writeonly %0, float %1, float %2, float %3, float %4) {
store float %1, float* %0
%6 = getelementptr inbounds float, float* %0, i64 1
store float %2, float* %6
%7 = getelementptr inbounds float, float* %0, i64 2
store float %3, float* %7
%8 = getelementptr inbounds float, float* %0, i64 3
store float %4, float* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wctype_t;

/* Variables and functions */
int /*<<< orphan*/ __infer_nondet_int();
wctype_t wctype(const char *property) { return (wctype_t)__infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @wctype(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @wctype(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
long long atoll(char *);
int /*<<< orphan*/ strip(char *);
long long conv(char *buffer) {
  strip(buffer);
  return atoll(buffer);
}


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

x86 assembly (clang, -O2):
<conv>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strip@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <atoll@plt>

LLVM IR (-O0):
define i64 @conv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strip(i8* %3)
%5 = load i8*, i8** %2
%6 = call i64 @atoll(i8* %5)
ret i64 %6
}

LLVM IR (-O2):
define i64 @conv(i8* %0) {
%2 = tail call i32 @strip(i8* %0)
%3 = tail call i64 @atoll(i8* %0)
ret i64 %3
}
int main(int argc, const char *argv[]) {
  struct my_struct {
    int a;
    float b;
    int c;
    struct {
      int e;
      float f;
      double g;
      struct {
        float i;
      } h;
      int j;
    } d;
  } x, y;
  y = x;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.my_struct = type { i32, float, i32, %struct.anon }
%struct.anon = type { i32, float, double, %struct.anon.0, i32 }
%struct.anon.0 = type { float }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.my_struct
%7 = alloca %struct.my_struct
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast %struct.my_struct* %7 to i8*
%9 = bitcast %struct.my_struct* %6 to i8*
ret i32 0
}

LLVM IR (-O2):
%struct.my_struct = type { i32, float, i32, %struct.anon }
%struct.anon = type { i32, float, double, %struct.anon.0, i32 }
%struct.anon.0 = type { float }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
float f(float x, int y) { return 0.1; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  0xeec(%rip),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @f(float %0, i32 %1) {
ret float 0x3FB99999A0000000
}
/* Variables and functions */
int /*<<< orphan*/ test_check_with_suite_add_test();
void test_check_with_suite_add_test_constructor(void) {
  test_check_with_suite_add_test();
}


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

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

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

LLVM IR (-O2):
define void @test_check_with_suite_add_test_constructor() {
%1 = tail call i32 (...) @test_check_with_suite_add_test()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int glib_linux_enosys(void) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<glib_linux_enosys>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<glib_linux_enosys>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @glib_linux_enosys() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @glib_linux_enosys() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}
void g_key_file_get_boolean() {}


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

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

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

LLVM IR (-O2):
define void @g_key_file_get_boolean() {
ret void
}
R0A1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if (r0 <= (*((unsigned char *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzbl -0x5(%rbp),%eax
mov    $0xa98ac7,%ecx
movzbl (%rcx),%ecx
cmp    %ecx,%eax
jg     113e <R0A1+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <R0A1+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0A1>:
movzbl %dil,%ecx
movzbl 0xa98ac7,%edx
xor    %eax,%eax
cmp    %edx,%ecx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @R0A1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = and i32 %0, 255
%8 = load i8, i8* inttoptr (i64 11111111 to i8*)
%9 = zext i8 %8 to i32
%10 = icmp ule i32 %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
void CPUAbortHandler(void) { ; }


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

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

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

LLVM IR (-O2):
define void @CPUAbortHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emulate_latency_ns(int);
void emulate_latency(size_t size) {
  int extra_latency;
  extra_latency = (int)size *
                  (1 - (float)(((float)1200) / 1000) / (((float)7000) / 1000)) /
                  (((float)1200) / 1000);
  emulate_latency_ns(extra_latency);
}


x86 assembly (clang, -O0):
<emulate_latency>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ss %eax,%xmm0
movss  0xed8(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xec8(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <emulate_latency_ns@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emulate_latency>:
cvtsi2ss %edi,%xmm0
mulss  0xee4(%rip),%xmm0
divss  0xee0(%rip),%xmm0
cvttss2si %xmm0,%edi
jmp    1030 <emulate_latency_ns@plt>

LLVM IR (-O0):
define void @emulate_latency(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = sitofp i32 %5 to float
%7 = fmul float %6, 0x3FEA83A840000000
%8 = fdiv float %7, 0x3FF3333340000000
%9 = fptosi float %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 @emulate_latency_ns(i32 %10)
ret void
}

LLVM IR (-O2):
define void @emulate_latency(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = sitofp i32 %2 to float
%4 = fmul float %3, 0x3FEA83A840000000
%5 = fdiv float %4, 0x3FF3333340000000
%6 = fptosi float %5 to i32
%7 = tail call i32 @emulate_latency_ns(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BLAS_dswap(int *, double *, int *, double *, int *);
void dswap(int n, double *dx, int incx, double *dy, int incy) {
  dx++;
  dy++;
  BLAS_dswap(&n, dx, &incx, dy, &incy);
}


x86 assembly (clang, -O0):
<dswap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x24(%rbp),%r8
call   1030 <BLAS_dswap@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dswap>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
add    $0x8,%rsi
add    $0x8,%rcx
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
call   1030 <BLAS_dswap@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @dswap(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %6
store i32 %2, i32* %7
store i32 %4, i32* %8
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = getelementptr inbounds double, double* %3, i64 1
%11 = call i32 @BLAS_dswap(i32* %6, double* %9, i32* %7, double* %10, i32* %8)
ret void
}
int main(void) {
  float f1 = 3.14f, f2;
  f2 = (double)f1 - 2;
  return f2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movss  0xef5(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed7(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
cvttss2si -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 0x40091EB860000000, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double %5, 2.000000e+00
%7 = fptrunc double %6 to float
store float %7, float* %3
%8 = load float, float* %3
%9 = fptosi float %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void myFree(void *p) { free(p); }


x86 assembly (clang, -O0):
<myFree>:
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):
<myFree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @myFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void ft_strclr(char *s) {
  while (*s != '\0')
    *s++ = '\0';
}


x86 assembly (clang, -O0):
<ft_strclr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     112f <ft_strclr+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    1108 <ft_strclr+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclr>:
cmpb   $0x0,(%rdi)
je     111d <ft_strclr+0x1d>
add    $0x1,%rdi
nopl   0x0(%rax)
movb   $0x0,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strclr+0x10>
ret

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

LLVM IR (-O2):
define void @ft_strclr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %6, %4 ], [ %0, %1 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8 0, i8* %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}