xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ malloc(int);
int nondetpos();
int *__attribute__((array)) main() {
  int size;
  int *retval;
  size = nondetpos();
  retval = (int *)malloc(size * sizeof(int));
  for (int i = 0; i < size; i++) {
    retval[i] = 0;
  }
  return retval;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <nondetpos@plt>
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1175 <main+0x55>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <main+0x2c>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <nondetpos@plt>
mov    %eax,%ebx
lea    0x0(,%rbx,4),%edi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %ebx,%ebx
jle    1160 <main+0x30>
mov    %ebx,%edx
shl    $0x2,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32* @main() {
%1 = tail call i32 (...) @nondetpos()
%2 = shl i32 %1, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = inttoptr i64 %3 to i8*
%7 = zext i32 %1 to i64
%8 = shl nuw nsw i64 %7, 2
br label %9
9: ; preds = %5, %0
%10 = inttoptr i64 %3 to i32*
ret i32* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("nv_hciattach - nVidia Bluetooth HCI Driver                           "
         "        initialization utility\n");
  printf("Usage:\n");
  printf("\tnv_hciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed]        "
         "                <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3b(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [101 x i8] c"nv_hciattach - nVidia Bluetooth HCI Driver initialization utility\0A\00"
@.str.1 = [8 x i8] c"Usage:\0A\00"
@.str.2 = [134 x i8] c"\09nv_hciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [100 x i8] c"nv_hciattach - nVidia Bluetooth HCI Driver initialization utility\00"
@str.3 = [7 x i8] c"Usage:\00"
@str.4 = [133 x i8] c"\09nv_hciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([133 x i8], [133 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(unsigned int, int /*<<< orphan*/ *);
void write_int32(FILE *out, unsigned int i) {
  putc((i >> 24), out);
  putc((i >> 16) & 255, out);
  putc((i >> 8) & 255, out);
  putc(i & 255, out);
}


x86 assembly (clang, -O0):
<write_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
shr    $0x18,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
shr    $0x10,%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
shr    $0x8,%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_int32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%eax
shr    $0x18,%eax
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
movzbl %bl,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @write_int32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = lshr i32 %5, 24
%7 = load i32*, i32** %3
%8 = call i32 @putc(i32 %6, i32* %7)
%9 = load i32, i32* %4
%10 = lshr i32 %9, 16
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = call i32 @putc(i32 %11, i32* %12)
%14 = load i32, i32* %4
%15 = lshr i32 %14, 8
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = call i32 @putc(i32 %16, i32* %17)
%19 = load i32, i32* %4
%20 = and i32 %19, 255
%21 = load i32*, i32** %3
%22 = call i32 @putc(i32 %20, i32* %21)
ret void
}

LLVM IR (-O2):
define void @write_int32(i32* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = tail call i32 @putc(i32 %3, i32* %0)
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = tail call i32 @putc(i32 %6, i32* %0)
%8 = lshr i32 %1, 8
%9 = and i32 %8, 255
%10 = tail call i32 @putc(i32 %9, i32* %0)
%11 = and i32 %1, 255
%12 = tail call i32 @putc(i32 %11, i32* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int __u32;

/* Variables and functions */
bool link_has_sll_hdr(uint32_t link_type) {
  switch (link_type) {
  case 253:
  case 113:
  case ((__u32)((((__u32)(253) & (__u32)0x000000ffUL) << 24) |
                (((__u32)(253) & (__u32)0x0000ff00UL) << 8) |
                (((__u32)(253) & (__u32)0x00ff0000UL) >> 8) |
                (((__u32)(253) & (__u32)0xff000000UL) >> 24))):
  case ((__u32)((((__u32)(113) & (__u32)0x000000ffUL) << 24) |
                (((__u32)(113) & (__u32)0x0000ff00UL) << 8) |
                (((__u32)(113) & (__u32)0x00ff0000UL) >> 8) |
                (((__u32)(113) & (__u32)0xff000000UL) >> 24))):
    return true;
  default:
    return false;
  }
}


x86 assembly (clang, -O0):
<link_has_sll_hdr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xfd000000,%eax
je     1154 <link_has_sll_hdr+0x54>
jmp    111d <link_has_sll_hdr+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x71,%eax
je     1154 <link_has_sll_hdr+0x54>
jmp    112e <link_has_sll_hdr+0x2e>
mov    -0xc(%rbp),%eax
sub    $0xfd,%eax
je     1154 <link_has_sll_hdr+0x54>
jmp    1141 <link_has_sll_hdr+0x41>
mov    -0xc(%rbp),%eax
sub    $0x71000000,%eax
jne    1160 <link_has_sll_hdr+0x60>
jmp    1154 <link_has_sll_hdr+0x54>
movl   $0x1,-0x4(%rbp)
jmp    1167 <link_has_sll_hdr+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<link_has_sll_hdr>:
mov    $0x1,%eax
cmp    $0xfc,%edi
jg     111b <link_has_sll_hdr+0x1b>
cmp    $0xfd000000,%edi
je     111a <link_has_sll_hdr+0x1a>
cmp    $0x71,%edi
jne    112b <link_has_sll_hdr+0x2b>
ret
cmp    $0xfd,%edi
je     111a <link_has_sll_hdr+0x1a>
cmp    $0x71000000,%edi
je     111a <link_has_sll_hdr+0x1a>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @link_has_sll_hdr(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 253, label %5
i32 113, label %5
i32 -50331648, label %5
i32 1895825408, label %5
]
5: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @link_has_sll_hdr(i32 %0) {
switch i32 %0, label %2 [
i32 253, label %3
i32 113, label %3
i32 -50331648, label %3
i32 1895825408, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: getnodes <grid file> [-i <node type>] [-o <node type>]\n");
  printf("                [-m <mask file>] [-x|-y] [-v]\n");
  printf("Try \"getnodes -h\" for more information\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2b(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2c(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"Usage: getnodes <grid file> [-i <node type>] [-o <node type>]\0A\00"
@.str.1 = [47 x i8] c" [-m <mask file>] [-x|-y] [-v]\0A\00"
@.str.2 = [40 x i8] c"Try \22getnodes -h\22 for more information\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [62 x i8] c"Usage: getnodes <grid file> [-i <node type>] [-o <node type>]\00"
@str.3 = [46 x i8] c" [-m <mask file>] [-x|-y] [-v]\00"
@str.4 = [39 x i8] c"Try \22getnodes -h\22 for more information\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ read_datas();
int main() {
  read_datas();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @read_datas()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int f(int i) {
  switch (i) {
  case -2:
    return 33;
  case -1:
    return 0;
  case 0:
    return 7;
  case 1:
    return 4;
  case 2:
    return 3;
  case 3:
    return 15;
  case 4:
    return 9;
  default:
    abort();
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x6,%eax
ja     1198 <f+0x88>
mov    -0x10(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x21,-0x4(%rbp)
jmp    119f <f+0x8f>
movl   $0x0,-0x4(%rbp)
jmp    119f <f+0x8f>
movl   $0x7,-0x4(%rbp)
jmp    119f <f+0x8f>
movl   $0x4,-0x4(%rbp)
jmp    119f <f+0x8f>
movl   $0x3,-0x4(%rbp)
jmp    119f <f+0x8f>
movl   $0xf,-0x4(%rbp)
jmp    119f <f+0x8f>
movl   $0x9,-0x4(%rbp)
jmp    119f <f+0x8f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
add    $0x2,%edi
cmp    $0x7,%edi
jae    1128 <f+0x18>
movslq %edi,%rax
lea    0xedd(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %12 [
i32 -2, label %5
i32 -1, label %6
i32 0, label %7
i32 1, label %8
i32 2, label %9
i32 3, label %10
i32 4, label %11
]
5: ; preds = %1
store i32 33, i32* %2
br label %14
6: ; preds = %1
store i32 0, i32* %2
br label %14
7: ; preds = %1
store i32 7, i32* %2
br label %14
8: ; preds = %1
store i32 4, i32* %2
br label %14
9: ; preds = %1
store i32 3, i32* %2
br label %14
10: ; preds = %1
store i32 15, i32* %2
br label %14
11: ; preds = %1
store i32 9, i32* %2
br label %14
12: ; preds = %1
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %11, %10, %9, %8, %7, %6, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@switch.table.f = [7 x i32] [i32 33, i32 0, i32 7, i32 4, i32 3, i32 15, i32 9]
define i32 @f(i32 %0) {
%2 = add i32 %0, 2
%3 = icmp ult i32 %2, 7
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.f, i64 0, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}
int fib(int n) {
  if (n < 3) {
    return 1;
  } else {
    return fib(n - 2) + fib(n - 1);
  }
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1131 <fib+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fib+0x44>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@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):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x3,%edi
jl     1145 <fib+0x35>
mov    %edi,%ebx
add    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <fib@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x3,%ebx
ja     1130 <fib+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fib(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 3
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 2
%10 = call i32 @fib(i32 %9)
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
%13 = call i32 @fib(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 @fib(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -2
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -1
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
float clamp(float x, float lower, float upper) {
  if (x < lower)
    return lower;
  if (x > upper)
    return upper;
  return x;
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clamp+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clamp+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <clamp+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clamp+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clamp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %6
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @clamp(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ subwindow;
};
struct TYPE_4__ {
  TYPE_1__ xcrossing;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xcrossing_subwindow(void *_p) {
  return (unsigned long)((XEvent *)_p)->xcrossing.subwindow;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcrossing_subwindow>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xcrossing_subwindow(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xcrossing_subwindow(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int x(int, int);
__attribute__((always_)) int y(int a, int b) { return x(a, b) * x(b, a); }


x86 assembly (clang, -O0):
<y>:
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 <x@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <x@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<y>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <x@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <x@plt>
imul   %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @y(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 @x(i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = call i32 @x(i32 %8, i32 %9)
%11 = mul nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @y(i32 %0, i32 %1) {
%3 = tail call i32 @x(i32 %0, i32 %1)
%4 = tail call i32 @x(i32 %1, i32 %0)
%5 = mul nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void closeHTMLHeader() { printf("%s<p>\n", "</head><body>", stdout); }


x86 assembly (clang, -O0):
<closeHTMLHeader>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edx
lea    0xedc(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeHTMLHeader>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
lea    0xee0(%rip),%rdi
lea    0xee0(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s<p>\0A\00"
@.str.1 = [14 x i8] c"</head><body>\00"
@stdout = global i32 0
define void @closeHTMLHeader() {
%1 = load i32, i32* @stdout
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s<p>\0A\00"
@.str.1 = [14 x i8] c"</head><body>\00"
@stdout = global i32 0
define void @closeHTMLHeader() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fs_path_op(void *, void *, void *, int);
int file_del(unsigned char *file) {
  int retval;
  fs_path_op((void *)file, (void *)0, (void *)&retval, 4);
  return retval;
}


x86 assembly (clang, -O0):
<file_del>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
mov    $0x4,%ecx
call   1030 <fs_path_op@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_del>:
push   %rax
lea    0x4(%rsp),%rdx
xor    %esi,%esi
mov    $0x4,%ecx
call   1030 <fs_path_op@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @file_del(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i32* %3 to i8*
%6 = call i32 @fs_path_op(i8* %4, i8* null, i8* %5, i32 4)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @file_del(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fs_path_op(i8* %0, i8* null, i8* %3, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
void alignment_check_handler(struct exception_info *info) {
  asm volatile("" : : :);
  asm volatile("hlt");
}


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

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

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

LLVM IR (-O2):
%struct.exception_info = type opaque
define void @alignment_check_handler(%struct.exception_info* nocapture readnone %0) {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exp(double);
unsigned int sqrt(int /*<<< orphan*/);
double fast_form_factor(unsigned int z, double q) {
  return sqrt(exp(-0.23 * q * q)) * (z + 1);
}


x86 assembly (clang, -O0):
<fast_form_factor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xec3(%rip),%xmm2
movaps %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cvtsi2sd %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_form_factor>:
push   %rbx
mov    %edi,%ebx
movsd  0xed5(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x1,%ebx
imul   %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @fast_form_factor(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fmul double -2.300000e-01, %5
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = call i32 @exp(double %8)
%10 = call i32 @sqrt(i32 %9)
%11 = load i32, i32* %3
%12 = add i32 %11, 1
%13 = mul i32 %10, %12
%14 = uitofp i32 %13 to double
ret double %14
}

LLVM IR (-O2):
define double @fast_form_factor(i32 %0, double %1) {
%3 = fmul double %1, -2.300000e-01
%4 = fmul double %3, %1
%5 = tail call i32 @exp(double %4)
%6 = tail call i32 @sqrt(i32 %5)
%7 = add i32 %0, 1
%8 = mul i32 %6, %7
%9 = uitofp i32 %8 to double
ret double %9
}
/* Variables and functions */
int poll(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
void wait_for_keyboard(void) {
  int ret;
  printf("Sleeping for 2 seconds using poll...\n");
  ret = poll(NULL, 0, 2000);
  printf("Ret: %d\n", ret);
}


x86 assembly (clang, -O0):
<wait_for_keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
mov    $0x7d0,%edx
call   1040 <poll@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_keyboard>:
push   %rax
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7d0,%edx
call   1050 <poll@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Sleeping for 2 seconds using poll...\0A\00"
@.str.1 = [9 x i8] c"Ret: %d\0A\00"
define void @wait_for_keyboard() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @poll(i32* null, i32 0, i32 2000)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"Ret: %d\0A\00"
@str = [37 x i8] c"Sleeping for 2 seconds using poll...\00"
define void @wait_for_keyboard() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @poll(i32* null, i32 0, i32 2000)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XAddExtension() {
  printf("XAddExtension called\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<XAddExtension>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"XAddExtension called\0A\00"
define i32 @XAddExtension() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"XAddExtension called\00"
define i32 @XAddExtension() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("   JJJJ\n  J\n J\n  J\n   JJJJJJJJJJJ"); }


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

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

LLVM IR (-O0):
@.str = [34 x i8] c" JJJJ\0A J\0A J\0A J\0A JJJJJJJJJJJ\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c" JJJJ\0A J\0A J\0A J\0A JJJJJJJJJJJ\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void glValidateProgram(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glValidateProgram() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void help(int argc, char **argv) {
  printf("Usage: %s input.xml output.mpo/output.jpg [ output_offsets.h ] [ "
         "prefix for defintions in .h file ]\n",
         argv[0]);
}


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

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

LLVM IR (-O0):
@.str = [101 x i8] c"Usage: %s input.xml output.mpo/output.jpg [ output_offsets.h ] [ prefix for defintions in .h file ]\0A\00"
define void @help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [101 x i8] c"Usage: %s input.xml output.mpo/output.jpg [ output_offsets.h ] [ prefix for defintions in .h file ]\0A\00"
define void @help(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void fftw_free(void *p) { free(p); }


x86 assembly (clang, -O0):
<fftw_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):
<fftw_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @fftw_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void mcparmerror_double(char *parm, char *val) {
  fprintf(stderr,
          "Error: Invalid value '%s' for floating point parameter %s "
          "(mcparmerror_double)\n",
          val, parm);
}


x86 assembly (clang, -O0):
<mcparmerror_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcparmerror_double>:
mov    %rsi,%rdx
mov    %rdi,%rcx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [80 x i8] c"Error: Invalid value '%s' for floating point parameter %s (mcparmerror_double)\0A\00"
define void @mcparmerror_double(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [80 x i8] c"Error: Invalid value '%s' for floating point parameter %s (mcparmerror_double)\0A\00"
define void @mcparmerror_double(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
ret void
}
/* Type definitions */
struct list_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int list_cmdline_parser_required(struct list_args_info *args_info,
                                 const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<list_cmdline_parser_required>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.list_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @list_cmdline_parser_required(%struct.list_args_info* %0, i8* %1) {
%3 = alloca %struct.list_args_info*
%4 = alloca i8*
store %struct.list_args_info* %0, %struct.list_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.list_args_info*, %struct.list_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.list_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @list_cmdline_parser_required(%struct.list_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
void path_017_expected_5(int a, int b) {
  switch (a) {
  case 0:
    return;
  case 1:
    if (a > 10) {
      return;
    }
    break;
  case 2:
    return;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<path_017_expected_5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     113f <path_017_expected_5+0x3f>
jmp    111d <path_017_expected_5+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1144 <path_017_expected_5+0x44>
jmp    112e <path_017_expected_5+0x2e>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1158 <path_017_expected_5+0x58>
jmp    115d <path_017_expected_5+0x5d>
jmp    1162 <path_017_expected_5+0x62>
cmpl   $0xa,-0x4(%rbp)
jle    1153 <path_017_expected_5+0x53>
jmp    1162 <path_017_expected_5+0x62>
jmp    1162 <path_017_expected_5+0x62>
jmp    1162 <path_017_expected_5+0x62>
jmp    1162 <path_017_expected_5+0x62>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @path_017_expected_5(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
switch i32 %5, label %13 [
i32 0, label %6
i32 1, label %7
i32 2, label %12
]
6: ; preds = %2
br label %14
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 10
br i1 %9, label %10, label %11
10: ; preds = %7
br label %14
11: ; preds = %7
br label %14
12: ; preds = %2
br label %14
13: ; preds = %2
br label %14
14: ; preds = %6, %10, %12, %13, %11
ret void
}

LLVM IR (-O2):
define void @path_017_expected_5(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *dll_freopen(char const *, char const *,
                                int /*<<< orphan*/ *);
FILE *__wrap_freopen(const char *path, const char *mode, FILE *stream) {
  return dll_freopen(path, mode, stream);
}


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

x86 assembly (clang, -O2):
<__wrap_freopen>:
jmp    1030 <dll_freopen@plt>

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

LLVM IR (-O2):
define i32* @__wrap_freopen(i8* %0, i8* %1, i32* %2) {
%4 = tail call i32* @dll_freopen(i8* %0, i8* %1, i32* %2)
ret i32* %4
}
void ff_hevc_put_hevc_uni_w_epel_hv16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_hv16_12_sse4() {
ret void
}
/* Variables and functions */
void *malloc(int);
int main() {
  void *p = malloc(sizeof p);
  long l = (long)p;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char EOF;
char getchar();
void flushbuf() {
  char ch;
  while ((ch = getchar()) != '\n' && ch != EOF)
    continue;
}


x86 assembly (clang, -O0):
<flushbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1149 <flushbuf+0x39>
movsbl -0x1(%rbp),%eax
mov    0x2eaa(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1159 <flushbuf+0x49>
jmp    115e <flushbuf+0x4e>
jmp    1118 <flushbuf+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flushbuf>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     112f <flushbuf+0x1f>
cmp    (%rbx),%al
jne    1120 <flushbuf+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i8 0
define void @flushbuf() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp ne i8 %2, 10
%4 = load i8, i8* @EOF
%5 = icmp ne i8 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
/* Variables and functions */
int close(int);
int netlink_close(int nl) { return close(nl); }


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

x86 assembly (clang, -O2):
<netlink_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @netlink_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) {
  printf("usage %s [options] \n"
         "-h\t\tthis text you see right here\n"
         "-r\t\tread input from file\n"
         "-M <expr>\tRead input from multiple directories.\n"
         "-R <expr>\tRead input from sequence of files.\n",
         name);
}


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

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

LLVM IR (-O0):
@.str = [172 x i8] c"usage %s [options] \0A-h\09\09this text you see right here\0A-r\09\09read input from file\0A-M <expr>\09Read input from multiple directories.\0A-R <expr>\09Read input from sequence of files.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [172 x i8] c"usage %s [options] \0A-h\09\09this text you see right here\0A-r\09\09read input from file\0A-M <expr>\09Read input from multiple directories.\0A-R <expr>\09Read input from sequence of files.\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ computeValue(int);
void *worker(void *arg) {
  int id = *((int *)arg);
  computeValue(id);
  return NULL;
}


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

x86 assembly (clang, -O2):
<worker>:
push   %rax
mov    (%rdi),%edi
call   1030 <computeValue@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @worker(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @computeValue(i32 %7)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @worker(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @computeValue(i32 %3)
ret i8* null
}
void *pi_get_symbol(void *handle, const char *name) { return 0; }


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

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

LLVM IR (-O0):
define i8* @pi_get_symbol(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @pi_get_symbol(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Type definitions */
struct tms {
  double tms_utime;
};

/* Variables and functions */
int /*<<< orphan*/ times(struct tms *);
int ttime() {
  struct tms buffer;
  int utime;
  times(&buffer);
  utime = (buffer.tms_utime / 60.0) * 1000.0;
  return (utime);
}


x86 assembly (clang, -O0):
<ttime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <times@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xeda(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttime>:
push   %rax
mov    %rsp,%rdi
call   1030 <times@plt>
movsd  (%rsp),%xmm0
divsd  0xeda(%rip),%xmm0
mulsd  0xeda(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tms = type { double }
define i32 @ttime() {
%1 = alloca %struct.tms
%2 = alloca i32
%3 = call i32 @times(%struct.tms* %1)
%4 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = fdiv double %5, 6.000000e+01
%7 = fmul double %6, 1.000000e+03
%8 = fptosi double %7 to i32
store i32 %8, i32* %2
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
%struct.tms = type { double }
define i32 @ttime() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = call i32 @times(%struct.tms* %1)
%4 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = fdiv double %5, 6.000000e+01
%7 = fmul double %6, 1.000000e+03
%8 = fptosi double %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ term(int);
void die(int ret) { term(ret); }


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

x86 assembly (clang, -O2):
<die>:
jmp    1030 <term@plt>

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

LLVM IR (-O2):
define void @die(i32 %0) {
%2 = tail call i32 @term(i32 %0)
ret void
}
int main(void) {
  char *s;
  s = &"hello";
  s[0] = 'x';
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x78,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8** %1
%2 = load i8*, i8** %1
%3 = getelementptr inbounds i8, i8* %2, i64 0
store i8 120, i8* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int do_414() { return 414; }


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

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

LLVM IR (-O0):
define i32 @do_414() {
ret i32 414
}

LLVM IR (-O2):
define i32 @do_414() {
ret i32 414
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void check_malloc(int *p) {
  if (p == NULL) {
    printf("Bellek alinamadi!\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114d <check_malloc+0x2d>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_malloc>:
test   %rdi,%rdi
je     1126 <check_malloc+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Bellek alinamadi!\0A\00"
define void @check_malloc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Bellek alinamadi!\00"
define void @check_malloc(i32* readnone %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}