xunge/DecIR huggingface dataset:
/* Variables and functions */
int controllerTimeReleaseResources();
int releaseControlResources();
int releaseResources() {
  int status = 0;
  status = releaseControlResources();
  if (status) {
    (void)controllerTimeReleaseResources();
  } else {
    status = controllerTimeReleaseResources();
  }
  return status;
}


x86 assembly (clang, -O0):
<releaseResources>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <releaseControlResources@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114f <releaseResources+0x2f>
mov    $0x0,%al
call   1040 <controllerTimeReleaseResources@plt>
jmp    1159 <releaseResources+0x39>
mov    $0x0,%al
call   1040 <controllerTimeReleaseResources@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<releaseResources>:
push   %rbx
xor    %eax,%eax
call   1030 <releaseControlResources@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <controllerTimeReleaseResources@plt>
test   %ebx,%ebx
cmovne %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @releaseResources() {
%1 = tail call i32 (...) @releaseControlResources()
%2 = icmp eq i32 %1, 0
%3 = tail call i32 (...) @controllerTimeReleaseResources()
%4 = select i1 %2, i32 %3, i32 %1
ret i32 %4
}
void smpboot_setup_io_apic(void) {}


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

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

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

LLVM IR (-O2):
define void @smpboot_setup_io_apic() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(char *);
int main() {
  char dummy[10];
  f(dummy);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xa(%rbp),%rdi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xe(%rsp),%rdi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @f(i8* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @f(i8* %2)
ret i32 0
}
void foo413() {}


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

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

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

LLVM IR (-O2):
define void @foo413() {
ret void
}
/* Type definitions */
struct index {
  int dummy;
};
typedef int /*<<< orphan*/ idx;

/* Variables and functions */
int /*<<< orphan*/ memset(struct index *, int, int /*<<< orphan*/);
void index_init(struct index *idx) { memset(idx, sizeof(idx), 0); }


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

x86 assembly (clang, -O2):
<index_init>:
mov    $0x8,%esi
xor    %edx,%edx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
%struct.index = type { i32 }
define void @index_init(%struct.index* %0) {
%2 = tail call i32 @memset(%struct.index* %0, i32 8, i32 0)
ret void
}
/* Type definitions */
struct argparse_option {
  int dummy;
};
struct argparse {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ argparse_usage(struct argparse *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int argparse_help_cb(struct argparse *this,
                     const struct argparse_option *option) {
  argparse_usage(this);
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<argparse_help_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <argparse_usage@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<argparse_help_cb>:
push   %rax
call   1030 <argparse_usage@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.argparse = type { i32 }
%struct.argparse_option = type { i32 }
define i32 @argparse_help_cb(%struct.argparse* %0, %struct.argparse_option* %1) {
%3 = alloca %struct.argparse*
%4 = alloca %struct.argparse_option*
store %struct.argparse* %0, %struct.argparse** %3
store %struct.argparse_option* %1, %struct.argparse_option** %4
%5 = load %struct.argparse*, %struct.argparse** %3
%6 = call i32 @argparse_usage(%struct.argparse* %5)
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.argparse = type { i32 }
%struct.argparse_option = type { i32 }
define i32 @argparse_help_cb(%struct.argparse* %0, %struct.argparse_option* nocapture readnone %1) {
%3 = tail call i32 @argparse_usage(%struct.argparse* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ test_case_assert_fail();
int /*<<< orphan*/ test_case_assert_pass();
void __assert_long_equal(const char *spec, long expected, long actual, int line,
                         const char *file) {
  int pass = expected == actual;
  if (pass) {
    test_case_assert_pass();
  } else {
    test_case_assert_fail();
  };
}


x86 assembly (clang, -O0):
<__assert_long_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1164 <__assert_long_equal+0x44>
mov    $0x0,%al
call   1030 <test_case_assert_pass@plt>
jmp    116b <__assert_long_equal+0x4b>
mov    $0x0,%al
call   1040 <test_case_assert_fail@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__assert_long_equal>:
xor    %eax,%eax
cmp    %rdx,%rsi
jne    112c <__assert_long_equal+0xc>
jmp    1030 <test_case_assert_pass@plt>
jmp    1040 <test_case_assert_fail@plt>

LLVM IR (-O0):
define void @__assert_long_equal(i8* %0, i64 %1, i64 %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
store i8* %0, i8** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = icmp eq i64 %12, %13
%15 = zext i1 %14 to i32
store i32 %15, i32* %11
%16 = load i32, i32* %11
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %5
%19 = call i32 (...) @test_case_assert_pass()
br label %22
20: ; preds = %5
%21 = call i32 (...) @test_case_assert_fail()
br label %22
22: ; preds = %20, %18
ret void
}

LLVM IR (-O2):
define void @__assert_long_equal(i8* nocapture readnone %0, i64 %1, i64 %2, i32 %3, i8* nocapture readnone %4) {
%6 = icmp eq i64 %1, %2
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 (...) @test_case_assert_pass()
br label %11
9: ; preds = %5
%10 = tail call i32 (...) @test_case_assert_fail()
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ LOG_PID;
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char *);
int do_log(char *msg, int delay) {
  openlog("testlog", LOG_PID, LOG_DAEMON);
  while (1) {
    syslog(LOG_ERR, "%s: testing one, two, three\n", msg);
    sleep(delay);
  }
  closelog();
  return (0);
}


x86 assembly (clang, -O0):
<do_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
lea    0xea8(%rip),%rdi
call   1040 <openlog@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe97(%rip),%rsi
call   1030 <syslog@plt>
mov    -0xc(%rbp),%edi
call   1050 <sleep@plt>
jmp    115d <do_log+0x2d>

x86 assembly (clang, -O2):
<do_log>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
lea    0xeab(%rip),%rdi
call   1040 <openlog@plt>
mov    0x2e67(%rip),%r15
lea    0xea0(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <syslog@plt>
mov    %ebp,%edi
call   1050 <sleep@plt>
jmp    1170 <do_log+0x40>

LLVM IR (-O0):
@.str = [8 x i8] c"testlog\00"
@LOG_PID = global i32 0
@LOG_DAEMON = global i32 0
@LOG_ERR = global i32 0
@.str.1 = [29 x i8] c"%s: testing one, two, three\0A\00"
define i32 @do_log(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @LOG_PID
%6 = load i32, i32* @LOG_DAEMON
%7 = call i32 @openlog(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
br label %8
8: ; preds = %2, %8
%9 = load i32, i32* @LOG_ERR
%10 = load i8*, i8** %3
%11 = call i32 @syslog(i32 %9, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = load i32, i32* %4
%13 = call i32 @sleep(i32 %12)
br label %8
}

LLVM IR (-O2):
@.str = [8 x i8] c"testlog\00"
@LOG_PID = global i32 0
@LOG_DAEMON = global i32 0
@LOG_ERR = global i32 0
@.str.1 = [29 x i8] c"%s: testing one, two, three\0A\00"
define i32 @do_log(i8* %0, i32 %1) {
%3 = load i32, i32* @LOG_PID
%4 = load i32, i32* @LOG_DAEMON
%5 = tail call i32 @openlog(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
br label %6
6: ; preds = %2, %6
%7 = load i32, i32* @LOG_ERR
%8 = tail call i32 @syslog(i32 %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%9 = tail call i32 @sleep(i32 %1)
br label %6
}
const char *rcsid(const char *p) {
  return rcsid(p = "@(#)$Id: apprentice.c 10 2006-07-10 18:22:27Z hyin $");
}


x86 assembly (clang, -O0):
<rcsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <rcsid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rcsid>:
jmp    1100 <rcsid>

LLVM IR (-O0):
@.str = [53 x i8] c"@(#)$Id: apprentice.c 10 2006-07-10 18:22:27Z hyin $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int atoi(char const *);
char *parse_skip_integer(char const *);
char const *parse_skip_whitespace(char const *);
const char *parse_read_integer(const char *str, int *num) {
  str = parse_skip_whitespace(str);
  *num = atoi(str);
  str = parse_skip_integer(str);
  return parse_skip_whitespace(str);
}


x86 assembly (clang, -O0):
<parse_read_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <parse_skip_whitespace@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <parse_skip_integer@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <parse_skip_whitespace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_read_integer>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <parse_skip_whitespace@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,(%r14)
mov    %rbx,%rdi
call   1040 <parse_skip_integer@plt>
mov    %rax,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <parse_skip_whitespace@plt>

LLVM IR (-O0):
define i8* @parse_read_integer(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = call i8* @parse_skip_whitespace(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @atoi(i8* %7)
%9 = load i32*, i32** %4
store i32 %8, i32* %9
%10 = load i8*, i8** %3
%11 = call i8* @parse_skip_integer(i8* %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = call i8* @parse_skip_whitespace(i8* %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @parse_read_integer(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i8* @parse_skip_whitespace(i8* %0)
%4 = tail call i32 @atoi(i8* %3)
store i32 %4, i32* %1
%5 = tail call i8* @parse_skip_integer(i8* %3)
%6 = tail call i8* @parse_skip_whitespace(i8* %5)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ microblaze_disable_icache();
int /*<<< orphan*/ microblaze_invalidate_cache_ext();
int /*<<< orphan*/ microblaze_invalidate_icache();
void Xil_ICacheDisable(void) {
  microblaze_invalidate_cache_ext();
  microblaze_invalidate_icache();
  ;
  microblaze_disable_icache();
}


x86 assembly (clang, -O0):
<Xil_ICacheDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <microblaze_invalidate_cache_ext@plt>
mov    $0x0,%al
call   1050 <microblaze_invalidate_icache@plt>
mov    $0x0,%al
call   1030 <microblaze_disable_icache@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xil_ICacheDisable>:
push   %rax
xor    %eax,%eax
call   1040 <microblaze_invalidate_cache_ext@plt>
xor    %eax,%eax
call   1050 <microblaze_invalidate_icache@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <microblaze_disable_icache@plt>

LLVM IR (-O0):
define void @Xil_ICacheDisable() {
%1 = call i32 (...) @microblaze_invalidate_cache_ext()
%2 = call i32 (...) @microblaze_invalidate_icache()
%3 = call i32 (...) @microblaze_disable_icache()
ret void
}

LLVM IR (-O2):
define void @Xil_ICacheDisable() {
%1 = tail call i32 (...) @microblaze_invalidate_cache_ext()
%2 = tail call i32 (...) @microblaze_invalidate_icache()
%3 = tail call i32 (...) @microblaze_disable_icache()
ret void
}
__attribute__((unused)) unsigned MEM_32bits(void) {
  return sizeof(void *) == 4;
}


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

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

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

LLVM IR (-O2):
define i32 @MEM_32bits() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void dump_elem_int(void *elem) {
  int *e;
  if (elem) {
    e = (int *)elem;
    printf("%d\n", *e);
  }
}


x86 assembly (clang, -O0):
<dump_elem_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1141 <dump_elem_int+0x31>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_elem_int>:
test   %rdi,%rdi
je     1123 <dump_elem_int+0x13>
mov    (%rdi),%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @dump_elem_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %3
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @dump_elem_int(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void verify(int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4) {
  if (a1 != b1 || a2 != b2 || a3 != b3 || a4 != b4)
    abort();
}


x86 assembly (clang, -O0):
<verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1162 <verify+0x52>
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    1162 <verify+0x52>
mov    -0xc(%rbp),%eax
cmp    0x10(%rbp),%eax
jne    1162 <verify+0x52>
mov    -0x10(%rbp),%eax
cmp    0x18(%rbp),%eax
je     1169 <verify+0x59>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify>:
push   %rax
cmp    %r8d,%edi
jne    1129 <verify+0x19>
cmp    %r9d,%esi
jne    1129 <verify+0x19>
cmp    0x10(%rsp),%edx
jne    1129 <verify+0x19>
cmp    0x18(%rsp),%ecx
jne    1129 <verify+0x19>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @verify(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i32, i32* %9
%18 = load i32, i32* %13
%19 = icmp ne i32 %17, %18
br i1 %19, label %32, label %20
20: ; preds = %8
%21 = load i32, i32* %10
%22 = load i32, i32* %14
%23 = icmp ne i32 %21, %22
br i1 %23, label %32, label %24
24: ; preds = %20
%25 = load i32, i32* %11
%26 = load i32, i32* %15
%27 = icmp ne i32 %25, %26
br i1 %27, label %32, label %28
28: ; preds = %24
%29 = load i32, i32* %12
%30 = load i32, i32* %16
%31 = icmp ne i32 %29, %30
br i1 %31, label %32, label %34
32: ; preds = %28, %24, %20, %8
%33 = call i32 (...) @abort()
unreachable
34: ; preds = %28
ret void
}

LLVM IR (-O2):
define void @verify(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = icmp eq i32 %0, %4
%10 = icmp eq i32 %1, %5
%11 = and i1 %9, %10
%12 = icmp eq i32 %2, %6
%13 = and i1 %11, %12
%14 = icmp eq i32 %3, %7
%15 = and i1 %13, %14
br i1 %15, label %18, label %16
16: ; preds = %8
%17 = tail call i32 (...) @abort()
unreachable
18: ; preds = %8
ret void
}
/* Variables and functions */
int ENOSYS;
int ftw(const char *path, int (*fn)(const char *, const struct stat *, int),
        int fd_limit) {
  return ENOSYS;
}


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

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

LLVM IR (-O0):
%struct.stat = type opaque
@ENOSYS = global i32 0
define i32 @ftw(i8* %0, i32 (i8*, %struct.stat*, i32)* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32 (i8*, %struct.stat*, i32)*
%6 = alloca i32
store i8* %0, i8** %4
store i32 (i8*, %struct.stat*, i32)* %1, i32 (i8*, %struct.stat*, i32)** %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type opaque
@ENOSYS = global i32 0
define i32 @ftw(i8* nocapture readnone %0, i32 (i8*, %struct.stat*, i32)* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
ret i32 %4
}
int zje_max(int a, int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<zje_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <zje_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <zje_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zje_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @zje_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void initialiseStatesAndConstants(double *states, double *variables) {
  states[0] = 0.0;
  states[1] = 1.0;
}


x86 assembly (clang, -O0):
<initialiseStatesAndConstants>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xedd(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialiseStatesAndConstants>:
xorps  %xmm0,%xmm0
movhps 0xef6(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @initialiseStatesAndConstants(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 = getelementptr inbounds double, double* %5, i64 0
store double 0.000000e+00, double* %6
%7 = load double*, double** %3
%8 = getelementptr inbounds double, double* %7, i64 1
store double 1.000000e+00, double* %8
ret void
}

LLVM IR (-O2):
define void @initialiseStatesAndConstants(double* nocapture writeonly %0, double* nocapture readnone %1) {
%3 = bitcast double* %0 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %3
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xmapping;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xmapping_display(void *_p, void *_v) {
  ((XEvent *)_p)->xmapping.display = (Display *)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xmapping_display>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xmapping_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_system_copy() {
  printf("test_system_copy...");
  printf("Ok\n");
}


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

x86 assembly (clang, -O2):
<test_system_copy>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"test_system_copy...\00"
@.str.1 = [4 x i8] c"Ok\0A\00"
define void @test_system_copy() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"test_system_copy...\00"
@str = [3 x i8] c"Ok\00"
define void @test_system_copy() {
%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 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ swag();
int /*<<< orphan*/ swag2();
int main() {
  int i;
  int j = 1;
  int k = 1;
  int l = 1;
  for (i = 1; i < 10; i++) {
    j *= i;
    k += 1;
    l += i;
  }
  swag();
  swag2();
  printf("%d %d %d\n", j, k, l);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    118f <main+0x5f>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115b <main+0x2b>
mov    $0x0,%al
call   1040 <swag@plt>
mov    $0x0,%al
call   1050 <swag2@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <swag@plt>
xor    %eax,%eax
call   1050 <swag2@plt>
lea    0xeba(%rip),%rdi
mov    $0x58980,%esi
mov    $0xa,%edx
mov    $0x2e,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @swag()
%2 = tail call i32 (...) @swag2()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 362880, i32 10, i32 46)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int __int64_t_decode_array(void const *, int, int, int /*<<< orphan*/ *, int);
int __double_decode_array(const void *_buf, int offset, int maxlen, double *p,
                          int elements) {
  return __int64_t_decode_array(_buf, offset, maxlen, (int64_t *)p, elements);
}


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

x86 assembly (clang, -O2):
<__double_decode_array>:
jmp    1030 <__int64_t_decode_array@plt>

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

LLVM IR (-O2):
define i32 @__double_decode_array(i8* %0, i32 %1, i32 %2, double* %3, i32 %4) {
%6 = bitcast double* %3 to i32*
%7 = tail call i32 @__int64_t_decode_array(i8* %0, i32 %1, i32 %2, i32* %6, i32 %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ quicksort(int *, int /*<<< orphan*/, int);
void QuickSort(int A[], int N) {
  printf("** QuickSort...\n");
  quicksort(A, 0, N - 1);
}


x86 assembly (clang, -O0):
<QuickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <quicksort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuickSort>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebx
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <quicksort@plt>

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

LLVM IR (-O2):
@str = [16 x i8] c"** QuickSort...\00"
define void @QuickSort(i32* %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = add nsw i32 %1, -1
%5 = tail call i32 @quicksort(i32* %0, i32 0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x, y;
  x = 20;
  y = 30;
  printf("MAX(x, y) = %d\n", ((x) > (y) ? (x) : (y)));
  printf("x = %d\n", x);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movl   $0x1e,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1144 <main+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114a <main+0x3a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"MAX(x, y) = %d\0A\00"
@.str.1 = [8 x i8] c"x = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 30)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 20)
ret i32 0
}
int FindIntegerInArray(int key, int array[], int n) {
  int i;
  for (i = 0; i < n; i++) {
    if (key == array[i])
      return (i);
  }
  return (-1);
}


x86 assembly (clang, -O0):
<FindIntegerInArray>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1153 <FindIntegerInArray+0x53>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1140 <FindIntegerInArray+0x40>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <FindIntegerInArray+0x5a>
jmp    1145 <FindIntegerInArray+0x45>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <FindIntegerInArray+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FindIntegerInArray>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    111e <FindIntegerInArray+0x1e>
mov    %edx,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmp    %edi,(%rsi,%rcx,4)
je     111f <FindIntegerInArray+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <FindIntegerInArray+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @FindIntegerInArray(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %0
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int sse4() {
  printf("SSE4 is not supported.");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"SSE4 is not supported.\00"
define i32 @sse4() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"SSE4 is not supported.\00"
define i32 @sse4() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void RTVfsChainIsSpec(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsChainIsSpec() {
ret void
}
char *my_realloc(p, n)
char *p;
unsigned int n;
{
  if (p == 0)
    return (char *)malloc(n);
  return (char *)realloc(p, n);
}


x86 assembly (clang, -O0):
<my_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114d <my_realloc+0x2d>
mov    -0x14(%rbp),%eax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    115f <my_realloc+0x3f>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
mov    %eax,%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_realloc>:
mov    %esi,%esi
test   %rdi,%rdi
je     112c <my_realloc+0xc>
jmp    1040 <realloc@plt>
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @my_realloc(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
%4 = zext i32 %1 to i64
br i1 %3, label %5, label %7
5: ; preds = %2
%6 = tail call i8* @malloc(i64 %4)
br label %9
7: ; preds = %2
%8 = tail call i8* @realloc(i8* %0, i64 %4)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ %6, %5 ], [ %8, %7 ]
ret i8* %10
}
extern int bar() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bar() {
ret i32 0
}
/* Variables and functions */
int setreuid(int, int);
int main(void) { return setreuid(-1, -1); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @setreuid(i32 -1, i32 -1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ read_line(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ str_reverse(char *);
int main(void) {
  char line[81];
  read_line(stdin, line);
  str_reverse(line);
  putchar('\n');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    -0x60(%rbp),%rsi
call   1050 <read_line@plt>
lea    -0x60(%rbp),%rdi
call   1040 <str_reverse@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <read_line@plt>
mov    %rbx,%rdi
call   1040 <str_reverse@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i8]
store i32 0, i32* %1
%3 = load i32, i32* @stdin
%4 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%5 = call i32 @read_line(i32 %3, i8* %4)
%6 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%7 = call i32 @str_reverse(i8* %6)
%8 = call i32 @putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @read_line(i32 %3, i8* %2)
%5 = call i32 @str_reverse(i8* %2)
%6 = call i32 @putchar(i8 signext 10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ ff_bfin_put_pixels16uc_nornd(int /*<<< orphan*/ *,
                                                int /*<<< orphan*/ const *,
                                                int /*<<< orphan*/ const *,
                                                int /*<<< orphan*/, int);
void bfin_put_pixels16_nornd(uint8_t *block, const uint8_t *pixels,
                             ptrdiff_t line_size, int h) {
  ff_bfin_put_pixels16uc_nornd(block, pixels, pixels, line_size, h);
}


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

x86 assembly (clang, -O2):
<bfin_put_pixels16_nornd>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
jmp    1030 <ff_bfin_put_pixels16uc_nornd@plt>

LLVM IR (-O0):
define void @bfin_put_pixels16_nornd(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** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @ff_bfin_put_pixels16uc_nornd(i32* %9, i32* %10, i32* %11, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @bfin_put_pixels16_nornd(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @ff_bfin_put_pixels16uc_nornd(i32* %0, i32* %1, i32* %1, i32 %2, i32 %3)
ret void
}
void setchar(charnr) long charnr;
{ outchar('#'); }


x86 assembly (clang, -O0):
<setchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x23,%edi
mov    $0x0,%al
call   1030 <outchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setchar>:
mov    $0x23,%edi
xor    %eax,%eax
jmp    1030 <outchar@plt>

LLVM IR (-O0):
define void @setchar(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @outchar to i32 (i32, ...)*)(i32 35)
ret void
}

LLVM IR (-O2):
define void @setchar(i64 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @outchar to i32 (i32, ...)*)(i32 35)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ console_start();
void console_autostart(void) { console_start(); }


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

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

LLVM IR (-O0):
define void @console_autostart() {
%1 = call i32 (...) @console_start()
ret void
}

LLVM IR (-O2):
define void @console_autostart() {
%1 = tail call i32 (...) @console_start()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void sigquit() {
  printf("My DADDY has Killed me!!!\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"My DADDY has Killed me!!!\0A\00"
define void @sigquit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [26 x i8] c"My DADDY has Killed me!!!\00"
define void @sigquit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
void gator_event_sampling_offline_dispatch(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @gator_event_sampling_offline_dispatch(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ msgbuf;

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ vsnprintf(char *, int, char const *, int /*<<< orphan*/);
void ns_client_logv(void *client, void *category, void *module, int level,
                    const char *fmt, va_list ap) {
  char msgbuf[2048];
  char peerbuf[2048];
  vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
  puts(msgbuf);
}


x86 assembly (clang, -O0):
<ns_client_logv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1030,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
lea    -0x830(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    $0x800,%esi
call   1040 <vsnprintf@plt>
lea    -0x830(%rbp),%rdi
call   1030 <puts@plt>
add    $0x1030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_client_logv>:
push   %rbx
sub    $0x800,%rsp
mov    %r9d,%ecx
mov    %r8,%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x800,%esi
call   1040 <vsnprintf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @ns_client_logv(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca [2048 x i8]
%14 = alloca [2048 x i8]
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%15 = getelementptr inbounds [2048 x i8], [2048 x i8]* %13, i64 0, i64 0
%16 = load i8*, i8** %11
%17 = load i32, i32* %12
%18 = call i32 @vsnprintf(i8* %15, i32 2048, i8* %16, i32 %17)
%19 = getelementptr inbounds [2048 x i8], [2048 x i8]* %13, i64 0, i64 0
%20 = call i32 @puts(i8* %19)
ret void
}

LLVM IR (-O2):
define void @ns_client_logv(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3, i8* nocapture %4, i32 %5) {
%7 = alloca [2048 x i8]
%8 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%9 = call i32 @vsnprintf(i8* %8, i32 2048, i8* %4, i32 %5)
%10 = call i32 @puts(i8* %8)
ret void
}