xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned int n = 0;
  scanf("%u", &n);
  printf("%0*d\n", n, 0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xebe(%rip),%rdi
xor    %edx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
@.str.1 = [6 x i8] c"%0*d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 0)
ret i32 0
}
int count_escaped(char *buf, int len) {
  int cnt = 0;
  int i = 0;
  while (i < len - 1) {
    if (buf[i] == '\\') {
      cnt++;
      i++;
    }
    i++;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<count_escaped>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    115f <count_escaped+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5c,%eax
jne    1151 <count_escaped+0x51>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <count_escaped+0x19>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_escaped>:
xor    %eax,%eax
cmp    $0x2,%esi
jl     1127 <count_escaped+0x27>
add    $0xffffffff,%esi
xor    %ecx,%ecx
xor    %eax,%eax
xchg   %ax,%ax
movslq %ecx,%rcx
xor    %edx,%edx
cmpb   $0x5c,(%rdi,%rcx,1)
sete   %dl
add    %edx,%eax
add    %edx,%ecx
add    $0x1,%ecx
cmp    %esi,%ecx
jl     1110 <count_escaped+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_escaped(i8* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %17
5: ; preds = %2, %5
%6 = phi i32 [ %15, %5 ], [ 0, %2 ]
%7 = phi i32 [ %13, %5 ], [ 0, %2 ]
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 92
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %7, %12
%14 = add nsw i32 %6, 1
%15 = add i32 %14, %12
%16 = icmp slt i32 %15, %3
br i1 %16, label %5, label %17
17: ; preds = %5, %2
%18 = phi i32 [ 0, %2 ], [ %13, %5 ]
ret i32 %18
}
void caller_1_2_2_2_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_2_2_2_2_2_1() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int node_number_to_block(uint32_t i_node_number) {
  return i_node_number / ((1024 / ((14 + 2) * 4)));
}


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

x86 assembly (clang, -O2):
<node_number_to_block>:
lea    0xf(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x4,%eax
ret

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

LLVM IR (-O2):
define i32 @node_number_to_block(i32 %0) {
%2 = sdiv i32 %0, 16
ret i32 %2
}
int mpi_get_i0(int ng, int rang, int p) {
  int step = ng / p;
  return rang * step;
}


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

x86 assembly (clang, -O2):
<mpi_get_i0>:
mov    %edx,%ecx
mov    %edi,%eax
cltd
idiv   %ecx
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @mpi_get_i0(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = sdiv i32 %8, %9
store i32 %10, i32* %7
%11 = load i32, i32* %5
%12 = load i32, i32* %7
%13 = mul nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @mpi_get_i0(i32 %0, i32 %1, i32 %2) {
%4 = sdiv i32 %0, %2
%5 = mul nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "Usage: %s {one or more hex numbers ...}\n", argv0);
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: %s {one or more hex numbers ...}\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: %s {one or more hex numbers ...}\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int f_i0() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f_i0() {
ret i32 0
}
double mymean(double arg1, double arg2) { return (arg1 + arg2) / 2; }


x86 assembly (clang, -O0):
<mymean>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymean>:
addsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mymean(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 = fadd double %5, %6
%8 = fdiv double %7, 2.000000e+00
ret double %8
}

LLVM IR (-O2):
define double @mymean(double %0, double %1) {
%3 = fadd double %0, %1
%4 = fmul double %3, 5.000000e-01
ret double %4
}
/* Variables and functions */
long get_fpc();
int /*<<< orphan*/ set_fpc(long);
int __fesetround(int r) {
  set_fpc(get_fpc() & ~3L | r);
  return 0;
}


x86 assembly (clang, -O0):
<__fesetround>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_fpc@plt>
mov    %rax,%rdi
and    $0xfffffffffffffffc,%rdi
movslq -0x4(%rbp),%rax
or     %rax,%rdi
call   1030 <set_fpc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fesetround>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <get_fpc@plt>
and    $0xfffffffffffffffc,%rax
movslq %ebx,%rdi
or     %rax,%rdi
call   1030 <set_fpc@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__fesetround(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @get_fpc()
%4 = and i64 %3, -4
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = or i64 %4, %6
%8 = call i32 @set_fpc(i64 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @__fesetround(i32 %0) {
%2 = tail call i64 (...) @get_fpc()
%3 = and i64 %2, -4
%4 = sext i32 %0 to i64
%5 = or i64 %3, %4
%6 = tail call i32 @set_fpc(i64 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ BUG();
void flush_tlb_kernel_range(unsigned long start, unsigned long end) { BUG(); }


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

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

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

LLVM IR (-O2):
define void @flush_tlb_kernel_range(i64 %0, i64 %1) {
%3 = tail call i32 (...) @BUG()
ret void
}
int isgraph(int c) { return ' ' < c && c < '\177'; }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x20,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jge    1124 <isgraph+0x24>
cmpl   $0x7f,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
size_t list_meter_float(const void *el) { return sizeof(float); }


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

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

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

LLVM IR (-O2):
define i64 @list_meter_float(i8* nocapture readnone %0) {
ret i64 4
}
int f(int x[10]) { return *++x; }


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

x86 assembly (clang, -O2):
<f>:
mov    0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
unsigned char readuchar(FILE *f) {
  unsigned char c1;
  fread(&c1, 1, 1, f);
  return c1;
}


x86 assembly (clang, -O0):
<readuchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x9(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
movzbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readuchar>:
push   %rax
mov    %rdi,%rcx
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @readuchar(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fread(i8* %3, i32 1, i32 1, i32* %4)
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @readuchar(i32* nocapture %0) {
%2 = alloca i8
%3 = call i32 @fread(i8* %2, i32 1, i32 1, i32* %0)
%4 = load i8, i8* %2
ret i8 %4
}
/* Variables and functions */
int fallocate(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/, int);
int main(void) { return fallocate(0, 0, 0, 4096); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edx,%edx
mov    $0x1000,%ecx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <fallocate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1000,%ecx
jmp    1030 <fallocate@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fallocate(i32 0, i32 0, i32 0, i32 4096)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fallocate(i32 0, i32 0, i32 0, i32 4096)
ret i32 %1
}
unsigned long long bar(unsigned short x) { return (unsigned long long)x << 32; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
shl    $0x20,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    %edi,%eax
shl    $0x20,%rax
ret

LLVM IR (-O0):
define i64 @bar(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i64
%5 = shl i64 %4, 32
ret i64 %5
}

LLVM IR (-O2):
define i64 @bar(i16 zeroext %0) {
%2 = zext i16 %0 to i64
%3 = shl nuw nsw i64 %2, 32
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void shepard_note_free(void *data) { free(data); }


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

x86 assembly (clang, -O2):
<shepard_note_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @shepard_note_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
union bpf_attr {
  int map_fd;
  void *next_key;
  void *key;
};
typedef int /*<<< orphan*/ attr;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_GET_NEXT_KEY;
int bpf(int /*<<< orphan*/, union bpf_attr *, int);
void *bpf_ptr_to_u64(void *);
int bpf_map_next_key(int fd, const void *key, void *next_key) {
  union bpf_attr attr = {};
  attr.map_fd = fd;
  attr.key = bpf_ptr_to_u64(key);
  attr.next_key = bpf_ptr_to_u64(next_key);
  return bpf(BPF_MAP_GET_NEXT_KEY, &attr, sizeof(attr));
}


x86 assembly (clang, -O0):
<bpf_map_next_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <bpf_ptr_to_u64@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <bpf_ptr_to_u64@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1030 <bpf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_map_next_key>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rsi,%rdi
call   1040 <bpf_ptr_to_u64@plt>
mov    %rbx,%rdi
call   1040 <bpf_ptr_to_u64@plt>
mov    %rax,0x8(%rsp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
mov    $0x8,%edx
call   1030 <bpf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%union.bpf_attr = type { i8* }
@__const.bpf_map_next_key.attr = { i32, [4 x i8] } { i32 0, [4 x i8] undef }
@BPF_MAP_GET_NEXT_KEY = global i32 0
define i32 @bpf_map_next_key(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %union.bpf_attr
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = bitcast %union.bpf_attr* %7 to i8*
%9 = load i32, i32* %4
%10 = bitcast %union.bpf_attr* %7 to i32*
store i32 %9, i32* %10
%11 = load i8*, i8** %5
%12 = call i8* @bpf_ptr_to_u64(i8* %11)
%13 = bitcast %union.bpf_attr* %7 to i8**
store i8* %12, i8** %13
%14 = load i8*, i8** %6
%15 = call i8* @bpf_ptr_to_u64(i8* %14)
%16 = bitcast %union.bpf_attr* %7 to i8**
store i8* %15, i8** %16
%17 = load i32, i32* @BPF_MAP_GET_NEXT_KEY
%18 = call i32 @bpf(i32 %17, %union.bpf_attr* %7, i32 8)
ret i32 %18
}

LLVM IR (-O2):
%union.bpf_attr = type { i8* }
@BPF_MAP_GET_NEXT_KEY = global i32 0
define i32 @bpf_map_next_key(i32 %0, i8* %1, i8* %2) {
%4 = alloca %union.bpf_attr
%5 = bitcast %union.bpf_attr* %4 to i8*
%6 = tail call i8* @bpf_ptr_to_u64(i8* %1)
%7 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %4, i64 0, i32 0
%8 = tail call i8* @bpf_ptr_to_u64(i8* %2)
store i8* %8, i8** %7
%9 = load i32, i32* @BPF_MAP_GET_NEXT_KEY
%10 = call i32 @bpf(i32 %9, %union.bpf_attr* %4, i32 8)
ret i32 %10
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_retrieve_quaddobl_solution(int n, int k, int *m, double *sol) {
  int fail;
  fail = _ada_use_c2phc4c(394, &k, m, sol, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_retrieve_quaddobl_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x18a,%edi
lea    -0x8(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_retrieve_quaddobl_solution>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x18a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_retrieve_quaddobl_solution(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca double*
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store double* %3, double** %8
%10 = load i32*, i32** %7
%11 = load double*, double** %8
%12 = call i32 @_ada_use_c2phc4c(i32 394, i32* %6, i32* %10, double* %11, i32 0)
store i32 %12, i32* %9
%13 = load i32, i32* %9
ret i32 %13
}

LLVM IR (-O2):
define i32 @solcon_retrieve_quaddobl_solution(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca i32
store i32 %1, i32* %5
%6 = call i32 @_ada_use_c2phc4c(i32 394, i32* %5, i32* %2, double* %3, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ method1();
int main(void) {
  method1();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <method1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <method1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @method1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @method1()
ret i32 0
}
/* Variables and functions */
int f(int *);
int main(void) {
  int p = 42;
  return f(&p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x2a,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <f@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 42, i32* %1
%3 = call i32 @f(i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ curses_end();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *non_null(void *ptr) {
  if (!ptr) {
    curses_end();
    fprintf(stderr, "malloc failed\n");
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<non_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    116d <non_null+0x3d>
mov    $0x0,%al
call   1030 <curses_end@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<non_null>:
test   %rdi,%rdi
je     1139 <non_null+0x9>
mov    %rdi,%rax
ret
push   %rax
xor    %eax,%eax
call   1030 <curses_end@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xeaf(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"malloc failed\0A\00"
define i8* @non_null(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = call i32 (...) @curses_end()
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"malloc failed\0A\00"
define i8* @non_null(i8* readnone returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = tail call i32 (...) @curses_end()
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xca() {
  Assert_real((isascii(202) == 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_isascii.c",
              1015, ("isascii should be 0 for 0xca"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xca>:
push   %rax
mov    $0xca,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3f7,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xca\00"
define void @t_isascii_0xca() {
%1 = call i64 @isascii(i32 202)
%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 1015, 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 0 for 0xca\00"
define void @t_isascii_0xca() {
%1 = tail call i64 @isascii(i32 202)
%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 1015, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
const void *field_cref(ptrdiff_t pos, const void *base) {
  return (const void *)(((const unsigned char *)base) + pos);
}


x86 assembly (clang, -O0):
<field_cref>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<field_cref>:
movslq %edi,%rax
add    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @field_cref(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
ret i8* %8
}

LLVM IR (-O2):
define i8* @field_cref(i32 %0, i8* readnone %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i8, i8* %1, i64 %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr, "Usage: mknod path {f|b|c|p} dev\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Usage: mknod path {f|b|c|p} dev\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Usage: mknod path {f|b|c|p} dev\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ munmap(void *, int /*<<< orphan*/);
void helper_closefile(int fd, off_t len, void *data) {
  munmap(data, len);
  close(fd);
}


x86 assembly (clang, -O0):
<helper_closefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <munmap@plt>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_closefile>:
push   %rbx
mov    %edi,%ebx
mov    %rdx,%rdi
call   1040 <munmap@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @helper_closefile(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @munmap(i8* %2, i32 %1)
%5 = tail call i32 @close(i32 %0)
ret void
}
int get_hash_len(int hashtype) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_hash_len(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ao();
int /*<<< orphan*/ mav(int, int);
int /*<<< orphan*/ msleep(int);
int main() {
  mav(0, 1000);
  mav(2, 1000);
  msleep(6000);
  ao();
  mav(0, -1000);
  mav(2, -1000);
  msleep(6000);
  ao();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x1770,%edi
call   1030 <msleep@plt>
mov    $0x0,%al
call   1050 <ao@plt>
xor    %edi,%edi
mov    $0xfffffc18,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0xfffffc18,%esi
call   1040 <mav@plt>
mov    $0x1770,%edi
call   1030 <msleep@plt>
mov    $0x0,%al
call   1050 <ao@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1040 <mav@plt>
mov    $0x1770,%edi
call   1030 <msleep@plt>
xor    %eax,%eax
call   1050 <ao@plt>
xor    %edi,%edi
mov    $0xfffffc18,%esi
call   1040 <mav@plt>
mov    $0x2,%edi
mov    $0xfffffc18,%esi
call   1040 <mav@plt>
mov    $0x1770,%edi
call   1030 <msleep@plt>
xor    %eax,%eax
call   1050 <ao@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @mav(i32 0, i32 1000)
%3 = call i32 @mav(i32 2, i32 1000)
%4 = call i32 @msleep(i32 6000)
%5 = call i32 (...) @ao()
%6 = call i32 @mav(i32 0, i32 -1000)
%7 = call i32 @mav(i32 2, i32 -1000)
%8 = call i32 @msleep(i32 6000)
%9 = call i32 (...) @ao()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @mav(i32 0, i32 1000)
%2 = tail call i32 @mav(i32 2, i32 1000)
%3 = tail call i32 @msleep(i32 6000)
%4 = tail call i32 (...) @ao()
%5 = tail call i32 @mav(i32 0, i32 -1000)
%6 = tail call i32 @mav(i32 2, i32 -1000)
%7 = tail call i32 @msleep(i32 6000)
%8 = tail call i32 (...) @ao()
ret i32 0
}
int HelpItem54(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem54() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LCD_CLR_RESET();
int /*<<< orphan*/ LCD_SET_A0();
int /*<<< orphan*/ LCD_SET_E();
int /*<<< orphan*/ LCD_SET_RESET();
void LCD_X_Init(void) {
  LCD_CLR_RESET();
  ;
  LCD_SET_E();
  ;
  LCD_SET_A0();
  ;
  ;
  ;
  LCD_SET_RESET();
}


x86 assembly (clang, -O0):
<LCD_X_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <LCD_CLR_RESET@plt>
mov    $0x0,%al
call   1060 <LCD_SET_E@plt>
mov    $0x0,%al
call   1040 <LCD_SET_A0@plt>
mov    $0x0,%al
call   1030 <LCD_SET_RESET@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_X_Init>:
push   %rax
xor    %eax,%eax
call   1050 <LCD_CLR_RESET@plt>
xor    %eax,%eax
call   1060 <LCD_SET_E@plt>
xor    %eax,%eax
call   1040 <LCD_SET_A0@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <LCD_SET_RESET@plt>

LLVM IR (-O0):
define void @LCD_X_Init() {
%1 = call i32 (...) @LCD_CLR_RESET()
%2 = call i32 (...) @LCD_SET_E()
%3 = call i32 (...) @LCD_SET_A0()
%4 = call i32 (...) @LCD_SET_RESET()
ret void
}

LLVM IR (-O2):
define void @LCD_X_Init() {
%1 = tail call i32 (...) @LCD_CLR_RESET()
%2 = tail call i32 (...) @LCD_SET_E()
%3 = tail call i32 (...) @LCD_SET_A0()
%4 = tail call i32 (...) @LCD_SET_RESET()
ret void
}
int sum(int n) {
  int s;
  s = 0;
  while (n != 0) {
    s = n != 2 ? s + n : s - n;
    n = n - 1;
  }
  return s;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114d <sum+0x4d>
cmpl   $0x2,-0x4(%rbp)
je     1130 <sum+0x30>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1139 <sum+0x39>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <sum+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
xor    %eax,%eax
jmp    111a <sum+0x1a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xfffffffe,%ecx
add    %ecx,%eax
add    $0xffffffff,%edi
cmp    $0x2,%edi
je     1110 <sum+0x10>
mov    %edi,%ecx
test   %edi,%edi
jne    1115 <sum+0x15>
ret

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

LLVM IR (-O2):
define i32 @sum(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ %0, %1 ], [ %9, %6 ]
%4 = phi i32 [ 0, %1 ], [ %8, %6 ]
switch i32 %3, label %6 [
i32 0, label %10
i32 2, label %5
]
5: ; preds = %2
br label %6
6: ; preds = %2, %5
%7 = phi i32 [ -2, %5 ], [ %3, %2 ]
%8 = add nsw i32 %7, %4
%9 = add nsw i32 %3, -1
br label %2
10: ; preds = %2
ret i32 %4
}
int spentLongTimeInBlock(int timeInBlock) { return timeInBlock > 5; }


x86 assembly (clang, -O0):
<spentLongTimeInBlock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spentLongTimeInBlock>:
xor    %eax,%eax
cmp    $0x6,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @spentLongTimeInBlock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 5
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @spentLongTimeInBlock(i32 %0) {
%2 = icmp sgt i32 %0, 5
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ full;

/* Variables and functions */
char *format_root_spec(char const *, char *);
scalar_t__ get_mount_point(char const *, int, char *);
char *get_rooted_trash_dir(const char base_path[], const char spec[]) {
  char full[4096];
  if (get_mount_point(base_path, sizeof(full), full) == 0) {
    return format_root_spec(spec, full);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<get_rooted_trash_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x1020(%rbp),%rdx
mov    $0x1000,%esi
call   1030 <get_mount_point@plt>
cmp    $0x0,%rax
jne    116b <get_rooted_trash_dir+0x4b>
mov    -0x18(%rbp),%rdi
lea    -0x1020(%rbp),%rsi
call   1040 <format_root_spec@plt>
mov    %rax,-0x8(%rbp)
jmp    1173 <get_rooted_trash_dir+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rooted_trash_dir>:
push   %rbx
sub    $0x1000,%rsp
mov    %rsi,%rbx
mov    %rsp,%rdx
mov    $0x1000,%esi
call   1030 <get_mount_point@plt>
test   %rax,%rax
je     1141 <get_rooted_trash_dir+0x21>
xor    %eax,%eax
jmp    114c <get_rooted_trash_dir+0x2c>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <format_root_spec@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @get_rooted_trash_dir(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [4096 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%9 = call i64 @get_mount_point(i8* %7, i32 4096, i8* %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%14 = call i8* @format_root_spec(i8* %12, i8* %13)
store i8* %14, i8** %3
br label %16
15: ; preds = %2
store i8* null, i8** %3
br label %16
16: ; preds = %15, %11
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @get_rooted_trash_dir(i8* %0, i8* %1) {
%3 = alloca [4096 x i8]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = call i64 @get_mount_point(i8* %0, i32 4096, i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i8* @format_root_spec(i8* %1, i8* %4)
br label %9
9: ; preds = %2, %7
%10 = phi i8* [ %8, %7 ], [ null, %2 ]
ret i8* %10
}
void Host_SetPaletteEntry(int Index, unsigned char R, unsigned char G,
                          unsigned char B) {}


x86 assembly (clang, -O0):
<Host_SetPaletteEntry>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %edi,-0x4(%rbp)
mov    %dl,-0x5(%rbp)
mov    %cl,-0x6(%rbp)
mov    %al,-0x7(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @Host_SetPaletteEntry(i32 %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
ret void
}
int test_imm_B0uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xB0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B0uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0xb0,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_B0uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 176
%7 = icmp ne i64 %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_B0uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 755914244096
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void code_free(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<code_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @code_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t simple_hash2(const char *name) {
  register unsigned char *s = (unsigned char *)name;
  register uint32_t hval = 0x811c9dc5;
  while (*s) {
    hval *= 16777619;
    hval ^= (uint32_t)*s++;
  }
  return hval;
}


x86 assembly (clang, -O0):
<simple_hash2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x811c9dc5,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <simple_hash2+0x4b>
imul   $0x1000193,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <simple_hash2+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_hash2>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <simple_hash2+0x27>
add    $0x1,%rdi
mov    $0x811c9dc5,%eax
nop
imul   $0x1000193,%eax,%edx
movzbl %cl,%eax
xor    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <simple_hash2+0x10>
ret
mov    $0x811c9dc5,%eax
ret

LLVM IR (-O0):
define i32 @simple_hash2(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
store i32 -2128831035, i32* %4
br label %6
6: ; preds = %10, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32, i32* %4
%12 = mul nsw i32 %11, 16777619
store i32 %12, i32* %4
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
%15 = load i8, i8* %13
%16 = zext i8 %15 to i32
%17 = load i32, i32* %4
%18 = xor i32 %17, %16
store i32 %18, i32* %4
br label %6
19: ; preds = %6
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @simple_hash2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ -2128831035, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul nsw i32 %6, 16777619
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = zext i8 %5 to i32
%11 = xor i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ -2128831035, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, char *);
void print_error_ln(int line, int char_number, char message[]) {
  printf("[error @ line %d, character %d] %s\n", line, char_number, message);
}


x86 assembly (clang, -O0):
<print_error_ln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error_ln>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"[error @ line %d, character %d] %s\0A\00"
define void @print_error_ln(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"[error @ line %d, character %d] %s\0A\00"
define void @print_error_ln(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_free_d(void *, int, char const *);
void free_d(void *ptr, int line, const char *file) {
  do_free_d(ptr, line, file);
}


x86 assembly (clang, -O0):
<free_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <do_free_d@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_d>:
jmp    1030 <do_free_d@plt>

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

LLVM IR (-O2):
define void @free_d(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @do_free_d(i8* %0, i32 %1, i8* %2)
ret void
}
/* Variables and functions */
float __rtl_fabsf_v1_00(float);
float rtl_fabsf(float a) { return __rtl_fabsf_v1_00(a); }


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

x86 assembly (clang, -O2):
<rtl_fabsf>:
jmp    1030 <__rtl_fabsf_v1_00@plt>

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

LLVM IR (-O2):
define float @rtl_fabsf(float %0) {
%2 = tail call float @__rtl_fabsf_v1_00(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int CheckPointerDouble(void *p, char *name) {
  if (p == NULL) {
    fprintf(stderr, "Error in fft_double():  %s == NULL\n", name);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<CheckPointerDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <CheckPointerDouble+0x40>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1157 <CheckPointerDouble+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckPointerDouble>:
mov    $0x1,%eax
test   %rdi,%rdi
je     111b <CheckPointerDouble+0xb>
ret
push   %rax
mov    %rsi,%rdx
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Error in fft_double(): %s == NULL\0A\00"
define i32 @CheckPointerDouble(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %10)
store i32 0, i32* %3
br label %13
12: ; preds = %2
store i32 1, i32* %3
br label %13
13: ; preds = %12, %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Error in fft_double(): %s == NULL\0A\00"
define i32 @CheckPointerDouble(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %8
}