xunge/DecIR huggingface dataset:
reg0adrreg1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if (r0 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0adrreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movswl -0x6(%rbp),%eax
mov    -0x20(%rbp),%rcx
movswl 0x87a22(%rcx),%ecx
cmp    %ecx,%eax
jg     1142 <reg0adrreg1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <reg0adrreg1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0adrreg1>:
movswl %di,%ecx
movswl 0x87a22(%r9),%edx
xor    %eax,%eax
cmp    %edx,%ecx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @reg0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = shl i32 %0, 16
%8 = ashr exact i32 %7, 16
%9 = getelementptr inbounds i16, i16* %5, i64 277777
%10 = load i16, i16* %9
%11 = sext i16 %10 to i32
%12 = icmp sle i32 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  int i = 0;
  for (i = 0; i < 10; i++) {
    puts("Hello, world!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1151 <main+0x41>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int set_attribute(char const *, char *, int);
int online_thread(const char *path) { return set_attribute(path, "%d", 1); }


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

x86 assembly (clang, -O2):
<online_thread>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <set_attribute@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @online_thread(i8* %0) {
%2 = tail call i32 @set_attribute(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ mt_init_by_seed_array(unsigned long *, int);
int open_or_die(char *, int /*<<< orphan*/);
int /*<<< orphan*/ read_or_die(int, unsigned long *, int);
void mt_init_by_random_device(void) {
  int fd;
  unsigned long k[256];
  fd = open_or_die("/dev/random", O_RDONLY);
  read_or_die(fd, k, sizeof(unsigned long) * 256);
  close(fd);
  mt_init_by_seed_array(k, 256);
}


x86 assembly (clang, -O0):
<mt_init_by_random_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
lea    0xea5(%rip),%rdi
call   1040 <open_or_die@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x810(%rbp),%rsi
mov    $0x800,%edx
call   1060 <read_or_die@plt>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
lea    -0x810(%rbp),%rdi
mov    $0x100,%esi
call   1050 <mt_init_by_seed_array@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_init_by_random_device>:
push   %r14
push   %rbx
sub    $0x808,%rsp
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
lea    0xea6(%rip),%rdi
call   1040 <open_or_die@plt>
mov    %eax,%ebx
mov    %rsp,%r14
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x800,%edx
call   1060 <read_or_die@plt>
mov    %ebx,%edi
call   1030 <close@plt>
mov    %r14,%rdi
mov    $0x100,%esi
call   1050 <mt_init_by_seed_array@plt>
add    $0x808,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/random\00"
@O_RDONLY = global i32 0
define void @mt_init_by_random_device() {
%1 = alloca i32
%2 = alloca [256 x i64]
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open_or_die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = getelementptr inbounds [256 x i64], [256 x i64]* %2, i64 0, i64 0
%7 = call i32 @read_or_die(i32 %5, i64* %6, i32 2048)
%8 = load i32, i32* %1
%9 = call i32 @close(i32 %8)
%10 = getelementptr inbounds [256 x i64], [256 x i64]* %2, i64 0, i64 0
%11 = call i32 @mt_init_by_seed_array(i64* %10, i32 256)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/random\00"
@O_RDONLY = global i32 0
define void @mt_init_by_random_device() {
%1 = alloca [256 x i64]
%2 = bitcast [256 x i64]* %1 to i8*
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @open_or_die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = getelementptr inbounds [256 x i64], [256 x i64]* %1, i64 0, i64 0
%6 = call i32 @read_or_die(i32 %4, i64* %5, i32 2048)
%7 = call i32 @close(i32 %4)
%8 = call i32 @mt_init_by_seed_array(i64* %5, i32 256)
ret void
}
/* Variables and functions */
int comp_name(char const *, char const *);
int icomp_name(const char *a, const char *b) { return -comp_name(a, b); }


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

x86 assembly (clang, -O2):
<icomp_name>:
push   %rax
call   1030 <comp_name@plt>
neg    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @icomp_name(i8* %0, i8* %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 i32 @comp_name(i8* %5, i8* %6)
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @icomp_name(i8* %0, i8* %1) {
%3 = tail call i32 @comp_name(i8* %0, i8* %1)
%4 = sub nsw i32 0, %3
ret i32 %4
}
unsigned long x86_call_disp(void *callsite, void *target) {
  return (unsigned long)target - (unsigned long)callsite - 5;
}


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

x86 assembly (clang, -O2):
<x86_call_disp>:
sub    %rdi,%rsi
lea    -0x5(%rsi),%rax
ret

LLVM IR (-O0):
define i64 @x86_call_disp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i64
%9 = sub i64 %6, %8
%10 = sub i64 %9, 5
ret i64 %10
}

LLVM IR (-O2):
define i64 @x86_call_disp(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 -5, %4
%6 = add i64 %5, %3
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int main() {
  printf("%u\n", 1UL);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%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
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 1)
ret i32 0
}

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), i64 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_data_write(int);
void putc(int ch) { uart_data_write(ch); }


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

x86 assembly (clang, -O2):
<putc>:
jmp    1030 <uart_data_write@plt>

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

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = tail call i32 @uart_data_write(i32 %0)
ret void
}
/* Type definitions */
struct generator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ w(struct generator *, char *);
void generate_start_comment(struct generator *g) {
  w(g, "// This file was generated automatically by the Snowball to Java "
       "compiler~N");
  w(g, "~N");
}


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

x86 assembly (clang, -O2):
<generate_start_comment>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <w@plt>
lea    0xf22(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <w@plt>

LLVM IR (-O0):
%struct.generator = type { i32 }
@.str = [76 x i8] c"// This file was generated automatically by the Snowball to Java compiler~N\00"
@.str.1 = [3 x i8] c"~N\00"
define void @generate_start_comment(%struct.generator* %0) {
%2 = alloca %struct.generator*
store %struct.generator* %0, %struct.generator** %2
%3 = load %struct.generator*, %struct.generator** %2
%4 = call i32 @w(%struct.generator* %3, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%5 = load %struct.generator*, %struct.generator** %2
%6 = call i32 @w(%struct.generator* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.generator = type { i32 }
@.str = [76 x i8] c"// This file was generated automatically by the Snowball to Java compiler~N\00"
@.str.1 = [3 x i8] c"~N\00"
define void @generate_start_comment(%struct.generator* %0) {
%2 = tail call i32 @w(%struct.generator* %0, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @w(%struct.generator* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ exp2f(float);
int /*<<< orphan*/ link_failure_exp2f();
void test_exp2f(float f) {
  if (exp2f(f) != exp2f(f))
    link_failure_exp2f();
}


x86 assembly (clang, -O0):
<test_exp2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <exp2f@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <exp2f@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_exp2f+0x3c>
mov    $0x0,%al
call   1040 <link_failure_exp2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_exp2f>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <exp2f@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <exp2f@plt>
cmp    %rax,%rbx
jne    1149 <test_exp2f+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_exp2f@plt>

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

LLVM IR (-O2):
define void @test_exp2f(float %0) {
%2 = tail call i64 @exp2f(float %0)
%3 = tail call i64 @exp2f(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_exp2f()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
struct prb_table {
  int dummy;
};

/* Variables and functions */
void **prb_probe(struct prb_table *, void *);
void *prb_replace(struct prb_table *table, void *item) {
  void **p = prb_probe(table, item);
  if (p == NULL || *p == item)
    return NULL;
  else {
    void *r = *p;
    *p = item;
    return r;
  }
}


x86 assembly (clang, -O0):
<prb_replace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <prb_probe@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     114d <prb_replace+0x3d>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
jne    115a <prb_replace+0x4a>
movq   $0x0,-0x8(%rbp)
jmp    1178 <prb_replace+0x68>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prb_replace>:
push   %rbx
mov    %rsi,%rbx
call   1030 <prb_probe@plt>
test   %rax,%rax
je     112e <prb_replace+0x1e>
mov    %rax,%rcx
mov    (%rax),%rax
cmp    %rbx,%rax
je     112e <prb_replace+0x1e>
mov    %rbx,(%rcx)
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.prb_table = type { i32 }
define i8* @prb_replace(%struct.prb_table* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca %struct.prb_table*
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i8*
store %struct.prb_table* %0, %struct.prb_table** %4
store i8* %1, i8** %5
%8 = load %struct.prb_table*, %struct.prb_table** %4
%9 = load i8*, i8** %5
%10 = call i8** @prb_probe(%struct.prb_table* %8, i8* %9)
store i8** %10, i8*** %6
%11 = load i8**, i8*** %6
%12 = icmp eq i8** %11, null
br i1 %12, label %18, label %13
13: ; preds = %2
%14 = load i8**, i8*** %6
%15 = load i8*, i8** %14
%16 = load i8*, i8** %5
%17 = icmp eq i8* %15, %16
br i1 %17, label %18, label %19
18: ; preds = %13, %2
store i8* null, i8** %3
br label %25
19: ; preds = %13
%20 = load i8**, i8*** %6
%21 = load i8*, i8** %20
store i8* %21, i8** %7
%22 = load i8*, i8** %5
%23 = load i8**, i8*** %6
store i8* %22, i8** %23
%24 = load i8*, i8** %7
store i8* %24, i8** %3
br label %25
25: ; preds = %19, %18
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
%struct.prb_table = type { i32 }
define i8* @prb_replace(%struct.prb_table* %0, i8* %1) {
%3 = tail call i8** @prb_probe(%struct.prb_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
br i1 %7, label %9, label %8
8: ; preds = %5
store i8* %1, i8** %3
br label %9
9: ; preds = %2, %5, %8
%10 = phi i8* [ %6, %8 ], [ null, %5 ], [ null, %2 ]
ret i8* %10
}
int map_ob(int x) { return (x < 0 || x > 119); }


x86 assembly (clang, -O0):
<map_ob>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <map_ob+0x20>
cmpl   $0x77,-0x4(%rbp)
setg   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_ob>:
xor    %eax,%eax
cmp    $0x78,%edi
setae  %al
ret

LLVM IR (-O0):
define i32 @map_ob(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 119
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @map_ob(i32 %0) {
%2 = icmp ugt i32 %0, 119
%3 = zext i1 %2 to i32
ret i32 %3
}
float ln(float x) { return -0.00804 * x * x + 0.25533 * x + 0.5515; }


x86 assembly (clang, -O0):
<ln>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xef6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm3
movsd  0xed0(%rip),%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xeec(%rip),%xmm0
addsd  %xmm1,%xmm0
addsd  0xee8(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @ln(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double -8.040000e-03, %4
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fmul double 2.553300e-01, %9
%11 = call double @llvm.fmuladd.f64(double %5, double %7, double %10)
%12 = fadd double %11, 5.515000e-01
%13 = fptrunc double %12 to float
ret float %13
}

LLVM IR (-O2):
define float @ln(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, -8.040000e-03
%4 = fmul double %2, 2.553300e-01
%5 = tail call double @llvm.fmuladd.f64(double %3, double %2, double %4)
%6 = fadd double %5, 5.515000e-01
%7 = fptrunc double %6 to float
ret float %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int height;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
void set_XGraphicsExposeEvent_height(void *_p, int _v) {
  ((XGraphicsExposeEvent *)_p)->height = (int)_v;
}


x86 assembly (clang, -O0):
<set_XGraphicsExposeEvent_height>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XGraphicsExposeEvent_height>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XGraphicsExposeEvent_height(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XGraphicsExposeEvent_height(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_info_member(char *pcInfo_member) {
  if (pcInfo_member != NULL) {
    free(pcInfo_member);
    pcInfo_member = NULL;
  }
}


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

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

LLVM IR (-O0):
define void @free_info_member(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 @free_info_member(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
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRB6_set(void) { return U_WMRCORENONE_set("U_WMRB6"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRB6\00"
define i8* @U_WMRB6_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRB6\00"
define i8* @U_WMRB6_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int lock_component_free() {}


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

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

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

LLVM IR (-O2):
define i32 @lock_component_free() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x89() {
  Assert_real((isodigit(137) == 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_isodigit.c",
              690, ("isodigit should be 0 for 0x89"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x89>:
push   %rax
mov    $0x89,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2b2,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x89\00"
define void @t_isodigit_0x89() {
%1 = call i64 @isodigit(i32 137)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 690, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x89\00"
define void @t_isodigit_0x89() {
%1 = tail call i64 @isodigit(i32 137)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 690, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void wifi_evt_tcpip_udp_data(const struct wifi_msg_tcpip_udp_data_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_tcpip_udp_data_evt_t = type opaque
define void @wifi_evt_tcpip_udp_data(%struct.wifi_msg_tcpip_udp_data_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__5__Control__clearPendingInterrupt();
void Msp430AlarmC__1__Msp430TimerControl__clearPendingInterrupt(void) {
  Msp430TimerCapComP__5__Control__clearPendingInterrupt();
}


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

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

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

LLVM IR (-O2):
define void @Msp430AlarmC__1__Msp430TimerControl__clearPendingInterrupt() {
%1 = tail call i32 (...) @Msp430TimerCapComP__5__Control__clearPendingInterrupt()
ret void
}
/* Variables and functions */
int client(char *, int, char *, char *, char *, char *);
int client2(int argc, char *argv[]) {
  return client("Client2", 2002, "Hello2", "Hello4", "Bonjour2", "Bonjour4");
}


x86 assembly (clang, -O0):
<client2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x7d2,%esi
lea    0xed6(%rip),%rdx
lea    0xed6(%rip),%rcx
lea    0xed6(%rip),%r8
lea    0xed8(%rip),%r9
call   1030 <client@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<client2>:
lea    0xee9(%rip),%rdi
lea    0xeea(%rip),%rdx
lea    0xeea(%rip),%rcx
lea    0xeea(%rip),%r8
lea    0xeec(%rip),%r9
mov    $0x7d2,%esi
jmp    1030 <client@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Client2\00"
@.str.1 = [7 x i8] c"Hello2\00"
@.str.2 = [7 x i8] c"Hello4\00"
@.str.3 = [9 x i8] c"Bonjour2\00"
@.str.4 = [9 x i8] c"Bonjour4\00"
define i32 @client2(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @client(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2002, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
ret i32 %5
}

LLVM IR (-O2):
@.str = [8 x i8] c"Client2\00"
@.str.1 = [7 x i8] c"Hello2\00"
@.str.2 = [7 x i8] c"Hello4\00"
@.str.3 = [9 x i8] c"Bonjour2\00"
@.str.4 = [9 x i8] c"Bonjour4\00"
define i32 @client2(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @client(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2002, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
scalar_t__ doubleToRawLongBits(double);
double const longBitsToDouble(scalar_t__);
__attribute__((always_)) const double toward0(double d) {
  return d == 0 ? 0 : longBitsToDouble(doubleToRawLongBits(d) - 1);
}


x86 assembly (clang, -O0):
<toward0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1152 <toward0+0x32>
jp     1152 <toward0+0x32>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    116d <toward0+0x4d>
movsd  -0x8(%rbp),%xmm0
call   1040 <doubleToRawLongBits@plt>
mov    %rax,%rdi
sub    $0x1,%rdi
call   1030 <longBitsToDouble@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toward0>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1131 <toward0+0x11>
jp     1131 <toward0+0x11>
xorpd  %xmm0,%xmm0
ret
push   %rax
call   1040 <doubleToRawLongBits@plt>
lea    -0x1(%rax),%rdi
pop    %rax
jmp    1030 <longBitsToDouble@plt>

LLVM IR (-O0):
define double @toward0(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load double, double* %2
%8 = call i64 @doubleToRawLongBits(double %7)
%9 = sub nsw i64 %8, 1
%10 = call double @longBitsToDouble(i64 %9)
br label %11
11: ; preds = %6, %5
%12 = phi double [ 0.000000e+00, %5 ], [ %10, %6 ]
ret double %12
}

LLVM IR (-O2):
define double @toward0(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @doubleToRawLongBits(double %0)
%5 = add nsw i64 %4, -1
%6 = tail call double @longBitsToDouble(i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ 0.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xe4() {
  Assert_real((isdigit(228) == 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_isdigit.c",
              1145, ("isdigit should be 0 for 0xe4"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xe4>:
push   %rax
mov    $0xe4,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x479,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xe4\00"
define void @t_isdigit_0xe4() {
%1 = call i64 @isdigit(i32 228)
%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 1145, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xe4\00"
define void @t_isdigit_0xe4() {
%1 = tail call i64 @isdigit(i32 228)
%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 1145, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void f1(int a) {
  if (a)
    ;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1116 <f1+0x16>
jmp    1116 <f1+0x16>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f1(i32 %0) {
ret void
}
int CalculateDaysBetweenGFunc(int month) {
  return (month <= 2) ? month + 13 : month + 1;
}


x86 assembly (clang, -O0):
<CalculateDaysBetweenGFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jg     111f <CalculateDaysBetweenGFunc+0x1f>
mov    -0x4(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x8(%rbp)
jmp    1128 <CalculateDaysBetweenGFunc+0x28>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalculateDaysBetweenGFunc>:
lea    0x1(%rdi),%ecx
lea    0xd(%rdi),%eax
cmp    $0x3,%edi
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @CalculateDaysBetweenGFunc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 2
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 13
br label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
br label %11
11: ; preds = %8, %5
%12 = phi i32 [ %7, %5 ], [ %10, %8 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @CalculateDaysBetweenGFunc(i32 %0) {
%2 = icmp slt i32 %0, 3
%3 = select i1 %2, i32 13, i32 1
%4 = add nsw i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int main() {
  char *p = NULL;
  *p = 5;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x5,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* null, i8** %2
%3 = load i8*, i8** %2
store i8 5, i8* %3
ret i32 0
}

LLVM IR (-O2):
void RTSemEventCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemEventCreate() {
ret void
}
void ADC0_IRQ_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ADC0_IRQ_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *);
void main(void) { printk("Hello Kernel World!\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"Hello Kernel World!\0A\00"
define void @main() {
%1 = call i32 @printk(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Hello Kernel World!\0A\00"
define void @main() {
%1 = tail call i32 @printk(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int u_int8_t;
typedef int u_int16_t;

/* Variables and functions */
int /*<<< orphan*/ read(int, int *, int);
u_int16_t be_read16(int fd) {
  u_int16_t word;
  u_int8_t buf[2];
  read(fd, buf, 2);
  word = (buf[0] << 8) | buf[1];
  return word;
}


x86 assembly (clang, -O0):
<be_read16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x2,%edx
call   1030 <read@plt>
mov    -0x10(%rbp),%eax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_read16>:
push   %rax
mov    %rsp,%rsi
mov    $0x2,%edx
call   1030 <read@plt>
mov    (%rsp),%eax
shl    $0x8,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @be_read16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2 x i32]
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%7 = call i32 @read(i32 %5, i32* %6, i32 2)
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%12 = load i32, i32* %11
%13 = or i32 %10, %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @be_read16(i32 %0) {
%2 = alloca [2 x i32]
%3 = bitcast [2 x i32]* %2 to i8*
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%5 = call i32 @read(i32 %0, i32* %4, i32 2)
%6 = load i32, i32* %4
%7 = shl i32 %6, 8
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%9 = load i32, i32* %8
%10 = or i32 %7, %9
ret i32 %10
}
int intcmp(const void *a, const void *b) { return (*(int *)a - *(int *)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(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @intcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by(int /*<<< orphan*/);
void or_by(uint32_t x) {
  by(x);
  or ();
}


x86 assembly (clang, -O0):
<or_by>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <by@plt>
mov    $0x0,%al
call   1040 <or@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<or_by>:
push   %rax
call   1030 <by@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <or@plt>

LLVM IR (-O0):
define void @or_by(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by(i32 %3)
%5 = call i32 (...) @or()
ret void
}

LLVM IR (-O2):
define void @or_by(i32 %0) {
%2 = tail call i32 @by(i32 %0)
%3 = tail call i32 (...) @or()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
void accept_info_request(u_int32_t src, u_int32_t dst, u_char *p, int datalen) {
}


x86 assembly (clang, -O0):
<accept_info_request>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @accept_info_request(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @accept_info_request(i32 %0, i32 %1, i32* nocapture %2, i32 %3) {
ret void
}
int __attribute__((no)) iaddv(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<iaddv>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @iaddv(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
scalar_t__ get_preuse_bit(int const);
int above_free(const int *mem, int current_part) {
  if (get_preuse_bit(mem[current_part]) || (current_part == 4)) {
    return 0;
  }
  return (current_part - mem[current_part - 1]);
}


x86 assembly (clang, -O0):
<above_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <get_preuse_bit@plt>
cmp    $0x0,%rax
jne    1143 <above_free+0x33>
cmpl   $0x4,-0x14(%rbp)
jne    114f <above_free+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    1165 <above_free+0x55>
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<above_free>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movslq %esi,%rbx
mov    (%rdi,%rbx,4),%edi
call   1030 <get_preuse_bit@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x4,%ebx
je     113a <above_free+0x2a>
test   %rcx,%rcx
jne    113a <above_free+0x2a>
mov    -0x4(%r14,%rbx,4),%eax
sub    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @above_free(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32*, i32** %4
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = load i32, i32* %9
%11 = call i64 @get_preuse_bit(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %2
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, 4
br i1 %15, label %16, label %17
16: ; preds = %13, %2
store i32 0, i32* %3
br label %26
17: ; preds = %13
%18 = load i32, i32* %5
%19 = load i32*, i32** %4
%20 = load i32, i32* %5
%21 = sub nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %19, i64 %22
%24 = load i32, i32* %23
%25 = sub nsw i32 %18, %24
store i32 %25, i32* %3
br label %26
26: ; preds = %17, %16
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @above_free(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = tail call i64 @get_preuse_bit(i32 %5)
%7 = icmp ne i64 %6, 0
%8 = icmp eq i32 %1, 4
%9 = or i1 %8, %7
br i1 %9, label %16, label %10
10: ; preds = %2
%11 = add nsw i32 %1, -1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = sub nsw i32 %1, %14
br label %16
16: ; preds = %2, %10
%17 = phi i32 [ %15, %10 ], [ 0, %2 ]
ret i32 %17
}
void function() {
  unsigned int i, j;
  double y;
  for (i = 0; i < 1000; i++)
    for (j = 0; j < 1000; j++)
      y++;
}


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jae    115f <function+0x5f>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jae    114c <function+0x4c>
movsd  0xecc(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <function+0x1f>
jmp    1151 <function+0x51>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <function+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @function() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
br label %4
4: ; preds = %18, %0
%5 = load i32, i32* %1
%6 = icmp ult i32 %5, 1000
br i1 %6, label %7, label %21
7: ; preds = %4
store i32 0, i32* %2
br label %8
8: ; preds = %14, %7
%9 = load i32, i32* %2
%10 = icmp ult i32 %9, 1000
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load double, double* %3
%13 = fadd double %12, 1.000000e+00
store double %13, double* %3
br label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = add i32 %15, 1
store i32 %16, i32* %2
br label %8
17: ; preds = %8
br label %18
18: ; preds = %17
%19 = load i32, i32* %1
%20 = add i32 %19, 1
store i32 %20, i32* %1
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @function() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_primes(int);
int /*<<< orphan*/ conjecture(int, int);
int main(void) {
  check_primes(1000);
  conjecture(2, 2000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3e8,%edi
call   1030 <check_primes@plt>
mov    $0x2,%edi
mov    $0x7d0,%esi
call   1040 <conjecture@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3e8,%edi
call   1030 <check_primes@plt>
mov    $0x2,%edi
mov    $0x7d0,%esi
call   1040 <conjecture@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @check_primes(i32 1000)
%3 = call i32 @conjecture(i32 2, i32 2000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @check_primes(i32 1000)
%2 = tail call i32 @conjecture(i32 2, i32 2000)
ret i32 0
}