xunge/DecIR huggingface dataset:
char *ToLowerCase(char *str) {
  register char *s = str;
  while (*s != '\0') {
    if (*s >= 'A' && *s <= 'Z')
      *s += 32;
    s++;
  }
  return (str);
}


x86 assembly (clang, -O0):
<ToLowerCase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115d <ToLowerCase+0x5d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     114c <ToLowerCase+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     114c <ToLowerCase+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ToLowerCase+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToLowerCase>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <ToLowerCase+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <ToLowerCase+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <ToLowerCase+0x2c>
lea    -0x41(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <ToLowerCase+0x10>
add    $0x20,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <ToLowerCase+0x10>
ret

LLVM IR (-O0):
define i8* @ToLowerCase(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %26, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %29
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %26
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 90
br i1 %19, label %20, label %26
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = add nsw i32 %23, 32
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
br label %26
26: ; preds = %20, %15, %10
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %3
br label %5
29: ; preds = %5
%30 = load i8*, i8** %2
ret i8* %30
}

LLVM IR (-O2):
define i8* @ToLowerCase(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ ulong;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
ulong my_htonl(ulong hostlong) { return htonl(hostlong); }


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

x86 assembly (clang, -O2):
<my_htonl>:
jmp    1030 <htonl@plt>

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

LLVM IR (-O2):
define i32 @my_htonl(i32 %0) {
%2 = tail call i32 @htonl(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ MIOSHWInit(int, int);
int /*<<< orphan*/ ahb_flush_from(int);
int /*<<< orphan*/ ahb_flush_to(int);
void MIOSInit(void) {
  ahb_flush_from(1);
  ahb_flush_to(1);
  MIOSHWInit(1, 1);
}


x86 assembly (clang, -O0):
<MIOSInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <ahb_flush_from@plt>
mov    $0x1,%edi
call   1050 <ahb_flush_to@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <MIOSHWInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIOSInit>:
push   %rax
mov    $0x1,%edi
call   1040 <ahb_flush_from@plt>
mov    $0x1,%edi
call   1050 <ahb_flush_to@plt>
mov    $0x1,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <MIOSHWInit@plt>

LLVM IR (-O0):
define void @MIOSInit() {
%1 = call i32 @ahb_flush_from(i32 1)
%2 = call i32 @ahb_flush_to(i32 1)
%3 = call i32 @MIOSHWInit(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @MIOSInit() {
%1 = tail call i32 @ahb_flush_from(i32 1)
%2 = tail call i32 @ahb_flush_to(i32 1)
%3 = tail call i32 @MIOSHWInit(i32 1, i32 1)
ret void
}
void __DELETE_java_io_PrintStream(void *me, void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_java_io_PrintStream(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_java_io_PrintStream(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void ckFpuFinit() { __asm__ __volatile__("finit"); }


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

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

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

LLVM IR (-O2):
define void @ckFpuFinit() {
tail call void asm sideeffect "finit", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void *pdf_aes_new(int len, char *key, char *iv) {}


x86 assembly (clang, -O0):
<pdf_aes_new>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @pdf_aes_new(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i8* undef
}
int ASN1_time_tm_clamp_notafter(struct tm *tm) { return 1; }


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

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

LLVM IR (-O0):
%struct.tm = type opaque
define i32 @ASN1_time_tm_clamp_notafter(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
ret i32 1
}

LLVM IR (-O2):
%struct.tm = type opaque
define i32 @ASN1_time_tm_clamp_notafter(%struct.tm* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int inb(int);
int leerReg() { return inb(0x0260 + 0x000A); }


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

x86 assembly (clang, -O2):
<leerReg>:
mov    $0x26a,%edi
jmp    1030 <inb@plt>

LLVM IR (-O0):
define i32 @leerReg() {
%1 = call i32 @inb(i32 618)
ret i32 %1
}

LLVM IR (-O2):
define i32 @leerReg() {
%1 = tail call i32 @inb(i32 618)
ret i32 %1
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_login_monitor_get_fd(void *m) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_login_monitor_get_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_login_monitor_get_fd>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_login_monitor_get_fd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_login_monitor_get_fd(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
void gtk_cell_layout_set_cell_data_func() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_layout_set_cell_data_func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Test5();
void Test4() { Test5(); }


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

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

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

LLVM IR (-O2):
define void @Test4() {
%1 = tail call i32 (...) @Test5()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge_sort_helper(int *, int /*<<< orphan*/, int);
void merge_sort(int *arr, int length) { merge_sort_helper(arr, 0, length - 1); }


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

x86 assembly (clang, -O2):
<merge_sort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <merge_sort_helper@plt>

LLVM IR (-O0):
define void @merge_sort(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 = sub nsw i32 %6, 1
%8 = call i32 @merge_sort_helper(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @merge_sort_helper(i32* %0, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ raise(int);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void sig_handler(int sig) {
  fprintf(stderr, "\n\n SIG RECEIVED\n\n");
  signal(sig, SIG_DFL);
  raise(sig);
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x4(%rbp),%edi
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    -0x4(%rbp),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <signal@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <raise@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"\0A\0A SIG RECEIVED\0A\0A\00"
@SIG_DFL = global i32 0
define void @sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = load i32, i32* @SIG_DFL
%7 = call i32 @signal(i32 %5, i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @raise(i32 %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"\0A\0A SIG RECEIVED\0A\0A\00"
@SIG_DFL = global i32 0
define void @sig_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @SIG_DFL
%5 = tail call i32 @signal(i32 %0, i32 %4)
%6 = tail call i32 @raise(i32 %0)
ret void
}
void USBUART_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @USBUART_SaveConfig() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void vl_func(void) { printf("VDPAU: strong\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"VDPAU: strong\0A\00"
define void @vl_func() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"VDPAU: strong\00"
define void @vl_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void willusgui_open_file(char *filename) {}


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

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

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

LLVM IR (-O2):
define void @willusgui_open_file(i8* nocapture %0) {
ret void
}
void egueb_dom_value_interpolate_double(double a, double b, double m,
                                        double *r) {
  *r = ((1 - m) * a) + (m * b);
}


x86 assembly (clang, -O0):
<egueb_dom_value_interpolate_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
movsd  0xee1(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<egueb_dom_value_interpolate_double>:
movsd  0xef8(%rip),%xmm3
subsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,(%rdi)
ret

LLVM IR (-O0):
define void @egueb_dom_value_interpolate_double(double %0, double %1, double %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double*
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double* %3, double** %8
%9 = load double, double* %7
%10 = fsub double 1.000000e+00, %9
%11 = load double, double* %5
%12 = load double, double* %7
%13 = load double, double* %6
%14 = fmul double %12, %13
%15 = call double @llvm.fmuladd.f64(double %10, double %11, double %14)
%16 = load double*, double** %8
store double %15, double* %16
ret void
}

LLVM IR (-O2):
define void @egueb_dom_value_interpolate_double(double %0, double %1, double %2, double* nocapture writeonly %3) {
%5 = fsub double 1.000000e+00, %2
%6 = fmul double %1, %2
%7 = tail call double @llvm.fmuladd.f64(double %5, double %0, double %6)
store double %7, double* %3
ret void
}
/* Variables and functions */
long long simple_strtoll(char const *, char **, int);
long long int strtoll(const char *nptr, char **endptr, int base) {
  return simple_strtoll(nptr, endptr, base);
}


x86 assembly (clang, -O0):
<strtoll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <simple_strtoll@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoll>:
jmp    1030 <simple_strtoll@plt>

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

LLVM IR (-O2):
define i64 @strtoll(i8* %0, i8** %1, i32 %2) {
%4 = tail call i64 @simple_strtoll(i8* %0, i8** %1, i32 %2)
ret i64 %4
}
/* Variables and functions */
char *getenv(char const *);
char *c_getenv(const char *arg0) { return getenv(arg0); }


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

x86 assembly (clang, -O2):
<c_getenv>:
jmp    1030 <getenv@plt>

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

LLVM IR (-O2):
define i8* @c_getenv(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ LOGGER_log(char *, char *);
int ROLE_report_filename_decoded(char *filename) {
  LOGGER_log("Decoding filename=%s", filename);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [21 x i8] c"Decoding filename=%s\00"
define i32 @ROLE_report_filename_decoded(i8* %0) {
%2 = tail call i32 @LOGGER_log(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
int nextVal() { return ((double)rand() / (double)RAND_MAX) < 0.05 ? 2 : 4; }


x86 assembly (clang, -O0):
<nextVal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm1
mov    0x2ec1(%rip),%rax
cvtsi2sdq (%rax),%xmm0
divsd  %xmm0,%xmm1
movsd  0xec8(%rip),%xmm0
mov    $0x4,%eax
mov    $0x2,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextVal>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xecb(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
add    %eax,%eax
add    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i32 @nextVal() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
%6 = fcmp olt double %5, 5.000000e-02
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 2, i32 4
ret i32 %8
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i32 @nextVal() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
%6 = fcmp olt double %5, 5.000000e-02
%7 = select i1 %6, i32 2, i32 4
ret i32 %7
}
long double test_atan2l(long double x, long double y) {
  return __builtin_atan2l(x, y);
}


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

x86 assembly (clang, -O2):
<test_atan2l>:
jmp    1030 <atan2l@plt>

LLVM IR (-O0):
define x86_fp80 @test_atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call x86_fp80 @atan2l(x86_fp80 %5, x86_fp80 %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @test_atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @atan2l(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
int base32_decode_length(int base32Length) { return ((base32Length * 5) / 8); }


x86 assembly (clang, -O0):
<base32_decode_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x5,-0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<base32_decode_length>:
lea    (%rdi,%rdi,4),%ecx
lea    (%rdi,%rdi,4),%eax
add    $0x7,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @base32_decode_length(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 5
%5 = sdiv i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @base32_decode_length(i32 %0) {
%2 = mul nsw i32 %0, 5
%3 = sdiv i32 %2, 8
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x2f() {
  Assert_real((isupper(47) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              240, ("isupper should be 0 for /"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for /\00"
define void @t_isupper_0x2f() {
%1 = tail call i64 @isupper(i32 47)
%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 240, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void zterp_os_get_screen_size(unsigned *w, unsigned *h) {}


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

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

LLVM IR (-O0):
define void @zterp_os_get_screen_size(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
ret void
}

LLVM IR (-O2):
define void @zterp_os_get_screen_size(i32* nocapture %0, i32* nocapture %1) {
ret void
}
void print_sos_lic() {}


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

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

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

LLVM IR (-O2):
define void @print_sos_lic() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void exit_now(void) { _exit(212); }


x86 assembly (clang, -O0):
<exit_now>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd4,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<exit_now>:
push   %rax
mov    $0xd4,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @exit_now() {
%1 = call i32 @_exit(i32 212)
unreachable
}

LLVM IR (-O2):
define void @exit_now() {
%1 = tail call i32 @_exit(i32 212)
unreachable
}
/* Variables and functions */
scalar_t__ getgid();
int UnixVfs_gid(void) { return (int)getgid(); }


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

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

LLVM IR (-O0):
define i32 @UnixVfs_gid() {
%1 = call i64 (...) @getgid()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @UnixVfs_gid() {
%1 = tail call i64 (...) @getgid()
%2 = trunc i64 %1 to i32
ret i32 %2
}
void GPIOPortR_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortR_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortR_Handler+0x9>
jmp    1109 <GPIOPortR_Handler+0x9>

x86 assembly (clang, -O2):
<GPIOPortR_Handler>:
jmp    1100 <GPIOPortR_Handler>

LLVM IR (-O0):
define void @GPIOPortR_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortR_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int Round(double a) { return (a < 0 ? a - 0.5 : a + 0.5); }


x86 assembly (clang, -O0):
<Round>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1132 <Round+0x32>
movsd  -0x8(%rbp),%xmm0
movsd  0xedc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1144 <Round+0x44>
movsd  0xec6(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Round>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xeec(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @Round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fsub double %6, 5.000000e-01
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = fadd double %9, 5.000000e-01
br label %11
11: ; preds = %8, %5
%12 = phi double [ %7, %5 ], [ %10, %8 ]
%13 = fptosi double %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @Round(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double -5.000000e-01, double 5.000000e-01
%4 = fadd double %3, %0
%5 = fptosi double %4 to i32
ret i32 %5
}
void __l2_flush_wback_phys(unsigned long start, int size) {}


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

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

LLVM IR (-O0):
define void @__l2_flush_wback_phys(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @__l2_flush_wback_phys(i64 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
void genera_mensaje(FILE *file) {
  fputc('A', file);
  fputc('l', file);
  fputc('v', file);
  fputc('a', file);
  fputc('r', file);
  fputc('o', file);
  rewind(file);
}


x86 assembly (clang, -O0):
<genera_mensaje>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x41,%edi
call   1040 <fputc@plt>
mov    -0x8(%rbp),%rsi
mov    $0x6c,%edi
call   1040 <fputc@plt>
mov    -0x8(%rbp),%rsi
mov    $0x76,%edi
call   1040 <fputc@plt>
mov    -0x8(%rbp),%rsi
mov    $0x61,%edi
call   1040 <fputc@plt>
mov    -0x8(%rbp),%rsi
mov    $0x72,%edi
call   1040 <fputc@plt>
mov    -0x8(%rbp),%rsi
mov    $0x6f,%edi
call   1040 <fputc@plt>
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genera_mensaje>:
push   %rbx
mov    %rdi,%rbx
mov    $0x41,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    $0x6c,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    $0x76,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    $0x61,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    $0x72,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    $0x6f,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <rewind@plt>

LLVM IR (-O0):
define void @genera_mensaje(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputc(i8 signext 65, i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @fputc(i8 signext 108, i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @fputc(i8 signext 118, i32* %7)
%9 = load i32*, i32** %2
%10 = call i32 @fputc(i8 signext 97, i32* %9)
%11 = load i32*, i32** %2
%12 = call i32 @fputc(i8 signext 114, i32* %11)
%13 = load i32*, i32** %2
%14 = call i32 @fputc(i8 signext 111, i32* %13)
%15 = load i32*, i32** %2
%16 = call i32 @rewind(i32* %15)
ret void
}

LLVM IR (-O2):
define void @genera_mensaje(i32* nocapture %0) {
%2 = tail call i32 @fputc(i8 signext 65, i32* %0)
%3 = tail call i32 @fputc(i8 signext 108, i32* %0)
%4 = tail call i32 @fputc(i8 signext 118, i32* %0)
%5 = tail call i32 @fputc(i8 signext 97, i32* %0)
%6 = tail call i32 @fputc(i8 signext 114, i32* %0)
%7 = tail call i32 @fputc(i8 signext 111, i32* %0)
%8 = tail call i32 @rewind(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int age = 10;
  int height;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall.\n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 undef)
ret i32 0
}
int my_toupper(n)
register int n;
{
  if (n >= 'a' && n <= 'z')
    return n & (~('a' - 'A'));
  return n;
}


x86 assembly (clang, -O0):
<my_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1129 <my_toupper+0x29>
cmpl   $0x7a,-0x8(%rbp)
jg     1129 <my_toupper+0x29>
mov    -0x8(%rbp),%eax
and    $0xffffffdf,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <my_toupper+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_toupper>:
lea    -0x61(%rdi),%ecx
mov    %edi,%eax
and    $0xffffffdf,%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @my_toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = and i32 %10, -33
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @my_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = and i32 %0, -33
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int sp_load_double_vector(double **v, int *size, const char *fname) {
  (void)v;
  (void)size;
  (void)fname;
  return 0;
}


x86 assembly (clang, -O0):
<sp_load_double_vector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sp_load_double_vector(double** nocapture readnone %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
void zeroVec32(int sz, int32_t *v) { memset(v, 0, 4 * sz); }


x86 assembly (clang, -O0):
<zeroVec32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
shl    $0x2,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeroVec32>:
lea    0x0(,%rdi,4),%edx
mov    %rsi,%rdi
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @zeroVec32(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = mul nsw i32 4, %6
%8 = call i32 @memset(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @zeroVec32(i32 %0, i32* %1) {
%3 = shl nsw i32 %0, 2
%4 = tail call i32 @memset(i32* %1, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void gmp_die(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  abort();
}


x86 assembly (clang, -O0):
<gmp_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<gmp_die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @gmp_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @gmp_die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
void f5() {
  int a;
  a = 30;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1e,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f5() {
%1 = alloca i32
store i32 30, i32* %1
ret void
}

LLVM IR (-O2):
define void @f5() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/, int /*<<< orphan*/);
void sigchld_handler(int sig) {
  while (waitpid(-1, 0, WNOHANG) > 0)
    ;
  return;
}


x86 assembly (clang, -O0):
<sigchld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    113f <sigchld_handler+0x2f>
jmp    111b <sigchld_handler+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigchld_handler>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <sigchld_handler+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @sigchld_handler(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32 0, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
/* Type definitions */
struct item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ parse_items(struct item **, char const *, char *);
char *read_file(char const *, int /*<<< orphan*/);
int parse_file(struct item **head, const char *fname) {
  char *data;
  data = read_file(fname, 0);
  if (!data)
    return -1;
  parse_items(head, fname, data);
  return 0;
}


x86 assembly (clang, -O0):
<parse_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1040 <read_file@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1156 <parse_file+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <parse_file+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <parse_items@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_file>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %ebp,%ebp
mov    %rsi,%rdi
xor    %esi,%esi
call   1040 <read_file@plt>
test   %rax,%rax
je     114b <parse_file+0x2b>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <parse_items@plt>
jmp    1150 <parse_file+0x30>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.item = type { i32 }
define i32 @parse_file(%struct.item** %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.item**
%5 = alloca i8*
%6 = alloca i8*
store %struct.item** %0, %struct.item*** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %5
%8 = call i8* @read_file(i8* %7, i32 0)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %2
store i32 -1, i32* %3
br label %17
12: ; preds = %2
%13 = load %struct.item**, %struct.item*** %4
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = call i32 @parse_items(%struct.item** %13, i8* %14, i8* %15)
store i32 0, i32* %3
br label %17
17: ; preds = %12, %11
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.item = type { i32 }
define i32 @parse_file(%struct.item** %0, i8* %1) {
%3 = tail call i8* @read_file(i8* %1, i32 0)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @parse_items(%struct.item** %0, i8* %1, i8* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %8
}
void compute_kernels_hess_cuda_(long *Mesh_pointer, int *ELASTIC_SIMULATION,
                                int *ACOUSTIC_SIMULATION) {}


x86 assembly (clang, -O0):
<compute_kernels_hess_cuda_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @compute_kernels_hess_cuda_(i64* %0, i32* %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i32*
%6 = alloca i32*
store i64* %0, i64** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
define void @compute_kernels_hess_cuda_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
long double truncl(long double);
long double test4l(long double x) { return truncl(x); }


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

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

LLVM IR (-O0):
define x86_fp80 @test4l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @llvm.trunc.f80(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @test4l(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.trunc.f80(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ s_crossfade_to_state(void *, double);
void s_restore_state(void *state) { s_crossfade_to_state(state, 0.003); }


x86 assembly (clang, -O0):
<s_restore_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movsd  0xed8(%rip),%xmm0
call   1030 <s_crossfade_to_state@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_restore_state>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <s_crossfade_to_state@plt>

LLVM IR (-O0):
define void @s_restore_state(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @s_crossfade_to_state(i8* %3, double 3.000000e-03)
ret void
}

LLVM IR (-O2):
define void @s_restore_state(i8* %0) {
%2 = tail call i32 @s_crossfade_to_state(i8* %0, double 3.000000e-03)
ret void
}
/* Variables and functions */
scalar_t__ flags_is_writing(int);
const char *access_flags_string(int flags) {
  return flags_is_writing(flags) ? "writing" : "reading";
}


x86 assembly (clang, -O0):
<access_flags_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <flags_is_writing@plt>
mov    %rax,%rdx
lea    0xedb(%rip),%rax
lea    0xecc(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<access_flags_string>:
push   %rax
call   1030 <flags_is_writing@plt>
test   %rax,%rax
lea    0xee8(%rip),%rcx
lea    0xed9(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"writing\00"
@.str.1 = [8 x i8] c"reading\00"
define i8* @access_flags_string(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @flags_is_writing(i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
ret i8* %7
}

LLVM IR (-O2):
@.str = [8 x i8] c"writing\00"
@.str.1 = [8 x i8] c"reading\00"
define i8* @access_flags_string(i32 %0) {
%2 = tail call i64 @flags_is_writing(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
ret i8* %4
}
void HalfFloatRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @HalfFloatRow_AVX2() {
ret void
}
/* Variables and functions */
char *niceStringOut(char *);
char *niceChar(int n) {
  if (n >= 32 && n < 127) {
    char s[2];
    s[0] = (char)n;
    s[1] = '\0';
    return niceStringOut(s);
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<niceChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jl     114b <niceChar+0x3b>
cmpl   $0x7f,-0xc(%rbp)
jge    114b <niceChar+0x3b>
mov    -0xc(%rbp),%eax
mov    %al,-0xe(%rbp)
movb   $0x0,-0xd(%rbp)
lea    -0xe(%rbp),%rdi
call   1030 <niceStringOut@plt>
mov    %rax,-0x8(%rbp)
jmp    1153 <niceChar+0x43>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<niceChar>:
lea    -0x20(%rdi),%eax
cmp    $0x5e,%eax
ja     1132 <niceChar+0x22>
push   %rax
mov    %dil,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x6(%rsp),%rdi
call   1030 <niceStringOut@plt>
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @niceChar(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [2 x i8]
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 32
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 127
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32, i32* %3
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
store i8 %12, i8* %13
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 0, i8* %14
%15 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%16 = call i8* @niceStringOut(i8* %15)
store i8* %16, i8** %2
br label %18
17: ; preds = %7, %1
store i8* null, i8** %2
br label %18
18: ; preds = %17, %10
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @niceChar(i32 %0) {
%2 = alloca [2 x i8]
%3 = add i32 %0, -32
%4 = icmp ult i32 %3, 95
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%7 = trunc i32 %0 to i8
store i8 %7, i8* %6
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 0, i8* %8
%9 = call i8* @niceStringOut(i8* %6)
br label %10
10: ; preds = %1, %5
%11 = phi i8* [ %9, %5 ], [ null, %1 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage: mknod.minix ");
  printf("<input file> <file name> <mode> <type> <minor> <major>\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"usage: mknod.minix \00"
@.str.1 = [56 x i8] c"<input file> <file name> <mode> <type> <minor> <major>\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"usage: mknod.minix \00"
@EXIT_SUCCESS = global i32 0
@str = [55 x i8] c"<input file> <file name> <mode> <type> <minor> <major>\00"
define void @usage() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
double exp(double const);
double std_norm_pdf(const double x) {
  return exp(-x * x * 0.5);
  ;
}


x86 assembly (clang, -O0):
<std_norm_pdf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xeba(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_norm_pdf>:
mulsd  %xmm0,%xmm0
mulsd  0xee4(%rip),%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @std_norm_pdf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = fmul double %6, 5.000000e-01
%8 = call double @exp(double %7)
ret double %8
}

LLVM IR (-O2):
define double @std_norm_pdf(double %0) {
%2 = fneg double %0
%3 = fmul double %2, %0
%4 = fmul double %3, 5.000000e-01
%5 = tail call double @exp(double %4)
ret double %5
}