xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x8d() {
  Assert_real((isxdigit(141) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              710, ("isxdigit should be 0 for 0x8d"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x8d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8d,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x2c6,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x8d>:
push   %rax
mov    $0x8d,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2c6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x8d\00"
define void @t_isxdigit_0x8d() {
%1 = call i64 @isxdigit(i32 141)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 710, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x8d\00"
define void @t_isxdigit_0x8d() {
%1 = tail call i64 @isxdigit(i32 141)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 710, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int bitgraph_edge_add(unsigned int graph, unsigned int node1,
                               unsigned int node2) {
  return 1 - node1 + node2;
}


x86 assembly (clang, -O0):
<bitgraph_edge_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x1,%eax
sub    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitgraph_edge_add>:
sub    %esi,%edx
lea    0x1(%rdx),%eax
ret

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

LLVM IR (-O2):
define i32 @bitgraph_edge_add(i32 %0, i32 %1, i32 %2) {
%4 = sub i32 1, %1
%5 = add i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ recursive_b(int);
void recursive_a(int i) {
  printf("%d\n", i);
  recursive_b(--i);
}


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

x86 assembly (clang, -O2):
<recursive_a>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
add    $0xffffffff,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <recursive_b@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @recursive_a(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = add nsw i32 %0, -1
%4 = tail call i32 @recursive_b(i32 %3)
ret void
}
/* Variables and functions */
int gmx_wheel(int, char **);
int main(int argc, char *argv[]) { return gmx_wheel(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <gmx_wheel@plt>

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

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

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *, int, int, int);
int mm_print_error(int /*<<< orphan*/ *, int);
int mm_write_crd_size(FILE *fp, int row_dim, int col_dim, int num_nonzeros) {
  if (fprintf(fp, "%d %d %d\n", row_dim, col_dim, num_nonzeros) != 3)
    return mm_print_error(NULL, 12);
  else
    return (0);
}


x86 assembly (clang, -O0):
<mm_write_crd_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x3,%eax
je     116e <mm_write_crd_size+0x4e>
xor    %eax,%eax
mov    %eax,%edi
mov    $0xc,%esi
call   1040 <mm_print_error@plt>
mov    %eax,-0x4(%rbp)
jmp    1175 <mm_write_crd_size+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_write_crd_size>:
push   %rax
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x3,%eax
jne    113d <mm_write_crd_size+0x1d>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
mov    $0xc,%esi
pop    %rax
jmp    1040 <mm_print_error@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @mm_write_crd_size(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3)
%6 = icmp eq i32 %5, 3
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @mm_print_error(i32* null, i32 12)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ %8, %7 ], [ 0, %4 ]
ret i32 %10
}
void xfrm_output_resume(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<xfrm_output_resume>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@__func__.xfrm_output_resume = [19 x i8] c"xfrm_output_resume\00"
define void @xfrm_output_resume() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.xfrm_output_resume, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.xfrm_output_resume = [19 x i8] c"xfrm_output_resume\00"
define void @xfrm_output_resume() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.xfrm_output_resume, i64 0, i64 0))
ret void
}
int setLowBits(int p, int val) { return (p & 0xF0) + val; }


x86 assembly (clang, -O0):
<setLowBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0,%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setLowBits>:
and    $0xf0,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @setLowBits(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 = and i32 %5, 240
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @setLowBits(i32 %0, i32 %1) {
%3 = and i32 %0, 240
%4 = add nsw i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ test_codepoints(int /*<<< orphan*/);
int main(int argc, char **argv) {
  test_codepoints(0);
  while (--argc)
    puts(*++argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1040 <test_codepoints@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     116c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
call   1030 <puts@plt>
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
xor    %edi,%edi
call   1040 <test_codepoints@plt>
cmp    $0x1,%ebp
je     1151 <main+0x31>
mov    %ebp,%ebp
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %ebx,%ebp
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @test_codepoints(i32 0)
%4 = add nsw i32 %0, -1
%5 = icmp eq i32 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ %4, %2 ]
%8 = phi i8** [ %9, %6 ], [ %1, %2 ]
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @puts(i8* dereferenceable(1) %10)
%12 = add nsw i32 %7, -1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ plan(int);
void no_plan(void) { plan(-1); }


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

x86 assembly (clang, -O2):
<no_plan>:
mov    $0xffffffff,%edi
jmp    1030 <plan@plt>

LLVM IR (-O0):
define void @no_plan() {
%1 = call i32 @plan(i32 -1)
ret void
}

LLVM IR (-O2):
define void @no_plan() {
%1 = tail call i32 @plan(i32 -1)
ret void
}
int mockAdder(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<mockAdder>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @mockAdder(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @mockAdder(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
att_event_handle_value_indication_complete_get_status(const uint8_t *event) {
  return event[2];
}


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

x86 assembly (clang, -O2):
<att_event_handle_value_indication_complete_get_status>:
mov    0x8(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @att_event_handle_value_indication_complete_get_status(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
unsigned long ary_aref(unsigned long, int /*<<< orphan*/);
int /*<<< orphan*/ integer_new(int);
unsigned long int ary_last(unsigned long int recv) {
  return ary_aref(recv, integer_new(-1));
}


x86 assembly (clang, -O0):
<ary_last>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0xffffffff,%edi
call   1030 <integer_new@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <ary_aref@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ary_last>:
push   %rbx
mov    %rdi,%rbx
mov    $0xffffffff,%edi
call   1030 <integer_new@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ary_aref@plt>

LLVM IR (-O0):
define i64 @ary_last(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @integer_new(i32 -1)
%5 = call i64 @ary_aref(i64 %3, i32 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @ary_last(i64 %0) {
%2 = tail call i32 @integer_new(i32 -1)
%3 = tail call i64 @ary_aref(i64 %0, i32 %2)
ret i64 %3
}
int f1(unsigned x) {
  switch (x) {
  case 10 ... 0xFFFFFFFF:
    return 0;
  default:
    return 10;
  }
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    111e <f1+0x1e>
movl   $0x0,-0x4(%rbp)
jmp    1134 <f1+0x34>
mov    -0xc(%rbp),%eax
sub    $0xa,%eax
cmp    $0xfffffff5,%eax
jbe    1112 <f1+0x12>
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
xor    %ecx,%ecx
cmp    $0xa,%edi
mov    $0xa,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
]
5: ; preds = %6
store i32 0, i32* %2
br label %10
6: ; preds = %1
%7 = sub i32 %4, 10
%8 = icmp ule i32 %7, -11
br i1 %8, label %5, label %9
9: ; preds = %6
store i32 10, i32* %2
br label %10
10: ; preds = %9, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = select i1 %2, i32 10, i32 0
ret i32 %3
}
int square(int val) { return val * val; }


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

x86 assembly (clang, -O2):
<square>:
mov    %edi,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @square(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
long double ceill(long double x) { return __builtin_ceill(x); }


x86 assembly (clang, -O0):
<ceill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <ceill@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceill>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <ceill@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @ceill(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @llvm.ceil.f80(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @ceill(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.ceil.f80(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void sum_rows(int ar[][4], int rows) {
  int r;
  int c;
  int tot;
  for (c = 0; r < rows; r++) {
    tot = 0;
    for (c = 0; c < 4; c++) {
      tot += ar[r][c];
    }
    printf("row %d: sum = %d\n", r, tot);
  }
}


x86 assembly (clang, -O0):
<sum_rows>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1194 <sum_rows+0x84>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1174 <sum_rows+0x64>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1140 <sum_rows+0x30>
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <sum_rows+0x16>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"row %d: sum = %d\0A\00"
define void @sum_rows([4 x i32]* %0, i32 %1) {
%3 = alloca [4 x i32]*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store [4 x i32]* %0, [4 x i32]** %3
store i32 %1, i32* %4
store i32 0, i32* %6
br label %8
8: ; preds = %34, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %37
12: ; preds = %8
store i32 0, i32* %7
store i32 0, i32* %6
br label %13
13: ; preds = %27, %12
%14 = load i32, i32* %6
%15 = icmp slt i32 %14, 4
br i1 %15, label %16, label %30
16: ; preds = %13
%17 = load [4 x i32]*, [4 x i32]** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %17, i64 %19
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %7
%26 = add nsw i32 %25, %24
store i32 %26, i32* %7
br label %27
27: ; preds = %16
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %13
30: ; preds = %13
%31 = load i32, i32* %5
%32 = load i32, i32* %7
%33 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %31, i32 %32)
br label %34
34: ; preds = %30
%35 = load i32, i32* %5
%36 = add nsw i32 %35, 1
store i32 %36, i32* %5
br label %8
37: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @sum_rows([4 x i32]* nocapture %0, i32 %1) {
ret void
}
void handle_sysrq(int key, struct tty_struct *tty) {}


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

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

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

LLVM IR (-O2):
%struct.tty_struct = type opaque
define void @handle_sysrq(i32 %0, %struct.tty_struct* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fwrite(char *, int, int, int /*<<< orphan*/ *);
scalar_t__ writeFLVScriptDataString(int /*<<< orphan*/ *, char const *);
size_t writeFLVScriptDataVariableArray(FILE *fp, const char *name) {
  size_t datasize = 0;
  char type;
  datasize += writeFLVScriptDataString(fp, name);
  type = 3;
  datasize += fwrite(&type, 1, 1, fp);
  return datasize;
}


x86 assembly (clang, -O0):
<writeFLVScriptDataVariableArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <writeFLVScriptDataString@plt>
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
movb   $0x3,-0x19(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x19(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeFLVScriptDataVariableArray>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <writeFLVScriptDataString@plt>
mov    %rax,%r14
movb   $0x3,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @writeFLVScriptDataVariableArray(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8
store i32* %0, i32** %3
store i8* %1, i8** %4
store i64 0, i64* %5
%7 = load i32*, i32** %3
%8 = load i8*, i8** %4
%9 = call i64 @writeFLVScriptDataString(i32* %7, i8* %8)
%10 = load i64, i64* %5
%11 = add i64 %10, %9
store i64 %11, i64* %5
store i8 3, i8* %6
%12 = load i32*, i32** %3
%13 = call i64 @fwrite(i8* %6, i32 1, i32 1, i32* %12)
%14 = load i64, i64* %5
%15 = add i64 %14, %13
store i64 %15, i64* %5
%16 = load i64, i64* %5
ret i64 %16
}

LLVM IR (-O2):
define i64 @writeFLVScriptDataVariableArray(i32* %0, i8* %1) {
%3 = alloca i8
%4 = tail call i64 @writeFLVScriptDataString(i32* %0, i8* %1)
store i8 3, i8* %3
%5 = call i64 @fwrite(i8* %3, i32 1, i32 1, i32* %0)
%6 = add i64 %5, %4
ret i64 %6
}
/* Variables and functions */
size_t c_tree_max_size();
size_t c_set_max_size(void) { return c_tree_max_size(); }


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

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

LLVM IR (-O0):
define i64 @c_set_max_size() {
%1 = call i64 (...) @c_tree_max_size()
ret i64 %1
}

LLVM IR (-O2):
define i64 @c_set_max_size() {
%1 = tail call i64 (...) @c_tree_max_size()
ret i64 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int);
uid_t getuid(void) { return syscall(199); }


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

x86 assembly (clang, -O2):
<getuid>:
mov    $0xc7,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @getuid() {
%1 = call i32 @syscall(i32 199)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getuid() {
%1 = tail call i32 @syscall(i32 199)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ posix_memalign(void **, size_t, size_t);
void *fftw_malloc(size_t size) {
  void *result;
  posix_memalign(&result, size, size);
  return result;
}


x86 assembly (clang, -O0):
<fftw_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%rdi
call   1030 <posix_memalign@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftw_malloc>:
push   %rax
mov    %rdi,%rdx
mov    %rsp,%rdi
mov    %rdx,%rsi
call   1030 <posix_memalign@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @fftw_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = load i64, i64* %2
%6 = call i32 @posix_memalign(i8** %3, i64 %4, i64 %5)
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
define i8* @fftw_malloc(i64 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @posix_memalign(i8** %2, i64 %0, i64 %0)
%5 = load i8*, i8** %2
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ ide_board_close(int);
void ide_close(void *priv) {
  ;
  ide_board_close(0);
  ide_board_close(1);
}


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

x86 assembly (clang, -O2):
<ide_close>:
push   %rax
xor    %edi,%edi
call   1030 <ide_board_close@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <ide_board_close@plt>

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

LLVM IR (-O2):
define void @ide_close(i8* nocapture readnone %0) {
%2 = tail call i32 @ide_board_close(i32 0)
%3 = tail call i32 @ide_board_close(i32 1)
ret void
}
void ff_hevc_put_hevc_bi_epel_hv4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv4_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
m_add() { ol("ADD  AX,BX"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"ADD AX,BX\00"
define i32 @m_add() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [11 x i8] c"ADD AX,BX\00"
define i32 @m_add() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
long strtol(char const *, int /*<<< orphan*/ *, int);
long atol(const char *s) { return strtol(s, NULL, 10); }


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

x86 assembly (clang, -O2):
<atol>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i64 @atol(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i32* null, i32 10)
ret i64 %4
}

LLVM IR (-O2):
define i64 @atol(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i32* null, i32 10)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void nist_dump_simple_hex(const void *data, int length) {
  int i;
  const unsigned char *p = (const unsigned char *)data;
  for (i = 0; i < length; ++i)
    printf("%02X", *p++);
}


x86 assembly (clang, -O0):
<nist_dump_simple_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1166 <nist_dump_simple_hex+0x56>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movzbl (%rax),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112e <nist_dump_simple_hex+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nist_dump_simple_hex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <nist_dump_simple_hex+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1130 <nist_dump_simple_hex+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02X\00"
define void @nist_dump_simple_hex(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i8* [ %7, %4 ], [ %0, %2 ]
%6 = phi i32 [ %11, %4 ], [ 0, %2 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Type definitions */
struct memfile_st {
  int dummy;
};

/* Variables and functions */
int write_memfile(struct memfile_st *, char *, int);
int write_memframe_data(struct memfile_st *mf, char *data, int data_size) {
  int n;
  n = write_memfile(mf, data, data_size);
  return (n);
}


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

x86 assembly (clang, -O2):
<write_memframe_data>:
jmp    1030 <write_memfile@plt>

LLVM IR (-O0):
%struct.memfile_st = type { i32 }
define i32 @write_memframe_data(%struct.memfile_st* %0, i8* %1, i32 %2) {
%4 = alloca %struct.memfile_st*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store %struct.memfile_st* %0, %struct.memfile_st** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load %struct.memfile_st*, %struct.memfile_st** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @write_memfile(%struct.memfile_st* %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
%struct.memfile_st = type { i32 }
define i32 @write_memframe_data(%struct.memfile_st* %0, i8* %1, i32 %2) {
%4 = tail call i32 @write_memfile(%struct.memfile_st* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void exit() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <_PROCEDURE_LINKAGE_TABLE_@plt>

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

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
unreachable
}

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
unreachable
}
int length_fast(char *string) {
  int i;
  if ((0))
    ;
  for (i = 0; '\0' != *string; ++i) {
    ++string;
  }
  if ((0))
    ;
  return i;
}


x86 assembly (clang, -O0):
<length_fast>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     113a <length_fast+0x3a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <length_fast+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length_fast>:
cmpb   $0x0,(%rdi)
je     111c <length_fast+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <length_fast+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @length_fast(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ pic_send_EOI_normal(int);
void isr_irq_13() { pic_send_EOI_normal(13); }


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

x86 assembly (clang, -O2):
<isr_irq_13>:
mov    $0xd,%edi
jmp    1030 <pic_send_EOI_normal@plt>

LLVM IR (-O0):
define void @isr_irq_13() {
%1 = call i32 @pic_send_EOI_normal(i32 13)
ret void
}

LLVM IR (-O2):
define void @isr_irq_13() {
%1 = tail call i32 @pic_send_EOI_normal(i32 13)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
long int tamanhoArquivo(FILE *arquivo) {
  long int tamanho;
  fseek(arquivo, 0, SEEK_END);
  tamanho = ftell(arquivo);
  rewind(arquivo);
  return tamanho;
}


x86 assembly (clang, -O0):
<tamanhoArquivo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tamanhoArquivo>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <rewind@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
define i64 @tamanhoArquivo(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %3
%9 = load i32*, i32** %2
%10 = call i32 @rewind(i32* %9)
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i64 @tamanhoArquivo(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i64 @ftell(i32* %0)
%5 = tail call i32 @rewind(i32* %0)
ret i64 %4
}
/* Variables and functions */
int foo(int, int, int, int, int);
int __attribute__((__force_align_arg_pointer__))
bar(int a, int b, int c, int d) {
  return foo(a, b, c, d, 5);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
and    $0xfffffffffffffff0,%rsp
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x8(%rsp)
mov    %edx,0x4(%rsp)
mov    %ecx,(%rsp)
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
mov    $0x5,%r8d
call   1030 <foo@plt>
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbp
mov    %rsp,%rbp
and    $0xfffffffffffffff0,%rsp
mov    $0x5,%r8d
call   1030 <foo@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define i32 @bar(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @foo(i32 %9, i32 %10, i32 %11, i32 %12, i32 5)
ret i32 %13
}

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 5)
ret i32 %5
}
/* Type definitions */
struct runtime_instr_cb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ store_runtime_instr_cb(struct runtime_instr_cb *);
void save_ri_cb(struct runtime_instr_cb *cb_prev) {
  if (cb_prev)
    store_runtime_instr_cb(cb_prev);
}


x86 assembly (clang, -O0):
<save_ri_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <save_ri_cb+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <store_runtime_instr_cb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_ri_cb>:
test   %rdi,%rdi
je     111a <save_ri_cb+0xa>
jmp    1030 <store_runtime_instr_cb@plt>
ret

LLVM IR (-O0):
%struct.runtime_instr_cb = type { i32 }
define void @save_ri_cb(%struct.runtime_instr_cb* %0) {
%2 = alloca %struct.runtime_instr_cb*
store %struct.runtime_instr_cb* %0, %struct.runtime_instr_cb** %2
%3 = load %struct.runtime_instr_cb*, %struct.runtime_instr_cb** %2
%4 = icmp ne %struct.runtime_instr_cb* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.runtime_instr_cb*, %struct.runtime_instr_cb** %2
%7 = call i32 @store_runtime_instr_cb(%struct.runtime_instr_cb* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.runtime_instr_cb = type { i32 }
define void @save_ri_cb(%struct.runtime_instr_cb* %0) {
%2 = icmp eq %struct.runtime_instr_cb* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @store_runtime_instr_cb(%struct.runtime_instr_cb* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void sync_clear_bit(long nr, volatile unsigned long *addr) {
  asm volatile("lock; btr %1,%0"
               : "+m"((*(volatile long *)addr))
               : "Ir"(nr)
               : "memory");
}


x86 assembly (clang, -O0):
<sync_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
lock btr %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_clear_bit>:
lock btr %rdi,(%rsi)
ret

LLVM IR (-O0):
define void @sync_clear_bit(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i64, i64* %3
ret void
}

LLVM IR (-O2):
define void @sync_clear_bit(i64 %0, i64* %1) {
tail call void asm sideeffect "lock; btr $1,$0", "=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i64 %0, i64* elementtype(i64) %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ via_raise_interrupt(int, int);
void scsi_raise_irq() { via_raise_interrupt(2, 3); }


x86 assembly (clang, -O0):
<scsi_raise_irq>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <via_raise_interrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<scsi_raise_irq>:
mov    $0x2,%edi
mov    $0x3,%esi
jmp    1030 <via_raise_interrupt@plt>

LLVM IR (-O0):
define void @scsi_raise_irq() {
%1 = call i32 @via_raise_interrupt(i32 2, i32 3)
ret void
}

LLVM IR (-O2):
define void @scsi_raise_irq() {
%1 = tail call i32 @via_raise_interrupt(i32 2, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ h_gf_gen_cauchy_matrix(unsigned char *, int, int);
void initEncodeMatrix(int numDataUnits, int numParityUnits,
                      unsigned char *encodeMatrix) {
  h_gf_gen_cauchy_matrix(encodeMatrix, numDataUnits + numParityUnits,
                         numDataUnits);
}


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

x86 assembly (clang, -O2):
<initEncodeMatrix>:
mov    %edi,%eax
add    %edi,%esi
mov    %rdx,%rdi
mov    %eax,%edx
jmp    1030 <h_gf_gen_cauchy_matrix@plt>

LLVM IR (-O0):
define void @initEncodeMatrix(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %4
%12 = call i32 @h_gf_gen_cauchy_matrix(i8* %7, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @initEncodeMatrix(i32 %0, i32 %1, i8* %2) {
%4 = add nsw i32 %1, %0
%5 = tail call i32 @h_gf_gen_cauchy_matrix(i8* %2, i32 %4, i32 %0)
ret void
}
double AUX2bp2b(double x) { return 0.0; }


x86 assembly (clang, -O0):
<AUX2bp2b>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<AUX2bp2b>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @AUX2bp2b(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @AUX2bp2b(double %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int print_test_data();
int test();
int main(int argc, char *argv[]) {
  int ret;
  if (argc > 1)
    ret = print_test_data();
  else
    ret = test();
  exit(ret);
  return (ret);
  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)
cmpl   $0x1,-0x8(%rbp)
jle    115f <main+0x2f>
mov    $0x0,%al
call   1030 <print_test_data@plt>
mov    %eax,-0x14(%rbp)
jmp    1169 <main+0x39>
mov    $0x0,%al
call   1050 <test@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
cmp    $0x2,%edi
jl     1144 <main+0x14>
call   1030 <print_test_data@plt>
mov    %eax,%edi
call   1040 <exit@plt>
call   1050 <test@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @print_test_data()
store i32 %10, i32* %6
br label %13
11: ; preds = %2
%12 = call i32 (...) @test()
store i32 %12, i32* %6
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %6
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @print_test_data()
br label %8
6: ; preds = %2
%7 = tail call i32 (...) @test()
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
%10 = tail call i32 @exit(i32 %9)
unreachable
}
/* Variables and functions */
int isPalindromeRec(char *, int);
int isPalindromeRecInit(char *str) {
  int n = 0;
  return isPalindromeRec(str, n);
}


x86 assembly (clang, -O0):
<isPalindromeRecInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <isPalindromeRec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPalindromeRecInit>:
xor    %esi,%esi
jmp    1030 <isPalindromeRec@plt>

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

LLVM IR (-O2):
define i32 @isPalindromeRecInit(i8* %0) {
%2 = tail call i32 @isPalindromeRec(i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ IBInitInterval();
int /*<<< orphan*/ IBInitIntervalConstants();
void IBInitIA() {
  IBInitIntervalConstants();
  IBInitInterval();
}


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

x86 assembly (clang, -O2):
<IBInitIA>:
push   %rax
xor    %eax,%eax
call   1030 <IBInitIntervalConstants@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <IBInitInterval@plt>

LLVM IR (-O0):
define void @IBInitIA() {
%1 = call i32 (...) @IBInitIntervalConstants()
%2 = call i32 (...) @IBInitInterval()
ret void
}

LLVM IR (-O2):
define void @IBInitIA() {
%1 = tail call i32 (...) @IBInitIntervalConstants()
%2 = tail call i32 (...) @IBInitInterval()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ libc_printf(char *, int);
int /*<<< orphan*/ printQueue();
int /*<<< orphan*/ removeCollisionEvent();
int /*<<< orphan*/ updatePhysics(int);
void down(void) {
  if ((1 == 0)) {
    libc_printf((char *)"entered down\\n", 14);
    printQueue();
  }
  updatePhysics((1 == 1));
  removeCollisionEvent();
}


x86 assembly (clang, -O0):
<down>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <updatePhysics@plt>
mov    $0x0,%al
call   1040 <removeCollisionEvent@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<down>:
push   %rax
mov    $0x1,%edi
call   1030 <updatePhysics@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <removeCollisionEvent@plt>

LLVM IR (-O0):
define void @down() {
%1 = call i32 @updatePhysics(i32 1)
%2 = call i32 (...) @removeCollisionEvent()
ret void
}

LLVM IR (-O2):
define void @down() {
%1 = tail call i32 @updatePhysics(i32 1)
%2 = tail call i32 (...) @removeCollisionEvent()
ret void
}
void motors_power_off() {}


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

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

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

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