xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ erf(double);
float erff(float x) { return (float)erf((double)x); }


x86 assembly (clang, -O0):
<erff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <erf@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erff>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <erf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @erff(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @erf(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @erff(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @erf(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
int div(int lhs, int rhs) { return lhs / rhs; }


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

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
ret

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

LLVM IR (-O2):
define i32 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Type definitions */
struct MgoString {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mgostring_ltrim(struct MgoString *);
int /*<<< orphan*/ mgostring_rtrim(struct MgoString *);
void mgostring_trim(struct MgoString *str) {
  mgostring_ltrim(str);
  mgostring_rtrim(str);
}


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

x86 assembly (clang, -O2):
<mgostring_trim>:
push   %rbx
mov    %rdi,%rbx
call   1040 <mgostring_ltrim@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <mgostring_rtrim@plt>

LLVM IR (-O0):
%struct.MgoString = type { i32 }
define void @mgostring_trim(%struct.MgoString* %0) {
%2 = alloca %struct.MgoString*
store %struct.MgoString* %0, %struct.MgoString** %2
%3 = load %struct.MgoString*, %struct.MgoString** %2
%4 = call i32 @mgostring_ltrim(%struct.MgoString* %3)
%5 = load %struct.MgoString*, %struct.MgoString** %2
%6 = call i32 @mgostring_rtrim(%struct.MgoString* %5)
ret void
}

LLVM IR (-O2):
%struct.MgoString = type { i32 }
define void @mgostring_trim(%struct.MgoString* %0) {
%2 = tail call i32 @mgostring_ltrim(%struct.MgoString* %0)
%3 = tail call i32 @mgostring_rtrim(%struct.MgoString* %0)
ret void
}
int main() {
  int a = 10;
  int b = 20;
  if (a == 10) {
    if (b == 21) {
      return 1;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    113e <main+0x3e>
cmpl   $0x15,-0xc(%rbp)
jne    1139 <main+0x39>
movl   $0x1,-0x4(%rbp)
jmp    113e <main+0x3e>
jmp    113e <main+0x3e>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 21
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %1
br label %11
10: ; preds = %6
br label %11
11: ; preds = %9, %10, %0
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
float e(int a, int b) { return ((-b) / (2 * a)); }


x86 assembly (clang, -O0):
<e>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<e>:
mov    %esi,%eax
add    %edi,%edi
cltd
idiv   %edi
neg    %eax
cvtsi2ss %eax,%xmm0
ret

LLVM IR (-O0):
define float @e(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 = sub nsw i32 0, %5
%7 = load i32, i32* %3
%8 = mul nsw i32 2, %7
%9 = sdiv i32 %6, %8
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @e(i32 %0, i32 %1) {
%3 = shl nsw i32 %0, 1
%4 = sdiv i32 %1, %3
%5 = sub nsw i32 0, %4
%6 = sitofp i32 %5 to float
ret float %6
}
/* Variables and functions */
scalar_t__ system(char *);
bool reinitTerminal() { return system("stty sane") == 0; }


x86 assembly (clang, -O0):
<reinitTerminal>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reinitTerminal>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"stty sane\00"
define i32 @reinitTerminal() {
%1 = call i64 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
@.str = [10 x i8] c"stty sane\00"
define i32 @reinitTerminal() {
%1 = tail call i64 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
float MIN(float x, float y) { return (x < y) ? x : y; }


x86 assembly (clang, -O0):
<MIN>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <MIN+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <MIN+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIN>:
minss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @MIN(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
long f1(void) { return 0x132; }


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

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

LLVM IR (-O0):
define i64 @f1() {
ret i64 306
}

LLVM IR (-O2):
define i64 @f1() {
ret i64 306
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func() { printf("hi!\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"hi!\00"
define void @func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
void nseel_asm_aboveeq_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_aboveeq_end() {
ret void
}
unsigned int foo(unsigned int x) {
  return ((x >> 16) & 0xffff) | ((x & 0xffff) << 16);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
and    $0xffff,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
rol    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 16
%5 = and i32 %4, 65535
%6 = load i32, i32* %2
%7 = and i32 %6, 65535
%8 = shl i32 %7, 16
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 16)
ret i32 %2
}
/* Variables and functions */
int syscall(int, void *, size_t, int);
int msync(void *start, size_t len, int flags) {
  return syscall(144, start, len, flags);
}


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

x86 assembly (clang, -O2):
<msync>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x90,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @msync(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 144, i8* %0, i64 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ oneLoop();
void eventLoop() {
  while (1)
    oneLoop();
}


x86 assembly (clang, -O0):
<eventLoop>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <eventLoop+0x9>
mov    $0x0,%al
call   1030 <oneLoop@plt>
jmp    1119 <eventLoop+0x9>

x86 assembly (clang, -O2):
<eventLoop>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <oneLoop@plt>
jmp    1120 <eventLoop+0x10>

LLVM IR (-O0):
define void @eventLoop() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @oneLoop()
br label %1
}

LLVM IR (-O2):
define void @eventLoop() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @oneLoop()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  char flag[] = "flagishellomerkel";
  printf("This is CIA property.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xecd(%rip),%ax
mov    %ax,-0x20(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.flag = [18 x i8] c"flagishellomerkel\00"
@.str = [23 x i8] c"This is CIA property.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [18 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [18 x i8]* %6 to i8*
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [22 x i8] c"This is CIA property.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ TEMP_FAILURE_RETRY(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ vfork();
int /*<<< orphan*/ waitpid(scalar_t__, int /*<<< orphan*/ *,
                           int /*<<< orphan*/);
void sig_handler(int signum) {
  pid_t child = vfork();
  if (child == 0)
    exit(0);
  TEMP_FAILURE_RETRY(waitpid(child, NULL, 0));
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <vfork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1168 <sig_handler+0x28>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <waitpid@plt>
mov    %eax,%edi
call   1060 <TEMP_FAILURE_RETRY@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
push   %rax
xor    %eax,%eax
call   1040 <vfork@plt>
test   %rax,%rax
je     1161 <sig_handler+0x21>
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <waitpid@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <TEMP_FAILURE_RETRY@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @sig_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 (...) @vfork()
store i64 %4, i64* %3
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @exit(i32 0)
unreachable
9: ; preds = %1
%10 = load i64, i64* %3
%11 = call i32 @waitpid(i64 %10, i32* null, i32 0)
%12 = call i32 @TEMP_FAILURE_RETRY(i32 %11)
ret void
}

LLVM IR (-O2):
define void @sig_handler(i32 %0) {
%2 = tail call i64 (...) @vfork()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %1
%7 = tail call i32 @waitpid(i64 %2, i32* null, i32 0)
%8 = tail call i32 @TEMP_FAILURE_RETRY(i32 %7)
ret void
}
int main(int argc, char *argv[]) {
#pragma critTer : 14 : hello.c:
  return 0;
#pragma critTer : 15 : hello.c:
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
char *generatePasscode(int);
int /*<<< orphan*/ phase(int);
void phase_4() {
  char *pass = generatePasscode(4);
  phase(4);
}


x86 assembly (clang, -O0):
<phase_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <generatePasscode@plt>
mov    %rax,-0x8(%rbp)
mov    $0x4,%edi
call   1040 <phase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phase_4>:
push   %rax
mov    $0x4,%edi
call   1030 <generatePasscode@plt>
mov    $0x4,%edi
pop    %rax
jmp    1040 <phase@plt>

LLVM IR (-O0):
define void @phase_4() {
%1 = alloca i8*
%2 = call i8* @generatePasscode(i32 4)
store i8* %2, i8** %1
%3 = call i32 @phase(i32 4)
ret void
}

LLVM IR (-O2):
define void @phase_4() {
%1 = tail call i8* @generatePasscode(i32 4)
%2 = tail call i32 @phase(i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fclose(void *);
void file_close(void *f) { fclose(f); }


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

x86 assembly (clang, -O2):
<file_close>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @file_close(i8* nocapture %0) {
%2 = tail call i32 @fclose(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nocall(char *);
void spawn(void) { nocall("spawn"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"spawn\00"
define void @spawn() {
%1 = call i32 @nocall(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"spawn\00"
define void @spawn() {
%1 = tail call i32 @nocall(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
long f() { long x; }


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

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

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

LLVM IR (-O2):
define i64 @f() {
ret i64 undef
}
void f11(a11, a12) struct file *a11;
int a12;
{}


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

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

LLVM IR (-O0):
%struct.file = type opaque
define void @f11(%struct.file* %0, i32 %1) {
%3 = alloca %struct.file*
%4 = alloca i32
store %struct.file* %0, %struct.file** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.file = type opaque
define void @f11(%struct.file* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
char *astobfp(char *, int *, char *);
char *asdtobfp(char *buf, int *mp, char *str1, char *str2) {
  buf = astobfp(buf, mp, str1);
  buf = astobfp(buf, mp, str2);
  return buf;
}


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

x86 assembly (clang, -O2):
<asdtobfp>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rsi,%rbx
call   1030 <astobfp@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <astobfp@plt>

LLVM IR (-O0):
define i8* @asdtobfp(i8* %0, i32* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32* %1, i32** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = load i8*, i8** %7
%12 = call i8* @astobfp(i8* %9, i32* %10, i8* %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = load i32*, i32** %6
%15 = load i8*, i8** %8
%16 = call i8* @astobfp(i8* %13, i32* %14, i8* %15)
store i8* %16, i8** %5
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @asdtobfp(i8* %0, i32* %1, i8* %2, i8* %3) {
%5 = tail call i8* @astobfp(i8* %0, i32* %1, i8* %2)
%6 = tail call i8* @astobfp(i8* %5, i32* %1, i8* %3)
ret i8* %6
}
/* Variables and functions */
scalar_t__ is_loalpha(char const);
char *skip_loalpha(const char *s, int sz) {
  while (sz > 0 && is_loalpha(*s)) {
    s++;
    sz--;
  }
  return (char *)s;
}


x86 assembly (clang, -O0):
<skip_loalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jle    1144 <skip_loalpha+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_loalpha@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1154 <skip_loalpha+0x44>
jmp    116e <skip_loalpha+0x5e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <skip_loalpha+0xf>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_loalpha>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %esi,%esi
jle    1139 <skip_loalpha+0x29>
mov    %esi,%ebp
add    $0x1,%ebp
nop
movsbl (%rbx),%edi
call   1030 <is_loalpha@plt>
test   %rax,%rax
je     1139 <skip_loalpha+0x29>
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
jg     1120 <skip_loalpha+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @skip_loalpha(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %15, %2
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = call i64 @is_loalpha(i8 signext %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %5
%14 = phi i1 [ false, %5 ], [ %12, %8 ]
br i1 %14, label %15, label %20
15: ; preds = %13
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
%18 = load i32, i32* %4
%19 = add nsw i32 %18, -1
store i32 %19, i32* %4
br label %5
20: ; preds = %13
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define i8* @skip_loalpha(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %10
%5 = phi i32 [ %12, %10 ], [ %1, %2 ]
%6 = phi i8* [ %11, %10 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = tail call i64 @is_loalpha(i8 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = add nsw i32 %5, -1
%13 = icmp sgt i32 %5, 1
br i1 %13, label %4, label %14
14: ; preds = %4, %10, %2
%15 = phi i8* [ %0, %2 ], [ %11, %10 ], [ %6, %4 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEnew(char *, int /*<<< orphan*/ *);
void code_new(char *arg) { appendCODE(makeCODEnew(arg, NULL)); }


x86 assembly (clang, -O0):
<code_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <makeCODEnew@plt>
mov    %eax,%edi
call   1030 <appendCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_new>:
push   %rax
xor    %esi,%esi
call   1040 <makeCODEnew@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <appendCODE@plt>

LLVM IR (-O0):
define void @code_new(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @makeCODEnew(i8* %3, i32* null)
%5 = call i32 @appendCODE(i32 %4)
ret void
}

LLVM IR (-O2):
define void @code_new(i8* %0) {
%2 = tail call i32 @makeCODEnew(i8* %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die_mem(char *, int);
void *realloc(void *, size_t);
int /*<<< orphan*/ update_entry(void *, void *, size_t, char *, int);
void *safe_realloc_internal(void *ptr, size_t size, char *file, int line) {
  void *ret = realloc(ptr, size);
  if (!ret)
    die_mem(file, line);
  update_entry(ptr, ret, size, file, line);
  return ret;
}


x86 assembly (clang, -O0):
<safe_realloc_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    116f <safe_realloc_internal+0x3f>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <die_mem@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1050 <update_entry@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_realloc_internal>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbp
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115c <safe_realloc_internal+0x2c>
mov    %r15,%rdi
mov    %r14d,%esi
call   1030 <die_mem@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14d,%r8d
call   1050 <update_entry@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @safe_realloc_internal(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i8* @realloc(i8* %0, i64 %1)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @die_mem(i8* %2, i32 %3)
br label %9
9: ; preds = %7, %4
%10 = tail call i32 @update_entry(i8* %0, i8* %5, i64 %1, i8* %2, i32 %3)
ret i8* %5
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ putchar(int);
void getchar5() {
  int c;
  while ((c = getchar()) != -1)
    putchar(c);
}


x86 assembly (clang, -O0):
<getchar5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xffffffff,%eax
je     1148 <getchar5+0x28>
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
jmp    1128 <getchar5+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar5>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xffffffff,%eax
je     1145 <getchar5+0x25>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    1130 <getchar5+0x10>
pop    %rax
ret

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

LLVM IR (-O2):
define void @getchar5() {
%1 = tail call i32 (...) @getchar()
%2 = icmp eq i32 %1, -1
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 @putchar(i32 %4)
%6 = tail call i32 (...) @getchar()
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %3
8: ; preds = %3, %0
ret void
}
long long foo(long long a, short *b, char *c) { return a + *b * *c; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movswl (%rcx),%ecx
mov    -0x18(%rbp),%rdx
movsbl (%rdx),%edx
imul   %edx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movswq (%rsi),%rcx
movsbq (%rdx),%rax
imul   %rcx,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @foo(i64 %0, i16* %1, i8* %2) {
%4 = alloca i64
%5 = alloca i16*
%6 = alloca i8*
store i64 %0, i64* %4
store i16* %1, i16** %5
store i8* %2, i8** %6
%7 = load i64, i64* %4
%8 = load i16*, i16** %5
%9 = load i16, i16* %8
%10 = sext i16 %9 to i32
%11 = load i8*, i8** %6
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = mul nsw i32 %10, %13
%15 = sext i32 %14 to i64
%16 = add nsw i64 %7, %15
ret i64 %16
}

LLVM IR (-O2):
define i64 @foo(i64 %0, i16* nocapture %1, i8* nocapture %2) {
%4 = load i16, i16* %1
%5 = sext i16 %4 to i64
%6 = load i8, i8* %2
%7 = sext i8 %6 to i64
%8 = mul nsw i64 %7, %5
%9 = add nsw i64 %8, %0
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x0d() {
  Assert_real((isascii(13)),
              "/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_isascii.c",
              70, ("isascii should be 1 for 0x0d"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x0d>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x46,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x0d\00"
define void @t_isascii_0x0d() {
%1 = call i32 @isascii(i32 13)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 70, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x0d\00"
define void @t_isascii_0x0d() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 70, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *mst2fd(string)
char *string;
{
  double sdj, dj;
  sdj = fd2jd(string);
  dj = mst2jd(sdj);
  return (jd2fd(dj));
}


x86 assembly (clang, -O0):
<mst2fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <mst2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1050 <jd2fd@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mst2fd>:
push   %rax
xor    %eax,%eax
call   1040 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1030 <mst2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1050 <jd2fd@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @mst2fd(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca double
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %5)
%7 = sitofp i32 %6 to double
store double %7, double* %3
%8 = load double, double* %3
%9 = call i32 (double, ...) bitcast (i32 (...)* @mst2jd to i32 (double, ...)*)(double %8)
%10 = sitofp i32 %9 to double
store double %10, double* %4
%11 = load double, double* %4
%12 = call i32 (double, ...) bitcast (i32 (...)* @jd2fd to i32 (double, ...)*)(double %11)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
ret i8* %14
}

LLVM IR (-O2):
define i8* @mst2fd(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @mst2jd to i32 (double, ...)*)(double %3)
%5 = sitofp i32 %4 to double
%6 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2fd to i32 (double, ...)*)(double %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f10(unsigned int s) {
  if ((unsigned int)s == 0)
    return;
  if (s == 0)
    link_error();
}


x86 assembly (clang, -O0):
<f10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112a <f10+0x1a>
jmp    113b <f10+0x2b>
cmpl   $0x0,-0x4(%rbp)
jne    113b <f10+0x2b>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f10(i32 %0) {
ret void
}
void kasan_slab_free(struct kmem_cache *s, void *object) {}


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

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

LLVM IR (-O0):
%struct.kmem_cache = type opaque
define void @kasan_slab_free(%struct.kmem_cache* %0, i8* %1) {
%3 = alloca %struct.kmem_cache*
%4 = alloca i8*
store %struct.kmem_cache* %0, %struct.kmem_cache** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.kmem_cache = type opaque
define void @kasan_slab_free(%struct.kmem_cache* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ _get_sysfs_numeric(char *, char *, unsigned int *);
unsigned int get_sysfs_ihex(char *sysfs_attr) {
  unsigned int number;
  if (_get_sysfs_numeric(sysfs_attr, "%x", &number) == 0)
    return number;
  else
    return ((unsigned int)-1);
}


x86 assembly (clang, -O0):
<get_sysfs_ihex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <_get_sysfs_numeric@plt>
cmp    $0x0,%rax
jne    1145 <get_sysfs_ihex+0x35>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <get_sysfs_ihex+0x3c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sysfs_ihex>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <_get_sysfs_numeric@plt>
neg    %rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @get_sysfs_ihex(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @_get_sysfs_numeric(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 -1
ret i32 %7
}
void g_type_get_plugin() {}


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

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

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

LLVM IR (-O2):
define void @g_type_get_plugin() {
ret void
}
/* Type definitions */
struct zbuf {
  int dummy;
};
typedef int n;

/* Variables and functions */
void *__zbuf_pull(struct zbuf *, int, int);
void *znl_pull(struct zbuf *zb, size_t n) {
  return (__zbuf_pull(zb, (((n) + 3) & ~3), 1));
}


x86 assembly (clang, -O0):
<znl_pull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
add    $0x3,%rax
and    $0xfffffffffffffffc,%rax
mov    %eax,%esi
mov    $0x1,%edx
call   1030 <__zbuf_pull@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<znl_pull>:
add    $0x3,%esi
and    $0xfffffffc,%esi
mov    $0x1,%edx
jmp    1030 <__zbuf_pull@plt>

LLVM IR (-O0):
%struct.zbuf = type { i32 }
define i8* @znl_pull(%struct.zbuf* %0, i64 %1) {
%3 = alloca %struct.zbuf*
%4 = alloca i64
store %struct.zbuf* %0, %struct.zbuf** %3
store i64 %1, i64* %4
%5 = load %struct.zbuf*, %struct.zbuf** %3
%6 = load i64, i64* %4
%7 = add i64 %6, 3
%8 = and i64 %7, -4
%9 = trunc i64 %8 to i32
%10 = call i8* @__zbuf_pull(%struct.zbuf* %5, i32 %9, i32 1)
ret i8* %10
}

LLVM IR (-O2):
%struct.zbuf = type { i32 }
define i8* @znl_pull(%struct.zbuf* %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = add i32 %3, 3
%5 = and i32 %4, -4
%6 = tail call i8* @__zbuf_pull(%struct.zbuf* %0, i32 %5, i32 1)
ret i8* %6
}
void fd116(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  p014A:
    goto p014A;
    goto a;
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
a:;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd116>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd116+0x7>

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

LLVM IR (-O0):
define void @fd116(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; preds = %23
br label %23
24: ; No predecessors!
%25 = load i32, i32* %2
%26 = zext i32 %25 to i64
br label %27
27: ; preds = %27, %24
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
br label %31
31: ; preds = %31, %28
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd116(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ msleep(long);
void fsleep(float ftime) {
  long mtime = (long)(ftime * 1000.0);
  msleep(mtime);
}


x86 assembly (clang, -O0):
<fsleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <msleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsleep>:
cvtss2sd %xmm0,%xmm0
mulsd  0xee4(%rip),%xmm0
cvttsd2si %xmm0,%rdi
jmp    1030 <msleep@plt>

LLVM IR (-O0):
define void @fsleep(float %0) {
%2 = alloca float
%3 = alloca i64
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fmul double %5, 1.000000e+03
%7 = fptosi double %6 to i64
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = call i32 @msleep(i64 %8)
ret void
}

LLVM IR (-O2):
define void @fsleep(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 1.000000e+03
%4 = fptosi double %3 to i64
%5 = tail call i32 @msleep(i64 %4)
ret void
}
int main() {
  int a[5];
  int len = 0;
  _Bool c = __VERIFIER_nondet_bool();
  int i;
  while (c) {
    if (len == 4)
      len = 0;
    a[len] = 0;
    len++;
  }
  __VERIFIER_assert(len == 5);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x24(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_bool@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x25(%rbp)
testb  $0x1,-0x25(%rbp)
je     117d <main+0x5d>
cmpl   $0x4,-0x24(%rbp)
jne    1163 <main+0x43>
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
movl   $0x0,-0x20(%rbp,%rax,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1148 <main+0x28>
cmpl   $0x5,-0x24(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <__VERIFIER_assert@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_bool@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <__VERIFIER_assert@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_bool()
%2 = icmp eq i32 %1, 0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @__VERIFIER_assert to i32 (i32, ...)*)(i32 0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int fputc(char, int /*<<< orphan*/);
int fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int puts(const char *m) {
  int go;
  go = fputs(m, stdout);
  go = fputc('\n', stdout);
  fflush(stdout);
  return go;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    0x2ea5(%rip),%r14
mov    (%r14),%esi
call   1030 <fputs@plt>
mov    (%r14),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    %eax,%ebx
mov    (%r14),%edi
call   1050 <fflush@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* @stdout
%8 = call i32 @fputc(i8 signext 10, i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* @stdout
%10 = call i32 @fflush(i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputc(i8 signext 10, i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
ret i32 %5
}
void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
                                           unsigned long rel_addr,
                                           unsigned long rel_size) {}


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

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

LLVM IR (-O0):
%struct.dyn_elf = type opaque
define void @_dl_parse_lazy_relocation_information(%struct.dyn_elf* %0, i64 %1, i64 %2) {
%4 = alloca %struct.dyn_elf*
%5 = alloca i64
%6 = alloca i64
store %struct.dyn_elf* %0, %struct.dyn_elf** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
%struct.dyn_elf = type opaque
define void @_dl_parse_lazy_relocation_information(%struct.dyn_elf* nocapture %0, i64 %1, i64 %2) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mpga_clear_protection_absent(uint8_t *p_mpga) { p_mpga[1] &= ~0x01; }


x86 assembly (clang, -O0):
<mpga_clear_protection_absent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpga_clear_protection_absent>:
andb   $0xfe,0x4(%rdi)
ret

LLVM IR (-O0):
define void @mpga_clear_protection_absent(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, -2
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @mpga_clear_protection_absent(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = and i32 %3, -2
store i32 %4, i32* %2
ret void
}
long long load64_reverse_3(long long *p, int i) {
  return __builtin_bswap64(p[i]);
}


x86 assembly (clang, -O0):
<load64_reverse_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
bswap  %rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load64_reverse_3>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
bswap  %rax
ret

LLVM IR (-O0):
define i64 @load64_reverse_3(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i64*, i64** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %5, i64 %7
%9 = load i64, i64* %8
%10 = call i64 @llvm.bswap.i64(i64 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @load64_reverse_3(i64* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i64, i64* %0, i64 %3
%5 = load i64, i64* %4
%6 = tail call i64 @llvm.bswap.i64(i64 %5)
ret i64 %6
}
void storage_setup(void) {}


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

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

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

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