xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_mday;
  scalar_t__ tm_hour;
  scalar_t__ tm_min;
  scalar_t__ tm_sec;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ mktime(struct tm *);
time_t getCurrentLocalMonthForTs(time_t ts) {
  struct tm *t = localtime(&ts);
  t->tm_sec = 0;
  t->tm_min = 0;
  t->tm_hour = 0;
  t->tm_mday = 1;
  return mktime(t);
}


x86 assembly (clang, -O0):
<getCurrentLocalMonthForTs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,0x18(%rax)
mov    -0x10(%rbp),%rax
movq   $0x0,0x10(%rax)
mov    -0x10(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <mktime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCurrentLocalMonthForTs>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rax)
movq   $0x0,0x18(%rax)
movl   $0x1,(%rax)
mov    %rax,%rdi
call   1040 <mktime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i64, i64, i64 }
define i32 @getCurrentLocalMonthForTs(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
store i32 %0, i32* %2
%4 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %4, %struct.tm** %3
%5 = load %struct.tm*, %struct.tm** %3
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 3
store i64 0, i64* %6
%7 = load %struct.tm*, %struct.tm** %3
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 2
store i64 0, i64* %8
%9 = load %struct.tm*, %struct.tm** %3
%10 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 1
store i64 0, i64* %10
%11 = load %struct.tm*, %struct.tm** %3
%12 = getelementptr inbounds %struct.tm, %struct.tm* %11, i32 0, i32 0
store i32 1, i32* %12
%13 = load %struct.tm*, %struct.tm** %3
%14 = call i32 @mktime(%struct.tm* %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.tm = type { i32, i64, i64, i64 }
define i32 @getCurrentLocalMonthForTs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call %struct.tm* @localtime(i32* %2)
%4 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 1
%5 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
%6 = bitcast i64* %4 to i8*
store i32 1, i32* %5
%7 = call i32 @mktime(%struct.tm* %3)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ENOPROTOOPT;
int /*<<< orphan*/ errno;
int mill_tcpreuseport(int s) {
  errno = ENOPROTOOPT;
  return -1;
}


x86 assembly (clang, -O0):
<mill_tcpreuseport>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOPROTOOPT = global i32 0
@errno = global i32 0
define i32 @mill_tcpreuseport(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOPROTOOPT
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOPROTOOPT = global i32 0
@errno = global i32 0
define i32 @mill_tcpreuseport(i32 %0) {
%2 = load i32, i32* @ENOPROTOOPT
store i32 %2, i32* @errno
ret i32 -1
}
int _all_notes_off(struct MIDIController *controller) { return 0; }


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

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

LLVM IR (-O0):
%struct.MIDIController = type opaque
define i32 @_all_notes_off(%struct.MIDIController* %0) {
%2 = alloca %struct.MIDIController*
store %struct.MIDIController* %0, %struct.MIDIController** %2
ret i32 0
}

LLVM IR (-O2):
%struct.MIDIController = type opaque
define i32 @_all_notes_off(%struct.MIDIController* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ query;

/* Variables and functions */
int RS400_sendbytes(unsigned char *, int);
int RS400_sleepmode() {
  unsigned char query[] = {0x69};
  return RS400_sendbytes(query, sizeof(query));
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <RS400_sendbytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
movb   $0x69,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <RS400_sendbytes@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.RS400_sleepmode.query = [1 x i8] c"i"
define i32 @RS400_sleepmode() {
%1 = alloca [1 x i8]
%2 = bitcast [1 x i8]* %1 to i8*
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%4 = call i32 @RS400_sendbytes(i8* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @RS400_sleepmode() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
store i8 105, i8* %2
%3 = call i32 @RS400_sendbytes(i8* %2, i32 1)
ret i32 %3
}
void TestAppP$Leds$led1Off(void) { LedsP$Leds$led1Off(); }


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

x86 assembly (clang, -O2):
<TestAppP$Leds$led1Off>:
xor    %eax,%eax
jmp    1030 <LedsP$Leds$led1Off@plt>

LLVM IR (-O0):
define void @"TestAppP$Leds$led1Off"() {
%1 = call i32 (...) @"LedsP$Leds$led1Off"()
ret void
}

LLVM IR (-O2):
define void @"TestAppP$Leds$led1Off"() {
%1 = tail call i32 (...) @"LedsP$Leds$led1Off"()
ret void
}
float log10f(float x) {
  float r;
  if (!x)
    return __pole_error(1);
  __asm__ __volatile__("fld1; fyl2x; fldl2t; fdivrp" : "=t"(r) : "0"(x));
  return r;
}


x86 assembly (clang, -O0):
<log10f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    114e <log10f+0x3e>
jp     114e <log10f+0x3e>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <__pole_error@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117a <log10f+0x6a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
flds   -0x10(%rbp)
fld1
fyl2x
fldl2t
fdivrp %st,%st(1)
fstps  -0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10f>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    111b <log10f+0xb>
jnp    1137 <log10f+0x27>
movss  %xmm0,0x4(%rsp)
flds   0x4(%rsp)
fld1
fyl2x
fldl2t
fdivrp %st,%st(1)
fstps  (%rsp)
movss  (%rsp),%xmm0
pop    %rax
ret
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <__pole_error@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @log10f(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %3
%5 = load float, float* %3
%6 = fcmp une float %5, 0.000000e+00
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @__pole_error to i32 (i32, ...)*)(i32 1)
%9 = sitofp i32 %8 to float
store float %9, float* %2
br label %14
10: ; preds = %1
%11 = load float, float* %3
%12 = call float asm sideeffect "fld1; fyl2x; fldl2t; fdivrp", "={st},0,~{dirflag},~{fpsr},~{flags}"(float %11)
store float %12, float* %4
%13 = load float, float* %4
store float %13, float* %2
br label %14
14: ; preds = %10, %7
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @log10f(float %0) {
%2 = fcmp une float %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @__pole_error to i32 (i32, ...)*)(i32 1)
%5 = sitofp i32 %4 to float
br label %8
6: ; preds = %1
%7 = tail call float asm sideeffect "fld1; fyl2x; fldl2t; fdivrp", "={st},0,~{dirflag},~{fpsr},~{flags}"(float %0)
br label %8
8: ; preds = %6, %3
%9 = phi float [ %7, %6 ], [ %5, %3 ]
ret float %9
}
void plug_nl_words_shutdown(void *in_context) {}


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

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

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

LLVM IR (-O2):
define void @plug_nl_words_shutdown(i8* nocapture %0) {
ret void
}
double log(double x) {
  double r;
  if (!x)
    return __pole_error(1);
  __asm__ __volatile__("fyl2x; fldl2e; fdivp" : "=t"(r) : "0"(x), "u"(1.));
  return r;
}


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114f <log+0x3f>
jp     114f <log+0x3f>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <__pole_error@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117f <log+0x6f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
fldl   -0x20(%rbp)
fld1
fxch   %st(1)
fyl2x
fldl2e
fdivp  %st,%st(1)
fstp   %st(1)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log>:
sub    $0x18,%rsp
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1120 <log+0x10>
jnp    1145 <log+0x35>
movsd  %xmm0,0x10(%rsp)
fldl   0x10(%rsp)
fld1
fxch   %st(1)
fyl2x
fldl2e
fdivp  %st,%st(1)
fstp   %st(1)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <__pole_error@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @log(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp une double %5, 0.000000e+00
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @__pole_error to i32 (i32, ...)*)(i32 1)
%9 = sitofp i32 %8 to double
store double %9, double* %2
br label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = call double asm sideeffect "fyl2x; fldl2e; fdivp", "={st},0,{st(1)},~{dirflag},~{fpsr},~{flags}"(double %11, double 1.000000e+00)
store double %12, double* %4
%13 = load double, double* %4
store double %13, double* %2
br label %14
14: ; preds = %10, %7
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @log(double %0) {
%2 = fcmp une double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @__pole_error to i32 (i32, ...)*)(i32 1)
%5 = sitofp i32 %4 to double
br label %8
6: ; preds = %1
%7 = tail call double asm sideeffect "fyl2x; fldl2e; fdivp", "={st},0,{st(1)},~{dirflag},~{fpsr},~{flags}"(double %0, double 1.000000e+00)
br label %8
8: ; preds = %6, %3
%9 = phi double [ %7, %6 ], [ %5, %3 ]
ret double %9
}
void input_null_poll(void *data) {}


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

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

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

LLVM IR (-O2):
define void @input_null_poll(i8* nocapture %0) {
ret void
}
void swap(char *lhs, char *rhs) {
  const char temp = *lhs;
  *lhs = *rhs;
  *rhs = temp;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
int test_imm_4Duint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x4D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_4Duint64_highword_reg>:
movabs $0x4d00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Duint64_highword_reg(i64 %0) {
%2 = and i64 %0, 330712481792
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void SpanishLightGun_Update(int X, int Y, int Button) {
  if (Button) {
  }
}


x86 assembly (clang, -O0):
<SpanishLightGun_Update>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     111c <SpanishLightGun_Update+0x1c>
jmp    111c <SpanishLightGun_Update+0x1c>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SpanishLightGun_Update(i32 %0, i32 %1, i32 %2) {
ret void
}
void f(n, m) int n;
float m;
{ printf("%i %f\n", n, m); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cvtsd2ss %xmm0,%xmm0
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cvtsd2ss %xmm0,%xmm0
mov    %edi,%esi
cvtss2sd %xmm0,%xmm0
lea    0xedf(%rip),%rdi
mov    $0x1,%al
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%i %f\0A\00"
define void @f(i32 %0, double %1) {
%3 = fptrunc double %1 to float
%4 = fpext float %3 to double
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, double %4)
ret void
}
char read8(unsigned int reg1) {
  unsigned int *reg;
  signed char val;
  reg = (unsigned int *)reg1;
  val = (char)(*reg);
  return val;
}


x86 assembly (clang, -O0):
<read8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read8>:
mov    %edi,%eax
mov    (%rax),%al
ret

LLVM IR (-O0):
define signext i8 @read8(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i8
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %3
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %4
%11 = load i8, i8* %4
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @read8(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load i32, i32* %3
%5 = trunc i32 %4 to i8
ret i8 %5
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rte_constant_bswap16(uint16_t x) {
  return (uint16_t)(((x & 0x00ffU) << 8) | ((x & 0xff00U) >> 8));
}


x86 assembly (clang, -O0):
<rte_constant_bswap16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_constant_bswap16>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @rte_constant_bswap16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 8
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = lshr i32 %7, 8
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @rte_constant_bswap16(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x67() {
  Assert_real((isprint(103)),
              "/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_isprint.c",
              520, ("isprint should be 1 for g"));
}


x86 assembly (clang, -O0):
<t_isprint_0x67>:
push   %rbp
mov    %rsp,%rbp
mov    $0x67,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x208,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x67>:
push   %rax
mov    $0x67,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x208,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for g\00"
define void @t_isprint_0x67() {
%1 = call i32 @isprint(i32 103)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 520, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for g\00"
define void @t_isprint_0x67() {
%1 = tail call i32 @isprint(i32 103)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 520, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_message(void) {
  fprintf(stderr, "Lua: command line options:\n"
                  "  -v       print version information\n"
                  "  -d       turn debug on\n"
                  "  -e stat  dostring `stat'\n"
                  "  -q       interactive mode without prompt\n"
                  "  -i       interactive mode with prompt\n"
                  "  -        executes stdin as a file\n"
                  "  a=b      sets global `a' with string `b'\n"
                  "  name     dofile `name'\n\n");
}


x86 assembly (clang, -O0):
<print_message>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_message>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [305 x i8] c"Lua: command line options:\0A -v print version information\0A -d turn debug on\0A -e stat dostring `stat'\0A -q interactive mode without prompt\0A -i interactive mode with prompt\0A - executes stdin as a file\0A a=b sets global `a' with string `b'\0A name dofile `name'\0A\0A\00"
define void @print_message() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([305 x i8], [305 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [305 x i8] c"Lua: command line options:\0A -v print version information\0A -d turn debug on\0A -e stat dostring `stat'\0A -q interactive mode without prompt\0A -i interactive mode with prompt\0A - executes stdin as a file\0A a=b sets global `a' with string `b'\0A name dofile `name'\0A\0A\00"
define void @print_message() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([305 x i8], [305 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long ILibLinkedList_GetCount(void *);
long ILibQueue_GetCount(void *q) { return ILibLinkedList_GetCount(q); }


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

x86 assembly (clang, -O2):
<ILibQueue_GetCount>:
jmp    1030 <ILibLinkedList_GetCount@plt>

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

LLVM IR (-O2):
define i64 @ILibQueue_GetCount(i8* %0) {
%2 = tail call i64 @ILibLinkedList_GetCount(i8* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
main() {
  char *a = "PQ";
  printf("\n%s%s", "BA", a);
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"PQ\00"
@.str.1 = [6 x i8] c"\0A%s%s\00"
@.str.2 = [3 x i8] c"BA\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ nearly_equal(double, double);
double sin(double);
double interp2_k_sinc(double x) {
  double result = 0.0;
  if (nearly_equal(x, 0.0)) {
    result = 1.0;
  } else {
    result = sin((22.0 / 7.0) * x) / ((22.0 / 7.0) * x);
  }
  return result;
}


x86 assembly (clang, -O0):
<interp2_k_sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1030 <nearly_equal@plt>
cmp    $0x0,%rax
je     115e <interp2_k_sinc+0x3e>
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1186 <interp2_k_sinc+0x66>
movsd  0xe9a(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
movsd  0xe88(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_k_sinc>:
push   %rax
xorps  %xmm1,%xmm1
movsd  %xmm0,(%rsp)
call   1030 <nearly_equal@plt>
test   %rax,%rax
je     113d <interp2_k_sinc+0x1d>
movsd  0xec5(%rip),%xmm0
pop    %rax
ret
movsd  (%rsp),%xmm0
mulsd  0xebe(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @interp2_k_sinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = load double, double* %2
%5 = call i64 @nearly_equal(double %4, double 0.000000e+00)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store double 1.000000e+00, double* %3
br label %15
8: ; preds = %1
%9 = load double, double* %2
%10 = fmul double 0x4009249249249249, %9
%11 = call double @sin(double %10)
%12 = load double, double* %2
%13 = fmul double 0x4009249249249249, %12
%14 = fdiv double %11, %13
store double %14, double* %3
br label %15
15: ; preds = %8, %7
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @interp2_k_sinc(double %0) {
%2 = tail call i64 @nearly_equal(double %0, double 0.000000e+00)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = fmul double %0, 0x4009249249249249
%6 = tail call double @sin(double %5)
%7 = fdiv double %6, %5
br label %8
8: ; preds = %1, %4
%9 = phi double [ %7, %4 ], [ 1.000000e+00, %1 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ dumpMem(int);
void dumpMemory(void) { dumpMem(8); }


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

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

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

LLVM IR (-O2):
define void @dumpMemory() {
%1 = tail call i32 @dumpMem(i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(void) {
  fputs("ABCDE\n", stdout);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"ABCDE\0A\00"
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void sys_hd_xxx() {}


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

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

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

LLVM IR (-O2):
define void @sys_hd_xxx() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int main() {
  char *a = malloc(0x100);
  char *b = malloc(0x100);
  memset(a, 0, 0x400);
  free(b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @malloc(i32 256)
store i8* %3, i8** %1
%4 = call i8* @malloc(i32 256)
store i8* %4, i8** %2
%5 = load i8*, i8** %1
%6 = call i32 @memset(i8* %5, i32 0, i32 1024)
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
%2 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
%3 = tail call i32 @memset(i8* %1, i32 0, i32 1024)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getline();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  printf("Input>");
  puts(getline());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getline@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    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getline@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"Input>\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @getline()
%5 = tail call i32 @puts(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ hal_timeout_add_ppm(int);
void hal_ppm_update_cvalue(int us) {
  hal_timeout_add_ppm(us - ((200 * 1) - 1));
}


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

x86 assembly (clang, -O2):
<hal_ppm_update_cvalue>:
add    $0xffffff39,%edi
jmp    1030 <hal_timeout_add_ppm@plt>

LLVM IR (-O0):
define void @hal_ppm_update_cvalue(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 199
%5 = call i32 @hal_timeout_add_ppm(i32 %4)
ret void
}

LLVM IR (-O2):
define void @hal_ppm_update_cvalue(i32 %0) {
%2 = add nsw i32 %0, -199
%3 = tail call i32 @hal_timeout_add_ppm(i32 %2)
ret void
}
/* Type definitions */
typedef float int16_t;

/* Variables and functions */
double tmp007_reg_to_mv(int16_t reg) { return reg * 156.25f / 1e6; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
mulss  0xef8(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @tmp007_reg_to_mv(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.562500e+02
%5 = fpext float %4 to double
%6 = fdiv double %5, 1.000000e+06
ret double %6
}

LLVM IR (-O2):
define double @tmp007_reg_to_mv(float %0) {
%2 = fmul float %0, 1.562500e+02
%3 = fpext float %2 to double
%4 = fdiv double %3, 1.000000e+06
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int strnlen(char *, int);
int main() {
  assert(strnlen("fnord", 3) == 3);
  assert(strnlen("fnord", 17) == 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xeb4(%rip),%rdi
mov    $0x11,%esi
call   1030 <strnlen@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x11,%esi
call   1030 <strnlen@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"fnord\00"
define i32 @main() {
%1 = call i32 @strnlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @strnlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 17)
%6 = icmp eq i32 %5, 5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"fnord\00"
define i32 @main() {
%1 = tail call i32 @strnlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @strnlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 17)
%6 = icmp eq i32 %5, 5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __quick_sort(char *, int /*<<< orphan*/, int);
void quick_sort(char str[], int len) { __quick_sort(str, 0, len - 1); }


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

x86 assembly (clang, -O2):
<quick_sort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <__quick_sort@plt>

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

LLVM IR (-O2):
define void @quick_sort(i8* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @__quick_sort(i8* %0, i32 0, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __off64_t;

/* Variables and functions */
int /*<<< orphan*/ dll_lseeki64(int, int /*<<< orphan*/, int);
__off64_t __wrap_lseek64(int filedes, __off64_t offset, int whence) {
  __off64_t seekRes = dll_lseeki64(filedes, offset, whence);
  return seekRes;
}


x86 assembly (clang, -O0):
<__wrap_lseek64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <dll_lseeki64@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_lseek64>:
jmp    1030 <dll_lseeki64@plt>

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

LLVM IR (-O2):
define i32 @__wrap_lseek64(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @dll_lseeki64(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print_int_matrix(char *, int const *, int, int);
void print_int_array(char *file_name, const int *array, int size) {
  print_int_matrix(file_name, array, size, 1);
}


x86 assembly (clang, -O0):
<print_int_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <print_int_matrix@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int_array>:
mov    $0x1,%ecx
jmp    1030 <print_int_matrix@plt>

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

LLVM IR (-O2):
define void @print_int_array(i8* %0, i32* %1, i32 %2) {
%4 = tail call i32 @print_int_matrix(i8* %0, i32* %1, i32 %2, i32 1)
ret void
}
void set_led_4(int mode) {
  if (mode == 1) {
    (*(volatile unsigned int *)(0x7F008824)) |= 8;
  } else if (mode == 0) {
    (*(volatile unsigned int *)(0x7F008824)) &= ~8;
  }
  return;
}


x86 assembly (clang, -O0):
<set_led_4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1127 <set_led_4+0x27>
mov    $0x7f008824,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x7f008824,%eax
mov    %ecx,(%rax)
jmp    1147 <set_led_4+0x47>
cmpl   $0x0,-0x4(%rbp)
jne    1142 <set_led_4+0x42>
mov    $0x7f008824,%eax
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    $0x7f008824,%eax
mov    %ecx,(%rax)
jmp    1147 <set_led_4+0x47>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_led_4>:
test   %edi,%edi
je     1115 <set_led_4+0x15>
cmp    $0x1,%edi
jne    1126 <set_led_4+0x26>
mov    0x7f008824,%eax
or     $0x8,%eax
jmp    111f <set_led_4+0x1f>
mov    0x7f008824,%eax
and    $0xfffffff7,%eax
mov    %eax,0x7f008824
ret

LLVM IR (-O0):
define void @set_led_4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%7 = or i32 %6, 8
store volatile i32 %7, i32* inttoptr (i64 2130741284 to i32*)
br label %15
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%13 = and i32 %12, -9
store volatile i32 %13, i32* inttoptr (i64 2130741284 to i32*)
br label %14
14: ; preds = %11, %8
br label %15
15: ; preds = %14, %5
ret void
}

LLVM IR (-O2):
define void @set_led_4(i32 %0) {
switch i32 %0, label %10 [
i32 1, label %2
i32 0, label %5
]
2: ; preds = %1
%3 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%4 = or i32 %3, 8
br label %8
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%7 = and i32 %6, -9
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ %4, %2 ]
store volatile i32 %9, i32* inttoptr (i64 2130741284 to i32*)
br label %10
10: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_BOOST_ENABLE_PIN() { clear_io_bit(0x70, 4); }


x86 assembly (clang, -O0):
<TOSH_CLR_BOOST_ENABLE_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70,%edi
mov    $0x4,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_BOOST_ENABLE_PIN>:
mov    $0x70,%edi
mov    $0x4,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_BOOST_ENABLE_PIN() {
%1 = call i32 @clear_io_bit(i32 112, i32 4)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_BOOST_ENABLE_PIN() {
%1 = tail call i32 @clear_io_bit(i32 112, i32 4)
ret void
}
double GETTIME() {}


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

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

LLVM IR (-O0):
define double @GETTIME() {
%1 = alloca double
%2 = load double, double* %1
ret double %2
}

LLVM IR (-O2):
define double @GETTIME() {
ret double undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void outbit(FILE *fp, int bit) { fprintf(fp, bit ? "1" : "0"); }


x86 assembly (clang, -O0):
<outbit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    0xed5(%rip),%rsi
lea    0xecc(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outbit>:
test   %esi,%esi
lea    0xee9(%rip),%rax
lea    0xee0(%rip),%rsi
cmove  %rax,%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
define void @outbit(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 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%10 = call i32 @fprintf(i32* %5, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
define void @outbit(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @fprintf(i32* %0, i8* %4)
ret void
}
int fun733() { return 733; }


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

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

LLVM IR (-O0):
define i32 @fun733() {
ret i32 733
}

LLVM IR (-O2):
define i32 @fun733() {
ret i32 733
}
void write_char(unsigned char *data, int offset, char value) {
  data[offset] = value;
}


x86 assembly (clang, -O0):
<write_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_char>:
movslq %esi,%rax
mov    %dl,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @write_char(i8* nocapture writeonly %0, i32 %1, i8 signext %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %2, i8* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_lcd(int);
void write_char(char letter) {
  if (((int)letter < 32) || ((int)letter > 125)) {
    letter = (char)63;
  }
  write_lcd((((int)letter >> 4) & 0x0F) | 0x20);
  write_lcd(((int)letter & 0x0F) | 0x20);
}


x86 assembly (clang, -O0):
<write_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jl     1138 <write_char+0x28>
movsbl -0x1(%rbp),%eax
cmp    $0x7d,%eax
jle    113c <write_char+0x2c>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
sar    $0x4,%edi
and    $0xf,%edi
or     $0x20,%edi
call   1030 <write_lcd@plt>
movsbl -0x1(%rbp),%edi
and    $0xf,%edi
or     $0x20,%edi
call   1030 <write_lcd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_char>:
push   %rbx
mov    %edi,%ebx
lea    -0x7e(%rbx),%eax
cmp    $0xa2,%al
mov    $0x3f,%eax
cmovb  %eax,%ebx
movzbl %bl,%edi
shr    $0x4,%edi
or     $0x20,%edi
call   1030 <write_lcd@plt>
and    $0xf,%ebx
or     $0x20,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <write_lcd@plt>

LLVM IR (-O0):
define void @write_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp slt i32 %4, 32
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sgt i32 %8, 125
br i1 %9, label %10, label %11
10: ; preds = %6, %1
store i8 63, i8* %2
br label %11
11: ; preds = %10, %6
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = ashr i32 %13, 4
%15 = and i32 %14, 15
%16 = or i32 %15, 32
%17 = call i32 @write_lcd(i32 %16)
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = and i32 %19, 15
%21 = or i32 %20, 32
%22 = call i32 @write_lcd(i32 %21)
ret void
}

LLVM IR (-O2):
define void @write_char(i8 signext %0) {
%2 = add i8 %0, -126
%3 = icmp ult i8 %2, -94
%4 = select i1 %3, i8 63, i8 %0
%5 = zext i8 %4 to i32
%6 = lshr i32 %5, 4
%7 = or i32 %6, 32
%8 = tail call i32 @write_lcd(i32 %7)
%9 = and i32 %5, 15
%10 = or i32 %9, 32
%11 = tail call i32 @write_lcd(i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void trace_log(char *message) {
  printf("\n  %s", message);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<trace_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_log>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\0A %s\00"
@stdout = global i32 0
define void @trace_log(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0A %s\00"
@stdout = global i32 0
define void @trace_log(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compute_distances_1_nonpacked(int, int, float const *,
                                                 float const *, int, float *);
void compute_distances_1(int d, int nb, const float *a, const float *b,
                         float *dist2) {
  compute_distances_1_nonpacked(d, nb, a, b, d, dist2);
}


x86 assembly (clang, -O0):
<compute_distances_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x4(%rbp),%r8d
mov    -0x20(%rbp),%r9
call   1030 <compute_distances_1_nonpacked@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_distances_1>:
mov    %r8,%r9
mov    %edi,%r8d
jmp    1030 <compute_distances_1_nonpacked@plt>

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

LLVM IR (-O2):
define void @compute_distances_1(i32 %0, i32 %1, float* %2, float* %3, float* %4) {
%6 = tail call i32 @compute_distances_1_nonpacked(i32 %0, i32 %1, float* %2, float* %3, i32 %0, float* %4)
ret void
}