xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int INT32_MAX;
float s32toQ(int32_t i) { return ((float)i) / (float)(INT32_MAX - 1); }


x86 assembly (clang, -O0):
<s32toQ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cvtsi2ssq -0x8(%rbp),%xmm0
mov    0x2ecb(%rip),%rax
mov    (%rax),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<s32toQ>:
cvtsi2ss %rdi,%xmm0
mov    0x2ed4(%rip),%rax
mov    (%rax),%eax
add    $0xffffffff,%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
@INT32_MAX = global i32 0
define float @s32toQ(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to float
%5 = load i32, i32* @INT32_MAX
%6 = sub nsw i32 %5, 1
%7 = sitofp i32 %6 to float
%8 = fdiv float %4, %7
ret float %8
}

LLVM IR (-O2):
@INT32_MAX = global i32 0
define float @s32toQ(i64 %0) {
%2 = sitofp i64 %0 to float
%3 = load i32, i32* @INT32_MAX
%4 = add nsw i32 %3, -1
%5 = sitofp i32 %4 to float
%6 = fdiv float %2, %5
ret float %6
}
void VP8YUVInit(void) {}


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

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

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

LLVM IR (-O2):
define void @VP8YUVInit() {
ret void
}
int stb__clex_iswhite(int x) {
  return x == ' ' || x == '\t' || x == '\r' || x == '\n' || x == '\f';
}


x86 assembly (clang, -O0):
<stb__clex_iswhite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <stb__clex_iswhite+0x4d>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <stb__clex_iswhite+0x4d>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <stb__clex_iswhite+0x4d>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <stb__clex_iswhite+0x4d>
cmpl   $0xc,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb__clex_iswhite>:
cmp    $0x20,%edi
ja     111d <stb__clex_iswhite+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    111d <stb__clex_iswhite+0x1d>
ret
xor    %eax,%eax
cmp    $0xc,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @stb__clex_iswhite(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 12
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void g_queue_link_index() {}


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

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

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

LLVM IR (-O2):
define void @g_queue_link_index() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ midi_clock_set_source(int);
int /*<<< orphan*/ seq_utils_clamp(int, int, int);
int song_get_midi_clock_source();
int /*<<< orphan*/ song_set_midi_clock_source(int /*<<< orphan*/);
void seq_ctrl_adjust_clock_source(int change) {
  song_set_midi_clock_source(
      seq_utils_clamp(song_get_midi_clock_source() + change, -1, (9 - (7))));
  if (song_get_midi_clock_source() == -1) {
    midi_clock_set_source(1);
  } else {
    midi_clock_set_source(0);
  }
}


x86 assembly (clang, -O0):
<seq_ctrl_adjust_clock_source>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <song_get_midi_clock_source@plt>
mov    %eax,%edi
add    -0x4(%rbp),%edi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1040 <seq_utils_clamp@plt>
mov    %eax,%edi
call   1050 <song_set_midi_clock_source@plt>
mov    $0x0,%al
call   1030 <song_get_midi_clock_source@plt>
cmp    $0xffffffff,%eax
jne    118c <seq_ctrl_adjust_clock_source+0x4c>
mov    $0x1,%edi
call   1060 <midi_clock_set_source@plt>
jmp    1193 <seq_ctrl_adjust_clock_source+0x53>
xor    %edi,%edi
call   1060 <midi_clock_set_source@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_adjust_clock_source>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <song_get_midi_clock_source@plt>
add    %eax,%ebx
mov    %ebx,%edi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1040 <seq_utils_clamp@plt>
mov    %eax,%edi
call   1050 <song_set_midi_clock_source@plt>
xor    %eax,%eax
call   1030 <song_get_midi_clock_source@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rbx
jmp    1060 <midi_clock_set_source@plt>

LLVM IR (-O0):
define void @seq_ctrl_adjust_clock_source(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @song_get_midi_clock_source()
%4 = load i32, i32* %2
%5 = add nsw i32 %3, %4
%6 = call i32 @seq_utils_clamp(i32 %5, i32 -1, i32 2)
%7 = call i32 @song_set_midi_clock_source(i32 %6)
%8 = call i32 (...) @song_get_midi_clock_source()
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @midi_clock_set_source(i32 1)
br label %14
12: ; preds = %1
%13 = call i32 @midi_clock_set_source(i32 0)
br label %14
14: ; preds = %12, %10
ret void
}

LLVM IR (-O2):
define void @seq_ctrl_adjust_clock_source(i32 %0) {
%2 = tail call i32 (...) @song_get_midi_clock_source()
%3 = add nsw i32 %2, %0
%4 = tail call i32 @seq_utils_clamp(i32 %3, i32 -1, i32 2)
%5 = tail call i32 @song_set_midi_clock_source(i32 %4)
%6 = tail call i32 (...) @song_get_midi_clock_source()
%7 = icmp eq i32 %6, -1
%8 = zext i1 %7 to i32
%9 = tail call i32 @midi_clock_set_source(i32 %8)
ret void
}
float df(float x) { return 2 * x; }


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

x86 assembly (clang, -O2):
<df>:
addss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @df(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 2.000000e+00, %3
ret float %4
}

LLVM IR (-O2):
define float @df(float %0) {
%2 = fmul float %0, 2.000000e+00
ret float %2
}
int option_check_true(int opt, ...) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @option_check_true(i32 %0, ...) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int socket(int, int, int);
int Socket(int family, int type, int protocol) {
  int des;
  des = socket(family, type, protocol);
  if (des < 0) {
    printf("Error defining socket......\n");
    exit(1);
  }
  return des;
}


x86 assembly (clang, -O0):
<Socket>:
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   1050 <socket@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1172 <Socket+0x42>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rax
call   1050 <socket@plt>
test   %eax,%eax
js     113c <Socket+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Error defining socket......\0A\00"
define i32 @Socket(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 @socket(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %3
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
@str = [28 x i8] c"Error defining socket......\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ libc_ltrim(char *);
int /*<<< orphan*/ libc_rtrim(char *);
char *libc_trim(char *str) {
  libc_rtrim(str);
  libc_ltrim(str);
  return str;
}


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

x86 assembly (clang, -O2):
<libc_trim>:
push   %rbx
mov    %rdi,%rbx
call   1040 <libc_rtrim@plt>
mov    %rbx,%rdi
call   1030 <libc_ltrim@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @libc_trim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @libc_rtrim(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @libc_ltrim(i8* %5)
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
define i8* @libc_trim(i8* returned %0) {
%2 = tail call i32 @libc_rtrim(i8* %0)
%3 = tail call i32 @libc_ltrim(i8* %0)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ GPIOinitOut(int, int);
void initLED(void) {
  GPIOinitOut(2, 10);
  GPIOinitOut(2, 11);
  GPIOinitOut(2, 12);
}


x86 assembly (clang, -O0):
<initLED>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0xa,%esi
call   1030 <GPIOinitOut@plt>
mov    $0x2,%edi
mov    $0xb,%esi
call   1030 <GPIOinitOut@plt>
mov    $0x2,%edi
mov    $0xc,%esi
call   1030 <GPIOinitOut@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initLED>:
push   %rax
mov    $0x2,%edi
mov    $0xa,%esi
call   1030 <GPIOinitOut@plt>
mov    $0x2,%edi
mov    $0xb,%esi
call   1030 <GPIOinitOut@plt>
mov    $0x2,%edi
mov    $0xc,%esi
pop    %rax
jmp    1030 <GPIOinitOut@plt>

LLVM IR (-O0):
define void @initLED() {
%1 = call i32 @GPIOinitOut(i32 2, i32 10)
%2 = call i32 @GPIOinitOut(i32 2, i32 11)
%3 = call i32 @GPIOinitOut(i32 2, i32 12)
ret void
}

LLVM IR (-O2):
define void @initLED() {
%1 = tail call i32 @GPIOinitOut(i32 2, i32 10)
%2 = tail call i32 @GPIOinitOut(i32 2, i32 11)
%3 = tail call i32 @GPIOinitOut(i32 2, i32 12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check();
int /*<<< orphan*/ init();
int /*<<< orphan*/ pipedF();
int /*<<< orphan*/ pipedF_ref();
int main() {
  init();
  pipedF_ref();
  pipedF();
  check();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
mov    $0x0,%al
call   1040 <pipedF_ref@plt>
mov    $0x0,%al
call   1030 <pipedF@plt>
mov    $0x0,%al
call   1060 <check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init@plt>
xor    %eax,%eax
call   1040 <pipedF_ref@plt>
xor    %eax,%eax
call   1030 <pipedF@plt>
xor    %eax,%eax
call   1060 <check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @init()
%3 = call i32 (...) @pipedF_ref()
%4 = call i32 (...) @pipedF()
%5 = call i32 (...) @check()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 (...) @pipedF_ref()
%3 = tail call i32 (...) @pipedF()
%4 = tail call i32 (...) @check()
ret i32 0
}
double run(double n) {
  double i = n, sum = 0.;
  while (i >= 0.) {
    sum = sum + i;
    i = i - 1.;
  }
  return sum;
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1157 <run+0x57>
movsd  -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    111b <run+0x1b>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112e <run+0x2e>
xorpd  %xmm2,%xmm2
movsd  0xeea(%rip),%xmm3
xorpd  %xmm1,%xmm1
nopw   0x0(%rax,%rax,1)
addsd  %xmm0,%xmm1
addsd  %xmm3,%xmm0
ucomisd %xmm2,%xmm0
jae    1120 <run+0x20>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @run(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %3
store double 0.000000e+00, double* %4
br label %6
6: ; preds = %9, %1
%7 = load double, double* %3
%8 = fcmp oge double %7, 0.000000e+00
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load double, double* %4
%11 = load double, double* %3
%12 = fadd double %10, %11
store double %12, double* %4
%13 = load double, double* %3
%14 = fsub double %13, 1.000000e+00
store double %14, double* %3
br label %6
15: ; preds = %6
%16 = load double, double* %4
ret double %16
}

LLVM IR (-O2):
define double @run(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi double [ %6, %3 ], [ 0.000000e+00, %1 ]
%5 = phi double [ %7, %3 ], [ %0, %1 ]
%6 = fadd double %5, %4
%7 = fadd double %5, -1.000000e+00
%8 = fcmp ult double %7, 0.000000e+00
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi double [ 0.000000e+00, %1 ], [ %6, %3 ]
ret double %10
}
void ff_hevc_put_hevc_uni_epel_v16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v16_12_sse4() {
ret void
}
int tste() {
  union doubleword {
    double d;
    unsigned long u[2];
  } dw;
  dw.d = 10;
  return dw.u[0] != 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<tste>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.doubleword = type { [2 x i64] }
define i32 @tste() {
%1 = alloca %union.doubleword
%2 = bitcast %union.doubleword* %1 to double*
store double 1.000000e+01, double* %2
%3 = bitcast %union.doubleword* %1 to [2 x i64]*
%4 = getelementptr inbounds [2 x i64], [2 x i64]* %3, i64 0, i64 0
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 0
ret i32 %8
}

LLVM IR (-O2):
define i32 @tste() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x6c() {
  Assert_real((iscntrl(108) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              545, ("iscntrl should be 0 for l"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x6c>:
push   %rax
mov    $0x6c,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x221,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for l\00"
define void @t_iscntrl_0x6c() {
%1 = call i64 @iscntrl(i32 108)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for l\00"
define void @t_iscntrl_0x6c() {
%1 = tail call i64 @iscntrl(i32 108)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x70() {
  Assert_real((isgraph(112)),
              "/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_isgraph.c",
              565, ("isgraph should be 1 for p"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x70>:
push   %rax
mov    $0x70,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x235,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for p\00"
define void @t_isgraph_0x70() {
%1 = call i32 @isgraph(i32 112)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 565, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for p\00"
define void @t_isgraph_0x70() {
%1 = tail call i32 @isgraph(i32 112)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 565, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, float *);
int main() {
  int dist;
  float fuel;
  scanf("%i %f", &dist, &fuel);
  printf("%.3f km/l\n", (dist / fuel));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
cvtsi2ssl 0x4(%rsp),%xmm0
divss  (%rsp),%xmm0
cvttss2si %xmm0,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%i %f\00"
@.str.1 = [11 x i8] c"%.3f km/l\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, float* %3)
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to float
%7 = load float, float* %3
%8 = fdiv float %6, %7
%9 = fptosi float %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%i %f\00"
@.str.1 = [11 x i8] c"%.3f km/l\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, float* %2)
%6 = load i32, i32* %1
%7 = sitofp i32 %6 to float
%8 = load float, float* %2
%9 = fdiv float %7, %8
%10 = fptosi float %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
int intcmp(int *a, int *b) { return (*a - *b); }


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

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

LLVM IR (-O0):
define i32 @intcmp(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @intcmp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
ret i32 %5
}
float dsigmoid(float z) { return z * (1 - z); }


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

x86 assembly (clang, -O2):
<dsigmoid>:
movss  0xef8(%rip),%xmm1
subss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @dsigmoid(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fsub float 1.000000e+00, %4
%6 = fmul float %3, %5
ret float %6
}

LLVM IR (-O2):
define float @dsigmoid(float %0) {
%2 = fsub float 1.000000e+00, %0
%3 = fmul float %2, %0
ret float %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void print_char_uart0(char c) {
  while ((*((volatile uint32_t *)(((volatile uint32_t *const)0x20201000 +
                                   0x18)))) &
         (1 << 5)) {
  }
  (*((volatile uint32_t *)((volatile uint32_t *const)0x20201000)) =
       (volatile uint32_t)(c));
}


x86 assembly (clang, -O0):
<print_char_uart0>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x20201000,%eax
mov    0x60(%rax),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1123 <print_char_uart0+0x23>
jmp    110a <print_char_uart0+0xa>
movsbl -0x1(%rbp),%ecx
mov    $0x20201000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_char_uart0>:
testl  $0x20,0x20201060
jne    1100 <print_char_uart0>
movsbl %dil,%eax
mov    %eax,0x20201000
ret

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

LLVM IR (-O2):
define void @print_char_uart0(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i32, i32* inttoptr (i64 538972256 to i32*)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = sext i8 %0 to i32
store volatile i32 %7, i32* inttoptr (i64 538972160 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VirtualizeTimerC__0__Timer__stop(unsigned int);
void SensirionSht11LogicP__0__Timer__stop(void) {
  VirtualizeTimerC__0__Timer__stop(5U);
}


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

x86 assembly (clang, -O2):
<SensirionSht11LogicP__0__Timer__stop>:
mov    $0x5,%edi
jmp    1030 <VirtualizeTimerC__0__Timer__stop@plt>

LLVM IR (-O0):
define void @SensirionSht11LogicP__0__Timer__stop() {
%1 = call i32 @VirtualizeTimerC__0__Timer__stop(i32 5)
ret void
}

LLVM IR (-O2):
define void @SensirionSht11LogicP__0__Timer__stop() {
%1 = tail call i32 @VirtualizeTimerC__0__Timer__stop(i32 5)
ret void
}
/* Variables and functions */
int open(char const *, int);
__attribute__((__weak__, __always___)) int
softboundmpx_open(const char *pathname, int flags) {
  return open(pathname, flags);
}


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

x86 assembly (clang, -O2):
<softboundmpx_open>:
jmp    1030 <open@plt>

LLVM IR (-O0):
define weak i32 @softboundmpx_open(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 = call i32 @open(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define weak i32 @softboundmpx_open(i8* %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ccvt_yuyv(int, int, unsigned char const *, unsigned char *,
                             int);
void ccvt_yuyv_rgb24(int width, int height, const void *src, void *dst) {
  ccvt_yuyv(width, height, (const unsigned char *)src, (unsigned char *)dst, 1);
}


x86 assembly (clang, -O0):
<ccvt_yuyv_rgb24>:
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    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <ccvt_yuyv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccvt_yuyv_rgb24>:
mov    $0x1,%r8d
jmp    1030 <ccvt_yuyv@plt>

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

LLVM IR (-O2):
define void @ccvt_yuyv_rgb24(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @ccvt_yuyv(i32 %0, i32 %1, i8* %2, i8* %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ catString(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void catName(char *name) {
  char buf[30 + 2];
  sprintf(buf, "\"%s\"", name);
  catString(buf);
}


x86 assembly (clang, -O0):
<catName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <catString@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catName>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rdx
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <catString@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\22%s\22\00"
define void @catName(i8* %0) {
%2 = alloca i8*
%3 = alloca [32 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%8 = call i32 @catString(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\22%s\22\00"
define void @catName(i8* %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @catString(i8* %3)
ret void
}
void *ocl_hw_tas_addr(void *addr) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @ocl_hw_tas_addr(i8* nocapture readnone %0) {
ret i8* undef
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
char *strchrnul(char const *, int);
char *strchr(const char *s, int c) {
  char *r = strchrnul(s, c);
  return *(uint8_t *)r == (uint8_t)c ? r : 0;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <strchrnul@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jne    1150 <strchr+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    115b <strchr+0x4b>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    115b <strchr+0x4b>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
push   %rbx
mov    %esi,%ebx
call   1030 <strchrnul@plt>
movslq %ebx,%rcx
xor    %edx,%edx
cmp    %rcx,(%rax)
cmovne %rdx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @strchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8* @strchrnul(i8* %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i64*
%11 = load i64, i64* %10
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = icmp eq i64 %11, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i8*, i8** %5
br label %18
17: ; preds = %2
br label %18
18: ; preds = %17, %15
%19 = phi i8* [ %16, %15 ], [ null, %17 ]
ret i8* %19
}

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = tail call i8* @strchrnul(i8* %0, i32 %1)
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = sext i32 %1 to i64
%7 = icmp eq i64 %5, %6
%8 = select i1 %7, i8* %3, i8* null
ret i8* %8
}
/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_size_t(size_t const k1, size_t const k2) {
  return k1 < k2;
}


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

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_size_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setb   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_size_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_size_t(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int support_vfprintf(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/);
int vfprintf(FILE *stream, const char *format, va_list arg) {
  return support_vfprintf(stream, format, arg);
}


x86 assembly (clang, -O0):
<vfprintf>:
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
call   1030 <support_vfprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfprintf>:
jmp    1030 <support_vfprintf@plt>

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

LLVM IR (-O2):
define i32 @vfprintf(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @support_vfprintf(i32* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void end_wave_raw(int fd) {
  if (fd != 1)
    close(fd);
}


x86 assembly (clang, -O0):
<end_wave_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     112d <end_wave_raw+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_wave_raw>:
cmp    $0x1,%edi
jne    1116 <end_wave_raw+0x6>
ret
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @end_wave_raw(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
unsigned __int128 identity(unsigned __int128 a) { return a; }


x86 assembly (clang, -O0):
<identity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<identity>:
mov    %rsi,%rdx
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define { i64, i64 } @identity(i64 %0, i64 %1) {
%3 = insertvalue { i64, i64 } poison, i64 %0, 0
%4 = insertvalue { i64, i64 } %3, i64 %1, 1
ret { i64, i64 } %4
}
void start_debugger() {}


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

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

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

LLVM IR (-O2):
define void @start_debugger() {
ret void
}
/* Variables and functions */
long double ceil(long double);
long double fun_ceil(long double a) { return ceil(a); }


x86 assembly (clang, -O0):
<fun_ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <ceil@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_ceil>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <ceill@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define x86_fp80 @fun_ceil(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.ceil.f80(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
scalar_t__ menu_load(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ reset_all_save(int /*<<< orphan*/);
void menu_load_bar(void) {
  if (menu_load(0, 0))
    reset_all_save(0);
}


x86 assembly (clang, -O0):
<menu_load_bar>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1040 <menu_load@plt>
cmp    $0x0,%rax
je     113e <menu_load_bar+0x1e>
xor    %edi,%edi
call   1030 <reset_all_save@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_load_bar>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <menu_load@plt>
test   %rax,%rax
je     1137 <menu_load_bar+0x17>
xor    %edi,%edi
pop    %rax
jmp    1030 <reset_all_save@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @menu_load_bar() {
%1 = call i64 @menu_load(i32 0, i32 0)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @reset_all_save(i32 0)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @menu_load_bar() {
%1 = tail call i64 @menu_load(i32 0, i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @reset_all_save(i32 0)
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
char *foo(char str[]) {
  char *data = malloc(sizeof(str));
  memcpy(data, str, sizeof(str));
  return data;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @foo(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 8)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 8)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @foo(i8* %0) {
%2 = tail call dereferenceable_or_null(8) i8* @malloc(i32 8)
%3 = tail call i32 @memcpy(i8* %2, i8* %0, i32 8)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void print_usage(const char *program_name) {
  printf("Usage: %s [OPTION]...\n"
         "Usage: %s [--help | --version]\n\n",
         program_name, program_name);
}


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Usage: %s [OPTION]...\0AUsage: %s [--help | --version]\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Usage: %s [OPTION]...\0AUsage: %s [--help | --version]\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
void ExttNASAuxTable(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void write_function_name(FILE *filep, char *base_name) {
  fprintf(filep, "void %s(void)\n", base_name);
}


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

x86 assembly (clang, -O2):
<write_function_name>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"void %s(void)\0A\00"
define void @write_function_name(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void delete_uds_msg(void **ppmsg) {
  free(*ppmsg);
  *ppmsg = 0;
}


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

x86 assembly (clang, -O2):
<delete_uds_msg>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @delete_uds_msg(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
ret void
}
/* Variables and functions */
int wcsulexe(char const *, int *, double *, double *, int);
int wcsulex(const char unitstr[], int *func, double *scale, double units[]) {
  return wcsulexe(unitstr, func, scale, units, 0x0);
}


x86 assembly (clang, -O0):
<wcsulex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <wcsulexe@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsulex>:
xor    %r8d,%r8d
jmp    1030 <wcsulexe@plt>

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

LLVM IR (-O2):
define i32 @wcsulex(i8* %0, i32* %1, double* %2, double* %3) {
%5 = tail call i32 @wcsulexe(i8* %0, i32* %1, double* %2, double* %3, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sleep2(int);
int main(int argc, char *argv[]) {
  printf("start..\n");
  sleep2(2);
  puts("end...");
  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    $0x2,%edi
call   1050 <sleep2@plt>
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"start..\0A\00"
@.str.1 = [7 x i8] c"end...\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 ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @sleep2(i32 2)
%8 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"end...\00"
@str = [8 x i8] c"start..\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep2(i32 2)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void delay_ms(int foo) { sleep(foo / 1000); }


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_ms>:
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x26,%rdi
add    %eax,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @delay_ms(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 1000
%5 = call i32 @sleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @delay_ms(i32 %0) {
%2 = sdiv i32 %0, 1000
%3 = tail call i32 @sleep(i32 %2)
ret void
}
int mv88x201x_set_loopback(struct cphy *cphy, int on) { return 0; }


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

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

LLVM IR (-O0):
%struct.cphy = type opaque
define i32 @mv88x201x_set_loopback(%struct.cphy* %0, i32 %1) {
%3 = alloca %struct.cphy*
%4 = alloca i32
store %struct.cphy* %0, %struct.cphy** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.cphy = type opaque
define i32 @mv88x201x_set_loopback(%struct.cphy* nocapture readnone %0, i32 %1) {
ret i32 0
}