xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ endOfProcess();
int /*<<< orphan*/ printf(char *);
void multiDemo() {
  int i = 0;
  while (i < 500000000) {
    i++;
  }
  printf("\nLoop is finished\n>");
  endOfProcess();
}


x86 assembly (clang, -O0):
<multiDemo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1dcd6500,-0x4(%rbp)
jge    114a <multiDemo+0x2a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <multiDemo+0xf>
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <endOfProcess@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiDemo>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <endOfProcess@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"\0ALoop is finished\0A>\00"
define void @multiDemo() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 500000000
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %2
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @endOfProcess()
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0ALoop is finished\0A>\00"
define void @multiDemo() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @endOfProcess()
ret void
}
void g_main_context_find_source_by_funcs_user_data() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_find_source_by_funcs_user_data() {
ret void
}
/* Type definitions */
struct membuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ put_string(struct membuffer *, char *);
void insert_html_header(struct membuffer *b) {
  put_string(b, "<!DOCTYPE html>\n<html>\n<head>\n");
  put_string(b, "<meta name=\"viewport\" content=\"initial-scale=1.0, "
                "user-scalable=no\" />\n<title>World Map</title>\n");
  put_string(b, "<meta charset=\"UTF-8\">");
}


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

x86 assembly (clang, -O2):
<insert_html_header>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <put_string@plt>
lea    0xef8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <put_string@plt>
lea    0xf4a(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <put_string@plt>

LLVM IR (-O0):
%struct.membuffer = type { i32 }
@.str = [31 x i8] c"<!DOCTYPE html>\0A<html>\0A<head>\0A\00"
@.str.1 = [97 x i8] c"<meta name=\22viewport\22 content=\22initial-scale=1.0, user-scalable=no\22 />\0A<title>World Map</title>\0A\00"
@.str.2 = [23 x i8] c"<meta charset=\22UTF-8\22>\00"
define void @insert_html_header(%struct.membuffer* %0) {
%2 = alloca %struct.membuffer*
store %struct.membuffer* %0, %struct.membuffer** %2
%3 = load %struct.membuffer*, %struct.membuffer** %2
%4 = call i32 @put_string(%struct.membuffer* %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = load %struct.membuffer*, %struct.membuffer** %2
%6 = call i32 @put_string(%struct.membuffer* %5, i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.1, i64 0, i64 0))
%7 = load %struct.membuffer*, %struct.membuffer** %2
%8 = call i32 @put_string(%struct.membuffer* %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.membuffer = type { i32 }
@.str = [31 x i8] c"<!DOCTYPE html>\0A<html>\0A<head>\0A\00"
@.str.1 = [97 x i8] c"<meta name=\22viewport\22 content=\22initial-scale=1.0, user-scalable=no\22 />\0A<title>World Map</title>\0A\00"
@.str.2 = [23 x i8] c"<meta charset=\22UTF-8\22>\00"
define void @insert_html_header(%struct.membuffer* %0) {
%2 = tail call i32 @put_string(%struct.membuffer* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @put_string(%struct.membuffer* %0, i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @put_string(%struct.membuffer* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strrev(char *);
main() {
  char str[500];
  printf("enter ur string :");
  gets(str);
  strrev(str);
  printf("\nReverse of ur string :");
  puts(str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
lea    -0x200(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x200(%rbp),%rdi
call   1060 <strrev@plt>
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
lea    -0x200(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x200,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1060 <strrev@plt>
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"enter ur string :\00"
@.str.1 = [24 x i8] c"\0AReverse of ur string :\00"
define i32 @main() {
%1 = alloca [500 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%6 = call i32 @strrev(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%9 = call i32 @puts(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"enter ur string :\00"
@.str.1 = [24 x i8] c"\0AReverse of ur string :\00"
define i32 @main() {
%1 = alloca [500 x i8]
%2 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @strrev(i8* %2)
%6 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @puts(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hello, world!"); }


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 = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void iram_precache(void *addr, uint32_t bytes) {}


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

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

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

LLVM IR (-O2):
define void @iram_precache(i8* nocapture %0, i32 %1) {
ret void
}
int f(int x) {
  if (x != 0 || x == 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111b <f+0x1b>
cmpl   $0x0,-0x8(%rbp)
jne    1127 <f+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <f+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 0
}
long jm_jround_up(long a, long b) {
  a += b - 1L;
  return a - (a % b);
}


x86 assembly (clang, -O0):
<jm_jround_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    -0x18(%rbp),%rax
sub    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jm_jround_up>:
lea    (%rdi,%rsi,1),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     111e <jm_jround_up+0x1e>
mov    %rcx,%rax
cqto
idiv   %rsi
jmp    1124 <jm_jround_up+0x24>
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
sub    %rdx,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @jm_jround_up(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 = sub nsw i64 %5, 1
%7 = load i64, i64* %3
%8 = add nsw i64 %7, %6
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = srem i64 %10, %11
%13 = sub nsw i64 %9, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @jm_jround_up(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = srem i64 %4, %1
%6 = sub nsw i64 %4, %5
ret i64 %6
}
void gdk_screen_width_mm() {}


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

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

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

LLVM IR (-O2):
define void @gdk_screen_width_mm() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x0b() {
  Assert_real((isxdigit(11) == 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",
              60, ("isxdigit should be 0 for 0x0b"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x0b>:
push   %rax
mov    $0xb,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3c,%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 0x0b\00"
define void @t_isxdigit_0x0b() {
%1 = call i64 @isxdigit(i32 11)
%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 60, 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 0x0b\00"
define void @t_isxdigit_0x0b() {
%1 = tail call i64 @isxdigit(i32 11)
%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 60, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(unsigned long);
int /*<<< orphan*/ printf(char *, int, unsigned long);
__attribute__((__noreturn__)) void exitfunc23(int status, void *arg) {
  printf("Executing exitfunc"
         "23"
         " (status=%d, arg=%lu)\n",
         status, (unsigned long)arg);
  exit((unsigned long)arg);
}


x86 assembly (clang, -O0):
<exitfunc23>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc23>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Executing exitfunc23 (status=%d, arg=%lu)\0A\00"
define void @exitfunc23(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i64
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i64
%11 = call i32 @exit(i64 %10)
unreachable
}

LLVM IR (-O2):
@.str = [43 x i8] c"Executing exitfunc23 (status=%d, arg=%lu)\0A\00"
define void @exitfunc23(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %3)
%5 = tail call i32 @exit(i64 %3)
unreachable
}
/* Variables and functions */
char *scout_h16(char const *);
char const *scout_ls32(char const *);
const char *scout_ipv6address_rh1(const char *c) {
  if ((c = scout_h16(c)) == NULL)
    return NULL;
  if (*(c + 1) == ':')
    return scout_ls32(c + 2);
  return NULL;
}


x86 assembly (clang, -O0):
<scout_ipv6address_rh1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <scout_h16@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1150 <scout_ipv6address_rh1+0x30>
movq   $0x0,-0x8(%rbp)
jmp    117f <scout_ipv6address_rh1+0x5f>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3a,%eax
jne    1177 <scout_ipv6address_rh1+0x57>
mov    -0x10(%rbp),%rdi
add    $0x2,%rdi
call   1040 <scout_ls32@plt>
mov    %rax,-0x8(%rbp)
jmp    117f <scout_ipv6address_rh1+0x5f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scout_ipv6address_rh1>:
push   %rax
call   1030 <scout_h16@plt>
test   %rax,%rax
je     113e <scout_ipv6address_rh1+0x1e>
cmpb   $0x3a,0x1(%rax)
jne    113e <scout_ipv6address_rh1+0x1e>
add    $0x2,%rax
mov    %rax,%rdi
pop    %rax
jmp    1040 <scout_ls32@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @scout_ipv6address_rh1(i8* %0) {
%2 = tail call i8* @scout_h16(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 58
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %2, i64 2
%10 = tail call i8* @scout_ls32(i8* %9)
br label %11
11: ; preds = %4, %1, %8
%12 = phi i8* [ %10, %8 ], [ null, %1 ], [ null, %4 ]
ret i8* %12
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ printf(char *);
int failure() {
  printf("FAIL\n");
  return EXIT_FAILURE;
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"FAIL\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @failure() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
ret i32 %2
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [5 x i8] c"FAIL\00"
define i32 @failure() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
ret i32 %2
}
/* Variables and functions */
bool nrf52_errata_140(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf52_errata_140() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf52_errata_140() {
ret i32 0
}
void flt128_va(void *mem, __float128 d) {
  __builtin_memcpy(mem, &d, sizeof(d));
}


x86 assembly (clang, -O0):
<flt128_va>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movaps %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<flt128_va>:
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @flt128_va(i8* nocapture writeonly %0, fp128 %1) {
%3 = bitcast i8* %0 to fp128*
store fp128 %1, fp128* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_vtkFile(char const *, unsigned int, int, double *);
void writeVtkOutput(double *collideField, const int *const flagField,
                    const char *filename, unsigned int t, int xlength) {
  write_vtkFile(filename, t, xlength, collideField);
}


x86 assembly (clang, -O0):
<writeVtkOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x8(%rbp),%rcx
call   1030 <write_vtkFile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeVtkOutput>:
mov    %rdi,%rax
mov    %rdx,%rdi
mov    %ecx,%esi
mov    %r8d,%edx
mov    %rax,%rcx
jmp    1030 <write_vtkFile@plt>

LLVM IR (-O0):
define void @writeVtkOutput(double* %0, i32* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca double*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store double* %0, double** %6
store i32* %1, i32** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %8
%12 = load i32, i32* %9
%13 = load i32, i32* %10
%14 = load double*, double** %6
%15 = call i32 @write_vtkFile(i8* %11, i32 %12, i32 %13, double* %14)
ret void
}

LLVM IR (-O2):
define void @writeVtkOutput(double* %0, i32* nocapture readnone %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @write_vtkFile(i8* %2, i32 %3, i32 %4, double* %0)
ret void
}
unsigned short be16_le(unsigned short n) { return n; }


x86 assembly (clang, -O0):
<be16_le>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @be16_le(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define zeroext i16 @be16_le(i16 returned zeroext %0) {
ret i16 %0
}
short rq_math_equal(double x, double y) {
  return x + 0.00000001 >= y && x - 0.00000001 <= y;
}


x86 assembly (clang, -O0):
<rq_math_equal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x11(%rbp)
jb     114b <rq_math_equal+0x4b>
movsd  -0x8(%rbp),%xmm1
movsd  0xec8(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_math_equal>:
movsd  0xef8(%rip),%xmm2
addsd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
setae  %al
addsd  0xeed(%rip),%xmm0
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define signext i16 @rq_math_equal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fadd double %5, 1.000000e-08
%7 = load double, double* %4
%8 = fcmp oge double %6, %7
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load double, double* %3
%11 = fsub double %10, 1.000000e-08
%12 = load double, double* %4
%13 = fcmp ole double %11, %12
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ false, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define signext i16 @rq_math_equal(double %0, double %1) {
%3 = fadd double %0, 1.000000e-08
%4 = fcmp oge double %3, %1
%5 = fadd double %0, -1.000000e-08
%6 = fcmp ole double %5, %1
%7 = and i1 %4, %6
%8 = zext i1 %7 to i16
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int main() {
  char s[] = "Reverse me!";
  reverse(s, strlen(s));
  printf("%s\n", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <reverse@plt>
lea    -0xc(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x2065737265766552,%rax
73 65 20
mov    %rax,(%rsp)
movl   $0x21656d,0x8(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <reverse@plt>
lea    0xea5(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s = [12 x i8] c"Reverse me!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = bitcast [12 x i8]* %1 to i8*
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @reverse(i8* %3, i32 %5)
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [12 x i8] c"Reverse me!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @reverse(i8* %2, i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int pq_implementation_wait(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @pq_implementation_wait() {
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(unsigned int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
void WriteFileEidxHeader(FILE *fp, char *file_name) {
  unsigned int num_edges = 0;
  if (!fwrite(&num_edges, sizeof(unsigned int), 1, fp)) {
    perror(file_name);
    exit(EXIT_FAILURE);
  };
  ;
}


x86 assembly (clang, -O0):
<WriteFileEidxHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <fwrite@plt>
cmp    $0x0,%eax
jne    117e <WriteFileEidxHeader+0x4e>
mov    -0x10(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteFileEidxHeader>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rcx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <fwrite@plt>
test   %eax,%eax
je     1161 <WriteFileEidxHeader+0x31>
add    $0x10,%rsp
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <perror@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @WriteFileEidxHeader(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
store i32 0, i32* %5
%6 = load i32*, i32** %3
%7 = call i32 @fwrite(i32* %5, i32 4, i32 1, i32* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i32 @perror(i8* %10)
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @WriteFileEidxHeader(i32* nocapture %0, i8* nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @fwrite(i32* %3, i32 4, i32 1, i32* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = tail call i32 @perror(i8* %1)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
ret void
}
int nop_lock(void *handle) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nop_lock(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int distance = 100;
  printf("You are %d milles away .\n", distance);
  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)
movl   $0x64,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"You are %d milles away .\0A\00"
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
store i32 100, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"You are %d milles away .\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 100)
ret i32 0
}
int elem(int val, int myarray[5]) {
  int i;
  int retval = 0;
  for (i = 0; i < 5; i++) {
    if (myarray[i] == val) {
      retval += 1;
      break;
    }
  }
  return retval;
}


x86 assembly (clang, -O0):
<elem>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    1158 <elem+0x58>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x4(%rbp),%eax
jne    1145 <elem+0x45>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1158 <elem+0x58>
jmp    114a <elem+0x4a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <elem+0x19>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elem>:
mov    $0x1,%eax
cmp    %edi,(%rsi)
je     1120 <elem+0x20>
cmp    %edi,0x4(%rsi)
je     1120 <elem+0x20>
cmp    %edi,0x8(%rsi)
je     1120 <elem+0x20>
cmp    %edi,0xc(%rsi)
je     1120 <elem+0x20>
xor    %eax,%eax
cmp    %edi,0x10(%rsi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @elem(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, %0
br i1 %4, label %22, label %5
5: ; preds = %2
%6 = getelementptr inbounds i32, i32* %1, i64 1
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, %0
br i1 %8, label %22, label %9
9: ; preds = %5
%10 = getelementptr inbounds i32, i32* %1, i64 2
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, %0
br i1 %12, label %22, label %13
13: ; preds = %9
%14 = getelementptr inbounds i32, i32* %1, i64 3
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, %0
br i1 %16, label %22, label %17
17: ; preds = %13
%18 = getelementptr inbounds i32, i32* %1, i64 4
%19 = load i32, i32* %18
%20 = icmp eq i32 %19, %0
%21 = zext i1 %20 to i32
br label %22
22: ; preds = %17, %13, %9, %5, %2
%23 = phi i32 [ 1, %2 ], [ 1, %5 ], [ 1, %9 ], [ 1, %13 ], [ %21, %17 ]
ret i32 %23
}
int mapif_parse_ItemBoundRetrieve_sub(int fd) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mapif_parse_ItemBoundRetrieve_sub(i32 %0) {
ret i32 0
}
/* Variables and functions */
long long LLONG_MIN;
int expect_long_long_sum(long long (*f)(long long, long long)) {
  return f(LLONG_MIN + 1, -1) == LLONG_MIN;
}


x86 assembly (clang, -O0):
<expect_long_long_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ec9(%rip),%rcx
mov    (%rcx),%rdi
add    $0x1,%rdi
mov    $0xffffffffffffffff,%rsi
call   *%rax
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect_long_long_sum>:
push   %rbx
mov    %rdi,%rax
mov    0x2ed5(%rip),%rbx
mov    (%rbx),%rdi
add    $0x1,%rdi
mov    $0xffffffffffffffff,%rsi
call   *%rax
xor    %ecx,%ecx
cmp    (%rbx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@LLONG_MIN = global i64 0
define i32 @expect_long_long_sum(i64 (i64, i64)* %0) {
%2 = alloca i64 (i64, i64)*
store i64 (i64, i64)* %0, i64 (i64, i64)** %2
%3 = load i64 (i64, i64)*, i64 (i64, i64)** %2
%4 = load i64, i64* @LLONG_MIN
%5 = add nsw i64 %4, 1
%6 = call i64 %3(i64 %5, i64 -1)
%7 = load i64, i64* @LLONG_MIN
%8 = icmp eq i64 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@LLONG_MIN = global i64 0
define i32 @expect_long_long_sum(i64 (i64, i64)* nocapture %0) {
%2 = load i64, i64* @LLONG_MIN
%3 = add nsw i64 %2, 1
%4 = tail call i64 %0(i64 %3, i64 -1)
%5 = load i64, i64* @LLONG_MIN
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
long InterlockedDecrement(long *p) { return --(*p); }


x86 assembly (clang, -O0):
<InterlockedDecrement>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<InterlockedDecrement>:
mov    (%rdi),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define i64 @InterlockedDecrement(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = add nsw i64 %4, -1
store i64 %5, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @InterlockedDecrement(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = add nsw i64 %2, -1
store i64 %3, i64* %0
ret i64 %3
}
void fiq_u_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @fiq_u_handler() {
ret void
}
/* Variables and functions */
int recurse1(int, int, char *);
int recurse2(int x, int y, char *s) {
  char str[32];
  if (x < y) {
    return (recurse1(x + 1, y, str));
  }
  return (x);
}


x86 assembly (clang, -O0):
<recurse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1148 <recurse2+0x38>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0xc(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1030 <recurse1@plt>
mov    %eax,-0x4(%rbp)
jmp    114e <recurse2+0x3e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurse2>:
mov    %edi,%eax
cmp    %esi,%edi
jge    112b <recurse2+0x1b>
sub    $0x28,%rsp
add    $0x1,%eax
mov    %rsp,%rdx
mov    %eax,%edi
call   1030 <recurse1@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @recurse2(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca [32 x i8]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %3
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = load i32, i32* %6
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%17 = call i32 @recurse1(i32 %14, i32 %15, i8* %16)
store i32 %17, i32* %4
br label %20
18: ; preds = %3
%19 = load i32, i32* %5
store i32 %19, i32* %4
br label %20
20: ; preds = %18, %12
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @recurse2(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = alloca [32 x i8]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%6 = icmp slt i32 %0, %1
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = add nsw i32 %0, 1
%9 = call i32 @recurse1(i32 %8, i32 %1, i8* %5)
br label %10
10: ; preds = %3, %7
%11 = phi i32 [ %9, %7 ], [ %0, %3 ]
ret i32 %11
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_copy_into_dobldobl_systems_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(463, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_copy_into_dobldobl_systems_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1cf,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_copy_into_dobldobl_systems_container>:
mov    $0x1cf,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_copy_into_dobldobl_systems_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 463, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_copy_into_dobldobl_systems_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 463, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void foo() {
  long l;
  void *p;
  volatile int x;
  __builtin_unwind_init();
  x = 12;
  __builtin_eh_return(l, p);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rdx
push   %rax
movl   $0xc,-0x4c(%rbp)
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdi
mov    %rbp,%rcx
mov    %rdi,0x8(%rcx,%rsi,1)
lea    0x8(%rcx,%rsi,1),%rcx
pop    %rax
pop    %rdx
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
mov    %rcx,%rsp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rdx
push   %rax
movl   $0xc,-0x3c(%rbp)
pop    %rax
pop    %rdx
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
mov    %rcx,%rsp
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i64
%2 = alloca i8*
%3 = alloca i32
store volatile i32 12, i32* %3
%4 = load i64, i64* %1
%5 = load i8*, i8** %2
unreachable
}

LLVM IR (-O2):
define void @foo() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
tail call void @llvm.eh.unwind.init()
store volatile i32 12, i32* %1
tail call void @llvm.eh.return.i64(i64 undef, i8* undef)
unreachable
}
/* Variables and functions */
void *calloc(size_t, int);
void multimap_failed(char *, char *, int);
void *multimap_zalloc(size_t size) {
  ((size) ? ((void)0)
          : multimap_failed("size",
                            "/scratch/repos/new/home/jordi_armengol_estape/"
                            "c-scraper/outputs/2022-01-22/02-19-57/repos/"
                            "tregon/multimap/refs/heads/develop/src/malloc.c",
                            47));
  return calloc(size, 1);
}


x86 assembly (clang, -O0):
<multimap_zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <multimap_zalloc+0x1c>
jmp    1154 <multimap_zalloc+0x34>
lea    0xebd(%rip),%rdi
lea    0xebb(%rip),%rsi
mov    $0x2f,%edx
call   1030 <multimap_failed@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <calloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multimap_zalloc>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1141 <multimap_zalloc+0x21>
lea    0xed0(%rip),%rdi
lea    0xece(%rip),%rsi
mov    $0x2f,%edx
call   1030 <multimap_failed@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
pop    %rbx
jmp    1040 <calloc@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"size\00"
@.str.1 = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tregon/multimap/refs/heads/develop/src/malloc.c\00"
define i8* @multimap_zalloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %5
%8 = load i64, i64* %2
%9 = call i8* @calloc(i64 %8, i32 1)
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"size\00"
@.str.1 = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tregon/multimap/refs/heads/develop/src/malloc.c\00"
define i8* @multimap_zalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void @multimap_failed(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str.1, i64 0, i64 0), i32 47)
br label %4
4: ; preds = %1, %3
%5 = tail call i8* @calloc(i64 %0, i32 1)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
char *alloca(int /*<<< orphan*/);
int /*<<< orphan*/ dprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ read_size();
void do_format() {
  uint32_t size = read_size();
  char *buf = alloca(size);
  read(STDIN_FILENO, buf, size);
  dprintf(STDOUT_FILENO, buf);
}


x86 assembly (clang, -O0):
<do_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <read_size@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1050 <read@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1040 <dprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_format>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <read_size@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1060 <alloca@plt>
mov    %rax,%r14
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
mov    %ebx,%edx
call   1050 <read@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <dprintf@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@STDOUT_FILENO = global i32 0
define void @do_format() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 (...) @read_size()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i8* @alloca(i32 %4)
store i8* %5, i8** %2
%6 = load i32, i32* @STDIN_FILENO
%7 = load i8*, i8** %2
%8 = load i32, i32* %1
%9 = call i32 @read(i32 %6, i8* %7, i32 %8)
%10 = load i32, i32* @STDOUT_FILENO
%11 = load i8*, i8** %2
%12 = call i32 @dprintf(i32 %10, i8* %11)
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@STDOUT_FILENO = global i32 0
define void @do_format() {
%1 = tail call i32 (...) @read_size()
%2 = tail call i8* @alloca(i32 %1)
%3 = load i32, i32* @STDIN_FILENO
%4 = tail call i32 @read(i32 %3, i8* %2, i32 %1)
%5 = load i32, i32* @STDOUT_FILENO
%6 = tail call i32 @dprintf(i32 %5, i8* %2)
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *SSynth_New(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<SSynth_New>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @SSynth_New(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @SSynth_New(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
void term_register_rollback(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTFileRead() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void menu() {
  printf("\nPress 1 for Insert\nPress 2 for delete\nPress 3 for exit");
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"\0APress 1 for Insert\0APress 2 for delete\0APress 3 for exit\00"
define void @menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"\0APress 1 for Insert\0APress 2 for delete\0APress 3 for exit\00"
define void @menu() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int paresd(int n) {
  if (n < 0) {
    return 0;
  } else {
    if (n % 2 == 0) {
      printf("%d\n", n);
      return paresd(n - 1);
    } else {
      return paresd(n - 1);
    }
  }
}


x86 assembly (clang, -O0):
<paresd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1141 <paresd+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1185 <paresd+0x65>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1177 <paresd+0x57>
mov    -0x8(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1040 <paresd@plt>
mov    %eax,-0x4(%rbp)
jmp    1185 <paresd+0x65>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1040 <paresd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paresd>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
js     114a <paresd+0x3a>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
jmp    1139 <paresd+0x29>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x1(%rbx),%eax
test   %ebx,%ebx
mov    %eax,%ebx
jle    114a <paresd+0x3a>
test   $0x1,%bl
jne    1130 <paresd+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <paresd+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @paresd(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %9
%4 = phi i32 [ %10, %9 ], [ %0, %1 ]
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %9
9: ; preds = %3, %7
%10 = add nsw i32 %4, -1
%11 = icmp slt i32 %4, 1
br i1 %11, label %12, label %3
12: ; preds = %9, %1
ret i32 0
}