xunge/DecIR huggingface dataset:
/* Type definitions */
struct hlist_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __hlist_del(struct hlist_node *);
int /*<<< orphan*/ hlist_unhashed(struct hlist_node *);
int /*<<< orphan*/ init_hlist_node(struct hlist_node *);
void hlist_del_init(struct hlist_node *n) {
  if (!hlist_unhashed(n)) {
    __hlist_del(n);
    init_hlist_node(n);
  }
}


x86 assembly (clang, -O0):
<hlist_del_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hlist_unhashed@plt>
cmp    $0x0,%eax
jne    1160 <hlist_del_init+0x30>
mov    -0x8(%rbp),%rdi
call   1050 <__hlist_del@plt>
mov    -0x8(%rbp),%rdi
call   1040 <init_hlist_node@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hlist_del_init>:
push   %rbx
mov    %rdi,%rbx
call   1030 <hlist_unhashed@plt>
test   %eax,%eax
je     113f <hlist_del_init+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
call   1050 <__hlist_del@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <init_hlist_node@plt>

LLVM IR (-O0):
%struct.hlist_node = type { i32 }
define void @hlist_del_init(%struct.hlist_node* %0) {
%2 = alloca %struct.hlist_node*
store %struct.hlist_node* %0, %struct.hlist_node** %2
%3 = load %struct.hlist_node*, %struct.hlist_node** %2
%4 = call i32 @hlist_unhashed(%struct.hlist_node* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load %struct.hlist_node*, %struct.hlist_node** %2
%8 = call i32 @__hlist_del(%struct.hlist_node* %7)
%9 = load %struct.hlist_node*, %struct.hlist_node** %2
%10 = call i32 @init_hlist_node(%struct.hlist_node* %9)
br label %11
11: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.hlist_node = type { i32 }
define void @hlist_del_init(%struct.hlist_node* %0) {
%2 = tail call i32 @hlist_unhashed(%struct.hlist_node* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @__hlist_del(%struct.hlist_node* %0)
%6 = tail call i32 @init_hlist_node(%struct.hlist_node* %0)
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
double sqrt(double const);
double bot_vector_magnitude_2d(const double v[2]) {
  return sqrt(v[0] * v[0] + v[1] * v[1]);
}


x86 assembly (clang, -O0):
<bot_vector_magnitude_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_vector_magnitude_2d>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1134 <bot_vector_magnitude_2d+0x24>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @bot_vector_magnitude_2d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = call double @sqrt(double %16)
ret double %17
}

LLVM IR (-O2):
define double @bot_vector_magnitude_2d(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = tail call double @sqrt(double %6)
ret double %7
}
/* Type definitions */
struct Round {
  int dummy;
};

/* Variables and functions */
int findAllowedBid(struct Round *, int, int);
int round_findNextAllowedBid(struct Round *round, int currentBid) {
  return findAllowedBid(round, currentBid, 1);
}


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

x86 assembly (clang, -O2):
<round_findNextAllowedBid>:
mov    $0x1,%edx
jmp    1030 <findAllowedBid@plt>

LLVM IR (-O0):
%struct.Round = type { i32 }
define i32 @round_findNextAllowedBid(%struct.Round* %0, i32 %1) {
%3 = alloca %struct.Round*
%4 = alloca i32
store %struct.Round* %0, %struct.Round** %3
store i32 %1, i32* %4
%5 = load %struct.Round*, %struct.Round** %3
%6 = load i32, i32* %4
%7 = call i32 @findAllowedBid(%struct.Round* %5, i32 %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
%struct.Round = type { i32 }
define i32 @round_findNextAllowedBid(%struct.Round* %0, i32 %1) {
%3 = tail call i32 @findAllowedBid(%struct.Round* %0, i32 %1, i32 1)
ret i32 %3
}
/* Type definitions */
struct mat4 {
  int dummy;
};
struct mat2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat2_assign_mat4(float *, float *);
__attribute__((always_)) struct mat2 *psmat2_assign_mat4(struct mat2 *result,
                                                         struct mat4 *m) {
  mat2_assign_mat4((float *)result, (float *)m);
  return result;
}


x86 assembly (clang, -O0):
<psmat2_assign_mat4>:
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 <mat2_assign_mat4@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psmat2_assign_mat4>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat2_assign_mat4@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat2 = type { i32 }
%struct.mat4 = type { i32 }
define %struct.mat2* @psmat2_assign_mat4(%struct.mat2* %0, %struct.mat4* %1) {
%3 = alloca %struct.mat2*
%4 = alloca %struct.mat4*
store %struct.mat2* %0, %struct.mat2** %3
store %struct.mat4* %1, %struct.mat4** %4
%5 = load %struct.mat2*, %struct.mat2** %3
%6 = bitcast %struct.mat2* %5 to float*
%7 = load %struct.mat4*, %struct.mat4** %4
%8 = bitcast %struct.mat4* %7 to float*
%9 = call i32 @mat2_assign_mat4(float* %6, float* %8)
%10 = load %struct.mat2*, %struct.mat2** %3
ret %struct.mat2* %10
}

LLVM IR (-O2):
%struct.mat2 = type { i32 }
%struct.mat4 = type { i32 }
define %struct.mat2* @psmat2_assign_mat4(%struct.mat2* returned %0, %struct.mat4* %1) {
%3 = bitcast %struct.mat2* %0 to float*
%4 = bitcast %struct.mat4* %1 to float*
%5 = tail call i32 @mat2_assign_mat4(float* %3, float* %4)
ret %struct.mat2* %0
}
/* Variables and functions */
int /*<<< orphan*/ search(int, int /*<<< orphan*/);
doswbrk() { search(1, 0); }


x86 assembly (clang, -O0):
<doswbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <search@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doswbrk>:
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <search@plt>

LLVM IR (-O0):
define i32 @doswbrk() {
%1 = alloca i32
%2 = call i32 @search(i32 1, i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @doswbrk() {
%1 = tail call i32 @search(i32 1, i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int);
void t_iscntrl_0x14() {
  Assert_real((iscntrl(20)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              105, ("iscntrl should be 1 for 0x14"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x14>:
push   %rax
mov    $0x14,%edi
call   1030 <iscntrl@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x69,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x14\00"
define void @t_iscntrl_0x14() {
%1 = call i32 @iscntrl(i32 20)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 105, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x14\00"
define void @t_iscntrl_0x14() {
%1 = tail call i32 @iscntrl(i32 20)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void sigpipe(int num) {}


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

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

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

LLVM IR (-O2):
define void @sigpipe(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WheelMouse248(long);
void wheelmouse(long wl) { WheelMouse248(wl); }


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

x86 assembly (clang, -O2):
<wheelmouse>:
jmp    1030 <WheelMouse248@plt>

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

LLVM IR (-O2):
define void @wheelmouse(i64 %0) {
%2 = tail call i32 @WheelMouse248(i64 %0)
ret void
}
void show_info_b() {
  printf("%s %d: %s() hello world\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/gcc/"
         "combine-object/b.c",
         21, __func__);
}


x86 assembly (clang, -O0):
<show_info_b>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef7(%rip),%rsi
mov    $0x15,%edx
lea    0xf83(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_info_b>:
lea    0xee9(%rip),%rdi
lea    0xefb(%rip),%rsi
lea    0xf8c(%rip),%rcx
mov    $0x15,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"%s %d: %s() hello world\0A\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/gcc/combine-object/b.c\00"
@__func__.show_info_b = [12 x i8] c"show_info_b\00"
define void @show_info_b() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.show_info_b, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"%s %d: %s() hello world\0A\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/gcc/combine-object/b.c\00"
@__func__.show_info_b = [12 x i8] c"show_info_b\00"
define void @show_info_b() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.show_info_b, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
double XRotVersion(char *str, int n) {
  if (str != NULL)
    strncpy(str, "xvertext routines Copyright (c) 1993 Alan Richardson", n);
  return 5.0;
}


x86 assembly (clang, -O0):
<XRotVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113d <XRotVersion+0x2d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed0(%rip),%rsi
call   1030 <strncpy@plt>
movsd  0xebb(%rip),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XRotVersion>:
push   %rax
test   %rdi,%rdi
je     1124 <XRotVersion+0x14>
mov    %esi,%edx
lea    0xee9(%rip),%rsi
call   1030 <strncpy@plt>
movsd  0xed4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [53 x i8] c"xvertext routines Copyright (c) 1993 Alan Richardson\00"
define double @XRotVersion(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @strncpy(i8* %8, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %2
ret double 5.000000e+00
}

LLVM IR (-O2):
@.str = [53 x i8] c"xvertext routines Copyright (c) 1993 Alan Richardson\00"
define double @XRotVersion(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @strncpy(i8* %0, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %6
6: ; preds = %4, %2
ret double 5.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

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


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

x86 assembly (clang, -O2):
<handler>:
mov    %rsi,%rdi
jmp    1030 <print_siginfo@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 = load i32*, i32** %5
%8 = call i32 @print_siginfo(i32* %7)
ret void
}

LLVM IR (-O2):
define void @handler(i32 %0, i32* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @print_siginfo(i32* %1)
ret void
}
void init_ports(void) {
  (*(volatile unsigned long *)(0xE002C000 + 0x00)) = 0x30C51555;
  (*(volatile unsigned long *)(0xE002C000 + 0x04)) = 0x150406A8;
  (*(volatile unsigned long *)(0xE002C000 + 0x14)) = 0x00000004;
  (*(volatile unsigned long *)(0xE0028000 + 0x08)) = 0x0030B480;
  (*(volatile unsigned long *)(0xE0028000 + 0x04)) = (1 << 7) | (1 << 11);
  (*(volatile unsigned long *)(0xE0028000 + 0x18)) = 0x03030000;
  (*(volatile unsigned long *)(0xE0028000 + 0x14)) = ((1 << 24) | (1 << 16));
}


x86 assembly (clang, -O0):
<init_ports>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe002c000,%eax
movq   $0x30c51555,(%rax)
mov    $0xe002c004,%eax
movq   $0x150406a8,(%rax)
mov    $0xe002c014,%eax
movq   $0x4,(%rax)
mov    $0xe0028008,%eax
movq   $0x30b480,(%rax)
mov    $0xe0028004,%eax
movq   $0x880,(%rax)
mov    $0xe0028018,%eax
movq   $0x3030000,(%rax)
mov    $0xe0028014,%eax
movq   $0x1010000,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_ports>:
mov    $0xe0028004,%eax
movq   $0x30c51555,0x3ffc(%rax)
55 15 c5 30
movq   $0x150406a8,0x4000(%rax)
a8 06 04 15
movq   $0x4,0x4010(%rax)
movq   $0x30b480,0x4(%rax)
movq   $0x880,(%rax)
movq   $0x3030000,0x14(%rax)
03
movq   $0x1010000,0x10(%rax)
01
ret

LLVM IR (-O0):
define void @init_ports() {
store volatile i64 818222421, i64* inttoptr (i64 3758276608 to i64*)
store volatile i64 352585384, i64* inttoptr (i64 3758276612 to i64*)
store volatile i64 4, i64* inttoptr (i64 3758276628 to i64*)
store volatile i64 3191936, i64* inttoptr (i64 3758260232 to i64*)
store volatile i64 2176, i64* inttoptr (i64 3758260228 to i64*)
store volatile i64 50528256, i64* inttoptr (i64 3758260248 to i64*)
store volatile i64 16842752, i64* inttoptr (i64 3758260244 to i64*)
ret void
}

LLVM IR (-O2):
define void @init_ports() {
store volatile i64 818222421, i64* inttoptr (i64 3758276608 to i64*)
store volatile i64 352585384, i64* inttoptr (i64 3758276612 to i64*)
store volatile i64 4, i64* inttoptr (i64 3758276628 to i64*)
store volatile i64 3191936, i64* inttoptr (i64 3758260232 to i64*)
store volatile i64 2176, i64* inttoptr (i64 3758260228 to i64*)
store volatile i64 50528256, i64* inttoptr (i64 3758260248 to i64*)
store volatile i64 16842752, i64* inttoptr (i64 3758260244 to i64*)
ret void
}
int verifyBlock(char *p, char val, int len) {
  while (len--) {
    if (*p++ != val) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<verifyBlock>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     1154 <verifyBlock+0x54>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
je     114f <verifyBlock+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    115b <verifyBlock+0x5b>
jmp    1111 <verifyBlock+0x11>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verifyBlock>:
mov    %edx,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    %ecx,%eax
je     1124 <verifyBlock+0x24>
lea    0x1(%rcx),%rdx
cmp    %sil,(%rdi,%rcx,1)
mov    %rdx,%rcx
je     1110 <verifyBlock+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @verifyBlock(i8* nocapture %0, i8 signext %1, i32 %2) {
br label %4
4: ; preds = %8, %3
%5 = phi i8* [ %0, %3 ], [ %10, %8 ]
%6 = phi i32 [ %2, %3 ], [ %9, %8 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = add nsw i32 %6, -1
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %5
%12 = icmp eq i8 %11, %1
br i1 %12, label %4, label %13
13: ; preds = %4, %8
%14 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_number(int);
int /*<<< orphan*/ output_with_tab(char *);
void gnargs(int d) {
  output_with_tab("mvi \ta,");
  output_number(d);
  newline();
}


x86 assembly (clang, -O0):
<gnargs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1040 <output_with_tab@plt>
mov    -0x4(%rbp),%edi
call   1050 <output_number@plt>
mov    $0x0,%al
call   1030 <newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnargs>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <output_with_tab@plt>
mov    %ebx,%edi
call   1050 <output_number@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"mvi \09a,\00"
define void @gnargs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @output_with_tab(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @output_number(i32 %4)
%6 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"mvi \09a,\00"
define void @gnargs(i32 %0) {
%2 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @output_number(i32 %0)
%4 = tail call i32 (...) @newline()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ot(char *);
defword() { ot(".word\t"); }


x86 assembly (clang, -O0):
<defword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <ot@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c".word\09\00"
define i32 @defword() {
%1 = alloca i32
%2 = call i32 @ot(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [7 x i8] c".word\09\00"
define i32 @defword() {
%1 = tail call i32 @ot(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void f(int *p) { *p = 2; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movl   $0x2,(%rdi)
ret

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

LLVM IR (-O2):
define void @f(i32* nocapture writeonly %0) {
store i32 2, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float calcoloBmi(unsigned int peso, float altezza) {
  float bmi;
  bmi = (peso / (altezza * altezza));
  printf("%f", bmi);
  return bmi;
}


x86 assembly (clang, -O0):
<calcoloBmi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcoloBmi>:
push   %rax
mov    %edi,%eax
cvtsi2ss %rax,%xmm1
mulss  %xmm0,%xmm0
divss  %xmm0,%xmm1
movss  %xmm1,0x4(%rsp)
lea    0xed3(%rip),%rdi
movaps %xmm1,%xmm0
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define float @calcoloBmi(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
%6 = load i32, i32* %3
%7 = uitofp i32 %6 to float
%8 = load float, float* %4
%9 = load float, float* %4
%10 = fmul float %8, %9
%11 = fdiv float %7, %10
store float %11, float* %5
%12 = load float, float* %5
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %12)
%14 = load float, float* %5
ret float %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define float @calcoloBmi(i32 %0, float %1) {
%3 = uitofp i32 %0 to float
%4 = fmul float %1, %1
%5 = fdiv float %3, %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %5)
ret float %5
}
/* Variables and functions */
int ez_net_resolve_generic(char *, char *, size_t, int);
int ez_net_resolve_host_ip(char *host, char *ipbuf, size_t ipbuf_len) {
  return ez_net_resolve_generic(host, ipbuf, ipbuf_len, 1);
}


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

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

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

LLVM IR (-O2):
define i32 @ez_net_resolve_host_ip(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @ez_net_resolve_generic(i8* %0, i8* %1, i64 %2, i32 1)
ret i32 %4
}
/* Variables and functions */
bool UT8_DIV_OVFCHK(unsigned char a, unsigned char b) {
  (void)(a);
  return !b;
}


x86 assembly (clang, -O0):
<UT8_DIV_OVFCHK>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UT8_DIV_OVFCHK>:
xor    %eax,%eax
test   %esi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @UT8_DIV_OVFCHK(i8 zeroext %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 = icmp ne i8 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @UT8_DIV_OVFCHK(i8 zeroext %0, i8 zeroext %1) {
%3 = icmp eq i8 %1, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ ENOSYS;
scalar_t__ create_module(int /*<<< orphan*/ *, int /*<<< orphan*/);
scalar_t__ errno;
int /*<<< orphan*/ exec_old(char const *, char **);
void try_old_version(const char *progname, char *argv[]) {
  errno = 0;
  if (create_module(NULL, 0) >= 0 || errno != ENOSYS)
    exec_old(progname, argv);
}


x86 assembly (clang, -O0):
<try_old_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea1(%rip),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1040 <create_module@plt>
cmp    $0x0,%rax
jge    116d <try_old_version+0x4d>
mov    0x2e7e(%rip),%rax
mov    (%rax),%rax
mov    0x2e84(%rip),%rcx
cmp    (%rcx),%rax
je     117a <try_old_version+0x5a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <exec_old@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_old_version>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ea6(%rip),%r15
movq   $0x0,(%r15)
xor    %edi,%edi
xor    %esi,%esi
call   1040 <create_module@plt>
test   %rax,%rax
jns    115c <try_old_version+0x3c>
mov    (%r15),%rax
mov    0x2e97(%rip),%rcx
cmp    (%rcx),%rax
jne    115c <try_old_version+0x3c>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <exec_old@plt>

LLVM IR (-O0):
@errno = global i64 0
@ENOSYS = global i64 0
define void @try_old_version(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
store i64 0, i64* @errno
%5 = call i64 @create_module(i32* null, i32 0)
%6 = icmp sge i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i64, i64* @errno
%9 = load i64, i64* @ENOSYS
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %7, %2
%12 = load i8*, i8** %3
%13 = load i8**, i8*** %4
%14 = call i32 @exec_old(i8* %12, i8** %13)
br label %15
15: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@ENOSYS = global i64 0
define void @try_old_version(i8* %0, i8** %1) {
store i64 0, i64* @errno
%3 = tail call i64 @create_module(i32* null, i32 0)
%4 = icmp sgt i64 %3, -1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i64, i64* @errno
%7 = load i64, i64* @ENOSYS
%8 = icmp eq i64 %6, %7
br i1 %8, label %11, label %9
9: ; preds = %5, %2
%10 = tail call i32 @exec_old(i8* %0, i8** %1)
br label %11
11: ; preds = %9, %5
ret void
}
/* Variables and functions */
char *_dl_malloc(int);
int /*<<< orphan*/ _dl_strcpy(char *, char const *);
int _dl_strlen(char const *);
char *_dl_strdup(const char *string) {
  char *retval;
  int len;
  len = _dl_strlen(string);
  retval = _dl_malloc(len + 1);
  _dl_strcpy(retval, string);
  return retval;
}


x86 assembly (clang, -O0):
<_dl_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_dl_strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1050 <_dl_malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <_dl_strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dl_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <_dl_strlen@plt>
lea    0x1(%rax),%edi
call   1050 <_dl_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <_dl_strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @_dl_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @_dl_strlen(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = call i8* @_dl_malloc(i32 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @_dl_strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @_dl_strdup(i8* %0) {
%2 = tail call i32 @_dl_strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @_dl_malloc(i32 %3)
%5 = tail call i32 @_dl_strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int get_lastlog_fd();
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
void setllent(void) {
  int ll_fd;
  if ((ll_fd = get_lastlog_fd()) != -1) {
    lseek(ll_fd, 0, SEEK_SET);
  }
}


x86 assembly (clang, -O0):
<setllent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <get_lastlog_fd@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xffffffff,%eax
je     114e <setllent+0x2e>
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setllent>:
push   %rax
xor    %eax,%eax
call   1040 <get_lastlog_fd@plt>
cmp    $0xffffffff,%eax
je     1140 <setllent+0x20>
mov    0x2eac(%rip),%rcx
mov    (%rcx),%edx
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <lseek@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@SEEK_SET = global i32 0
define void @setllent() {
%1 = tail call i32 (...) @get_lastlog_fd()
%2 = icmp eq i32 %1, -1
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @lseek(i32 %1, i32 0, i32 %4)
br label %6
6: ; preds = %3, %0
ret void
}
void outb(short port, char val) {
  __asm__ volatile("outb %0,%1" : : "a"(val), "d"(port));
  return;
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i16 signext %0, i8 signext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @outb(i16 signext %0, i8 signext %1) {
tail call void asm sideeffect "outb $0,$1", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char **, char **);
int main(int argn, char **argv, char **envp) {
  argv[0] = "/usr/lib/cgi-bin/cricket/grapher-real.cgi";
  execve("/usr/lib/cgi-bin/cricket/grapher-real.cgi", argv, envp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
lea    0xed2(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec0(%rip),%rdi
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [42 x i8] c"/usr/lib/cgi-bin/cricket/grapher-real.cgi\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8** %8
%9 = load i8**, i8*** %5
%10 = load i8**, i8*** %6
%11 = call i32 @execve(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8** %9, i8** %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"/usr/lib/cgi-bin/cricket/grapher-real.cgi\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8** %1
%4 = tail call i32 @execve(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8** %1, i8** %2)
ret i32 0
}
void eth_int_enable(void) {
  *((volatile unsigned long *)(0x92000000 + 0x08)) =
      0x00000001 | 0x00000002 | 0x00000004 | 0x00000008 | 0x00000010 |
      0x00000020 | 0x00000040;
}


x86 assembly (clang, -O0):
<eth_int_enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x92000008,%eax
movq   $0x7f,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<eth_int_enable>:
mov    $0x92000008,%eax
movq   $0x7f,(%rax)
ret

LLVM IR (-O0):
define void @eth_int_enable() {
store volatile i64 127, i64* inttoptr (i64 2449473544 to i64*)
ret void
}

LLVM IR (-O2):
define void @eth_int_enable() {
store volatile i64 127, i64* inttoptr (i64 2449473544 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, char *, int);
void diesig(void) {
  write(2, "kill: unknown signal\n", 21);
  exit(1);
}


x86 assembly (clang, -O0):
<diesig>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xed0(%rip),%rsi
mov    $0x15,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<diesig>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x2,%edi
mov    $0x15,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"kill: unknown signal\0A\00"
define void @diesig() {
%1 = call i32 @write(i32 2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 21)
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"kill: unknown signal\0A\00"
define void @diesig() {
%1 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 21)
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ nrerror(char *);
unsigned long *lvector(long nl, long nh) {
  unsigned long *v;
  v = (unsigned long *)malloc((size_t)((nh - nl + 1 + 0) * sizeof(long)));
  if (!v)
    nrerror("allocation failure in lvector()");
  return v - nl + 0;
}


x86 assembly (clang, -O0):
<lvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
add    $0x0,%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1164 <lvector+0x44>
lea    0xea1(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x8(,%rsi,8),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <lvector+0x2b>
lea    0xeba(%rip),%rdi
call   1030 <nrerror@plt>
shl    $0x3,%r14
sub    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in lvector()\00"
define i64* @lvector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = shl i64 %3, 3
%5 = add i64 %4, 8
%6 = tail call i64 @malloc(i64 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to i64*
%12 = sub i64 0, %0
%13 = getelementptr inbounds i64, i64* %11, i64 %12
ret i64* %13
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void lzpt_free_toc(unsigned char *p_toc, size_t toc_nentries) {
  if (p_toc)
    free((void *)p_toc);
}


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

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

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

LLVM IR (-O2):
define void @lzpt_free_toc(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %4, %2
ret void
}
double multiplex_2_extended_types_s10_decode(float value) {
  return ((double)value);
}


x86 assembly (clang, -O0):
<multiplex_2_extended_types_s10_decode>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiplex_2_extended_types_s10_decode>:
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @multiplex_2_extended_types_s10_decode(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
ret double %4
}

LLVM IR (-O2):
define double @multiplex_2_extended_types_s10_decode(float %0) {
%2 = fpext float %0 to double
ret double %2
}
/* Variables and functions */
long long strlen(char const *);
extern long long str_len(const char *s) { return strlen(s); }


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

x86 assembly (clang, -O2):
<str_len>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i64 @str_len(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %2
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/hashtable.c",
                        284));
  return word_ans;
}


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

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

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

LLVM IR (-O2):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/hashtable.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_help() {
  puts("f <adrs> <len> <val>: fill memory\r\n");
  puts("d <adrs> [<len>]    : display memory\r\n");
  puts("x <adrs>            : xmodem load\r\n");
  puts("r                   : readioreg\r\n");
  puts("w                   : writeioreg\r\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf18(%rip),%rdi
call   1030 <puts@plt>
lea    0xf30(%rip),%rdi
call   1030 <puts@plt>
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf33(%rip),%rdi
call   1030 <puts@plt>
lea    0xf49(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"f <adrs> <len> <val>: fill memory\0D\0A\00"
@.str.1 = [39 x i8] c"d <adrs> [<len>] : display memory\0D\0A\00"
@.str.2 = [36 x i8] c"x <adrs> : xmodem load\0D\0A\00"
@.str.3 = [34 x i8] c"r : readioreg\0D\0A\00"
@.str.4 = [35 x i8] c"w : writeioreg\0D\0A\00"
define void @print_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"f <adrs> <len> <val>: fill memory\0D\0A\00"
@.str.1 = [39 x i8] c"d <adrs> [<len>] : display memory\0D\0A\00"
@.str.2 = [36 x i8] c"x <adrs> : xmodem load\0D\0A\00"
@.str.3 = [34 x i8] c"r : readioreg\0D\0A\00"
@.str.4 = [35 x i8] c"w : writeioreg\0D\0A\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
char IN(int);
char phy_rxd(void) { return IN((0x60 | 0x0c)); }


x86 assembly (clang, -O0):
<phy_rxd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6c,%edi
call   1030 <IN@plt>
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<phy_rxd>:
mov    $0x6c,%edi
jmp    1030 <IN@plt>

LLVM IR (-O0):
define signext i8 @phy_rxd() {
%1 = call signext i8 @IN(i32 108)
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @phy_rxd() {
%1 = tail call signext i8 @IN(i32 108)
ret i8 %1
}