xunge/DecIR huggingface dataset:
void acpuclk_krait_debug_init(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @noop_fn() {
ret void
}
void check(int x) {
  if (x < 0) {
  ERROR:
    return;
  } else {
    x += 42;
  }
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111b <check+0x1b>
jmp    1116 <check+0x16>
jmp    1124 <check+0x24>
mov    -0x4(%rbp),%eax
add    $0x2a,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @check(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
br label %6
6: ; preds = %5
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 42
store i32 %9, i32* %2
br label %10
10: ; preds = %6, %7
ret void
}

LLVM IR (-O2):
define void @check(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
int is_integer(char *input) {
  while (*input) {
    if (!isdigit(*input))
      return 0;
    input++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <is_integer+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114a <is_integer+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1162 <is_integer+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_integer+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_integer>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <is_integer+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <is_integer+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <is_integer+0x20>
jmp    114b <is_integer+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_integer(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %14, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = call i32 @isdigit(i8 signext %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %8
store i32 0, i32* %2
br label %18
14: ; preds = %8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %4
17: ; preds = %4
store i32 1, i32* %2
br label %18
18: ; preds = %17, %13
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @is_integer(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isdigit(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ GLuint;

/* Variables and functions */
int /*<<< orphan*/ glLoadName(int /*<<< orphan*/);
void LoadName(GLuint name) { glLoadName(name); }


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

x86 assembly (clang, -O2):
<LoadName>:
jmp    1030 <glLoadName@plt>

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

LLVM IR (-O2):
define void @LoadName(i32 %0) {
%2 = tail call i32 @glLoadName(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int C, N;
  scanf("%d %d", &C, &N);
  printf("%d\n", C % N);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cltd
idivl  (%rsp)
lea    0xec2(%rip),%rdi
mov    %edx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = srem i32 %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
indreg0adr1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((*p0) <= (*((double *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0adr1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0xa98ac7,%eax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1143 <indreg0adr1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <indreg0adr1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0adr1>:
movsd  0xa98ac7,%xmm0
xor    %eax,%eax
ucomisd (%rdx),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @indreg0adr1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double*, double** %12
%15 = load double, double* %14
%16 = load double, double* inttoptr (i64 11111111 to double*)
%17 = fcmp ole double %15, %16
br i1 %17, label %18, label %19
18: ; preds = %6
store i32 1, i32* %7
br label %20
19: ; preds = %6
store i32 0, i32* %7
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @indreg0adr1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture readnone %5) {
%7 = load double, double* %4
%8 = load double, double* inttoptr (i64 11111111 to double*)
%9 = fcmp ole double %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
int amd_iommu_activate_guest_mode(void *data) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @amd_iommu_activate_guest_mode(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int somefunc1(int, int);
int somefunc2(int x, int y) {
  for (; y < x; y++) {
    x += y;
  }
  return somefunc1(x, y);
}


x86 assembly (clang, -O0):
<somefunc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1141 <somefunc2+0x31>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111e <somefunc2+0xe>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <somefunc1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<somefunc2>:
cmp    %edi,%esi
jge    112f <somefunc2+0x1f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rsi,%rdi,1),%eax
add    $0x1,%esi
cmp    $0x1,%edi
mov    %eax,%edi
jg     1120 <somefunc2+0x10>
mov    %eax,%edi
jmp    1030 <somefunc1@plt>

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

LLVM IR (-O2):
define i32 @somefunc2(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ %1, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, %6
%8 = add nsw i32 %5, 1
%9 = icmp sgt i32 %6, 1
br i1 %9, label %4, label %10
10: ; preds = %4, %2
%11 = phi i32 [ %0, %2 ], [ %7, %4 ]
%12 = phi i32 [ %1, %2 ], [ %8, %4 ]
%13 = tail call i32 @somefunc1(i32 %11, i32 %12)
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *thread_main(void *arg) {
  int i;
  int cnt;
  cnt = *((int *)arg);
  for (i = 0; i < cnt; ++i) {
    sleep(1);
    printf("running thread\n");
  }
  return NULL;
}


x86 assembly (clang, -O0):
<thread_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    116c <thread_main+0x4c>
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113c <thread_main+0x1c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_main>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%ebp
test   %ebp,%ebp
jle    1147 <thread_main+0x27>
lea    0xed0(%rip),%rbx
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebp
jne    1130 <thread_main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"running thread\0A\00"
define i8* @thread_main(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %4
store i32 0, i32* %3
br label %8
8: ; preds = %15, %1
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = call i32 @sleep(i32 1)
%14 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %12
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %8
18: ; preds = %8
ret i8* null
}

LLVM IR (-O2):
@str = [15 x i8] c"running thread\00"
define noalias i8* @thread_main(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1, %5
%6 = phi i32 [ %9, %5 ], [ 0, %1 ]
%7 = tail call i32 @sleep(i32 1)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%9 = add nuw nsw i32 %6, 1
%10 = icmp eq i32 %9, %3
br i1 %10, label %11, label %5
11: ; preds = %5, %1
ret i8* null
}
long a_cas_l(volatile void *p, long t, long s) {
  __asm__("lock ; .byte 0x67\n\tcmpxchg %3, %1"
          : "=a"(t), "=m"(*(long *)p)
          : "a"(t), "r"(s)
          : "memory");
  return t;
}


x86 assembly (clang, -O0):
<a_cas_l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdx
lock cmpxchg %rdx,(%ecx)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_cas_l>:
mov    %rsi,%rax
lock cmpxchg %rdx,(%edi)
ret

LLVM IR (-O0):
define i64 @a_cas_l(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = call i64 asm "lock ; .byte 0x67\0A\09cmpxchg $3, $1", "={ax},=*m,{ax},r,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %8, i64 %9, i64 %10)
store i64 %11, i64* %5
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @a_cas_l(i8* %0, i64 %1, i64 %2) {
%4 = bitcast i8* %0 to i64*
%5 = tail call i64 asm "lock ; .byte 0x67\0A\09cmpxchg $3, $1", "={ax},=*m,{ax},r,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %4, i64 %1, i64 %2)
ret i64 %5
}
void _unit_test_dummy(void **state) { (void)state; }


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

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

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

LLVM IR (-O2):
define void @_unit_test_dummy(i8** nocapture %0) {
ret void
}
/* Variables and functions */
long get_long(char **);
int /*<<< orphan*/ skip_bytes(char **, int);
void get_range(char **line, long *a, long *b) {
  *a = get_long(line);
  if ('-' == *line[0]) {
    skip_bytes(line, 1);
    *b = get_long(line);
  } else {
    *b = *a;
  }
}


x86 assembly (clang, -O0):
<get_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_long@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x2d,%eax
cmp    %ecx,%eax
jne    1184 <get_range+0x64>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <skip_bytes@plt>
mov    -0x8(%rbp),%rdi
call   1030 <get_long@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    1192 <get_range+0x72>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_range>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <get_long@plt>
mov    %rax,(%r15)
mov    (%rbx),%rcx
cmpb   $0x2d,(%rcx)
jne    1153 <get_range+0x33>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <skip_bytes@plt>
mov    %rbx,%rdi
call   1030 <get_long@plt>
mov    %rax,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @get_range(i8** %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2) {
%4 = tail call i64 @get_long(i8** %0)
store i64 %4, i64* %1
%5 = load i8*, i8** %0
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 45
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = tail call i32 @skip_bytes(i8** %0, i32 1)
%10 = tail call i64 @get_long(i8** %0)
br label %11
11: ; preds = %3, %8
%12 = phi i64 [ %10, %8 ], [ %4, %3 ]
store i64 %12, i64* %2
ret void
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_datefunc1(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_datefunc1() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_datefunc1() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void __raw_writel(uint32_t data, void *ptr) {
  ;
  *((uint32_t *)ptr) = data;
}


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

x86 assembly (clang, -O2):
<__raw_writel>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @__raw_writel(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @__raw_writel(i32 %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %1 to i32*
store i32 %0, i32* %3
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
struct event_base {
  int dummy;
};
struct evconnlistener {
  int dummy;
};
typedef int /*<<< orphan*/ evutil_socket_t;

/* Variables and functions */
struct event_base *evconnlistener_get_base(struct evconnlistener *);
void setup_client(struct event_base *, int /*<<< orphan*/, struct sockaddr *,
                  int);
void accept_conn_cb(struct evconnlistener *listener, evutil_socket_t fd,
                    struct sockaddr *address, int socklen, void *ctx) {
  struct event_base *base = evconnlistener_get_base(listener);
  return setup_client(base, fd, address, socklen);
}


x86 assembly (clang, -O0):
<accept_conn_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <evconnlistener_get_base@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <setup_client@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept_conn_cb>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %esi,%ebp
call   1040 <evconnlistener_get_base@plt>
mov    %rax,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <setup_client@plt>

LLVM IR (-O0):
%struct.evconnlistener = type { i32 }
%struct.sockaddr = type { i32 }
%struct.event_base = type { i32 }
define void @accept_conn_cb(%struct.evconnlistener* %0, i32 %1, %struct.sockaddr* %2, i32 %3, i8* %4) {
%6 = alloca %struct.evconnlistener*
%7 = alloca i32
%8 = alloca %struct.sockaddr*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca %struct.event_base*
store %struct.evconnlistener* %0, %struct.evconnlistener** %6
store i32 %1, i32* %7
store %struct.sockaddr* %2, %struct.sockaddr** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%12 = load %struct.evconnlistener*, %struct.evconnlistener** %6
%13 = call %struct.event_base* @evconnlistener_get_base(%struct.evconnlistener* %12)
store %struct.event_base* %13, %struct.event_base** %11
%14 = load %struct.event_base*, %struct.event_base** %11
%15 = load i32, i32* %7
%16 = load %struct.sockaddr*, %struct.sockaddr** %8
%17 = load i32, i32* %9
ret void
}

LLVM IR (-O2):
%struct.evconnlistener = type { i32 }
%struct.sockaddr = type { i32 }
%struct.event_base = type { i32 }
define void @accept_conn_cb(%struct.evconnlistener* %0, i32 %1, %struct.sockaddr* %2, i32 %3, i8* nocapture readnone %4) {
%6 = tail call %struct.event_base* @evconnlistener_get_base(%struct.evconnlistener* %0)
tail call void @setup_client(%struct.event_base* %6, i32 %1, %struct.sockaddr* %2, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(unsigned int *, unsigned int, int,
                          int /*<<< orphan*/ *);
int generate_bin(unsigned buff[], unsigned int size, char *name) {
  FILE *fp;
  fp = fopen(name, "wb");
  fwrite(buff, size, 1, fp);
  fclose(fp);
}


x86 assembly (clang, -O0):
<generate_bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x28(%rbp),%rcx
mov    $0x1,%edx
call   1050 <fwrite@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_bin>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xebf(%rip),%rsi
mov    %rdx,%rdi
call   1040 <fopen@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
define i32 @generate_bin(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%9 = load i8*, i8** %7
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %8
%11 = load i32*, i32** %5
%12 = load i32, i32* %6
%13 = load i32*, i32** %8
%14 = call i32 @fwrite(i32* %11, i32 %12, i32 1, i32* %13)
%15 = load i32*, i32** %8
%16 = call i32 @fclose(i32* %15)
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define i32 @generate_bin(i32* nocapture %0, i32 %1, i8* nocapture %2) {
%4 = tail call i32* @fopen(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @fwrite(i32* %0, i32 %1, i32 1, i32* %4)
%6 = tail call i32 @fclose(i32* %4)
ret i32 undef
}
void test22_Blink3_targetInit__I() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XAddExtension() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cm_sort_array_quicksort__normal_scenario__array_is_sorted();
void cm_sorting_run_tests(void) {
  cm_sort_array_quicksort__normal_scenario__array_is_sorted();
}


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

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

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

LLVM IR (-O2):
define void @cm_sorting_run_tests() {
%1 = tail call i32 (...) @cm_sort_array_quicksort__normal_scenario__array_is_sorted()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ map2check_add_store_pointer(void *, void *, int, char *, int,
                                               char *);
int /*<<< orphan*/ map2check_malloc(void *, int);
void map2check_posix(void *ptr, int size) {
  void **temp = (void **)ptr;
  void *addr = *temp;
  map2check_malloc(addr, size);
  map2check_add_store_pointer((void *)temp, addr, 1, "pointer", 1, "cocoiso");
}


x86 assembly (clang, -O0):
<map2check_posix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <map2check_malloc@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x1,%r8d
lea    0xe9d(%rip),%rcx
lea    0xe9e(%rip),%r9
mov    %r8d,%edx
call   1040 <map2check_add_store_pointer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map2check_posix>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%r14
mov    %r14,%rdi
call   1030 <map2check_malloc@plt>
lea    0xec7(%rip),%rcx
lea    0xec8(%rip),%r9
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
mov    $0x1,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <map2check_add_store_pointer@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"pointer\00"
@.str.1 = [8 x i8] c"cocoiso\00"
define void @map2check_posix(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = load i32, i32* %4
%13 = call i32 @map2check_malloc(i8* %11, i32 %12)
%14 = load i8**, i8*** %5
%15 = bitcast i8** %14 to i8*
%16 = load i8*, i8** %6
%17 = call i32 @map2check_add_store_pointer(i8* %15, i8* %16, i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"pointer\00"
@.str.1 = [8 x i8] c"cocoiso\00"
define void @map2check_posix(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @map2check_malloc(i8* %4, i32 %1)
%6 = tail call i32 @map2check_add_store_pointer(i8* %0, i8* %4, i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void *zmemcpy(void *dest, const void *src, int len) {
  int d0, d1, d2;
  asm volatile("cld\n\t"
               "rep\n\t"
               "movsb"
               : "=&c"(d0), "=&S"(d1), "=&D"(d2)
               : "0"(len), "1"(src), "2"(dest)
               : "memory");
  return dest;
}


x86 assembly (clang, -O0):
<zmemcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdi
cld
rep movsb %ds:(%rsi),%es:(%rdi)
mov    %ecx,-0x18(%rbp)
mov    %esi,%eax
mov    %eax,-0x1c(%rbp)
mov    %edi,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zmemcpy>:
mov    %edx,%ecx
mov    %rdi,%rax
cld
rep movsb %ds:(%rsi),%es:(%rdi)
ret

LLVM IR (-O0):
define i8* @zmemcpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%10 = load i32, i32* %6
%11 = load i8*, i8** %5
%12 = load i8*, i8** %4
%13 = call { i32, i8*, i8* } asm sideeffect "cld\0A\09rep\0A\09movsb", "=&{cx},=&{si},=&{di},0,1,2,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %10, i8* %11, i8* %12)
%14 = extractvalue { i32, i8*, i8* } %13, 0
%15 = extractvalue { i32, i8*, i8* } %13, 1
%16 = extractvalue { i32, i8*, i8* } %13, 2
store i32 %14, i32* %7
%17 = ptrtoint i8* %15 to i64
%18 = trunc i64 %17 to i32
store i32 %18, i32* %8
%19 = ptrtoint i8* %16 to i64
%20 = trunc i64 %19 to i32
store i32 %20, i32* %9
%21 = load i8*, i8** %4
ret i8* %21
}

LLVM IR (-O2):
define i8* @zmemcpy(i8* returned %0, i8* %1, i32 %2) {
%4 = tail call { i32, i8*, i8* } asm sideeffect "cld\0A\09rep\0A\09movsb", "=&{cx},=&{si},=&{di},0,1,2,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %2, i8* %1, i8* %0)
ret i8* %0
}
void breakpoint(void) { asm volatile("int3"); }


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

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

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

LLVM IR (-O2):
define void @breakpoint() {
tail call void asm sideeffect "int3", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int WEXITSTATUS(int);
int /*<<< orphan*/ WIFEXITED(int);
scalar_t__ WIFSIGNALED(int);
int status_is_failure(int status) {
  if (WIFSIGNALED(status)) {
    return 1;
  }
  if (!WIFEXITED(status)) {
    return 1;
  }
  status = WEXITSTATUS(status);
  return status != 0;
}


x86 assembly (clang, -O0):
<status_is_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <WIFSIGNALED@plt>
cmp    $0x0,%rax
je     1159 <status_is_failure+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1190 <status_is_failure+0x60>
mov    -0x8(%rbp),%edi
call   1050 <WIFEXITED@plt>
cmp    $0x0,%eax
jne    1176 <status_is_failure+0x46>
movl   $0x1,-0x4(%rbp)
jmp    1190 <status_is_failure+0x60>
mov    -0x8(%rbp),%edi
call   1040 <WEXITSTATUS@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<status_is_failure>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <WIFSIGNALED@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    115d <status_is_failure+0x2d>
mov    %ebp,%edi
call   1050 <WIFEXITED@plt>
test   %eax,%eax
je     115d <status_is_failure+0x2d>
mov    %ebp,%edi
call   1040 <WEXITSTATUS@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @status_is_failure(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @WIFSIGNALED(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %19
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @WIFEXITED(i32 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8
store i32 1, i32* %2
br label %19
13: ; preds = %8
%14 = load i32, i32* %3
%15 = call i32 @WEXITSTATUS(i32 %14)
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
%18 = zext i1 %17 to i32
store i32 %18, i32* %2
br label %19
19: ; preds = %13, %12, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @status_is_failure(i32 %0) {
%2 = tail call i64 @WIFSIGNALED(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i32 @WIFEXITED(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 @WEXITSTATUS(i32 %0)
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %1, %7
%12 = phi i32 [ %10, %7 ], [ 1, %1 ], [ 1, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ __gnat_install_handler_common(int, int);
void __gnat_install_handler(void) { __gnat_install_handler_common(0x1d, 0x15); }


x86 assembly (clang, -O0):
<__gnat_install_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%edi
mov    $0x15,%esi
call   1030 <__gnat_install_handler_common@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gnat_install_handler>:
mov    $0x1d,%edi
mov    $0x15,%esi
jmp    1030 <__gnat_install_handler_common@plt>

LLVM IR (-O0):
define void @__gnat_install_handler() {
%1 = call i32 @__gnat_install_handler_common(i32 29, i32 21)
ret void
}

LLVM IR (-O2):
define void @__gnat_install_handler() {
%1 = tail call i32 @__gnat_install_handler_common(i32 29, i32 21)
ret void
}
/* Variables and functions */
double _fmin(double, int /*<<< orphan*/);
int /*<<< orphan*/ fabs(double);
double calculate_accuracy(double count, double ms) {
  return ((count - _fmin(count, fabs(count - ms))) / count) * 100.0;
}


x86 assembly (clang, -O0):
<calculate_accuracy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
movsd  -0x20(%rbp),%xmm0
mov    %eax,%edi
call   1040 <_fmin@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  0xe86(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_accuracy>:
push   %rax
movsd  %xmm0,(%rsp)
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
movsd  (%rsp),%xmm0
mov    %eax,%edi
call   1040 <_fmin@plt>
movsd  (%rsp),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
divsd  %xmm2,%xmm1
mulsd  0xeac(%rip),%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @calculate_accuracy(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* %3
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = call i32 @fabs(double %9)
%11 = call double @_fmin(double %6, i32 %10)
%12 = fsub double %5, %11
%13 = load double, double* %3
%14 = fdiv double %12, %13
%15 = fmul double %14, 1.000000e+02
ret double %15
}

LLVM IR (-O2):
define double @calculate_accuracy(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call i32 @fabs(double %3)
%5 = tail call double @_fmin(double %0, i32 %4)
%6 = fsub double %0, %5
%7 = fdiv double %6, %0
%8 = fmul double %7, 1.000000e+02
ret double %8
}
int __gtsf2(float a __attribute__((unused)), float b __attribute__((unused))) {
  return 0;
}


x86 assembly (clang, -O0):
<__gtsf2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__gtsf2(float %0, float %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void version(void) {
  printf("%s\n", "1.0.0");
  exit(EXIT_SUCCESS);
}


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

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"1.0.0\00"
@EXIT_SUCCESS = global i32 0
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"1.0.0\00"
@EXIT_SUCCESS = global i32 0
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ clrscr();
int /*<<< orphan*/ getch();
int main() {
  int i, j = 2, k = 3, l, *S;
  clrscr();
  S[0] = 0;
  getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    $0x0,%al
call   1030 <clrscr@plt>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    $0x0,%al
call   1040 <getch@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 0, i32* %1
store i32 2, i32* %3
store i32 3, i32* %4
%7 = call i32 (...) @clrscr()
%8 = load i32*, i32** %6
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 0, i32* %9
%10 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @clrscr()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int extract_pic_offsets(int /*<<< orphan*/ **);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, size_t,
                          int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_pic_offsets(void) {
  int32_t *r;
  size_t l = extract_pic_offsets(&r) / sizeof(int32_t);
  fwrite(r, sizeof(int32_t), l, stdout);
  free(r);
}


x86 assembly (clang, -O0):
<print_pic_offsets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <extract_pic_offsets@plt>
cltq
shr    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    0x2e86(%rip),%rax
mov    (%rax),%ecx
mov    $0x4,%esi
call   1050 <fwrite@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_pic_offsets>:
push   %rax
mov    %rsp,%rdi
call   1040 <extract_pic_offsets@plt>
movslq %eax,%rdx
shr    $0x2,%rdx
mov    (%rsp),%rdi
mov    0x2e95(%rip),%rax
mov    (%rax),%ecx
mov    $0x4,%esi
call   1050 <fwrite@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
pop    %rax
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @print_pic_offsets() {
%1 = alloca i32*
%2 = alloca i64
%3 = call i32 @extract_pic_offsets(i32** %1)
%4 = sext i32 %3 to i64
%5 = udiv i64 %4, 4
store i64 %5, i64* %2
%6 = load i32*, i32** %1
%7 = load i64, i64* %2
%8 = load i32, i32* @stdout
%9 = call i32 @fwrite(i32* %6, i32 4, i64 %7, i32 %8)
%10 = load i32*, i32** %1
%11 = call i32 @free(i32* %10)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @print_pic_offsets() {
%1 = alloca i32*
%2 = bitcast i32** %1 to i8*
%3 = call i32 @extract_pic_offsets(i32** %1)
%4 = sext i32 %3 to i64
%5 = lshr i64 %4, 2
%6 = load i32*, i32** %1
%7 = load i32, i32* @stdout
%8 = call i32 @fwrite(i32* %6, i32 4, i64 %5, i32 %7)
%9 = load i32*, i32** %1
%10 = call i32 @free(i32* %9)
ret void
}
void mat2arr(short M[1988][1988]) {
  int i, j, k, count = 0;
  short m[1988];
  for (i = 0; i < 1988; i++) {
    for (j = 0; j < 1988; j++) {
      if (M[i][j] == 1)
        m[i] = j;
    }
  }
}


x86 assembly (clang, -O0):
<mat2arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x7c4,-0xc(%rbp)
jge    1199 <mat2arr+0x99>
movl   $0x0,-0x10(%rbp)
cmpl   $0x7c4,-0x10(%rbp)
jge    1186 <mat2arr+0x86>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0xf88,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cmp    $0x1,%eax
jne    1173 <mat2arr+0x73>
mov    -0x10(%rbp),%eax
mov    %ax,%cx
movslq -0xc(%rbp),%rax
mov    %cx,-0xfa0(%rbp,%rax,2)
ff
jmp    1178 <mat2arr+0x78>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1131 <mat2arr+0x31>
jmp    118b <mat2arr+0x8b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111d <mat2arr+0x1d>
add    $0xf20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mat2arr([1988 x i16]* %0) {
%2 = alloca [1988 x i16]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [1988 x i16]
store [1988 x i16]* %0, [1988 x i16]** %2
store i32 0, i32* %6
store i32 0, i32* %3
br label %8
8: ; preds = %37, %1
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 1988
br i1 %10, label %11, label %40
11: ; preds = %8
store i32 0, i32* %4
br label %12
12: ; preds = %33, %11
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 1988
br i1 %14, label %15, label %36
15: ; preds = %12
%16 = load [1988 x i16]*, [1988 x i16]** %2
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [1988 x i16], [1988 x i16]* %16, i64 %18
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [1988 x i16], [1988 x i16]* %19, i64 0, i64 %21
%23 = load i16, i16* %22
%24 = sext i16 %23 to i32
%25 = icmp eq i32 %24, 1
br i1 %25, label %26, label %32
26: ; preds = %15
%27 = load i32, i32* %4
%28 = trunc i32 %27 to i16
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [1988 x i16], [1988 x i16]* %7, i64 0, i64 %30
store i16 %28, i16* %31
br label %32
32: ; preds = %26, %15
br label %33
33: ; preds = %32
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
br label %12
36: ; preds = %12
br label %37
37: ; preds = %36
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %8
40: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @mat2arr([1988 x i16]* nocapture %0) {
ret void
}
/* Variables and functions */
void *dlsym(int /*<<< orphan*/ *, char *);
void *start_routine(void *args) {
  int i;
  void **addrs = (void **)args;
  for (i = 0; i < 10000; ++i)
    addrs[i % 1024] = dlsym(NULL, "does_not_exist");
  return addrs;
}


x86 assembly (clang, -O0):
<start_routine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2710,-0xc(%rbp)
jge    117e <start_routine+0x6e>
xor    %eax,%eax
mov    %eax,%edi
lea    0xebd(%rip),%rsi
call   1030 <dlsym@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%rax
mov    %edx,%ecx
mov    -0x20(%rbp),%rdx
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <start_routine+0x1b>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_routine>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %r14,%rsi
call   1030 <dlsym@plt>
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rax,(%r15,%rcx,8)
add    $0x1,%ebx
cmp    $0x2710,%ebx
jne    1130 <start_routine+0x20>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"does_not_exist\00"
define i8* @start_routine(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8**
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i8**
store i8** %6, i8*** %4
store i32 0, i32* %3
br label %7
7: ; preds = %17, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 10000
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = call i8* @dlsym(i32* null, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%12 = load i8**, i8*** %4
%13 = load i32, i32* %3
%14 = srem i32 %13, 1024
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %12, i64 %15
store i8* %11, i8** %16
br label %17
17: ; preds = %10
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %7
20: ; preds = %7
%21 = load i8**, i8*** %4
%22 = bitcast i8** %21 to i8*
ret i8* %22
}

LLVM IR (-O2):
@.str = [15 x i8] c"does_not_exist\00"
define i8* @start_routine(i8* returned writeonly %0) {
%2 = bitcast i8* %0 to i8**
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %9, %3 ]
%5 = tail call i8* @dlsym(i32* null, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = and i32 %4, 1023
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8*, i8** %2, i64 %7
store i8* %5, i8** %8
%9 = add nuw nsw i32 %4, 1
%10 = icmp eq i32 %9, 10000
br i1 %10, label %11, label %3
11: ; preds = %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void btor_msg_main(char *msg) {
  assert(msg);
  fprintf(stdout, "[btormain] %s", msg);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<btor_msg_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea7(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btor_msg_main>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    0x2e9d(%rip),%r14
mov    (%r14),%edi
lea    0xeb3(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    (%r14),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [14 x i8] c"[btormain] %s\00"
define void @btor_msg_main(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [14 x i8] c"[btormain] %s\00"
define void @btor_msg_main(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret void
}