xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, double);
void print_help(const char *program_name) {
  printf(
      "Usage: %s [OPTIONS] -r ROWS -c COLUMNS\n"
      "   -a, --alive-character       "
      "a character representing an alive object\n"
      "   -c, --columns\n"
      "   -f, --file                  read game starting position from file\n"
      "   -h, --help                  print this help\n"
      "   -n, --not-alive-character   "
      "a character representing an object not alive\n"
      "   -p, --probability           default %g\n"
      "   -r, --rows\n",
      program_name, 0.3);
}


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

x86 assembly (clang, -O2):
<print_help>:
mov    %rdi,%rsi
lea    0xeee(%rip),%rdi
movsd  0xede(%rip),%xmm0
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [377 x i8] c"Usage: %s [OPTIONS] -r ROWS -c COLUMNS\0A -a, --alive-character a character representing an alive object\0A -c, --columns\0A -f, --file read game starting position from file\0A -h, --help print this help\0A -n, --not-alive-character a character representing an object not alive\0A -p, --probability default %g\0A -r, --rows\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str, i64 0, i64 0), i8* %3, double 3.000000e-01)
ret void
}

LLVM IR (-O2):
@.str = [377 x i8] c"Usage: %s [OPTIONS] -r ROWS -c COLUMNS\0A -a, --alive-character a character representing an alive object\0A -c, --columns\0A -f, --file read game starting position from file\0A -h, --help print this help\0A -n, --not-alive-character a character representing an object not alive\0A -p, --probability default %g\0A -r, --rows\0A\00"
define void @print_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str, i64 0, i64 0), i8* %0, double 3.000000e-01)
ret void
}
void ID_3hr_interval(int *i, int *j) {
  if (*j != 0) {
    *j--;
  } else if (j == 0 && i != 0) {
    *i--;
    *j = 7;
  }
}


x86 assembly (clang, -O0):
<ID_3hr_interval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     112a <ID_3hr_interval+0x2a>
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
jmp    115b <ID_3hr_interval+0x5b>
cmpq   $0x0,-0x10(%rbp)
jne    1156 <ID_3hr_interval+0x56>
cmpq   $0x0,-0x8(%rbp)
je     1156 <ID_3hr_interval+0x56>
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x7,(%rax)
jmp    115b <ID_3hr_interval+0x5b>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @ID_3hr_interval(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int librlc_rs_repair_cleanup(char *out_data) {
  free(out_data);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @librlc_rs_repair_cleanup(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void yyerror(const char *msg) { printf("%s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double cos(double);
double sin(double);
double sincos(double x, double y, double t) { return sin(x) + cos(y); }


x86 assembly (clang, -O0):
<sincos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sincos>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @sincos(double %0, double %1, double %2) {
%4 = tail call double @sin(double %0)
%5 = tail call double @cos(double %1)
%6 = fadd double %4, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ malloc(int);
void *elem_new(int value) {
  int *p = (int *)malloc(sizeof(int));
  assert(p && "Failed to malloc a new element");
  *p = value;
  return ((void *)p);
}


x86 assembly (clang, -O0):
<elem_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     1153 <elem_new+0x33>
mov    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    1153 <elem_new+0x33>
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elem_new>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %ebp,(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Failed to malloc a new element\00"
define i8* @elem_new(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %1
%10 = phi i1 [ false, %1 ], [ true, %8 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %2
%14 = load i32*, i32** %3
store i32 %13, i32* %14
%15 = load i32*, i32** %3
%16 = bitcast i32* %15 to i8*
ret i8* %16
}

LLVM IR (-O2):
define i8* @elem_new(i32 %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
%4 = icmp ne i64 %2, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
store i32 %0, i32* %3
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ glib_fill(unsigned int);
void glib_wash(unsigned int colour) { glib_fill(colour); }


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

x86 assembly (clang, -O2):
<glib_wash>:
jmp    1030 <glib_fill@plt>

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

LLVM IR (-O2):
define void @glib_wash(i32 %0) {
%2 = tail call i32 @glib_fill(i32 %0)
ret void
}
int test_imm_E8int64_midword_reg(long long val) {
  return ((val >> 16) & (0xE8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E8int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xe8,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E8int64_midword_reg>:
test   $0xe80000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E8int64_midword_reg(i64 %0) {
%2 = and i64 %0, 15204352
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int main() {
  int i;
  int res = 0;
  goto L1;
  for (i = 0; i < 10; i++) {
  L2:
    res++;
    goto L3;
    return 42;
  L3:
    if (i > 100) {
    L1:
      i = 0;
      goto L2;
      break;
    }
  }
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    113e <main+0x3e>
cmpl   $0xa,-0x8(%rbp)
jge    115d <main+0x5d>
jmp    1126 <main+0x26>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x64,-0x8(%rbp)
jle    114a <main+0x4a>
jmp    113e <main+0x3e>
movl   $0x0,-0x8(%rbp)
jmp    1126 <main+0x26>
jmp    114f <main+0x4f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1117 <main+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %16
4: ; No predecessors!
store i32 0, i32* %2
br label %5
5: ; preds = %18, %4
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %21
8: ; preds = %5
br label %9
9: ; preds = %16, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 100
br i1 %14, label %15, label %17
15: ; preds = %12
br label %16
16: ; preds = %15, %0
store i32 0, i32* %2
br label %9
17: ; preds = %12
br label %18
18: ; preds = %17
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %5
21: ; preds = %5
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
scalar_t__ sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int set_cpu(int cpu) {
  int ret = 1;
  cpu_set_t mask;
  CPU_ZERO(&mask);
  CPU_SET(cpu, &mask);
  if (sched_setaffinity(0, sizeof(cpu_set_t), &mask) != 0) {
    ret = 0;
  }
  return ret;
}


x86 assembly (clang, -O0):
<set_cpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0xc(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
cmp    $0x0,%rax
je     1178 <set_cpu+0x48>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cpu>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @set_cpu(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%5 = call i32 @CPU_ZERO(i32* %4)
%6 = load i32, i32* %2
%7 = call i32 @CPU_SET(i32 %6, i32* %4)
%8 = call i64 @sched_setaffinity(i32 0, i32 4, i32* %4)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %3
br label %11
11: ; preds = %10, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @set_cpu(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i64 @sched_setaffinity(i32 0, i32 4, i32* %2)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ do_quit(char);
void quit() { do_quit('q'); }


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

x86 assembly (clang, -O2):
<quit>:
mov    $0x71,%edi
jmp    1030 <do_quit@plt>

LLVM IR (-O0):
define void @quit() {
%1 = call i32 @do_quit(i8 signext 113)
ret void
}

LLVM IR (-O2):
define void @quit() {
%1 = tail call i32 @do_quit(i8 signext 113)
ret void
}
void newstylev(int a, int b, ...) { ; }


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

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

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

LLVM IR (-O2):
define void @newstylev(i32 %0, i32 %1, ...) {
ret void
}
void gdk_screen_get_height() {}


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

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

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

LLVM IR (-O2):
define void @gdk_screen_get_height() {
ret void
}
void foo132(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo132(i32 %0) {
ret void
}
/* Variables and functions */
long double fabsd(long double);
long double copysignd(long double x, long double ref_val) {
  return (ref_val < 0 ? -fabsd(x) : fabsd(x));
}


x86 assembly (clang, -O0):
<copysignd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    114f <copysignd+0x3f>
jmp    1138 <copysignd+0x28>
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <fabsd@plt>
fchs
fstpt  -0x2c(%rbp)
jmp    115f <copysignd+0x4f>
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <fabsd@plt>
fstpt  -0x2c(%rbp)
fldt   -0x2c(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copysignd>:
sub    $0x28,%rsp
fldt   0x40(%rsp)
fstpt  0x1c(%rsp)
fldt   0x30(%rsp)
fstpt  (%rsp)
call   1030 <fabsd@plt>
fldz
fldt   0x1c(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
fld    %st(0)
fchs
fxch   %st(1)
fcmovnbe %st(1),%st
fstp   %st(1)
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
define x86_fp80 @copysignd(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp olt x86_fp80 %1, 0xK00000000000000000000
%4 = tail call x86_fp80 @fabsd(x86_fp80 %0)
%5 = fneg x86_fp80 %4
%6 = select i1 %3, x86_fp80 %5, x86_fp80 %4
ret x86_fp80 %6
}
void *yy_flex_alloc(size)
int size;
{ return (void *)malloc((unsigned)size); }


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

x86 assembly (clang, -O2):
<yy_flex_alloc>:
mov    %edi,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @yy_flex_alloc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = call i8* @malloc(i64 %4)
ret i8* %5
}

LLVM IR (-O2):
define noalias i8* @yy_flex_alloc(i32 %0) {
%2 = zext i32 %0 to i64
%3 = tail call i8* @malloc(i64 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int _printInt(int a) {
  printf("%d\n", a);
  return 0;
}


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

x86 assembly (clang, -O2):
<_printInt>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @_printInt(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HelpEditHook(int /*<<< orphan*/);
int /*<<< orphan*/ KEY_F(int);
void HelpSend() { HelpEditHook(KEY_F(9)); }


x86 assembly (clang, -O0):
<HelpSend>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%edi
call   1030 <KEY_F@plt>
mov    %eax,%edi
call   1040 <HelpEditHook@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HelpSend>:
push   %rax
mov    $0x9,%edi
call   1030 <KEY_F@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <HelpEditHook@plt>

LLVM IR (-O0):
define void @HelpSend() {
%1 = call i32 @KEY_F(i32 9)
%2 = call i32 @HelpEditHook(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HelpSend() {
%1 = tail call i32 @KEY_F(i32 9)
%2 = tail call i32 @HelpEditHook(i32 %1)
ret void
}
void dbg_dump_leb(const struct ubifs_info *c, int lnum) { return; }


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

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

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

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define void @dbg_dump_leb(%struct.ubifs_info* nocapture %0, i32 %1) {
ret void
}
int minblanks(int consecutiveblanks) { return consecutiveblanks % 4; }


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

x86 assembly (clang, -O2):
<minblanks>:
mov    %edi,%eax
lea    0x3(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @minblanks(i32 %0) {
%2 = srem i32 %0, 4
ret i32 %2
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char const *);
char *full_name(const char *tail, char *buf, int sz) {
  snprintf(buf, sz, "%s/.yt_history/%s", getenv("HOME"), tail);
  return buf;
}


x86 assembly (clang, -O0):
<full_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <getenv@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    %rax,%rcx
mov    -0x8(%rbp),%r8
lea    0xe9e(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<full_name>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xedf(%rip),%rdi
call   1030 <getenv@plt>
lea    0xec1(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rcx
mov    %r14,%r8
call   1040 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%s/.yt_history/%s\00"
@.str.1 = [5 x i8] c"HOME\00"
define i8* @full_name(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%10 = load i8*, i8** %4
%11 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
%12 = load i8*, i8** %5
ret i8* %12
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s/.yt_history/%s\00"
@.str.1 = [5 x i8] c"HOME\00"
define i8* @full_name(i8* %0, i8* returned %1, i32 %2) {
%4 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %0)
ret i8* %1
}
double Start_data(double x, double y) { return x * x + y * y; }


x86 assembly (clang, -O0):
<Start_data>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Start_data>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Start_data(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* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
ret double %10
}

LLVM IR (-O2):
define double @Start_data(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ WXThread_USleep(int);
int blip() {
  WXThread_USleep(100000);
  return 0;
}


x86 assembly (clang, -O0):
<blip>:
push   %rbp
mov    %rsp,%rbp
mov    $0x186a0,%edi
call   1030 <WXThread_USleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blip>:
push   %rax
mov    $0x186a0,%edi
call   1030 <WXThread_USleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blip() {
%1 = call i32 @WXThread_USleep(i32 100000)
ret i32 0
}

LLVM IR (-O2):
define i32 @blip() {
%1 = tail call i32 @WXThread_USleep(i32 100000)
ret i32 0
}
/* Variables and functions */
scalar_t__ abs(int);
int attacks(int r1, int c1, int r2, int c2) {
  return r1 == r2 || c1 == c2 || abs(r1 - r2) == abs(c1 - c2) ? 1 : 0;
}


x86 assembly (clang, -O0):
<attacks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
je     1170 <attacks+0x60>
mov    -0x8(%rbp),%ecx
mov    $0x1,%al
cmp    -0x10(%rbp),%ecx
mov    %al,-0x11(%rbp)
je     1170 <attacks+0x60>
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attacks>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%eax
sub    %edx,%edi
je     113d <attacks+0x2d>
mov    %esi,%ebx
sub    %ecx,%ebx
je     113d <attacks+0x2d>
call   1030 <abs@plt>
mov    %rax,%r14
mov    %ebx,%edi
call   1030 <abs@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%r14
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @attacks(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = icmp eq i32 %9, %10
br i1 %11, label %26, label %12
12: ; preds = %4
%13 = load i32, i32* %6
%14 = load i32, i32* %8
%15 = icmp eq i32 %13, %14
br i1 %15, label %26, label %16
16: ; preds = %12
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = sub nsw i32 %17, %18
%20 = call i64 @abs(i32 %19)
%21 = load i32, i32* %6
%22 = load i32, i32* %8
%23 = sub nsw i32 %21, %22
%24 = call i64 @abs(i32 %23)
%25 = icmp eq i64 %20, %24
br label %26
26: ; preds = %16, %12, %4
%27 = phi i1 [ true, %12 ], [ true, %4 ], [ %25, %16 ]
%28 = zext i1 %27 to i64
%29 = select i1 %27, i32 1, i32 0
ret i32 %29
}

LLVM IR (-O2):
define i32 @attacks(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %2
%6 = icmp eq i32 %1, %3
%7 = or i1 %5, %6
br i1 %7, label %15, label %8
8: ; preds = %4
%9 = sub nsw i32 %0, %2
%10 = tail call i64 @abs(i32 %9)
%11 = sub nsw i32 %1, %3
%12 = tail call i64 @abs(i32 %11)
%13 = icmp eq i64 %10, %12
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %8, %4
%16 = phi i32 [ 1, %4 ], [ %14, %8 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void BkColor(int N) { printf("\033[48;5;%dm", N); }


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

x86 assembly (clang, -O2):
<BkColor>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[48;5;%dm\00"
define void @BkColor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[48;5;%dm\00"
define void @BkColor(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
struct node *match(char *);
struct node *A() {
  return match("SYMBOL");
}


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

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

LLVM IR (-O0):
%struct.node = type { i32 }
@.str = [7 x i8] c"SYMBOL\00"
define %struct.node* @A() {
%1 = call %struct.node* @match(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret %struct.node* %1
}

LLVM IR (-O2):
%struct.node = type { i32 }
@.str = [7 x i8] c"SYMBOL\00"
define %struct.node* @A() {
%1 = tail call %struct.node* @match(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret %struct.node* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int m(int *p) {
  printf("p=%d\n", *p);
  return 0;
}


x86 assembly (clang, -O0):
<m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"p=%d\0A\00"
define i32 @m(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
double FtMin2ms(const double valueFtMin) { return valueFtMin * 0.00508; }


x86 assembly (clang, -O0):
<FtMin2ms>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FtMin2ms>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @FtMin2ms(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 5.080000e-03
ret double %4
}

LLVM IR (-O2):
define double @FtMin2ms(double %0) {
%2 = fmul double %0, 5.080000e-03
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set_value(int, unsigned int);
void smart_gpio_set_value(int gpio_num, unsigned gpio_value) {
  if ((gpio_num == -1) || (gpio_value == 0x10)) {
    return;
  }
  gpio_set_value(gpio_num, gpio_value);
}


x86 assembly (clang, -O0):
<smart_gpio_set_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     1132 <smart_gpio_set_value+0x22>
cmpl   $0x10,-0x8(%rbp)
jne    1137 <smart_gpio_set_value+0x27>
jmp    1142 <smart_gpio_set_value+0x32>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gpio_set_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smart_gpio_set_value>:
cmp    $0xffffffff,%edi
je     111f <smart_gpio_set_value+0xf>
cmp    $0x10,%esi
je     111f <smart_gpio_set_value+0xf>
jmp    1030 <gpio_set_value@plt>
ret

LLVM IR (-O0):
define void @smart_gpio_set_value(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 = icmp eq i32 %5, -1
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 16
br i1 %9, label %10, label %11
10: ; preds = %7, %2
br label %15
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @gpio_set_value(i32 %12, i32 %13)
br label %15
15: ; preds = %11, %10
ret void
}

LLVM IR (-O2):
define void @smart_gpio_set_value(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, -1
%4 = icmp eq i32 %1, 16
%5 = or i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @gpio_set_value(i32 %0, i32 %1)
br label %8
8: ; preds = %2, %6
ret void
}
/* Variables and functions */
char *filename_to_print(char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, unsigned int,
                           char const *, char const *);
int /*<<< orphan*/ stderr;
void lace_log_error_(const char *file, const char *func, unsigned line,
                     const char *msg) {
  fprintf(stderr, "ERROR %s(%u) in %s: %s\n", filename_to_print(file), line,
          func, msg);
}


x86 assembly (clang, -O0):
<lace_log_error_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <filename_to_print@plt>
mov    -0x24(%rbp),%edi
mov    %rax,%rdx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lace_log_error_>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%ebp
mov    %rsi,%r15
mov    0x2eaa(%rip),%rax
mov    (%rax),%ebx
call   1040 <filename_to_print@plt>
lea    0xebc(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %r15,%r8
mov    %r14,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"ERROR %s(%u) in %s: %s\0A\00"
define void @lace_log_error_(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = call i8* @filename_to_print(i8* %10)
%12 = load i32, i32* %7
%13 = load i8*, i8** %6
%14 = load i8*, i8** %8
%15 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12, i8* %13, i8* %14)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"ERROR %s(%u) in %s: %s\0A\00"
define void @lace_log_error_(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i8* @filename_to_print(i8* %0)
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %2, i8* %1, i8* %3)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int qcmp(const void *a, const void *b) {
  const char **ia = (const char **)a;
  const char **ib = (const char **)b;
  return strcmp(*ia, *ib);
}


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

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

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

LLVM IR (-O2):
define i32 @qcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
void option_unset_unit2MODIF_DOTALL() {}


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

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

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

LLVM IR (-O2):
define void @option_unset_unit2MODIF_DOTALL() {
ret void
}
/* Type definitions */
struct progress {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _(char *);
int /*<<< orphan*/ stop_progress_msg(struct progress **, int /*<<< orphan*/);
void stop_progress(struct progress **p_progress) {
  stop_progress_msg(p_progress, _("done"));
}


x86 assembly (clang, -O0):
<stop_progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xec5(%rip),%rdi
call   1040 <_@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <stop_progress_msg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_progress>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <_@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <stop_progress_msg@plt>

LLVM IR (-O0):
%struct.progress = type { i32 }
@.str = [5 x i8] c"done\00"
define void @stop_progress(%struct.progress** %0) {
%2 = alloca %struct.progress**
store %struct.progress** %0, %struct.progress*** %2
%3 = load %struct.progress**, %struct.progress*** %2
%4 = call i32 @_(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @stop_progress_msg(%struct.progress** %3, i32 %4)
ret void
}

LLVM IR (-O2):
%struct.progress = type { i32 }
@.str = [5 x i8] c"done\00"
define void @stop_progress(%struct.progress** %0) {
%2 = tail call i32 @_(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @stop_progress_msg(%struct.progress** %0, i32 %2)
ret void
}
int dsi_runtime_get(struct platform_device *dsidev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.platform_device = type opaque
define i32 @dsi_runtime_get(%struct.platform_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void reopen_stdout(int fd) {
  fflush(stdout);
  dup2(fd, 1);
  close(fd);
}


x86 assembly (clang, -O0):
<reopen_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reopen_stdout>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @reopen_stdout(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @dup2(i32 %5, i32 1)
%7 = load i32, i32* %2
%8 = call i32 @close(i32 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @reopen_stdout(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @dup2(i32 %0, i32 1)
%5 = tail call i32 @close(i32 %0)
ret void
}
/* Type definitions */
struct svc_req {
  int dummy;
};

/* Variables and functions */
int undo();
int *undo_1_svc(void *argp, struct svc_req *rqstp) {
  static int result;
  result = undo();
  return &result;
}


x86 assembly (clang, -O0):
<undo_1_svc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <undo@plt>
mov    %eax,0x2eff(%rip)
lea    0x2ef8(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<undo_1_svc>:
push   %rax
xor    %eax,%eax
call   1030 <undo@plt>
mov    %eax,0x2f0e(%rip)
lea    0x2f07(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.svc_req = type { i32 }
@undo_1_svc.result = internal global i32 0
define i32* @undo_1_svc(i8* %0, %struct.svc_req* %1) {
%3 = alloca i8*
%4 = alloca %struct.svc_req*
store i8* %0, i8** %3
store %struct.svc_req* %1, %struct.svc_req** %4
%5 = call i32 (...) @undo()
store i32 %5, i32* @undo_1_svc.result
ret i32* @undo_1_svc.result
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
@undo_1_svc.result = internal global i32 0
define i32* @undo_1_svc(i8* nocapture readnone %0, %struct.svc_req* nocapture readnone %1) {
%3 = tail call i32 (...) @undo()
store i32 %3, i32* @undo_1_svc.result
ret i32* @undo_1_svc.result
}
/* Variables and functions */
int /*<<< orphan*/ rfc_test();
int main(void) {
  rfc_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @rfc_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __CPROVER_assert(int /*<<< orphan*/, char *);
void baz(unsigned short ignore) { __CPROVER_assert(0, "KABOOM"); }


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
xor    %edi,%edi
lea    0xed8(%rip),%rsi
call   1030 <__CPROVER_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <__CPROVER_assert@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"KABOOM\00"
define void @baz(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @__CPROVER_assert(i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"KABOOM\00"
define void @baz(i16 zeroext %0) {
%2 = tail call i32 @__CPROVER_assert(i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ smb2c_irqEnable();
void m40setParamsA000(uint16_t addr, uint8_t val) {
  (void)addr;
  (void)val;
  smb2c_irqEnable();
}


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

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

LLVM IR (-O0):
define void @m40setParamsA000(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (...) @smb2c_irqEnable()
ret void
}

LLVM IR (-O2):
define void @m40setParamsA000(i32 %0, i32 %1) {
%3 = tail call i32 (...) @smb2c_irqEnable()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ sse2_block_copy(int /*<<< orphan*/ *const,
                                   int /*<<< orphan*/ *const, int const);
int /*<<< orphan*/ sse2_block_zero(int /*<<< orphan*/ *const);
int /*<<< orphan*/ sse2_idct(int /*<<< orphan*/ *const);
void mpeg2_idct_copy_sse2(int16_t *const block, uint8_t *const dest,
                          const int stride) {
  sse2_idct(block);
  sse2_block_copy(block, dest, stride);
  sse2_block_zero(block);
}


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

x86 assembly (clang, -O2):
<mpeg2_idct_copy_sse2>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <sse2_idct@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <sse2_block_copy@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <sse2_block_zero@plt>

LLVM IR (-O0):
define void @mpeg2_idct_copy_sse2(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = call i32 @sse2_idct(i32* %7)
%9 = load i32*, i32** %4
%10 = load i32*, i32** %5
%11 = load i32, i32* %6
%12 = call i32 @sse2_block_copy(i32* %9, i32* %10, i32 %11)
%13 = load i32*, i32** %4
%14 = call i32 @sse2_block_zero(i32* %13)
ret void
}

LLVM IR (-O2):
define void @mpeg2_idct_copy_sse2(i32* %0, i32* %1, i32 %2) {
%4 = tail call i32 @sse2_idct(i32* %0)
%5 = tail call i32 @sse2_block_copy(i32* %0, i32* %1, i32 %2)
%6 = tail call i32 @sse2_block_zero(i32* %0)
ret void
}
unsigned SEQ_FIRST_BEFORE_SECOND(unsigned seqno1, unsigned seqno2) {
  int compare;
  compare = seqno2 - seqno1;
  if (compare > 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<SEQ_FIRST_BEFORE_SECOND>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1129 <SEQ_FIRST_BEFORE_SECOND+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1130 <SEQ_FIRST_BEFORE_SECOND+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SEQ_FIRST_BEFORE_SECOND>:
sub    %edi,%esi
xor    %eax,%eax
test   %esi,%esi
setg   %al
ret

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

LLVM IR (-O2):
define i32 @SEQ_FIRST_BEFORE_SECOND(i32 %0, i32 %1) {
%3 = sub i32 %1, %0
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int INHERENT_lstat() { return 1; }


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

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

LLVM IR (-O0):
define i32 @INHERENT_lstat() {
ret i32 1
}

LLVM IR (-O2):
define i32 @INHERENT_lstat() {
ret i32 1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t h264nal_get_type(const uint8_t *p_h264nal) {
  return p_h264nal[3] & 0x1f;
}


x86 assembly (clang, -O0):
<h264nal_get_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
and    $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264nal_get_type>:
mov    0xc(%rdi),%eax
and    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @h264nal_get_type(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = and i32 %3, 31
ret i32 %4
}