xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ LTE246QV_WriteByte(short);
void LTE246QV_WriteWord(short data) {
  LTE246QV_WriteByte(data >> 8);
  LTE246QV_WriteByte(data & 0xff);
}


x86 assembly (clang, -O0):
<LTE246QV_WriteWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
sar    $0x8,%eax
movswl %ax,%edi
call   1030 <LTE246QV_WriteByte@plt>
movswl -0x2(%rbp),%eax
and    $0xff,%eax
movswl %ax,%edi
call   1030 <LTE246QV_WriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LTE246QV_WriteWord>:
push   %rbx
mov    %edi,%ebx
sar    $0x8,%edi
call   1030 <LTE246QV_WriteByte@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <LTE246QV_WriteByte@plt>

LLVM IR (-O0):
define void @LTE246QV_WriteWord(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = ashr i32 %4, 8
%6 = trunc i32 %5 to i16
%7 = call i32 @LTE246QV_WriteByte(i16 signext %6)
%8 = load i16, i16* %2
%9 = sext i16 %8 to i32
%10 = and i32 %9, 255
%11 = trunc i32 %10 to i16
%12 = call i32 @LTE246QV_WriteByte(i16 signext %11)
ret void
}

LLVM IR (-O2):
define void @LTE246QV_WriteWord(i16 signext %0) {
%2 = ashr i16 %0, 8
%3 = tail call i32 @LTE246QV_WriteByte(i16 signext %2)
%4 = and i16 %0, 255
%5 = tail call i32 @LTE246QV_WriteByte(i16 signext %4)
ret void
}
int ti_bbands_start(double const *options) { return (int)options[0] - 1; }


x86 assembly (clang, -O0):
<ti_bbands_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_bbands_start>:
cvttsd2si (%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_bbands_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_bbands_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = add nsw i32 %3, -1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef uintptr_t uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htole32(uintptr_t);
int /*<<< orphan*/ rgph_murmur32_finalise(int, uintptr_t *);
int /*<<< orphan*/ rgph_murmur32_mix0(int /*<<< orphan*/, uintptr_t *);
void rgph_u32x4_murmur32v_u32(uint32_t value, uintptr_t seed, uint32_t *h) {
  h[0] = h[1] = h[2] = h[3] = seed;
  rgph_murmur32_mix0(htole32(value), h);
  rgph_murmur32_finalise(sizeof(value), h);
}


x86 assembly (clang, -O0):
<rgph_u32x4_murmur32v_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    -0x18(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <htole32@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rsi
call   1050 <rgph_murmur32_mix0@plt>
mov    -0x18(%rbp),%rsi
mov    $0x8,%edi
call   1040 <rgph_murmur32_finalise@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u32x4_murmur32v_u32>:
push   %rbx
mov    %rdx,%rbx
mov    %rsi,0x18(%rdx)
mov    %rsi,0x10(%rdx)
mov    %rsi,0x8(%rdx)
mov    %rsi,(%rdx)
call   1030 <htole32@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1050 <rgph_murmur32_mix0@plt>
mov    $0x8,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <rgph_murmur32_finalise@plt>

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

LLVM IR (-O2):
define void @rgph_u32x4_murmur32v_u32(i64 %0, i64 %1, i64* %2) {
%4 = getelementptr inbounds i64, i64* %2, i64 3
store i64 %1, i64* %4
%5 = getelementptr inbounds i64, i64* %2, i64 2
store i64 %1, i64* %5
%6 = getelementptr inbounds i64, i64* %2, i64 1
store i64 %1, i64* %6
store i64 %1, i64* %2
%7 = tail call i32 @htole32(i64 %0)
%8 = tail call i32 @rgph_murmur32_mix0(i32 %7, i64* %2)
%9 = tail call i32 @rgph_murmur32_finalise(i32 8, i64* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(int, int);
void ClearMsg() {
  move(23, 1);
  clrtoeol();
}


x86 assembly (clang, -O0):
<ClearMsg>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
mov    $0x1,%esi
call   1040 <move@plt>
mov    $0x0,%al
call   1030 <clrtoeol@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearMsg>:
push   %rax
mov    $0x17,%edi
mov    $0x1,%esi
call   1040 <move@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <clrtoeol@plt>

LLVM IR (-O0):
define void @ClearMsg() {
%1 = call i32 @move(i32 23, i32 1)
%2 = call i32 (...) @clrtoeol()
ret void
}

LLVM IR (-O2):
define void @ClearMsg() {
%1 = tail call i32 @move(i32 23, i32 1)
%2 = tail call i32 (...) @clrtoeol()
ret void
}
/* Variables and functions */
double EvalAngCor_p0_2plus_12minus_14926_L1(double);
double funcAngCor_p0_2plus_12minus_14926_L1(double *x, double *par) {
  double result;
  result = par[0] * EvalAngCor_p0_2plus_12minus_14926_L1(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngCor_p0_2plus_12minus_14926_L1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngCor_p0_2plus_12minus_14926_L1@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngCor_p0_2plus_12minus_14926_L1>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngCor_p0_2plus_12minus_14926_L1@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngCor_p0_2plus_12minus_14926_L1(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngCor_p0_2plus_12minus_14926_L1(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngCor_p0_2plus_12minus_14926_L1(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngCor_p0_2plus_12minus_14926_L1(double %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_msg(int length, int current) {
  printf("[P ");
  printf("%f]\n", (double)current / (double)length);
}


x86 assembly (clang, -O0):
<print_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xec3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_msg>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cvtsi2sd %ebx,%xmm0
cvtsi2sd %ebp,%xmm1
divsd  %xmm1,%xmm0
lea    0xecc(%rip),%rdi
mov    $0x1,%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"[P \00"
@.str.1 = [5 x i8] c"%f]\0A\00"
define void @print_msg(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = sitofp i32 %1 to double
%5 = sitofp i32 %0 to double
%6 = fdiv double %4, %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %6)
ret void
}
/* Variables and functions */
int control(char *);
int main(int argc, char **argv) { return control("/dev/usb/hiddev0"); }


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    0xed3(%rip),%rdi
call   1030 <control@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"/dev/usb/hiddev0\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 @control(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
@.str = [17 x i8] c"/dev/usb/hiddev0\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @control(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
int id2(int);
int id(int x) {
  if (x == 0)
    return 0;
  int ret = id2(x - 1) + 1;
  if (ret > 3)
    return 3;
  return ret;
}


x86 assembly (clang, -O0):
<id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <id+0x21>
movl   $0x0,-0x4(%rbp)
jmp    115e <id+0x4e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <id2@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jle    1158 <id+0x48>
movl   $0x3,-0x4(%rbp)
jmp    115e <id+0x4e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<id>:
test   %edi,%edi
je     1130 <id+0x20>
push   %rax
add    $0xffffffff,%edi
call   1030 <id2@plt>
lea    0x1(%rax),%ecx
cmp    $0x3,%eax
mov    $0x3,%eax
cmovl  %ecx,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @id(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @id2(i32 %4)
%6 = add nsw i32 %5, 1
%7 = icmp slt i32 %5, 3
%8 = select i1 %7, i32 %6, i32 3
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
size_t libretro_dummy_retro_serialize_size() { return 0; }


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

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

LLVM IR (-O0):
define i64 @libretro_dummy_retro_serialize_size() {
ret i64 0
}

LLVM IR (-O2):
define i64 @libretro_dummy_retro_serialize_size() {
ret i64 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t LowByte(uint16_t value) { return value & 0xff; }


x86 assembly (clang, -O0):
<LowByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LowByte>:
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @LowByte(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void uDMAChannelPrioritySet(uint32_t ui32Base, uint32_t ui32ChannelNum) {
  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000038))) = 1 << ui32ChannelNum;
}


x86 assembly (clang, -O0):
<uDMAChannelPrioritySet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    -0x4(%rbp),%eax
add    $0x38,%eax
cltq
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelPrioritySet>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
movslq %edi,%rcx
mov    %rax,0x38(%rcx)
ret

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

LLVM IR (-O2):
define void @uDMAChannelPrioritySet(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = sext i32 %3 to i64
%5 = add nsw i32 %0, 56
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i64*
store volatile i64 %4, i64* %7
ret void
}
/* Variables and functions */
int htmly_detect_tag(char *, char *);
int htmly_detect_header(char *line) { return htmly_detect_tag(line, "t"); }


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

x86 assembly (clang, -O2):
<htmly_detect_header>:
lea    0xee9(%rip),%rsi
jmp    1030 <htmly_detect_tag@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"t\00"
define i32 @htmly_detect_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @htmly_detect_tag(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [2 x i8] c"t\00"
define i32 @htmly_detect_header(i8* %0) {
%2 = tail call i32 @htmly_detect_tag(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/, int, int,
                           char *);
char *fsm_get_library_version_string() {
  static char s[20];
  sprintf(s, "%i.%i.%i%s", 0, 9, 18, "alpha");
  return (s);
}


x86 assembly (clang, -O0):
<fsm_get_library_version_string>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
lea    0xede(%rip),%rsi
xor    %edx,%edx
mov    $0x9,%ecx
mov    $0x12,%r8d
lea    0xed5(%rip),%r9
call   1030 <sprintf@plt>
lea    0x2efe(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsm_get_library_version_string>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
lea    0xee5(%rip),%r9
mov    %rbx,%rdi
xor    %edx,%edx
mov    $0x9,%ecx
mov    $0x12,%r8d
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@fsm_get_library_version_string.s = internal global [20 x i8] zeroinitializer
@.str = [11 x i8] c"%i.%i.%i%s\00"
@.str.1 = [6 x i8] c"alpha\00"
define i8* @fsm_get_library_version_string() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @fsm_get_library_version_string.s, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0, i32 9, i32 18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @fsm_get_library_version_string.s, i64 0, i64 0)
}

LLVM IR (-O2):
@fsm_get_library_version_string.s = internal global [20 x i8] zeroinitializer
@.str = [11 x i8] c"%i.%i.%i%s\00"
@.str.1 = [6 x i8] c"alpha\00"
define i8* @fsm_get_library_version_string() {
%1 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @fsm_get_library_version_string.s, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0, i32 9, i32 18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @fsm_get_library_version_string.s, i64 0, i64 0)
}
int hashkey_divided(int key, int TABLE_SIZE) {
  return (key & 0xFFFFFFF) % TABLE_SIZE;
}


x86 assembly (clang, -O0):
<hashkey_divided>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffff,%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashkey_divided>:
mov    %edi,%eax
and    $0xfffffff,%eax
xor    %edx,%edx
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hashkey_divided(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 = and i32 %5, 268435455
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @hashkey_divided(i32 %0, i32 %1) {
%3 = and i32 %0, 268435455
%4 = srem i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int sunxi_gpio_input(unsigned int);
int digitalRead(unsigned int pin) { return sunxi_gpio_input(pin); }


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

x86 assembly (clang, -O2):
<digitalRead>:
jmp    1030 <sunxi_gpio_input@plt>

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

LLVM IR (-O2):
define i32 @digitalRead(i32 %0) {
%2 = tail call i32 @sunxi_gpio_input(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
int unlink(void) {
  errno = ENOENT;
  return -1;
}


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

x86 assembly (clang, -O2):
<unlink>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @unlink() {
%1 = load i32, i32* @ENOENT
store i32 %1, i32* @errno
ret i32 -1
}
long long llrint(double x) {
  long long r;
  __asm__("cvtsd2si %1, %0" : "=r"(r) : "x"(x));
  return r;
}


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

x86 assembly (clang, -O2):
<llrint>:
cvtsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @llrint(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load double, double* %2
%5 = call i64 asm "cvtsd2si $1, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(double %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @llrint(double %0) {
%2 = tail call i64 asm "cvtsd2si $1, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(double %0)
ret i64 %2
}
unsigned char *cvector(nl, nh)
long nh, nl;
{
  unsigned char *v;
  v = (unsigned char *)malloc(
      (unsigned int)((nh - nl + 1 + 1) * sizeof(unsigned char)));
  if (!v)
    nrerror("allocation failure in cvector()");
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<cvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
add    $0x1,%rax
add    $0x1,%rax
shl    $0x0,%rax
mov    %eax,%eax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116a <cvector+0x4a>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %r14d,%esi
lea    0x2(%rsi),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <cvector+0x28>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1030 <nrerror@plt>
sub    %r14,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @cvector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 1
%12 = trunc i64 %11 to i32
%13 = zext i32 %12 to i64
%14 = call i8* @malloc(i64 %13)
store i8* %14, i8** %5
%15 = load i8*, i8** %5
%16 = icmp ne i8* %15, null
br i1 %16, label %19, label %17
17: ; preds = %2
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
%20 = load i8*, i8** %5
%21 = load i64, i64* %3
%22 = sub i64 0, %21
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = getelementptr inbounds i8, i8* %23, i64 1
ret i8* %24
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @cvector(i64 %0, i64 %1) {
%3 = sub i64 2, %0
%4 = add i64 %3, %1
%5 = and i64 %4, 4294967295
%6 = tail call i8* @malloc(i64 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = sub i64 0, %0
%12 = getelementptr inbounds i8, i8* %6, i64 %11
%13 = getelementptr inbounds i8, i8* %12, i64 1
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void g(int x, int y) { printf("yippie!\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"yippie!\00"
define void @g(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
void termop_restcurattr(struct ansiseq *s) {
  tnc_log_log(
      7, 4, -1,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c",
      353, __func__, "unhandled");
  ansiseq_dump(s);
}


x86 assembly (clang, -O0):
<termop_restcurattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x7,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
lea    0xebe(%rip),%rcx
mov    $0x161,%r8d
lea    0xf37(%rip),%r9
lea    0xf43(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <tnc_log_log@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <ansiseq_dump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<termop_restcurattr>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xf6a(%rip),%rax
mov    %rax,(%rsp)
lea    0xec6(%rip),%rcx
lea    0xf45(%rip),%r9
mov    $0x7,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
mov    $0x161,%r8d
xor    %eax,%eax
call   1030 <tnc_log_log@plt>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <ansiseq_dump@plt>

LLVM IR (-O0):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c\00"
@__func__.termop_restcurattr = [19 x i8] c"termop_restcurattr\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_restcurattr(%struct.ansiseq* %0) {
%2 = alloca %struct.ansiseq*
store %struct.ansiseq* %0, %struct.ansiseq** %2
%3 = call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 7, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 353, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.termop_restcurattr, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = load %struct.ansiseq*, %struct.ansiseq** %2
%5 = call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %4)
ret void
}

LLVM IR (-O2):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c\00"
@__func__.termop_restcurattr = [19 x i8] c"termop_restcurattr\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_restcurattr(%struct.ansiseq* %0) {
%2 = tail call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 7, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 353, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.termop_restcurattr, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %0)
ret void
}
void int_exchange(int *a, int *b) {
  int temp;
  temp = *a;
  *a = *b;
  *b = temp;
  return;
}


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

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

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

LLVM IR (-O2):
define void @int_exchange(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int *array, int size) {
  int curr;
  for (curr = 0; curr < size; curr++) {
    printf("%d, ", array[curr]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d, \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printArray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
void fp_force_eval(double x) {
  volatile double y;
  y = x;
  (void)y;
}


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

x86 assembly (clang, -O2):
<fp_force_eval>:
movsd  %xmm0,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
ret

LLVM IR (-O0):
define void @fp_force_eval(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store volatile double %4, double* %3
%5 = load volatile double, double* %3
ret void
}

LLVM IR (-O2):
define void @fp_force_eval(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store volatile double %0, double* %2
%4 = load volatile double, double* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_command(int);
void reset_lcd(void) { send_command(0xE2); }


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

x86 assembly (clang, -O2):
<reset_lcd>:
mov    $0xe2,%edi
jmp    1030 <send_command@plt>

LLVM IR (-O0):
define void @reset_lcd() {
%1 = call i32 @send_command(i32 226)
ret void
}

LLVM IR (-O2):
define void @reset_lcd() {
%1 = tail call i32 @send_command(i32 226)
ret void
}
/* Variables and functions */
unsigned long long _blsi_u64(unsigned long long);
unsigned long long test_blsi_u64(unsigned long long __X) {
  return _blsi_u64(__X);
}


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

x86 assembly (clang, -O2):
<test_blsi_u64>:
jmp    1030 <_blsi_u64@plt>

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

LLVM IR (-O2):
define i64 @test_blsi_u64(i64 %0) {
%2 = tail call i64 @_blsi_u64(i64 %0)
ret i64 %2
}
int __attribute__((no)) bar(int *p, int *q) {
  *p = -2;
  *q = -1;
  return *p;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xfffffffe,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
movl   $0xfffffffe,(%rdi)
movl   $0xffffffff,(%rsi)
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @bar(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
store i32 -2, i32* %5
%6 = load i32*, i32** %4
store i32 -1, i32* %6
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @bar(i32* nocapture %0, i32* nocapture writeonly %1) {
store i32 -2, i32* %0
store i32 -1, i32* %1
%3 = load i32, i32* %0
ret i32 %3
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/"
        "cyc-lib/vc_cyc_include.h",
        259));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x103,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x103,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/cyc-lib/vc_cyc_include.h\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 259)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/cyc-lib/vc_cyc_include.h\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 259)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
unsigned int strlen(char const *);
int gzipped_filename_p(const char *name) {
  unsigned len = strlen(name);
  return ((sizeof("") > 1) && (len > sizeof("") - 1) &&
          (strcmp(name + len - (sizeof("") - 1), "") == 0)) ||
         ((sizeof("") > 1) && (len > sizeof("") - 1) &&
          (strcmp(name + len - (sizeof("") - 1), "") == 0));
}


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

x86 assembly (clang, -O2):
<gzipped_filename_p>:
push   %rax
call   1030 <strlen@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gzipped_filename_p(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ all_leds_off();
int sys_leds_off(void) {
  all_leds_off();
  return 0;
}


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

x86 assembly (clang, -O2):
<sys_leds_off>:
push   %rax
xor    %eax,%eax
call   1030 <all_leds_off@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sys_leds_off() {
%1 = call i32 (...) @all_leds_off()
ret i32 0
}

LLVM IR (-O2):
define i32 @sys_leds_off() {
%1 = tail call i32 (...) @all_leds_off()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
int config_close(FILE *f) {
  if (f == NULL)
    return -1;
  return fclose(f);
}


x86 assembly (clang, -O0):
<config_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <config_close+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    113f <config_close+0x2f>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_close>:
test   %rdi,%rdi
je     111a <config_close+0xa>
jmp    1030 <fclose@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @config_close(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fclose(i32* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ -1, %1 ]
ret i32 %6
}
char *skipnsp(char *s) {
  while (*s != '\0' && *s != ' ' && *s != '\t')
    s++;
  return (s);
}


x86 assembly (clang, -O0):
<skipnsp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1142 <skipnsp+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1142 <skipnsp+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <skipnsp+0x52>
jmp    1163 <skipnsp+0x63>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipnsp+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipnsp>:
mov    %rdi,%rax
movabs $0x100000201,%rcx
jmp    1114 <skipnsp+0x14>
nop
add    $0x1,%rax
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1110 <skipnsp+0x10>
bt     %rdx,%rcx
jae    1110 <skipnsp+0x10>
ret

LLVM IR (-O0):
define i8* @skipnsp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %20, %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 %18
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 32
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 9
br label %18
18: ; preds = %13, %8, %3
%19 = phi i1 [ false, %8 ], [ false, %3 ], [ %17, %13 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
br label %3
23: ; preds = %18
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
define i8* @skipnsp(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 32, label %7
i8 9, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
ret i8* %3
}
int do_523() { return 523; }


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

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

LLVM IR (-O0):
define i32 @do_523() {
ret i32 523
}

LLVM IR (-O2):
define i32 @do_523() {
ret i32 523
}
void a_store(volatile int *p, int x) {
  __asm__ __volatile__("mov %1, %0 ; lock ; orl $0,(%%esp)"
                       : "=m"(*p)
                       : "r"(x)
                       : "memory");
}


x86 assembly (clang, -O0):
<a_store>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,(%rax)
lock orl $0x0,(%esp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_store>:
mov    %esi,(%rdi)
lock orl $0x0,(%esp)
ret

LLVM IR (-O0):
define void @a_store(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
ret void
}

LLVM IR (-O2):
define void @a_store(i32* %0, i32 %1) {
tail call void asm sideeffect "mov $1, $0 ; lock ; orl $$0,(%esp)", "=*m,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bit_hl(int);
void opcb_56() { bit_hl(2); }


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

x86 assembly (clang, -O2):
<opcb_56>:
mov    $0x2,%edi
jmp    1030 <bit_hl@plt>

LLVM IR (-O0):
define void @opcb_56() {
%1 = call i32 @bit_hl(i32 2)
ret void
}

LLVM IR (-O2):
define void @opcb_56() {
%1 = tail call i32 @bit_hl(i32 2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void WatchdogIntClear(uint32_t ui32Base) {
  ASSERT((ui32Base == 0x40000000) || (ui32Base == 0x40001000));
  (*((volatile uint32_t *)(ui32Base + 0x0000000C))) = 0x00000001;
}


x86 assembly (clang, -O0):
<WatchdogIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x40000000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113a <WatchdogIntClear+0x2a>
cmpl   $0x40001000,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
movl   $0x1,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntClear>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40000000,%eax
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
movl   $0x1,0xc(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @WatchdogIntClear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1073741824
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1073745920
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @ASSERT(i32 %10)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 12
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store volatile i32 1, i32* %15
ret void
}

LLVM IR (-O2):
define void @WatchdogIntClear(i32 %0) {
%2 = and i32 %0, -4097
%3 = icmp eq i32 %2, 1073741824
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 12
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 1, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fd_led_set_d2(int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
void identify_off(void) { fd_led_set_d2(0, 0, 0); }


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

x86 assembly (clang, -O2):
<identify_off>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <fd_led_set_d2@plt>

LLVM IR (-O0):
define void @identify_off() {
%1 = call i32 @fd_led_set_d2(i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @identify_off() {
%1 = tail call i32 @fd_led_set_d2(i32 0, i32 0, i32 0)
ret void
}
float f_rad2deg(float x) { return x * 57.2957795147f; }


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

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

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

LLVM IR (-O2):
define float @f_rad2deg(float %0) {
%2 = fmul float %0, 0x404CA5DC20000000
ret float %2
}
/* Variables and functions */
double medmeddev_double(int, double *);
double medmeddev(int n, double *data) { return medmeddev_double(n, data); }


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

x86 assembly (clang, -O2):
<medmeddev>:
jmp    1030 <medmeddev_double@plt>

LLVM IR (-O0):
define double @medmeddev(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load double*, double** %4
%7 = call double @medmeddev_double(i32 %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @medmeddev(i32 %0, double* %1) {
%3 = tail call double @medmeddev_double(i32 %0, double* %1)
ret double %3
}