xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int open_device() {
  int fd_cam;
  fd_cam = open("/dev/video0", O_RDWR, 0);
  if (fd_cam < 0) {
    return -1;
  }
  return fd_cam;
}


x86 assembly (clang, -O0):
<open_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
xor    %edx,%edx
call   1030 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1148 <open_device+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <open_device+0x3e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_device>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
xor    %edx,%edx
call   1030 <open@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovs  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/video0\00"
@O_RDWR = global i32 0
define i32 @open_device() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1, i32 0)
%3 = icmp sgt i32 %2, -1
%4 = select i1 %3, i32 %2, i32 -1
ret i32 %4
}
int bnxt_vf_reps_alloc(struct bnxt *bp) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.bnxt = type opaque
define i32 @bnxt_vf_reps_alloc(%struct.bnxt* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct libavl_allocator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *malloc(size_t);
void *trb_malloc(struct libavl_allocator *allocator, size_t size) {
  assert(allocator != NULL && size > 0);
  return malloc(size);
}


x86 assembly (clang, -O0):
<trb_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     114b <trb_malloc+0x2b>
cmpq   $0x0,-0x10(%rbp)
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trb_malloc>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <malloc@plt>

LLVM IR (-O0):
%struct.libavl_allocator = type { i32 }
define i8* @trb_malloc(%struct.libavl_allocator* %0, i64 %1) {
%3 = alloca %struct.libavl_allocator*
%4 = alloca i64
store %struct.libavl_allocator* %0, %struct.libavl_allocator** %3
store i64 %1, i64* %4
%5 = load %struct.libavl_allocator*, %struct.libavl_allocator** %3
%6 = icmp ne %struct.libavl_allocator* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %4
%9 = icmp ugt i64 %8, 0
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i64, i64* %4
%15 = call i8* @malloc(i64 %14)
ret i8* %15
}

LLVM IR (-O2):
%struct.libavl_allocator = type { i32 }
define noalias i8* @trb_malloc(%struct.libavl_allocator* readnone %0, i64 %1) {
%3 = icmp ne %struct.libavl_allocator* %0, null
%4 = icmp ne i64 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i8* @malloc(i64 %1)
ret i8* %8
}
extern void flush_page_to_ram(unsigned long address) {}


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

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

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

LLVM IR (-O2):
define void @flush_page_to_ram(i64 %0) {
ret void
}
int lifenumber(int a) {
  int out = 0;
  for (; a > 0; a /= 10) {
    out += (a % 10);
  }
  if (out >= 10)
    return lifenumber(out);
  else
    return out;
}


x86 assembly (clang, -O0):
<lifenumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1150 <lifenumber+0x40>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    -0xc(%rbp),%edx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1122 <lifenumber+0x12>
cmpl   $0xa,-0xc(%rbp)
jl     116a <lifenumber+0x5a>
mov    -0xc(%rbp),%edi
call   1030 <lifenumber@plt>
mov    %eax,-0x4(%rbp)
jmp    1170 <lifenumber+0x60>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lifenumber>:
mov    $0xcccccccd,%r8d
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
test   %edi,%edi
jle    1144 <lifenumber+0x44>
cs nopw 0x0(%rax,%rax,1)
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
add    %ecx,%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1120 <lifenumber+0x20>
mov    %eax,%edi
cmp    $0x9,%eax
ja     1110 <lifenumber+0x10>
ret

LLVM IR (-O0):
define i32 @lifenumber(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %13, %1
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %3
%10 = srem i32 %9, 10
%11 = load i32, i32* %4
%12 = add nsw i32 %11, %10
store i32 %12, i32* %4
br label %13
13: ; preds = %8
%14 = load i32, i32* %3
%15 = sdiv i32 %14, 10
store i32 %15, i32* %3
br label %5
16: ; preds = %5
%17 = load i32, i32* %4
%18 = icmp sge i32 %17, 10
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i32, i32* %4
%21 = call i32 @lifenumber(i32 %20)
store i32 %21, i32* %2
br label %24
22: ; preds = %16
%23 = load i32, i32* %4
store i32 %23, i32* %2
br label %24
24: ; preds = %22, %19
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @lifenumber(i32 %0) {
br label %2
2: ; preds = %12, %1
%3 = phi i32 [ %0, %1 ], [ %9, %12 ]
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ 0, %2 ]
%7 = phi i32 [ %10, %5 ], [ %3, %2 ]
%8 = urem i32 %7, 10
%9 = add nuw nsw i32 %6, %8
%10 = udiv i32 %7, 10
%11 = icmp ult i32 %7, 10
br i1 %11, label %12, label %5
12: ; preds = %5
%13 = icmp ugt i32 %9, 9
br i1 %13, label %2, label %14
14: ; preds = %2, %12
%15 = phi i32 [ %9, %12 ], [ 0, %2 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ qhyper_nop();
int main(int argc, char **argv) {
  if (!qhyper_nop()) {
    printf("hypercall interface not available\n");
    return 1;
  }
  printf("hypercall interface available\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <qhyper_nop@plt>
cmp    $0x0,%eax
jne    115e <main+0x3e>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1171 <main+0x51>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <qhyper_nop@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
lea    0xeca(%rip),%rax
lea    0xee5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"hypercall interface not available\0A\00"
@.str.1 = [31 x i8] c"hypercall interface available\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @qhyper_nop()
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@str = [34 x i8] c"hypercall interface not available\00"
@str.2 = [30 x i8] c"hypercall interface available\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @qhyper_nop()
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0)
%6 = zext i1 %4 to i32
%7 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 %6
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, char *);
char *strerror(int);
void check_return(int r) {
  if (r < 0) {
    printf("********* failed with %d %s ********\n", errno, strerror(errno));
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    117b <check_return+0x4b>
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x8(%rbp),%esi
mov    %rax,%rdx
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_return>:
test   %edi,%edi
js     1135 <check_return+0x5>
ret
push   %rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1050 <strerror@plt>
lea    0xeb3(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"********* failed with %d %s ********\0A\00"
@errno = global i32 0
define void @check_return(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 %11
5: ; preds = %1
%6 = load i32, i32* @errno
%7 = load i32, i32* @errno
%8 = call i8* @strerror(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"********* failed with %d %s ********\0A\00"
@errno = global i32 0
define void @check_return(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main() {
  int x;
  int p = 1;
  for (x = 10; x > 0; x--) {
    __VERIFIER_assert(p == 1);
    if (x == 1)
      p = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    116c <main+0x5c>
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
cmpl   $0x1,-0x8(%rbp)
jne    1159 <main+0x49>
movl   $0x0,-0xc(%rbp)
jmp    115e <main+0x4e>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
%2 = tail call i32 @__VERIFIER_assert(i32 1)
%3 = tail call i32 @__VERIFIER_assert(i32 1)
%4 = tail call i32 @__VERIFIER_assert(i32 1)
%5 = tail call i32 @__VERIFIER_assert(i32 1)
%6 = tail call i32 @__VERIFIER_assert(i32 1)
%7 = tail call i32 @__VERIFIER_assert(i32 1)
%8 = tail call i32 @__VERIFIER_assert(i32 1)
%9 = tail call i32 @__VERIFIER_assert(i32 1)
%10 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
/* Type definitions */
struct psl {
  int dummy;
};

/* Variables and functions */
int pslScore(struct psl const *);
int pslCmpScore(const void *va, const void *vb) {
  const struct psl *a = *((struct psl **)va);
  const struct psl *b = *((struct psl **)vb);
  return pslScore(b) - pslScore(a);
}


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

x86 assembly (clang, -O2):
<pslCmpScore>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%rbx
mov    (%rsi),%rdi
call   1030 <pslScore@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <pslScore@plt>
sub    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.psl = type { i32 }
define i32 @pslCmpScore(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.psl*
%6 = alloca %struct.psl*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.psl**
%9 = load %struct.psl*, %struct.psl** %8
store %struct.psl* %9, %struct.psl** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to %struct.psl**
%12 = load %struct.psl*, %struct.psl** %11
store %struct.psl* %12, %struct.psl** %6
%13 = load %struct.psl*, %struct.psl** %6
%14 = call i32 @pslScore(%struct.psl* %13)
%15 = load %struct.psl*, %struct.psl** %5
%16 = call i32 @pslScore(%struct.psl* %15)
%17 = sub nsw i32 %14, %16
ret i32 %17
}

LLVM IR (-O2):
%struct.psl = type { i32 }
define i32 @pslCmpScore(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to %struct.psl**
%4 = load %struct.psl*, %struct.psl** %3
%5 = bitcast i8* %1 to %struct.psl**
%6 = load %struct.psl*, %struct.psl** %5
%7 = tail call i32 @pslScore(%struct.psl* %6)
%8 = tail call i32 @pslScore(%struct.psl* %4)
%9 = sub nsw i32 %7, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DMA2_Stream2_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @DMA2_Stream2_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ ht_inc_cnt_bw(int, int /*<<< orphan*/);
void count_bw(int numdate, uint64_t resp_size) {
  ht_inc_cnt_bw(numdate, resp_size);
}


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

x86 assembly (clang, -O2):
<count_bw>:
jmp    1030 <ht_inc_cnt_bw@plt>

LLVM IR (-O0):
define void @count_bw(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 @ht_inc_cnt_bw(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @count_bw(i32 %0, i32 %1) {
%3 = tail call i32 @ht_inc_cnt_bw(i32 %0, i32 %1)
ret void
}
int getLeftShooterPower(int speed) { return 40; }


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

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

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

LLVM IR (-O2):
define i32 @getLeftShooterPower(i32 %0) {
ret i32 40
}
/* Variables and functions */
int /*<<< orphan*/ emit(int, char *);
void be_push() { emit(1, "\x50"); }


x86 assembly (clang, -O0):
<be_push>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <emit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_push>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <emit@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"P\00"
define void @be_push() {
%1 = tail call i32 @emit(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int inet_pton(int /*<<< orphan*/, char const *, struct in6_addr *);
struct in6_addr *xtables_numeric_to_ip6addr(const char *num) {
  static struct in6_addr ap;
  int err;
  if ((err = inet_pton(AF_INET6, num, &ap)) == 1)
    return &ap;
  return NULL;
}


x86 assembly (clang, -O0):
<xtables_numeric_to_ip6addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
lea    0x2efc(%rip),%rdx
call   1030 <inet_pton@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x1,%eax
jne    1151 <xtables_numeric_to_ip6addr+0x41>
lea    0x2ee4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <xtables_numeric_to_ip6addr+0x49>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtables_numeric_to_ip6addr>:
push   %rbx
mov    %rdi,%rsi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x2f08(%rip),%rbx
mov    %rbx,%rdx
call   1030 <inet_pton@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.in6_addr = type { i32 }
@xtables_numeric_to_ip6addr.ap = internal global %struct.in6_addr zeroinitializer
@AF_INET6 = global i32 0
define %struct.in6_addr* @xtables_numeric_to_ip6addr(i8* %0) {
%2 = alloca %struct.in6_addr*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i32, i32* @AF_INET6
%6 = load i8*, i8** %3
%7 = call i32 @inet_pton(i32 %5, i8* %6, %struct.in6_addr* @xtables_numeric_to_ip6addr.ap)
store i32 %7, i32* %4
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %1
store %struct.in6_addr* @xtables_numeric_to_ip6addr.ap, %struct.in6_addr** %2
br label %11
10: ; preds = %1
store %struct.in6_addr* null, %struct.in6_addr** %2
br label %11
11: ; preds = %10, %9
%12 = load %struct.in6_addr*, %struct.in6_addr** %2
ret %struct.in6_addr* %12
}

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
@xtables_numeric_to_ip6addr.ap = internal global %struct.in6_addr zeroinitializer
@AF_INET6 = global i32 0
define %struct.in6_addr* @xtables_numeric_to_ip6addr(i8* %0) {
%2 = load i32, i32* @AF_INET6
%3 = tail call i32 @inet_pton(i32 %2, i8* %0, %struct.in6_addr* @xtables_numeric_to_ip6addr.ap)
%4 = icmp eq i32 %3, 1
%5 = select i1 %4, %struct.in6_addr* @xtables_numeric_to_ip6addr.ap, %struct.in6_addr* null
ret %struct.in6_addr* %5
}
/* Variables and functions */
long double pow(long double, int);
long double hypot(long double x, long double y) {
  return pow(x, 2) + pow(y, 2);
}


x86 assembly (clang, -O0):
<hypot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
mov    $0x2,%edi
mov    %edi,-0x30(%rbp)
call   1030 <pow@plt>
mov    -0x30(%rbp),%edi
fstpt  -0x2c(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <pow@plt>
fldt   -0x2c(%rbp)
faddp  %st,%st(1)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypot>:
sub    $0x28,%rsp
fldt   0x40(%rsp)
fstpt  0x1c(%rsp)
fldt   0x30(%rsp)
fstpt  (%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
fstpt  0x10(%rsp)
fldt   0x1c(%rsp)
fstpt  (%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
fldt   0x10(%rsp)
faddp  %st,%st(1)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @hypot(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* %3
%6 = call x86_fp80 @pow(x86_fp80 %5, i32 2)
%7 = load x86_fp80, x86_fp80* %4
%8 = call x86_fp80 @pow(x86_fp80 %7, i32 2)
%9 = fadd x86_fp80 %6, %8
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @hypot(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @pow(x86_fp80 %0, i32 2)
%4 = tail call x86_fp80 @pow(x86_fp80 %1, i32 2)
%5 = fadd x86_fp80 %3, %4
ret x86_fp80 %5
}
void caller_1_2_2_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_2_2_1_1_2_2() {
ret void
}
int test_imm_F2uint8_reg(unsigned char val) {
  return ((val) & (0xF2 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F2uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xf2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F2uint8_reg>:
test   $0xf2,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F2uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 242
%6 = icmp ne i32 %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_F2uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -14
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void print_bin_stats() {}


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

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

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

LLVM IR (-O2):
define void @print_bin_stats() {
ret void
}
/* Variables and functions */
scalar_t__ kgetc();
int kgets(char *s) {
  int i = 0;
  unsigned char c;
  do {
    c = (unsigned char)kgetc();
    if (c == '\n') {
      c = '\0';
    }
    s[i++] = c;
  } while (c != '\0');
  return i - 1;
}


x86 assembly (clang, -O0):
<kgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <kgetc@plt>
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
cmp    $0xa,%eax
jne    113e <kgets+0x2e>
movb   $0x0,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0xc(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
movzbl -0xd(%rbp),%eax
cmp    $0x0,%eax
jne    1123 <kgets+0x13>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kgets>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    $0xffffffff,%ebp
xor    %r14d,%r14d
nop
xor    %eax,%eax
call   1030 <kgetc@plt>
cmp    $0xa,%al
cmove  %r14d,%eax
mov    %al,(%rbx)
add    $0x1,%ebp
add    $0x1,%rbx
test   %al,%al
jne    1120 <kgets+0x10>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @kgets(i8* nocapture writeonly %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %9, %2 ], [ 0, %1 ]
%4 = tail call i64 (...) @kgetc()
%5 = trunc i64 %4 to i8
%6 = and i64 %4, 255
%7 = icmp eq i64 %6, 10
%8 = select i1 %7, i8 0, i8 %5
%9 = add nuw i64 %3, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %3
store i8 %8, i8* %10
%11 = icmp eq i8 %8, 0
br i1 %11, label %12, label %2
12: ; preds = %2
%13 = trunc i64 %3 to i32
ret i32 %13
}
/* Variables and functions */
scalar_t__ isdigit(char);
int octdigit(char c) { return (isdigit(c) && c != '8' && c != '9'); }


x86 assembly (clang, -O0):
<octdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
je     1158 <octdigit+0x48>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x38,%ecx
mov    %al,-0x2(%rbp)
je     1158 <octdigit+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<octdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xfe,%bl
cmp    $0x38,%bl
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @octdigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isdigit(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 56
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 57
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ false, %6 ], [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @octdigit(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = and i8 %0, -2
%5 = icmp ne i8 %4, 56
%6 = and i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int f(int);
int g(int x) {
  if (x <= 0)
    return 0;
  else
    return f(x - 2) + f(x - 3);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <g+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1154 <g+0x44>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x3,%edi
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
test   %edi,%edi
jle    1136 <g+0x26>
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    -0x2(%rbx),%edi
call   1030 <f@plt>
mov    %eax,%ebp
add    $0xfffffffd,%ebx
mov    %ebx,%edi
call   1030 <f@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -2
%5 = tail call i32 @f(i32 %4)
%6 = add nsw i32 %0, -3
%7 = tail call i32 @f(i32 %6)
%8 = add nsw i32 %7, %5
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 0, %1 ]
ret i32 %10
}
unsigned long rho_ruby_create_boolean(unsigned char b) { return 0; }


x86 assembly (clang, -O0):
<rho_ruby_create_boolean>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @rho_ruby_create_boolean(i8 zeroext %0) {
ret i64 0
}
void smal_collect_before_sweep() {}


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

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

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

LLVM IR (-O2):
define void @smal_collect_before_sweep() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void testArray() {
  int a[2];
  a[0] = 1;
  a[1] = 2;
  int *p = &a[0];
  int *p2 = a;
  printf("testArray: %d %d %d\n", a[0], *p, *p2);
}


x86 assembly (clang, -O0):
<testArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testArray>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"testArray: %d %d %d\0A\00"
define void @testArray() {
%1 = alloca [2 x i32]
%2 = alloca i32*
%3 = alloca i32*
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32 1, i32* %4
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
store i32 2, i32* %5
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32* %6, i32** %2
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32* %7, i32** %3
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%9 = load i32, i32* %8
%10 = load i32*, i32** %2
%11 = load i32, i32* %10
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"testArray: %d %d %d\0A\00"
define void @testArray() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 1)
ret void
}
OP(fd, a3) { op_a3(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_a3()
ret i32 undef
}
int fun1088() { return 1088; }


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

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

LLVM IR (-O0):
define i32 @fun1088() {
ret i32 1088
}

LLVM IR (-O2):
define i32 @fun1088() {
ret i32 1088
}
/* Type definitions */
struct Hash_t {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int Hash_dump(struct Hash_t *HASH_P, FILE *dump_file) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.Hash_t = type { i32 }
define i32 @Hash_dump(%struct.Hash_t* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvwinnwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwinnwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int deref(int *);
int test_deref(int *p) {
  if (p && deref(p) > 3)
    return 4;
  else
    return 0;
}


x86 assembly (clang, -O0):
<test_deref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1145 <test_deref+0x35>
mov    -0x10(%rbp),%rdi
call   1030 <deref@plt>
cmp    $0x3,%eax
jle    1145 <test_deref+0x35>
movl   $0x4,-0x4(%rbp)
jmp    114c <test_deref+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_deref>:
test   %rdi,%rdi
je     112c <test_deref+0x1c>
push   %rax
call   1030 <deref@plt>
mov    %eax,%ecx
mov    $0x4,%eax
cmp    $0x3,%ecx
lea    0x8(%rsp),%rsp
jg     112e <test_deref+0x1e>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @test_deref(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @deref(i32* %0)
%5 = icmp sgt i32 %4, 3
br i1 %5, label %7, label %6
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 0, %6 ], [ 4, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ strlcpy(char *, char const *, size_t);
int strlen(char const *);
char *xmalloc(size_t);
__attribute__((visibility("hidden"))) char *xstrdup(const char *str) {
  size_t len;
  char *cp;
  len = strlen(str) + 1;
  cp = xmalloc(len);
  strlcpy(cp, str, len);
  return cp;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1050 <strlcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1040 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <strlcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define hidden i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i8* @xmalloc(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = load i64, i64* %3
%14 = call i32 @strlcpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define hidden i8* @xstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @xmalloc(i64 %4)
%6 = tail call i32 @strlcpy(i8* %5, i8* %0, i64 %4)
ret i8* %5
}
void OTG_HS_EP1_IN_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @OTG_HS_EP1_IN_IRQHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quicksort_recursive(int *, int /*<<< orphan*/, int,
                                       int /*<<< orphan*/);
void quicksort_descending(int *array, int length) {
  quicksort_recursive(array, 0, length, 0);
}


x86 assembly (clang, -O0):
<quicksort_descending>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1030 <quicksort_recursive@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort_descending>:
mov    %esi,%edx
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <quicksort_recursive@plt>

LLVM IR (-O0):
define void @quicksort_descending(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 @quicksort_recursive(i32* %5, i32 0, i32 %6, i32 0)
ret void
}

LLVM IR (-O2):
define void @quicksort_descending(i32* %0, i32 %1) {
%3 = tail call i32 @quicksort_recursive(i32* %0, i32 0, i32 %1, i32 0)
ret void
}
int mDBi_msg_s(msg, src)
char *msg, *src;
{
  strcat(msg, "\t");
  strcat(msg, src ? src : " ");
}


x86 assembly (clang, -O0):
<mDBi_msg_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcat@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1150 <mDBi_msg_s+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1160 <mDBi_msg_s+0x50>
lea    0xeab(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1160 <mDBi_msg_s+0x50>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcat@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mDBi_msg_s>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
movw   $0x9,(%rbx,%rax,1)
test   %r14,%r14
lea    0xec1(%rip),%rsi
cmovne %r14,%rsi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strcat@plt>

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

LLVM IR (-O2):
@.str.1 = [2 x i8] c" \00"
define i32 @mDBi_msg_s(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr i8, i8* %0, i64 %3
%5 = bitcast i8* %4 to i16*
store i16 9, i16* %5
%6 = icmp eq i8* %1, null
%7 = select i1 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %1
%8 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %7)
ret i32 undef
}
void eusstart(x) { return; }


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

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

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

LLVM IR (-O2):
define void @eusstart(i32 %0) {
ret void
}
int absval(int x) { return (x < 0) ? -1 * x : x; }


x86 assembly (clang, -O0):
<absval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1120 <absval+0x20>
imul   $0xffffffff,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <absval+0x26>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @absval(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 %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = mul nsw i32 -1, %6
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @absval(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ tidyUpAll();
int /*<<< orphan*/ unMarkAll();
int /*<<< orphan*/ walkRootsAll();
void GC_collectAll(void) {
  walkRootsAll();
  unMarkAll();
  walkRootsAll();
  tidyUpAll();
}


x86 assembly (clang, -O0):
<GC_collectAll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <walkRootsAll@plt>
mov    $0x0,%al
call   1030 <unMarkAll@plt>
mov    $0x0,%al
call   1040 <walkRootsAll@plt>
mov    $0x0,%al
call   1050 <tidyUpAll@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GC_collectAll>:
push   %rax
xor    %eax,%eax
call   1040 <walkRootsAll@plt>
xor    %eax,%eax
call   1030 <unMarkAll@plt>
xor    %eax,%eax
call   1040 <walkRootsAll@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <tidyUpAll@plt>

LLVM IR (-O0):
define void @GC_collectAll() {
%1 = call i32 (...) @walkRootsAll()
%2 = call i32 (...) @unMarkAll()
%3 = call i32 (...) @walkRootsAll()
%4 = call i32 (...) @tidyUpAll()
ret void
}

LLVM IR (-O2):
define void @GC_collectAll() {
%1 = tail call i32 (...) @walkRootsAll()
%2 = tail call i32 (...) @unMarkAll()
%3 = tail call i32 (...) @walkRootsAll()
%4 = tail call i32 (...) @tidyUpAll()
ret void
}
void do_post() {}


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

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

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

LLVM IR (-O2):
define void @do_post() {
ret void
}
void glOrthof(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glOrthof() {
ret void
}
/* Type definitions */
struct server {
  int dummy;
};
struct imapmsg {
  int dummy;
};
struct folder {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ start_search(struct server *, struct folder *);
void imap_selectok(struct imapmsg *msg, struct server *sptr,
                   struct folder *fptr) {
  start_search(sptr, fptr);
}


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

x86 assembly (clang, -O2):
<imap_selectok>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <start_search@plt>

LLVM IR (-O0):
%struct.imapmsg = type { i32 }
%struct.server = type { i32 }
%struct.folder = type { i32 }
define void @imap_selectok(%struct.imapmsg* %0, %struct.server* %1, %struct.folder* %2) {
%4 = alloca %struct.imapmsg*
%5 = alloca %struct.server*
%6 = alloca %struct.folder*
store %struct.imapmsg* %0, %struct.imapmsg** %4
store %struct.server* %1, %struct.server** %5
store %struct.folder* %2, %struct.folder** %6
%7 = load %struct.server*, %struct.server** %5
%8 = load %struct.folder*, %struct.folder** %6
%9 = call i32 @start_search(%struct.server* %7, %struct.folder* %8)
ret void
}

LLVM IR (-O2):
%struct.imapmsg = type { i32 }
%struct.server = type { i32 }
%struct.folder = type { i32 }
define void @imap_selectok(%struct.imapmsg* nocapture readnone %0, %struct.server* %1, %struct.folder* %2) {
%4 = tail call i32 @start_search(%struct.server* %1, %struct.folder* %2)
ret void
}