xunge/DecIR huggingface dataset:
void obliczenia(int *q, int *r, int x, int y) {
  *q = x / y;
  *r = x % y;
}


x86 assembly (clang, -O0):
<obliczenia>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<obliczenia>:
mov    %edx,%eax
cltd
idiv   %ecx
mov    %eax,(%rdi)
mov    %edx,(%rsi)
ret

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

LLVM IR (-O2):
define void @obliczenia(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = sdiv i32 %2, %3
store i32 %5, i32* %0
%6 = srem i32 %2, %3
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ allocate_queues();
int /*<<< orphan*/ create_queues_lock();
int /*<<< orphan*/ create_serial_lock();
int /*<<< orphan*/ init_sem();
int /*<<< orphan*/ start_queues_handlers();
void init() {
  allocate_queues();
  create_queues_lock();
  create_serial_lock();
  init_sem();
  start_queues_handlers();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <allocate_queues@plt>
mov    $0x0,%al
call   1050 <create_queues_lock@plt>
mov    $0x0,%al
call   1030 <create_serial_lock@plt>
mov    $0x0,%al
call   1040 <init_sem@plt>
mov    $0x0,%al
call   1070 <start_queues_handlers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1060 <allocate_queues@plt>
xor    %eax,%eax
call   1050 <create_queues_lock@plt>
xor    %eax,%eax
call   1030 <create_serial_lock@plt>
xor    %eax,%eax
call   1040 <init_sem@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <start_queues_handlers@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 (...) @allocate_queues()
%2 = call i32 (...) @create_queues_lock()
%3 = call i32 (...) @create_serial_lock()
%4 = call i32 (...) @init_sem()
%5 = call i32 (...) @start_queues_handlers()
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @allocate_queues()
%2 = tail call i32 (...) @create_queues_lock()
%3 = tail call i32 (...) @create_serial_lock()
%4 = tail call i32 (...) @init_sem()
%5 = tail call i32 (...) @start_queues_handlers()
ret void
}
int is_sorted(int *a, int n) {
  while (--n >= 1) {
    if (a[n] < a[n - 1])
      return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<is_sorted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x1,%eax
jl     114f <is_sorted+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    114a <is_sorted+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1156 <is_sorted+0x56>
jmp    110b <is_sorted+0xb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sorted>:
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x2,%eax
jl     1128 <is_sorted+0x28>
mov    -0x4(%rdi,%rax,4),%ecx
lea    -0x2(%rax),%edx
add    $0xffffffffffffffff,%rax
cmp    (%rdi,%rdx,4),%ecx
jge    1110 <is_sorted+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_sorted(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %9, %2
%5 = phi i64 [ %6, %9 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %17
9: ; preds = %4
%10 = getelementptr inbounds i32, i32* %0, i64 %6
%11 = load i32, i32* %10
%12 = add i64 %5, 4294967294
%13 = and i64 %12, 4294967295
%14 = getelementptr inbounds i32, i32* %0, i64 %13
%15 = load i32, i32* %14
%16 = icmp slt i32 %11, %15
br i1 %16, label %17, label %4
17: ; preds = %4, %9
%18 = phi i32 [ 0, %9 ], [ 1, %4 ]
ret i32 %18
}
char *b64enc_shortdesc(void) { return "encode data to Base64 representation"; }


x86 assembly (clang, -O0):
<b64enc_shortdesc>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64enc_shortdesc>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [37 x i8] c"encode data to Base64 representation\00"
define i8* @b64enc_shortdesc() {
ret i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [37 x i8] c"encode data to Base64 representation\00"
define i8* @b64enc_shortdesc() {
ret i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ assign_value(char *, int, int /*<<< orphan*/);
void create_var(char *s, int value) { assign_value(s, value, 0); }


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

x86 assembly (clang, -O2):
<create_var>:
xor    %edx,%edx
jmp    1030 <assign_value@plt>

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

LLVM IR (-O2):
define void @create_var(i8* %0, i32 %1) {
%3 = tail call i32 @assign_value(i8* %0, i32 %1, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ read_email(int /*<<< orphan*/, int /*<<< orphan*/ *,
                              int /*<<< orphan*/);
int main(int argc, char **argv) {
  FILE *in;
  in = fopen(argv[1], "r");
  read_email(0, in, 0);
  fclose(in);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeb2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
mov    %edx,%edi
call   1040 <read_email@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
lea    0xec4(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
mov    %rax,%rsi
xor    %edx,%edx
call   1040 <read_email@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @read_email(i32 0, i32* %5, i32 0)
%7 = tail call i32 @fclose(i32* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test(char **);
int main(int argv, char **args) {
  short i;
  for (i = 0; i < 20; i++) {
    test(args);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movw   $0x0,-0x12(%rbp)
movswl -0x12(%rbp),%eax
cmp    $0x14,%eax
jge    1153 <main+0x43>
mov    -0x10(%rbp),%rdi
call   1030 <test@plt>
mov    -0x12(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x12(%rbp)
jmp    112c <main+0x1c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
mov    %rbx,%rdi
call   1030 <test@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i16
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i16 0, i16* %6
br label %7
7: ; preds = %14, %2
%8 = load i16, i16* %6
%9 = sext i16 %8 to i32
%10 = icmp slt i32 %9, 20
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = call i32 @test(i8** %12)
br label %14
14: ; preds = %11
%15 = load i16, i16* %6
%16 = add i16 %15, 1
store i16 %16, i16* %6
br label %7
17: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test(i8** %1)
%4 = tail call i32 @test(i8** %1)
%5 = tail call i32 @test(i8** %1)
%6 = tail call i32 @test(i8** %1)
%7 = tail call i32 @test(i8** %1)
%8 = tail call i32 @test(i8** %1)
%9 = tail call i32 @test(i8** %1)
%10 = tail call i32 @test(i8** %1)
%11 = tail call i32 @test(i8** %1)
%12 = tail call i32 @test(i8** %1)
%13 = tail call i32 @test(i8** %1)
%14 = tail call i32 @test(i8** %1)
%15 = tail call i32 @test(i8** %1)
%16 = tail call i32 @test(i8** %1)
%17 = tail call i32 @test(i8** %1)
%18 = tail call i32 @test(i8** %1)
%19 = tail call i32 @test(i8** %1)
%20 = tail call i32 @test(i8** %1)
%21 = tail call i32 @test(i8** %1)
%22 = tail call i32 @test(i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main(void) {
  char string_1[100];
  char string_2[100];
  get_string(string_1, 100);
  get_string(string_2, 100);
  squeeze(string_1, string_2);
  printf("%s\n", string_1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   1040 <get_string@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x64,%esi
call   1040 <get_string@plt>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x70(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
lea    0x70(%rsp),%r14
mov    %r14,%rdi
mov    $0x64,%esi
call   1040 <get_string@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <get_string@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <squeeze@plt>
lea    0xe92(%rip),%rdi
mov    %r14,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @get_string(i8* %3, i32 100)
%6 = call i32 @get_string(i8* %4, i32 100)
%7 = call i32 @squeeze(i8* %3, i8* %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
log(fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9) char *fmt;
long a1, a2, a3, a4, a5, a6, a7, a8, a9;
{ _dolog(0, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9); }


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
mov    -0x48(%rbp),%r14
mov    0x10(%rbp),%rbx
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10
mov    0x28(%rbp),%rax
xor    %edi,%edi
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    $0x0,%al
call   1030 <_dolog@plt>
mov    -0x14(%rbp),%eax
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<log>:
sub    $0x28,%rsp
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
movaps 0x30(%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
movups %xmm1,0x18(%rsp)
movups %xmm0,0x8(%rsp)
mov    %r9,(%rsp)
xor    %edi,%edi
mov    %rax,%r9
xor    %eax,%eax
call   1030 <_dolog@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @log(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
store i8* %0, i8** %12
store i64 %1, i64* %13
store i64 %2, i64* %14
store i64 %3, i64* %15
store i64 %4, i64* %16
store i64 %5, i64* %17
store i64 %6, i64* %18
store i64 %7, i64* %19
store i64 %8, i64* %20
store i64 %9, i64* %21
%22 = load i8*, i8** %12
%23 = load i64, i64* %13
%24 = load i64, i64* %14
%25 = load i64, i64* %15
%26 = load i64, i64* %16
%27 = load i64, i64* %17
%28 = load i64, i64* %18
%29 = load i64, i64* %19
%30 = load i64, i64* %20
%31 = load i64, i64* %21
%32 = call i32 (i32, i8*, i64, i64, i64, i64, i64, i64, i64, i64, i64, ...) bitcast (i32 (...)* @_dolog to i32 (i32, i8*, i64, i64, i64, i64, i64, i64, i64, i64, i64, ...)*)(i32 0, i8* %22, i64 %23, i64 %24, i64 %25, i64 %26, i64 %27, i64 %28, i64 %29, i64 %30, i64 %31)
%33 = load i32, i32* %11
ret i32 %33
}

LLVM IR (-O2):
define i32 @log(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = tail call i32 (i32, i8*, i64, i64, i64, i64, i64, i64, i64, i64, i64, ...) bitcast (i32 (...)* @_dolog to i32 (i32, i8*, i64, i64, i64, i64, i64, i64, i64, i64, i64, ...)*)(i32 0, i8* %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9)
ret i32 undef
}
/* Variables and functions */
scalar_t__ getpid();
int unistd_getpid(void) { return (int)(getpid()); }


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

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

LLVM IR (-O0):
define i32 @unistd_getpid() {
%1 = call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @unistd_getpid() {
%1 = tail call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
ret i32 %2
}
int levelmatch(struct initrec *p, int level) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.initrec = type opaque
define i32 @levelmatch(%struct.initrec* nocapture readnone %0, i32 %1) {
ret i32 1
}
unsigned xrop3_24_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = T ^ D;
  stk1 = stk1 & stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_24_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_24_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    %eax,%ecx
xor    $0xff,%eax
and    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_24_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %8
%25 = load i32, i32* %7
%26 = load i32, i32* %5
%27 = xor i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
ret i32 %31
}

LLVM IR (-O2):
define i32 @xrop3_24_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %4
%8 = xor i32 %6, 255
%9 = and i32 %7, %8
ret i32 %9
}
int main() {
  test();
  asm volatile(".byte 0xd6" : : "a"(0));
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test()
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void terminal_error(const char *name) {
  fprintf(stderr, "\n");
  perror(name);
  exit(1);
}


x86 assembly (clang, -O0):
<terminal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<terminal_error>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @terminal_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @perror(i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @terminal_error(i8* nocapture %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @perror(i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int getAmountArray(int *, int);
float getAverageArray(int *array, int length) {
  int amount = getAmountArray(array, length);
  return (float)amount / length;
}


x86 assembly (clang, -O0):
<getAverageArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <getAmountArray@plt>
mov    %eax,-0x10(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAverageArray>:
push   %rbx
mov    %esi,%ebx
call   1030 <getAmountArray@plt>
cvtsi2ss %eax,%xmm0
cvtsi2ss %ebx,%xmm1
divss  %xmm1,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @getAverageArray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = call i32 @getAmountArray(i32* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to float
%11 = load i32, i32* %4
%12 = sitofp i32 %11 to float
%13 = fdiv float %10, %12
ret float %13
}

LLVM IR (-O2):
define float @getAverageArray(i32* %0, i32 %1) {
%3 = tail call i32 @getAmountArray(i32* %0, i32 %1)
%4 = sitofp i32 %3 to float
%5 = sitofp i32 %1 to float
%6 = fdiv float %4, %5
ret float %6
}
/* Variables and functions */
int POLLIN;
int POLLOUT;
int /*<<< orphan*/ daemon_poll_addfd(int, int);
void daemon_poll_addfd_readwrite(int fd) {
  daemon_poll_addfd(fd, POLLIN | POLLOUT);
}


x86 assembly (clang, -O0):
<daemon_poll_addfd_readwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
mov    0x2eca(%rip),%rax
or     (%rax),%esi
call   1030 <daemon_poll_addfd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daemon_poll_addfd_readwrite>:
mov    0x2ec9(%rip),%rax
mov    0x2eda(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
jmp    1030 <daemon_poll_addfd@plt>

LLVM IR (-O0):
@POLLIN = global i32 0
@POLLOUT = global i32 0
define void @daemon_poll_addfd_readwrite(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @POLLIN
%5 = load i32, i32* @POLLOUT
%6 = or i32 %4, %5
%7 = call i32 @daemon_poll_addfd(i32 %3, i32 %6)
ret void
}

LLVM IR (-O2):
@POLLIN = global i32 0
@POLLOUT = global i32 0
define void @daemon_poll_addfd_readwrite(i32 %0) {
%2 = load i32, i32* @POLLIN
%3 = load i32, i32* @POLLOUT
%4 = or i32 %3, %2
%5 = tail call i32 @daemon_poll_addfd(i32 %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_iochannel_is_readable() {
  printf("NOT IMPLEMENTED:"
         "pa_iochannel_is_readable"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_iochannel_is_readable\00"
define i32 @pa_iochannel_is_readable() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int test_empty(const char *buf, size_t size) {
  while (size--) {
    if (*buf++ != 0xff)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<test_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1153 <test_empty+0x53>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0xff,%eax
je     114e <test_empty+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    115a <test_empty+0x5a>
jmp    110c <test_empty+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_empty>:
xor    %eax,%eax
test   %rsi,%rsi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @test_empty(i8* nocapture readnone %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ c_leaks();
int main(void) {
  c_leaks();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @c_leaks()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ vec_len(void *);
int vec_splice(void *, int /*<<< orphan*/, void *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ vec_truncat(void *, int /*<<< orphan*/, size_t);
int vec_copy(void *destp, void *src, size_t size) {
  vec_truncat(destp, 0, size);
  return vec_splice(destp, 0, src, vec_len(src), size);
}


x86 assembly (clang, -O0):
<vec_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1040 <vec_truncat@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <vec_len@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
mov    -0x18(%rbp),%r8
xor    %esi,%esi
call   1030 <vec_splice@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_copy>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <vec_truncat@plt>
mov    %r15,%rdi
call   1050 <vec_len@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
mov    %eax,%ecx
mov    %r14,%r8
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <vec_splice@plt>

LLVM IR (-O0):
define i32 @vec_copy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %6
%9 = call i32 @vec_truncat(i8* %7, i32 0, i64 %8)
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i8*, i8** %5
%13 = call i32 @vec_len(i8* %12)
%14 = load i64, i64* %6
%15 = call i32 @vec_splice(i8* %10, i32 0, i8* %11, i32 %13, i64 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @vec_copy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @vec_truncat(i8* %0, i32 0, i64 %2)
%5 = tail call i32 @vec_len(i8* %1)
%6 = tail call i32 @vec_splice(i8* %0, i32 0, i8* %1, i32 %5, i64 %2)
ret i32 %6
}
/* Type definitions */
struct ddb_view {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ddb_view *);
void ddb_view_free(struct ddb_view *view) { free(view); }


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

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

LLVM IR (-O0):
%struct.ddb_view = type { i32 }
define void @ddb_view_free(%struct.ddb_view* %0) {
%2 = alloca %struct.ddb_view*
store %struct.ddb_view* %0, %struct.ddb_view** %2
%3 = load %struct.ddb_view*, %struct.ddb_view** %2
%4 = call i32 @free(%struct.ddb_view* %3)
ret void
}

LLVM IR (-O2):
%struct.ddb_view = type { i32 }
define void @ddb_view_free(%struct.ddb_view* nocapture %0) {
%2 = tail call i32 @free(%struct.ddb_view* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
gen_logical_negation() {
  output_line("sltu\t$t1, $v0, $zero");
  output_line("sltu\t$t2, $zero, $v0");
  output_line("or\t$v0, $t1, $t2");
  output_line("xori\t$v0, 1");
}


x86 assembly (clang, -O0):
<gen_logical_negation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <output_line@plt>
lea    0xeea(%rip),%rdi
call   1030 <output_line@plt>
lea    0xef3(%rip),%rdi
call   1030 <output_line@plt>
lea    0xef8(%rip),%rdi
call   1030 <output_line@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_logical_negation>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <output_line@plt>
lea    0xef1(%rip),%rdi
call   1030 <output_line@plt>
lea    0xefa(%rip),%rdi
call   1030 <output_line@plt>
lea    0xeff(%rip),%rdi
pop    %rax
jmp    1030 <output_line@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"sltu\09$t1, $v0, $zero\00"
@.str.1 = [21 x i8] c"sltu\09$t2, $zero, $v0\00"
@.str.2 = [17 x i8] c"or\09$v0, $t1, $t2\00"
@.str.3 = [12 x i8] c"xori\09$v0, 1\00"
define i32 @gen_logical_negation() {
%1 = alloca i32
%2 = call i32 @output_line(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @output_line(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @output_line(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @output_line(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [21 x i8] c"sltu\09$t1, $v0, $zero\00"
@.str.1 = [21 x i8] c"sltu\09$t2, $zero, $v0\00"
@.str.2 = [17 x i8] c"or\09$v0, $t1, $t2\00"
@.str.3 = [12 x i8] c"xori\09$v0, 1\00"
define i32 @gen_logical_negation() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output_line(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @output_line(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @output_line(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
ret i32 undef
}
const char *mark6PacketFormat(int formatId) {
  if (formatId == 0) {
    return "VDIF";
  } else if (formatId == 1) {
    return "Mark5b";
  } else if (formatId == 2) {
    return "Unknown";
  } else {
    return "Illegal value!";
  }
}


x86 assembly (clang, -O0):
<mark6PacketFormat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1121 <mark6PacketFormat+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <mark6PacketFormat+0x60>
cmpl   $0x1,-0xc(%rbp)
jne    113b <mark6PacketFormat+0x3b>
lea    0xed3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <mark6PacketFormat+0x60>
cmpl   $0x2,-0xc(%rbp)
jne    1155 <mark6PacketFormat+0x55>
lea    0xec0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <mark6PacketFormat+0x60>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark6PacketFormat>:
cmp    $0x2,%edi
ja     1117 <mark6PacketFormat+0x17>
movslq %edi,%rax
lea    0xf15(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xef6(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"VDIF\00"
@.str.1 = [7 x i8] c"Mark5b\00"
@.str.2 = [8 x i8] c"Unknown\00"
@.str.3 = [15 x i8] c"Illegal value!\00"
define i8* @mark6PacketFormat(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %16
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %15
14: ; preds = %11
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %16
15: ; preds = %11
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %16
16: ; preds = %15, %14, %10, %6
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@.str = [5 x i8] c"VDIF\00"
@.str.1 = [7 x i8] c"Mark5b\00"
@.str.2 = [8 x i8] c"Unknown\00"
@.str.3 = [15 x i8] c"Illegal value!\00"
@reltable.mark6PacketFormat = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.mark6PacketFormat to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.mark6PacketFormat to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.mark6PacketFormat to i64)) to i32)]
define i8* @mark6PacketFormat(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.mark6PacketFormat to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %8
}
/* Variables and functions */
scalar_t__ frexp(double, int *);
long double frexpl(long double x, int *e) {
  return (long double)frexp((double)x, e);
}


x86 assembly (clang, -O0):
<frexpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   1030 <frexp@plt>
mov    %rax,-0x20(%rbp)
fildll -0x20(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frexpl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <frexp@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @frexpl(x86_fp80 %0, i32* %1) {
%3 = alloca x86_fp80
%4 = alloca i32*
store x86_fp80 %0, x86_fp80* %3
store i32* %1, i32** %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load i32*, i32** %4
%8 = call i64 @frexp(double %6, i32* %7)
%9 = sitofp i64 %8 to x86_fp80
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @frexpl(x86_fp80 %0, i32* nocapture %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = tail call i64 @frexp(double %3, i32* %1)
%5 = sitofp i64 %4 to x86_fp80
ret x86_fp80 %5
}
/* Variables and functions */
int chapter_strlen(char *s) {
  int i = 0;
  if (NULL == s)
    return 0;
  while (s[i] != '\0')
    ++i;
  return i;
}


x86 assembly (clang, -O0):
<chapter_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1127 <chapter_strlen+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1155 <chapter_strlen+0x55>
jmp    112c <chapter_strlen+0x2c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114f <chapter_strlen+0x4f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112c <chapter_strlen+0x2c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chapter_strlen>:
test   %rdi,%rdi
je     111d <chapter_strlen+0x1d>
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <chapter_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @chapter_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 0, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double getFloatTime() {
  struct timeval t;
  gettimeofday(&t, 0);
  return (double)t.tv_sec + (double)t.tv_usec / 1000000.0;
}


x86 assembly (clang, -O0):
<getFloatTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFloatTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
divsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @getFloatTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @getFloatTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %10, %6
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
int BNC_1() {
  int ii, stat = 99;
  char com1, data;
  BNCIO(1);
  return (stat);
}


x86 assembly (clang, -O0):
<BNC_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @BNC_1() {
%1 = tail call i32 @BNCIO(i32 1)
ret i32 99
}
double prv_process_fpa_add_real64(double a, double b) { return a + b; }


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

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

LLVM IR (-O0):
define double @prv_process_fpa_add_real64(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @prv_process_fpa_add_real64(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
int readsnump(p)
char **p;
{
  if (**p == '-') {
    *p = *p + 1;
    skipspace(p);
    return (-readnump(p));
  } else {
    return (readnump(p));
  }
}


x86 assembly (clang, -O0):
<readsnump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1175 <readsnump+0x55>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <skipspace@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <readnump@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1183 <readsnump+0x63>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <readnump@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readsnump>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
cmpb   $0x2d,(%rax)
jne    114b <readsnump+0x2b>
add    $0x1,%rax
mov    %rax,(%rbx)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <skipspace@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <readnump@plt>
neg    %eax
pop    %rbx
ret
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <readnump@plt>

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

LLVM IR (-O2):
define i32 @readsnump(i8** %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 45
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %6, i8** %0
%7 = tail call i32 (i8**, ...) bitcast (i32 (...)* @skipspace to i32 (i8**, ...)*)(i8** %0)
%8 = tail call i32 (i8**, ...) bitcast (i32 (...)* @readnump to i32 (i8**, ...)*)(i8** %0)
%9 = sub nsw i32 0, %8
br label %12
10: ; preds = %1
%11 = tail call i32 (i8**, ...) bitcast (i32 (...)* @readnump to i32 (i8**, ...)*)(i8** %0)
br label %12
12: ; preds = %10, %5
%13 = phi i32 [ %9, %5 ], [ %11, %10 ]
ret i32 %13
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ f(int);
void main() {
  int c = __VERIFIER_nondet_int();
  if (c) {
    f(1);
  } else {
    f(2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114b <main+0x2b>
mov    $0x1,%edi
call   1030 <f@plt>
jmp    1155 <main+0x35>
mov    $0x2,%edi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%eax
mov    $0x1,%edi
adc    $0x0,%edi
pop    %rax
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i32 2, i32 1
%4 = tail call i32 @f(i32 %3)
ret void
}
int func(n) {
  long arr[n];
  return 1;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    $0x1,%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i64, i64 %6
store i64 %6, i64* %4
%9 = load i8*, i8** %3
ret i32 1
}

LLVM IR (-O2):
define i32 @func(i32 %0) {
ret i32 1
}