xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x10() {
  Assert_real((isupper(16) == 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_isupper.c",
              85, ("isupper should be 0 for 0x10"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x10>:
push   %rax
mov    $0x10,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x55,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x10\00"
define void @t_isupper_0x10() {
%1 = call i64 @isupper(i32 16)
%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 85, i8* getelementptr inbounds ([29 x i8], [29 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x10\00"
define void @t_isupper_0x10() {
%1 = tail call i64 @isupper(i32 16)
%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 85, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ new_space(size_t);
void heap_expand(size_t count) {
  if (count < 4194304)
    count = 4194304;
  new_space(count);
}


x86 assembly (clang, -O0):
<heap_expand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x400000,-0x8(%rbp)
jae    1132 <heap_expand+0x22>
movq   $0x400000,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <new_space@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heap_expand>:
cmp    $0x400001,%rdi
mov    $0x400000,%eax
cmovb  %rax,%rdi
jmp    1030 <new_space@plt>

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

LLVM IR (-O2):
define void @heap_expand(i64 %0) {
%2 = icmp ugt i64 %0, 4194304
%3 = select i1 %2, i64 %0, i64 4194304
%4 = tail call i32 @new_space(i64 %3)
ret void
}
void dj_set_mod_volume(char volume) {}


x86 assembly (clang, -O0):
<dj_set_mod_volume>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @dj_set_mod_volume(i8 signext %0) {
ret void
}
long C_Utils_max_long(const long item1, const long item2) {
  return item1 > item2 ? item1 : item2;
}


x86 assembly (clang, -O0):
<C_Utils_max_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <C_Utils_max_long+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <C_Utils_max_long+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_max_long>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @C_Utils_max_long(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 sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @C_Utils_max_long(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_casting();
void main() { test_casting(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @test_casting()
ret void
}
/* Variables and functions */
float perlin_noise_3d(int /*<<< orphan*/);
int /*<<< orphan*/ vec3f(float, float, float);
float call_pnoise3(float x, float y, float z) {
  return perlin_noise_3d(vec3f(x, y, z));
}


x86 assembly (clang, -O0):
<call_pnoise3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1040 <vec3f@plt>
mov    %eax,%edi
call   1030 <perlin_noise_3d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_pnoise3>:
push   %rax
call   1040 <vec3f@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <perlin_noise_3d@plt>

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

LLVM IR (-O2):
define float @call_pnoise3(float %0, float %1, float %2) {
%4 = tail call i32 @vec3f(float %0, float %1, float %2)
%5 = tail call float @perlin_noise_3d(i32 %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_error_undefined_io() {
  printf("Error: there's no defined action for this I/O command.\n");
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"Error: there's no defined action for this I/O command.\0A\00"
define void @msg_error_undefined_io() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [55 x i8] c"Error: there's no defined action for this I/O command.\00"
define void @msg_error_undefined_io() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
ret void
}
int foo() {
  volatile int a[1];
  int i, *p = (int *)a;
  a[0] = 1;
  for (i = 0; i < 1; ++i)
    if (p[i])
      return -1;
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    1155 <foo+0x55>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1142 <foo+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    115c <foo+0x5c>
jmp    1147 <foo+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111a <foo+0x1a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x1,-0x4(%rsp)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 1, i32* %1
ret i32 -1
}
void gtk_file_chooser_error_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_error_get_type() {
ret void
}
const char *get_last_asm(const char *dir, unsigned char cmp) {
  asm volatile("movq %%rcx, %%rdx\n"
               "ext_len_loop:\n"
               "cmpb $0, (%%rcx)\n"
               "je ext_main_loop\n"
               "incq %%rcx\n"
               "jmp ext_len_loop\n"
               "ext_main_loop:\n"
               "decq %%rcx\n"
               "cmpq %%rdx, %%rcx\n"
               "jl ext_insufficient\n"
               "cmpb %%bl, (%%rcx)\n"
               "je ext_success\n"
               "jmp ext_main_loop\n"
               "ext_insufficient:\n"
               "xorq %%rcx, %%rcx\n"
               "ext_success:\n"
               : "=c"(dir)
               : "c"(dir), "b"(cmp)
               : "%rdx");
  return dir;
}


x86 assembly (clang, -O0):
<get_last_asm>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x11(%rbp),%bl
mov    %rcx,%rdx

x86 assembly (clang, -O2):
<get_last_asm>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rcx
mov    %rcx,%rdx

LLVM IR (-O0):
define i8* @get_last_asm(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i8* asm sideeffect "movq %rcx, %rdx\0Aext_len_loop:\0Acmpb $$0, (%rcx)\0Aje ext_main_loop\0Aincq %rcx\0Ajmp ext_len_loop\0Aext_main_loop:\0Adecq %rcx\0Acmpq %rdx, %rcx\0Ajl ext_insufficient\0Acmpb %bl, (%rcx)\0Aje ext_success\0Ajmp ext_main_loop\0Aext_insufficient:\0Axorq %rcx, %rcx\0Aext_success:\0A", "={cx},{cx},{bx},~{rdx},~{dirflag},~{fpsr},~{flags}"(i8* %5, i8 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @get_last_asm(i8* %0, i8 zeroext %1) {
%3 = tail call i8* asm sideeffect "movq %rcx, %rdx\0Aext_len_loop:\0Acmpb $$0, (%rcx)\0Aje ext_main_loop\0Aincq %rcx\0Ajmp ext_len_loop\0Aext_main_loop:\0Adecq %rcx\0Acmpq %rdx, %rcx\0Ajl ext_insufficient\0Acmpb %bl, (%rcx)\0Aje ext_success\0Ajmp ext_main_loop\0Aext_insufficient:\0Axorq %rcx, %rcx\0Aext_success:\0A", "={cx},{cx},{bx},~{rdx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i8 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int /*<<< orphan*/, void *);
void printString(const char *str) { write(strlen(str), (void *)str); }


x86 assembly (clang, -O0):
<printString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printString>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @printString(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 %2, i8* %0)
ret void
}
int test_imm_A7uint16_reg(unsigned short val) {
  return ((val) & (-0xA7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A7uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff59,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A7uint16_reg>:
test   $0xff59,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A7uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -167
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct zsock_pollfd {
  int dummy;
};

/* Variables and functions */
int zsock_poll(struct zsock_pollfd *, int, int);
int poll(struct zsock_pollfd *fds, int nfds, int timeout) {
  return zsock_poll(fds, nfds, timeout);
}


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

x86 assembly (clang, -O2):
<poll>:
jmp    1030 <zsock_poll@plt>

LLVM IR (-O0):
%struct.zsock_pollfd = type { i32 }
define i32 @poll(%struct.zsock_pollfd* %0, i32 %1, i32 %2) {
%4 = alloca %struct.zsock_pollfd*
%5 = alloca i32
%6 = alloca i32
store %struct.zsock_pollfd* %0, %struct.zsock_pollfd** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.zsock_pollfd*, %struct.zsock_pollfd** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @zsock_poll(%struct.zsock_pollfd* %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.zsock_pollfd = type { i32 }
define i32 @poll(%struct.zsock_pollfd* %0, i32 %1, i32 %2) {
%4 = tail call i32 @zsock_poll(%struct.zsock_pollfd* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ loff_t;

/* Variables and functions */
int resume_with_ckpt(int, int, int, int, int, char *, char *,
                     int /*<<< orphan*/, int, int /*<<< orphan*/);
int resume(int fd_spec, int pin, int gdb, int follow_splits, int save_mmap,
           char *logdir, char *linker, loff_t attach_index, int attach_pid) {
  return resume_with_ckpt(fd_spec, pin, gdb, follow_splits, save_mmap, logdir,
                          linker, attach_index, attach_pid, 0);
}


x86 assembly (clang, -O0):
<resume>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x48,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
xor    %ebx,%ebx
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
call   1030 <resume_with_ckpt@plt>
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<resume>:
push   %rax
mov    0x18(%rsp),%r10d
mov    0x20(%rsp),%eax
push   $0x0
push   %rax
push   %r10
push   0x28(%rsp)
call   1030 <resume_with_ckpt@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @resume(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i8* %5, i8** %15
store i8* %6, i8** %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = load i8*, i8** %15
%25 = load i8*, i8** %16
%26 = load i32, i32* %17
%27 = load i32, i32* %18
%28 = call i32 @resume_with_ckpt(i32 %19, i32 %20, i32 %21, i32 %22, i32 %23, i8* %24, i8* %25, i32 %26, i32 %27, i32 0)
ret i32 %28
}

LLVM IR (-O2):
define i32 @resume(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6, i32 %7, i32 %8) {
%10 = tail call i32 @resume_with_ckpt(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6, i32 %7, i32 %8, i32 0)
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ j5update();
void handler(int sig, siginfo_t *si, void *uc) { j5update(); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <j5update@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @handler(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = call i32 (...) @j5update()
ret void
}

LLVM IR (-O2):
define void @handler(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @j5update()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
float mtgp32_temper_float_open(const uint32_t flt_tmp_tbl[16], uint32_t r,
                               uint32_t t) {
  union {
    uint32_t u;
    float f;
  } x;
  t ^= t >> 16;
  t ^= t >> 8;
  r = r >> 9;
  x.u = (r ^ flt_tmp_tbl[t & 0x0f]) | 1;
  return x.f;
}


x86 assembly (clang, -O0):
<mtgp32_temper_float_open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x10,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x8,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x9,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%edx
and    $0xf,%edx
movslq %edx,%rdx
xor    (%rcx,%rdx,4),%eax
or     $0x1,%eax
mov    %eax,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtgp32_temper_float_open>:
mov    %edx,%eax
sar    $0x10,%eax
xor    %edx,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
xor    %eax,%ecx
sar    $0x9,%esi
and    $0xf,%ecx
xor    (%rdi,%rcx,4),%esi
or     $0x1,%esi
movd   %esi,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define float @mtgp32_temper_float_open(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %union.anon
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = ashr i32 %8, 16
%10 = load i32, i32* %6
%11 = xor i32 %10, %9
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = ashr i32 %12, 8
%14 = load i32, i32* %6
%15 = xor i32 %14, %13
store i32 %15, i32* %6
%16 = load i32, i32* %5
%17 = ashr i32 %16, 9
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = load i32*, i32** %4
%20 = load i32, i32* %6
%21 = and i32 %20, 15
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %19, i64 %22
%24 = load i32, i32* %23
%25 = xor i32 %18, %24
%26 = or i32 %25, 1
%27 = bitcast %union.anon* %7 to i32*
store i32 %26, i32* %27
%28 = bitcast %union.anon* %7 to float*
%29 = load float, float* %28
ret float %29
}

LLVM IR (-O2):
define float @mtgp32_temper_float_open(i32* nocapture %0, i32 %1, i32 %2) {
%4 = ashr i32 %2, 16
%5 = xor i32 %4, %2
%6 = lshr i32 %5, 8
%7 = xor i32 %6, %5
%8 = ashr i32 %1, 9
%9 = and i32 %7, 15
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = xor i32 %12, %8
%14 = or i32 %13, 1
%15 = bitcast i32 %14 to float
ret float %15
}
/* Variables and functions */
long strtol(char const *, char **, int);
long atol(const char *s) {
  char *tmp;
  return strtol(s, &tmp, 10);
}


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

x86 assembly (clang, -O2):
<atol>:
push   %rax
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @atol(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 10)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xfb() {
  Assert_real((isprint(251) == 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_isprint.c",
              1260, ("isprint should be 0 for 0xfb"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xfb\00"
define void @t_isprint_0xfb() {
%1 = call i64 @isprint(i32 251)
%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 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xfb\00"
define void @t_isprint_0xfb() {
%1 = tail call i64 @isprint(i32 251)
%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 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init(int *);
void __libc_init_first(int argc __attribute__((unused)), ...) { init(&argc); }


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

x86 assembly (clang, -O2):
<__libc_init_first>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <init@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @__libc_init_first(i32 %0, ...) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @init(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RamAccFixMod(int);
int /*<<< orphan*/ RamWriteA(int, short);
int /*<<< orphan*/ RegWriteA(int, int);
void AfVcmCod(signed short SsCodVal) {
  RamAccFixMod(0x01);
  RamWriteA(0x1513, SsCodVal);
  RamAccFixMod(0x00);
  RegWriteA(0x01E1, 0x01);
}


x86 assembly (clang, -O0):
<AfVcmCod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x1,%edi
call   1040 <RamAccFixMod@plt>
mov    $0x1513,%edi
movswl -0x2(%rbp),%esi
call   1030 <RamWriteA@plt>
xor    %edi,%edi
call   1040 <RamAccFixMod@plt>
mov    $0x1e1,%edi
mov    $0x1,%esi
call   1050 <RegWriteA@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AfVcmCod>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1040 <RamAccFixMod@plt>
mov    $0x1513,%edi
mov    %ebx,%esi
call   1030 <RamWriteA@plt>
xor    %edi,%edi
call   1040 <RamAccFixMod@plt>
mov    $0x1e1,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1050 <RegWriteA@plt>

LLVM IR (-O0):
define void @AfVcmCod(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @RamAccFixMod(i32 1)
%4 = load i16, i16* %2
%5 = call i32 @RamWriteA(i32 5395, i16 signext %4)
%6 = call i32 @RamAccFixMod(i32 0)
%7 = call i32 @RegWriteA(i32 481, i32 1)
ret void
}

LLVM IR (-O2):
define void @AfVcmCod(i16 signext %0) {
%2 = tail call i32 @RamAccFixMod(i32 1)
%3 = tail call i32 @RamWriteA(i32 5395, i16 signext %0)
%4 = tail call i32 @RamAccFixMod(i32 0)
%5 = tail call i32 @RegWriteA(i32 481, i32 1)
ret void
}
unsigned addval_437(unsigned x) { return x + 2429192639U; }


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

x86 assembly (clang, -O2):
<addval_437>:
lea    -0x6f357641(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addval_437(i32 %0) {
%2 = add i32 %0, -1865774657
ret i32 %2
}
unsigned int uint_limit(unsigned int lower, unsigned int upper,
                        unsigned int val) {
  return ((val < lower) ? lower : (val > upper ? upper : val));
}


x86 assembly (clang, -O0):
<uint_limit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1124 <uint_limit+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <uint_limit+0x47>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    113b <uint_limit+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <uint_limit+0x41>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint_limit>:
mov    %esi,%eax
cmp    %esi,%edx
cmovbe %edx,%eax
cmp    %edi,%edx
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @uint_limit(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i32, i32* %4
br label %22
12: ; preds = %3
%13 = load i32, i32* %6
%14 = load i32, i32* %5
%15 = icmp ugt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i32, i32* %5
br label %20
18: ; preds = %12
%19 = load i32, i32* %6
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i32 [ %11, %10 ], [ %21, %20 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @uint_limit(i32 %0, i32 %1, i32 %2) {
%4 = icmp ult i32 %2, %0
%5 = icmp ugt i32 %2, %1
%6 = select i1 %5, i32 %1, i32 %2
%7 = select i1 %4, i32 %0, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ NXCTRLExitLoop();
void NXCTRLLoop(void) { NXCTRLExitLoop(); }


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

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

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

LLVM IR (-O2):
define void @NXCTRLLoop() {
%1 = tail call i32 (...) @NXCTRLExitLoop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Band_Init();
int /*<<< orphan*/ Battery_Init();
int /*<<< orphan*/ Clock_Init();
int /*<<< orphan*/ LED_Init();
int /*<<< orphan*/ RF_Init();
int /*<<< orphan*/ i2cInit();
void clockGpioConfig() {
  Clock_Init();
  i2cInit();
  LED_Init();
  Band_Init();
  RF_Init();
  Battery_Init();
}


x86 assembly (clang, -O0):
<clockGpioConfig>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <Clock_Init@plt>
mov    $0x0,%al
call   1040 <i2cInit@plt>
mov    $0x0,%al
call   1030 <LED_Init@plt>
mov    $0x0,%al
call   1060 <Band_Init@plt>
mov    $0x0,%al
call   1050 <RF_Init@plt>
mov    $0x0,%al
call   1070 <Battery_Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clockGpioConfig>:
push   %rax
xor    %eax,%eax
call   1080 <Clock_Init@plt>
xor    %eax,%eax
call   1040 <i2cInit@plt>
xor    %eax,%eax
call   1030 <LED_Init@plt>
xor    %eax,%eax
call   1060 <Band_Init@plt>
xor    %eax,%eax
call   1050 <RF_Init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <Battery_Init@plt>

LLVM IR (-O0):
define void @clockGpioConfig() {
%1 = call i32 (...) @Clock_Init()
%2 = call i32 (...) @i2cInit()
%3 = call i32 (...) @LED_Init()
%4 = call i32 (...) @Band_Init()
%5 = call i32 (...) @RF_Init()
%6 = call i32 (...) @Battery_Init()
ret void
}

LLVM IR (-O2):
define void @clockGpioConfig() {
%1 = tail call i32 (...) @Clock_Init()
%2 = tail call i32 (...) @i2cInit()
%3 = tail call i32 (...) @LED_Init()
%4 = tail call i32 (...) @Band_Init()
%5 = tail call i32 (...) @RF_Init()
%6 = tail call i32 (...) @Battery_Init()
ret void
}
/* Variables and functions */
scalar_t__ listen(int, int);
int net_listen(int sock) {
  if (listen(sock, 5) < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<net_listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
call   1030 <listen@plt>
cmp    $0x0,%rax
jge    113e <net_listen+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <net_listen+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_listen>:
push   %rax
mov    $0x5,%esi
call   1030 <listen@plt>
sar    $0x3f,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @net_listen(i32 %0) {
%2 = tail call i64 @listen(i32 %0, i32 5)
%3 = ashr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ atanl(long double);
int /*<<< orphan*/ link_failure_atanl();
void test_atanl(long double ld) {
  if (atanl(ld) != atanl(ld))
    link_failure_atanl();
}


x86 assembly (clang, -O0):
<test_atanl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <atanl@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <atanl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_atanl+0x43>
mov    $0x0,%al
call   1040 <link_failure_atanl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_atanl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1030 <atanl@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1030 <atanl@plt>
cmp    %rax,%rbx
jne    1151 <test_atanl+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1040 <link_failure_atanl@plt>

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

LLVM IR (-O2):
define void @test_atanl(x86_fp80 %0) {
%2 = tail call i64 @atanl(x86_fp80 %0)
%3 = tail call i64 @atanl(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_atanl()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int *alloca(int);
int main() {
  int *x = alloca(sizeof(int));
  while (*x <= 10) {
    if (*x > 6) {
      *x = *x + 2;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xa,(%rax)
jg     115b <main+0x4b>
mov    -0x10(%rbp),%rax
cmpl   $0x6,(%rax)
jle    1156 <main+0x46>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    (%rax),%ecx
cmp    $0xa,%ecx
jle    1135 <main+0x25>
xor    %eax,%eax
pop    %rcx
ret
cs nopw 0x0(%rax,%rax,1)
cmp    $0xb,%ecx
jge    1122 <main+0x12>
cmp    $0x7,%ecx
jl     1130 <main+0x20>
add    $0x2,%ecx
mov    %ecx,(%rax)
jmp    1130 <main+0x20>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @alloca(i32 4)
%2 = load i32, i32* %1
%3 = icmp slt i32 %2, 11
br i1 %3, label %4, label %12
4: ; preds = %0, %9
%5 = phi i32 [ %10, %9 ], [ %2, %0 ]
%6 = icmp sgt i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nuw nsw i32 %5, 2
store i32 %8, i32* %1
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %8, %7 ], [ %5, %4 ]
%11 = icmp slt i32 %10, 11
br i1 %11, label %4, label %12
12: ; preds = %9, %0
ret i32 0
}
/* Variables and functions */
int foo(long, long, long, long, long, long, long, long, long, long, long, long,
        long, long, long, long);
int main() {
  return foo(0L, 0L, 6L, 1L, 0L, 2L, 0L, 0L, 3L, 0L, 5L, 0L, 7L, 0L, 11L, 0L);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%r8d
mov    $0x6,%edx
mov    $0x1,%ecx
mov    $0x2,%r9d
mov    %r8,%rdi
mov    %r8,%rsi
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x3,0x10(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x5,0x20(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x7,0x30(%rsp)
movq   $0x0,0x38(%rsp)
movq   $0xb,0x40(%rsp)
movq   $0x0,0x48(%rsp)
call   1030 <foo@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,(%rsp)
movq   $0x0,0x48(%rsp)
movq   $0xb,0x40(%rsp)
movq   $0x0,0x38(%rsp)
movq   $0x7,0x30(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x5,0x20(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x3,0x10(%rsp)
mov    $0x6,%edx
mov    $0x1,%ecx
mov    $0x2,%r9d
xor    %edi,%edi
xor    %esi,%esi
xor    %r8d,%r8d
call   1030 <foo@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i64 0, i64 0, i64 6, i64 1, i64 0, i64 2, i64 0, i64 0, i64 3, i64 0, i64 5, i64 0, i64 7, i64 0, i64 11, i64 0)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i64 0, i64 0, i64 6, i64 1, i64 0, i64 2, i64 0, i64 0, i64 3, i64 0, i64 5, i64 0, i64 7, i64 0, i64 11, i64 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printArgsNoRet(int, double, char, double, char *, int,
                                  double, char, double, char *, int, double,
                                  char, double, char *);
int main(int argc, char **argv) {
  printArgsNoRet(1, 2.1, 'c', 4.1, "e", 6, 7.1, 'h', 9.1, "j", 11, 12.1, 'm',
                 14.1, "o");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
movsd  0xecd(%rip),%xmm0
mov    $0x63,%esi
movsd  0xec8(%rip),%xmm1
lea    0xee9(%rip),%rdx
mov    $0x6,%ecx
movsd  0xebc(%rip),%xmm2
mov    $0x68,%r8d
movsd  0xeb6(%rip),%xmm3
lea    0xec9(%rip),%r9
movsd  0xeaf(%rip),%xmm4
movsd  0xeaf(%rip),%xmm5
lea    0xeb4(%rip),%rax
movl   $0xb,(%rsp)
movl   $0x6d,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <printArgsNoRet@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
lea    0xf18(%rip),%rax
lea    0xf0d(%rip),%rdx
lea    0xf08(%rip),%r9
movsd  0xece(%rip),%xmm0
movsd  0xece(%rip),%xmm1
movsd  0xece(%rip),%xmm2
movsd  0xece(%rip),%xmm3
movsd  0xece(%rip),%xmm4
movsd  0xece(%rip),%xmm5
mov    $0x1,%edi
mov    $0x63,%esi
mov    $0x6,%ecx
mov    $0x68,%r8d
push   %rax
push   $0x6d
push   $0xb
call   1030 <printArgsNoRet@plt>
add    $0x20,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"e\00"
@.str.1 = [2 x i8] c"j\00"
@.str.2 = [2 x i8] c"o\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 @printArgsNoRet(i32 1, double 2.100000e+00, i8 signext 99, double 4.100000e+00, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 6, double 7.100000e+00, i8 signext 104, double 9.100000e+00, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 11, double 1.210000e+01, i8 signext 109, double 1.410000e+01, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"e\00"
@.str.1 = [2 x i8] c"j\00"
@.str.2 = [2 x i8] c"o\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printArgsNoRet(i32 1, double 2.100000e+00, i8 signext 99, double 4.100000e+00, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 6, double 7.100000e+00, i8 signext 104, double 9.100000e+00, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 11, double 1.210000e+01, i8 signext 109, double 1.410000e+01, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *, char *);
int /*<<< orphan*/ refresh();
void reportOutput(char filename[80]) {
  move(14, 4);
  printw("Output written to %s", filename);
  refresh();
}


x86 assembly (clang, -O0):
<reportOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xe,%edi
mov    $0x4,%esi
call   1050 <move@plt>
mov    -0x8(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reportOutput>:
push   %rbx
mov    %rdi,%rbx
mov    $0xe,%edi
mov    $0x4,%esi
call   1050 <move@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printw@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <refresh@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Output written to %s\00"
define void @reportOutput(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @move(i32 14, i32 4)
%4 = load i8*, i8** %2
%5 = call i32 @printw(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Output written to %s\00"
define void @reportOutput(i8* %0) {
%2 = tail call i32 @move(i32 14, i32 4)
%3 = tail call i32 @printw(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @refresh()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ end;

/* Variables and functions */
int send(int, int *, int, int /*<<< orphan*/);
int send_end(int fd, int id) {
  int end = 0xe67cba2d;
  if (send(fd, &end, sizeof(end), 0) == -1)
    return -1;
  if (send(fd, &id, sizeof(int), 0) == -1)
    return -1;
}


x86 assembly (clang, -O0):
<send_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xe67cba2d,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
cmp    $0xffffffff,%eax
jne    114d <send_end+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1170 <send_end+0x60>
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
cmp    $0xffffffff,%eax
jne    1170 <send_end+0x60>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_end>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,0xc(%rsp)
movl   $0xe67cba2d,0x8(%rsp)
e6
lea    0x8(%rsp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
cmp    $0xffffffff,%eax
je     114c <send_end+0x3c>
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @send_end(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %1, i32* %3
%5 = bitcast i32* %4 to i8*
store i32 -428033491, i32* %4
%6 = call i32 @send(i32 %0, i32* %4, i32 4, i32 0)
%7 = icmp eq i32 %6, -1
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 @send(i32 %0, i32* %3, i32 4, i32 0)
br label %10
10: ; preds = %8, %2
ret i32 -1
}
int CIF1() { return 0; }


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

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

LLVM IR (-O0):
define i32 @CIF1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @CIF1() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int main() {
  int a = 0;
  unsigned int b = (unsigned int)a - 256U;
  if ((unsigned int)a - 256U <= 511U) {
    a += 4;
  }
  printf("%u\n", (unsigned int)a - 256U);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x100,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x100,%eax
cmp    $0x1ff,%eax
ja     114d <main+0x3d>
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
sub    $0x100,%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -256)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void scgi_header_location_free_data(void *data) {
  if (data) {
    free(data);
    data = NULL;
  }
}


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

x86 assembly (clang, -O2):
<scgi_header_location_free_data>:
test   %rdi,%rdi
je     111a <scgi_header_location_free_data+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @scgi_header_location_free_data(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
signed int explicit_unsigned_int_to_unsigned_int(signed int src) {
  return (signed int)src;
}


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

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

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

LLVM IR (-O2):
define i32 @explicit_unsigned_int_to_unsigned_int(i32 returned %0) {
ret i32 %0
}
int isu8cont(unsigned char c) { return (c & (0x80 | 0x40)) == 0x80; }


x86 assembly (clang, -O0):
<isu8cont>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isu8cont>:
and    $0xc0,%dil
xor    %eax,%eax
cmp    $0x80,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isu8cont(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 192
%6 = icmp eq i32 %5, 128
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isu8cont(i8 zeroext %0) {
%2 = and i8 %0, -64
%3 = icmp eq i8 %2, -128
%4 = zext i1 %3 to i32
ret i32 %4
}