xunge/DecIR huggingface dataset:
/* Variables and functions */
long double floorl(long double);
long double fmodl(long double x, long double y) {
  if (y == 0.0L)
    return 0.0L;
  return x - floorl(x / y) * y;
}


x86 assembly (clang, -O0):
<fmodl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    114a <fmodl+0x3a>
jp     114a <fmodl+0x3a>
jmp    1140 <fmodl+0x30>
fldz
fstpt  -0x10(%rbp)
jmp    1175 <fmodl+0x65>
fldt   -0x20(%rbp)
fld    %st(0)
fstpt  -0x3c(%rbp)
fldt   -0x30(%rbp)
fld    %st(0)
fstpt  -0x48(%rbp)
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <floorl@plt>
fldt   -0x48(%rbp)
fldt   -0x3c(%rbp)
fxch   %st(2)
fmulp  %st,%st(1)
fsubrp %st,%st(1)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmodl>:
sub    $0x28,%rsp
fldt   0x40(%rsp)
fldt   0x30(%rsp)
fldz
fxch   %st(2)
fucomi %st(2),%st
jne    112f <fmodl+0x1f>
jp     112f <fmodl+0x1f>
fstp   %st(1)
fstp   %st(0)
add    $0x28,%rsp
ret
fstp   %st(2)
fld    %st(0)
fdiv   %st(2),%st
fstpt  (%rsp)
fstpt  0x1c(%rsp)
fstpt  0x10(%rsp)
call   1030 <floorl@plt>
fldt   0x10(%rsp)
fmulp  %st,%st(1)
fldt   0x1c(%rsp)
fsubp  %st,%st(1)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @fmodl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
%6 = load x86_fp80, x86_fp80* %5
%7 = fcmp oeq x86_fp80 %6, 0xK00000000000000000000
br i1 %7, label %8, label %9
8: ; preds = %2
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
br label %18
9: ; preds = %2
%10 = load x86_fp80, x86_fp80* %4
%11 = load x86_fp80, x86_fp80* %4
%12 = load x86_fp80, x86_fp80* %5
%13 = fdiv x86_fp80 %11, %12
%14 = call x86_fp80 @llvm.floor.f80(x86_fp80 %13)
%15 = load x86_fp80, x86_fp80* %5
%16 = fneg x86_fp80 %14
%17 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %16, x86_fp80 %15, x86_fp80 %10)
store x86_fp80 %17, x86_fp80* %3
br label %18
18: ; preds = %9, %8
%19 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %19
}

LLVM IR (-O2):
define x86_fp80 @fmodl(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp oeq x86_fp80 %1, 0xK00000000000000000000
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = fdiv x86_fp80 %0, %1
%6 = tail call x86_fp80 @llvm.floor.f80(x86_fp80 %5)
%7 = fneg x86_fp80 %6
%8 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %7, x86_fp80 %1, x86_fp80 %0)
br label %9
9: ; preds = %2, %4
%10 = phi x86_fp80 [ %8, %4 ], [ 0xK00000000000000000000, %2 ]
ret x86_fp80 %10
}
/* Variables and functions */
scalar_t__ RAND_MAX;
float rand();
int loss_occurs(int emitter, int receiver, double lossRate) {
  return rand() / (float)RAND_MAX <= lossRate;
}


x86 assembly (clang, -O0):
<loss_occurs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    0x2eb7(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loss_occurs>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec4(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
xor    %eax,%eax
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i32 @loss_occurs(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = call float (...) @rand()
%8 = load i64, i64* @RAND_MAX
%9 = sitofp i64 %8 to float
%10 = fdiv float %7, %9
%11 = fpext float %10 to double
%12 = load double, double* %6
%13 = fcmp ole double %11, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i32 @loss_occurs(i32 %0, i32 %1, double %2) {
%4 = tail call float (...) @rand()
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to float
%7 = fdiv float %4, %6
%8 = fpext float %7 to double
%9 = fcmp ole double %8, %2
%10 = zext i1 %9 to i32
ret i32 %10
}
void fsl_udc_dtd_prepare(void) {}


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

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

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

LLVM IR (-O2):
define void @fsl_udc_dtd_prepare() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void ArenaServers_Cache(void) {
  trap_R_RegisterShaderNoMip("levelshots/unknownmap");
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"levelshots/unknownmap\00"
define void @ArenaServers_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"levelshots/unknownmap\00"
define void @ArenaServers_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OS_TINIT();
void os_tmr_init(void) { OS_TINIT(); }


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

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

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

LLVM IR (-O2):
define void @os_tmr_init() {
%1 = tail call i32 (...) @OS_TINIT()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int read_pid(char *path) {
  int pid = 0;
  FILE *f = fopen(path, "r");
  if (!f)
    return -1;
  fscanf(f, "%d", &pid);
  fclose(f);
  return pid;
}


x86 assembly (clang, -O0):
<read_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116e <read_pid+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1191 <read_pid+0x61>
mov    -0x20(%rbp),%rdi
lea    0xe89(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_pid>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1173 <read_pid+0x43>
mov    %rax,%rbx
lea    0xeaa(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rax,%rdi
call   1040 <fscanf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0xc(%rsp),%eax
jmp    1178 <read_pid+0x48>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @read_pid(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 0, i32* %4
%6 = load i8*, i8** %3
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = icmp ne i32* %8, null
br i1 %9, label %11, label %10
10: ; preds = %1
store i32 -1, i32* %2
br label %17
11: ; preds = %1
%12 = load i32*, i32** %5
%13 = call i32 @fscanf(i32* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%14 = load i32*, i32** %5
%15 = call i32 @fclose(i32* %14)
%16 = load i32, i32* %4
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @read_pid(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = call i32 @fscanf(i32* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 @fclose(i32* %4)
%9 = load i32, i32* %2
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ CloseFile315();
void closefile() { CloseFile315(); }


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

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

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

LLVM IR (-O2):
define void @closefile() {
%1 = tail call i32 (...) @CloseFile315()
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_wadd_wchstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_wadd_wchstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_wadd_wchstr+0x2a>
jmp    1170 <cmd_wadd_wchstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_wadd_wchstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_wadd_wchstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_wadd_wchstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_wadd_wchstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_SYS_GetBusClockFreq();
uint32_t CLOCK_SYS_GetI2cFreq(uint32_t instance) {
  (void)instance;
  return CLOCK_SYS_GetBusClockFreq();
}


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

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

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

LLVM IR (-O2):
define i32 @CLOCK_SYS_GetI2cFreq(i32 %0) {
%2 = tail call i32 (...) @CLOCK_SYS_GetBusClockFreq()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __gmp_get_memory_functions(int /*<<< orphan*/ *,
                                              void *(*)(void *, size_t, size_t),
                                              int /*<<< orphan*/ *);
void *stub1(void *, size_t, size_t);
char *mpc_realloc_str(char *str, size_t oldlen, size_t newlen) {
  void *(*reallocfunc)(void *, size_t, size_t);
  __gmp_get_memory_functions(NULL, &reallocfunc, NULL);
  return (char *)((*reallocfunc)(str, oldlen, newlen));
}


x86 assembly (clang, -O0):
<mpc_realloc_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
call   1030 <__gmp_get_memory_functions@plt>
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpc_realloc_str>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
xor    %edi,%edi
xor    %edx,%edx
call   1030 <__gmp_get_memory_functions@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   *0x8(%rsp)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mpc_realloc_str(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8* (i8*, i64, i64)*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = bitcast i8* (i8*, i64, i64)** %7 to i8* (i8*, i64, i64)*
%9 = call i32 @__gmp_get_memory_functions(i32* null, i8* (i8*, i64, i64)* %8, i32* null)
%10 = load i8* (i8*, i64, i64)*, i8* (i8*, i64, i64)** %7
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = load i64, i64* %6
%14 = call i8* %10(i8* %11, i64 %12, i64 %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @mpc_realloc_str(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8* (i8*, i64, i64)*
%5 = bitcast i8* (i8*, i64, i64)** %4 to i8*
%6 = bitcast i8* (i8*, i64, i64)** %4 to i8* (i8*, i64, i64)*
%7 = call i32 @__gmp_get_memory_functions(i32* null, i8* (i8*, i64, i64)* %6, i32* null)
%8 = load i8* (i8*, i64, i64)*, i8* (i8*, i64, i64)** %4
%9 = call i8* %8(i8* %0, i64 %1, i64 %2)
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print() { printf("this is a c function in c source file!"); }


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"this is a c function in c source file!\00"
define void @print() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"this is a c function in c source file!\00"
define void @print() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}
void dummy(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnge_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpnge_pd(__m128d A, __m128d B) { return _mm_cmpnge_pd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_cmpnge_pd>:
jmp    1030 <_mm_cmpnge_pd@plt>

LLVM IR (-O0):
define i32 @test_mm_cmpnge_pd(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 = call i32 @_mm_cmpnge_pd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_cmpnge_pd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnge_pd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ LZ4_compressBound(int);
int LZ4_compress_HC(char const *, char *, int, int /*<<< orphan*/,
                    int /*<<< orphan*/);
int LZ4_compressHC(const char *src, char *dst, int srcSize) {
  return LZ4_compress_HC(src, dst, srcSize, LZ4_compressBound(srcSize), 0);
}


x86 assembly (clang, -O0):
<LZ4_compressHC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <LZ4_compressBound@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%edx
mov    %eax,%ecx
xor    %r8d,%r8d
call   1030 <LZ4_compress_HC@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compressHC>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%edi
call   1040 <LZ4_compressBound@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <LZ4_compress_HC@plt>

LLVM IR (-O0):
define i32 @LZ4_compressHC(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 = load i32, i32* %6
%11 = call i32 @LZ4_compressBound(i32 %10)
%12 = call i32 @LZ4_compress_HC(i8* %7, i8* %8, i32 %9, i32 %11, i32 0)
ret i32 %12
}

LLVM IR (-O2):
define i32 @LZ4_compressHC(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @LZ4_compressBound(i32 %2)
%5 = tail call i32 @LZ4_compress_HC(i8* %0, i8* %1, i32 %2, i32 %4, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x38() {
  Assert_real((ispunct(56) == 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_ispunct.c",
              285, ("ispunct should be 0 for 8"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x38>:
push   %rax
mov    $0x38,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x11d,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for 8\00"
define void @t_ispunct_0x38() {
%1 = call i64 @ispunct(i32 56)
%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 285, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for 8\00"
define void @t_ispunct_0x38() {
%1 = tail call i64 @ispunct(i32 56)
%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 285, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned char cast_short_uchar(short int x) { return (unsigned char)x; }


x86 assembly (clang, -O0):
<cast_short_uchar>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @cast_short_uchar(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = trunc i16 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @cast_short_uchar(i16 signext %0) {
%2 = trunc i16 %0 to i8
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ ot(char *);
defword() { ot("DW "); }


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 = [4 x i8] c"DW \00"
define i32 @defword() {
%1 = alloca i32
%2 = call i32 @ot(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

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


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

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

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

LLVM IR (-O2):
define void @handle_TTIN(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int some_function() { printf("Helooo World function\n"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Helooo World function\0A\00"
define i32 @some_function() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [22 x i8] c"Helooo World function\00"
define i32 @some_function() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int __semihost(int, int *);
int semihost_istty(int fh) { return __semihost((0x9), &fh); }


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

x86 assembly (clang, -O2):
<semihost_istty>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x9,%edi
call   1030 <__semihost@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @semihost_istty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__semihost(i32 9, i32* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @semihost_istty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__semihost(i32 9, i32* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ U(int *, int);
void U_r(int *a, int r) { U(a, 1); }


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

x86 assembly (clang, -O2):
<U_r>:
mov    $0x1,%esi
jmp    1030 <U@plt>

LLVM IR (-O0):
define void @U_r(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 = call i32 @U(i32* %5, i32 1)
ret void
}

LLVM IR (-O2):
define void @U_r(i32* %0, i32 %1) {
%3 = tail call i32 @U(i32* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
void arr(int arr[]) { printf("arr[]: %p \n", arr); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"arr[]: %p \0A\00"
define void @arr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"arr[]: %p \0A\00"
define void @arr(i32* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %0)
ret void
}
double dbl_max1(double a, double b) { return (a >= b) ? a : b; }


x86 assembly (clang, -O0):
<dbl_max1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     112d <dbl_max1+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <dbl_max1+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl_max1>:
movapd %xmm1,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @dbl_max1(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
int test_imm_24int8_mem(signed char *val) {
  return ((*val) & (0x24 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_24int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x24,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_24int8_mem>:
testb  $0x24,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_24int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 36
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int is_reserv(char c) {
  if ((c < 0x30) || ((c > 0x39) && (c < 0x41)) ||
      ((c > 0x5a) && (c < 0x61) && (c != 0x5f)) || ((c > 0x7a) && (c < 0x80)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_reserv>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1174 <is_reserv+0x74>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    1131 <is_reserv+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1174 <is_reserv+0x74>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    1158 <is_reserv+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jge    1158 <is_reserv+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    1174 <is_reserv+0x74>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    1180 <is_reserv+0x80>
movsbl -0x5(%rbp),%eax
cmp    $0x80,%eax
jge    1180 <is_reserv+0x80>
movl   $0x1,-0x4(%rbp)
jmp    1187 <is_reserv+0x87>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_reserv>:
mov    $0x1,%eax
cmp    $0x30,%dil
jl     1130 <is_reserv+0x30>
lea    -0x3a(%rdi),%ecx
cmp    $0x7,%cl
jb     1130 <is_reserv+0x30>
lea    -0x5b(%rdi),%eax
cmp    $0x6,%al
setb   %al
cmp    $0x5f,%dil
setne  %cl
and    %al,%cl
cmp    $0x7b,%dil
setae  %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_reserv(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 48
br i1 %6, label %35, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 57
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp slt i32 %13, 65
br i1 %14, label %35, label %15
15: ; preds = %11, %7
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sgt i32 %17, 90
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp slt i32 %21, 97
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 95
br i1 %26, label %35, label %27
27: ; preds = %23, %19, %15
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp sgt i32 %29, 122
br i1 %30, label %31, label %36
31: ; preds = %27
%32 = load i8, i8* %3
%33 = sext i8 %32 to i32
%34 = icmp slt i32 %33, 128
br i1 %34, label %35, label %36
35: ; preds = %31, %23, %11, %1
store i32 1, i32* %2
br label %37
36: ; preds = %31, %27
store i32 0, i32* %2
br label %37
37: ; preds = %36, %35
%38 = load i32, i32* %2
ret i32 %38
}

LLVM IR (-O2):
define i32 @is_reserv(i8 signext %0) {
%2 = icmp slt i8 %0, 48
%3 = add i8 %0, -58
%4 = icmp ult i8 %3, 7
%5 = or i1 %2, %4
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = add nsw i8 %0, -91
%8 = icmp ult i8 %7, 6
%9 = icmp ne i8 %0, 95
%10 = and i1 %9, %8
%11 = icmp ugt i8 %0, 122
%12 = or i1 %11, %10
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %6, %1
%15 = phi i32 [ 1, %1 ], [ %13, %6 ]
ret i32 %15
}
/* Variables and functions */
char *_ltoa(long, char *, int, int);
char *ltoa(long n, char *buf, int base) { return _ltoa(n, buf, base, 1); }


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

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

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

LLVM IR (-O2):
define i8* @ltoa(i64 %0, i8* %1, i32 %2) {
%4 = tail call i8* @_ltoa(i64 %0, i8* %1, i32 %2, i32 1)
ret i8* %4
}
/* Variables and functions */
int extras_init();
int module_extras_init(void) { return extras_init(); }


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

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

LLVM IR (-O0):
define i32 @module_extras_init() {
%1 = call i32 (...) @extras_init()
ret i32 %1
}

LLVM IR (-O2):
define i32 @module_extras_init() {
%1 = tail call i32 (...) @extras_init()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_mprf_epilogue(FILE *infile) { fprintf(infile, "end rtl;\n"); }


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

x86 assembly (clang, -O2):
<print_mprf_epilogue>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"end rtl;\0A\00"
define void @print_mprf_epilogue(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"end rtl;\0A\00"
define void @print_mprf_epilogue(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 9, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_io_get_gpio_ifg_addr(void *port) {
  return cfg_processor_get_hex_int_attr(port, "ifg");
}


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

x86 assembly (clang, -O2):
<cfg_io_get_gpio_ifg_addr>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_hex_int_attr@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"ifg\00"
define i32 @cfg_io_get_gpio_ifg_addr(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
double test_floor(double x) { return __builtin_floor(x); }


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

x86 assembly (clang, -O2):
<test_floor>:
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @test_floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.floor.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @test_floor(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *, int *);
int getmin(void) {
  int hours, minutes;
  scanf("%d:%d", &hours, &minutes);
  return (hours * 60 + minutes);
}


x86 assembly (clang, -O0):
<getmin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1030 <scanf@plt>
imul   $0x3c,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getmin>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <scanf@plt>
imul   $0x3c,0x4(%rsp),%eax
add    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d:%d\00"
define i32 @getmin() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, 60
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d:%d\00"
define i32 @getmin() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = mul nsw i32 %6, 60
%8 = load i32, i32* %2
%9 = add nsw i32 %7, %8
ret i32 %9
}
void cx11646_shutdown(struct usb_spca50x *spca50x) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @cx11646_shutdown(%struct.usb_spca50x* nocapture %0) {
ret void
}
void outb(unsigned short port, unsigned char data) {
  asm volatile("outb %0, %1" ::"a"(data), "Nd"(port));
}


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 zeroext %0, i8 zeroext %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 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $0, $1", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ diff1(int);
int /*<<< orphan*/ diff2(int, int);
int /*<<< orphan*/ diff3(int, int, int);
int /*<<< orphan*/ initialize();
int /*<<< orphan*/ printf(char *);
int main() {
  initialize();
  printf("differences|count|first group|last group\n");
  diff1(2);
  diff1(1);
  diff2(2, 2);
  diff2(2, 4);
  diff2(4, 2);
  diff3(6, 4, 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <initialize@plt>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <diff1@plt>
mov    $0x1,%edi
call   1060 <diff1@plt>
mov    $0x2,%esi
mov    %esi,%edi
call   1050 <diff2@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1050 <diff2@plt>
mov    $0x4,%edi
mov    $0x2,%esi
call   1050 <diff2@plt>
mov    $0x6,%edi
mov    $0x4,%esi
mov    $0x2,%edx
call   1070 <diff3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <initialize@plt>
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1060 <diff1@plt>
mov    $0x1,%edi
call   1060 <diff1@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1050 <diff2@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1050 <diff2@plt>
mov    $0x4,%edi
mov    $0x2,%esi
call   1050 <diff2@plt>
mov    $0x6,%edi
mov    $0x4,%esi
mov    $0x2,%edx
call   1070 <diff3@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"differences|count|first group|last group\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initialize()
%3 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @diff1(i32 2)
%5 = call i32 @diff1(i32 1)
%6 = call i32 @diff2(i32 2, i32 2)
%7 = call i32 @diff2(i32 2, i32 4)
%8 = call i32 @diff2(i32 4, i32 2)
%9 = call i32 @diff3(i32 6, i32 4, i32 2)
ret i32 0
}

LLVM IR (-O2):
@str = [41 x i8] c"differences|count|first group|last group\00"
define i32 @main() {
%1 = tail call i32 (...) @initialize()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @diff1(i32 2)
%4 = tail call i32 @diff1(i32 1)
%5 = tail call i32 @diff2(i32 2, i32 2)
%6 = tail call i32 @diff2(i32 2, i32 4)
%7 = tail call i32 @diff2(i32 4, i32 2)
%8 = tail call i32 @diff3(i32 6, i32 4, i32 2)
ret i32 0
}
int contain(const char *s, const char *sub) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @contain(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uwsgi_build_unshare(char *);
void uwsgi_opt_set_unshare(char *opt, char *value, void *none) {
  uwsgi_build_unshare(value);
}


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

x86 assembly (clang, -O2):
<uwsgi_opt_set_unshare>:
mov    %rsi,%rdi
jmp    1030 <uwsgi_build_unshare@plt>

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

LLVM IR (-O2):
define void @uwsgi_opt_set_unshare(i8* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @uwsgi_build_unshare(i8* %1)
ret void
}
int iNemoEngineAPI_Return_NewFullScale(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @iNemoEngineAPI_Return_NewFullScale() {
ret i32 0
}
int test_bit(unsigned int nr, unsigned long *addr) {
  return (addr[((nr) / (sizeof(long) * 8))] &
          (1UL << ((nr) % (sizeof(long) * 8)))) != 0;
}


x86 assembly (clang, -O0):
<test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x4(%rbp),%ecx
and    $0x3f,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bit>:
mov    %edi,%eax
shr    $0x3,%eax
and    $0xfffffff8,%eax
mov    (%rsi,%rax,1),%rcx
xor    %eax,%eax
bt     %rdi,%rcx
setb   %al
ret

LLVM IR (-O0):
define i32 @test_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = udiv i64 %7, 64
%9 = getelementptr inbounds i64, i64* %5, i64 %8
%10 = load i64, i64* %9
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = urem i64 %12, 64
%14 = shl i64 1, %13
%15 = and i64 %10, %14
%16 = icmp ne i64 %15, 0
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @test_bit(i32 %0, i64* nocapture %1) {
%3 = zext i32 %0 to i64
%4 = lshr i64 %3, 6
%5 = getelementptr inbounds i64, i64* %1, i64 %4
%6 = load i64, i64* %5
%7 = and i64 %3, 63
%8 = shl nuw i64 1, %7
%9 = and i64 %6, %8
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
void UsageFaultISR(void) {
  while (1) {
    (*((volatile unsigned long *)0x400253FC)) =
        ((*((volatile unsigned long *)0x400253FC)) & ~0xE) | 0x2;
  }
}


x86 assembly (clang, -O0):
<UsageFaultISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <UsageFaultISR+0x9>
mov    $0x400253fc,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffff1,%rcx
mov    %rcx,-0x10(%rbp)
or     $0x2,%rcx
mov    %rcx,-0x8(%rbp)
mov    $0x400253fc,%eax
mov    %rcx,(%rax)
jmp    1109 <UsageFaultISR+0x9>

x86 assembly (clang, -O2):
<UsageFaultISR>:
mov    0x400253fc,%rax
40
and    $0xfffffffffffffff1,%rax
or     $0x2,%rax
mov    %rax,0x400253fc
40
jmp    1100 <UsageFaultISR>

LLVM IR (-O0):
define void @UsageFaultISR() {
br label %1
1: ; preds = %0, %1
%2 = load volatile i64, i64* inttoptr (i64 1073894396 to i64*)
%3 = and i64 %2, -15
%4 = or i64 %3, 2
store volatile i64 %4, i64* inttoptr (i64 1073894396 to i64*)
br label %1
}

LLVM IR (-O2):
define void @UsageFaultISR() {
br label %1
1: ; preds = %0, %1
%2 = load volatile i64, i64* inttoptr (i64 1073894396 to i64*)
%3 = and i64 %2, -15
%4 = or i64 %3, 2
store volatile i64 %4, i64* inttoptr (i64 1073894396 to i64*)
br label %1
}
int do_515() { return 515; }


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

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

LLVM IR (-O0):
define i32 @do_515() {
ret i32 515
}

LLVM IR (-O2):
define i32 @do_515() {
ret i32 515
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xbb() {
  Assert_real((isbdigit(187) == 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_isbdigit.c",
              940, ("isbdigit should be 0 for 0xbb"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xbb\00"
define void @t_isbdigit_0xbb() {
%1 = call i64 @isbdigit(i32 187)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 940, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xbb\00"
define void @t_isbdigit_0xbb() {
%1 = tail call i64 @isbdigit(i32 187)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 940, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double deriv(double f(double), double x, double h) { return f(x) + h; }


x86 assembly (clang, -O0):
<deriv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x10(%rbp),%xmm0
call   *%rax
addsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deriv>:
push   %rax
movsd  %xmm1,(%rsp)
call   *%rdi
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @deriv(double (double)* %0, double %1, double %2) {
%4 = alloca double (double)*
%5 = alloca double
%6 = alloca double
store double (double)* %0, double (double)** %4
store double %1, double* %5
store double %2, double* %6
%7 = load double (double)*, double (double)** %4
%8 = load double, double* %5
%9 = call double %7(double %8)
%10 = load double, double* %6
%11 = fadd double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @deriv(double (double)* nocapture %0, double %1, double %2) {
%4 = tail call double %0(double %1)
%5 = fadd double %4, %2
ret double %5
}