xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Count2EndIndex(int *, int);
int /*<<< orphan*/ EndIndex2BeginIndex(int *, int);
void Count2BeginIndex(int *a, int n) {
  Count2EndIndex(a, n);
  EndIndex2BeginIndex(a, n);
}


x86 assembly (clang, -O0):
<Count2BeginIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Count2EndIndex@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <EndIndex2BeginIndex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Count2BeginIndex>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <Count2EndIndex@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <EndIndex2BeginIndex@plt>

LLVM IR (-O0):
define void @Count2BeginIndex(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @Count2EndIndex(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = call i32 @EndIndex2BeginIndex(i32* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @Count2BeginIndex(i32* %0, i32 %1) {
%3 = tail call i32 @Count2EndIndex(i32* %0, i32 %1)
%4 = tail call i32 @EndIndex2BeginIndex(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("Hello, C\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"Hello, C\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ screenheight();
void basScreenHeight() { pushNumber(screenheight()); }


x86 assembly (clang, -O0):
<basScreenHeight>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <screenheight@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basScreenHeight>:
push   %rax
xor    %eax,%eax
call   1030 <screenheight@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basScreenHeight() {
%1 = call i32 (...) @screenheight()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basScreenHeight() {
%1 = tail call i32 (...) @screenheight()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PressKey240(unsigned char, unsigned long);
void presskey(unsigned char k, unsigned long t) { PressKey240(k, t); }


x86 assembly (clang, -O0):
<presskey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <PressKey240@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<presskey>:
jmp    1030 <PressKey240@plt>

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

LLVM IR (-O2):
define void @presskey(i8 zeroext %0, i64 %1) {
%3 = tail call i32 @PressKey240(i8 zeroext %0, i64 %1)
ret void
}
int motTrouve(char *mot_bis) {
  int i = 0;
  while (*(mot_bis + i) != 0) {
    if (*(mot_bis + i) == '\xB8') {
      return 0;
    }
    i++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<motTrouve>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1153 <motTrouve+0x53>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xffffffb8,%eax
jne    1145 <motTrouve+0x45>
movl   $0x0,-0x4(%rbp)
jmp    115a <motTrouve+0x5a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <motTrouve+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<motTrouve>:
movzbl (%rdi),%eax
cmp    $0xb8,%al
je     1111 <motTrouve+0x11>
test   %al,%al
je     1114 <motTrouve+0x14>
add    $0x1,%rdi
jmp    1100 <motTrouve>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @motTrouve(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %9
i8 -72, label %8
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
br label %9
9: ; preds = %2, %8
%10 = phi i32 [ 0, %8 ], [ 1, %2 ]
ret i32 %10
}
void foo082(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo082(i32 %0) {
ret void
}
/* Variables and functions */
unsigned long long ask_rand();
unsigned long long ask_rand_in_bounds(unsigned long long lower,
                                      unsigned long long higher) {
  return ask_rand() % (higher - lower + 1) + lower;
}


x86 assembly (clang, -O0):
<ask_rand_in_bounds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <ask_rand@plt>
mov    -0x10(%rbp),%rcx
sub    -0x8(%rbp),%rcx
add    $0x1,%rcx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ask_rand_in_bounds>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <ask_rand@plt>
sub    %r14,%rbx
add    $0x1,%rbx
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     113e <ask_rand_in_bounds+0x2e>
xor    %edx,%edx
div    %rbx
mov    %rdx,%rax
jmp    1144 <ask_rand_in_bounds+0x34>
xor    %edx,%edx
div    %ebx
mov    %edx,%eax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @ask_rand_in_bounds(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 (...) @ask_rand()
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub i64 %6, %7
%9 = add i64 %8, 1
%10 = urem i64 %5, %9
%11 = load i64, i64* %3
%12 = add i64 %10, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @ask_rand_in_bounds(i64 %0, i64 %1) {
%3 = tail call i64 (...) @ask_rand()
%4 = sub i64 1, %0
%5 = add i64 %4, %1
%6 = urem i64 %3, %5
%7 = add i64 %6, %0
ret i64 %7
}
/* Variables and functions */
int getpagesize();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", getpagesize());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getpagesize@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpagesize()
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpagesize()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
bool fspath_is_file(const char path[]) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @fspath_is_file(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_reverse();
void run_tests() { test_reverse(); }


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

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

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

LLVM IR (-O2):
define void @run_tests() {
%1 = tail call i32 (...) @test_reverse()
ret void
}
void hleftj_(i) int *i;
{ hleftjustify(*i); }


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

x86 assembly (clang, -O2):
<hleftj_>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <hleftjustify@plt>

LLVM IR (-O0):
define void @hleftj_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @hleftjustify to i32 (i32, ...)*)(i32 %4)
ret void
}

LLVM IR (-O2):
define void @hleftj_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @hleftjustify to i32 (i32, ...)*)(i32 %2)
ret void
}
/* Type definitions */
struct cli_assembler_decompile_result {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cli_assembler_implementation_decompile_dispose(
    struct cli_assembler_decompile_result *);
void cli_assembler_decompile_dispose(
    struct cli_assembler_decompile_result *result) {
  cli_assembler_implementation_decompile_dispose(result);
}


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

x86 assembly (clang, -O2):
<cli_assembler_decompile_dispose>:
jmp    1030 <cli_assembler_implementation_decompile_dispose@plt>

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

LLVM IR (-O2):
%struct.cli_assembler_decompile_result = type { i32 }
define void @cli_assembler_decompile_dispose(%struct.cli_assembler_decompile_result* %0) {
%2 = tail call i32 @cli_assembler_implementation_decompile_dispose(%struct.cli_assembler_decompile_result* %0)
ret void
}
void network_disconnect(void) {}


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

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

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

LLVM IR (-O2):
define void @network_disconnect() {
ret void
}
int fun1003() { return 1003; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x3eb,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x3eb,%eax
ret

LLVM IR (-O0):
define i32 @fun1003() {
ret i32 1003
}

LLVM IR (-O2):
define i32 @fun1003() {
ret i32 1003
}
float ps2_rad_to_deg(float radians) {
  return radians * (180.0f / 3.1415926535897932384626433832795f);
}


x86 assembly (clang, -O0):
<ps2_rad_to_deg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps2_rad_to_deg>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @ps2_rad_to_deg(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x404CA5DC00000000
ret float %4
}

LLVM IR (-O2):
define float @ps2_rad_to_deg(float %0) {
%2 = fmul float %0, 0x404CA5DC00000000
ret float %2
}
int *find_alloc_info(char *database, int index) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i32* @find_alloc_info(i8* nocapture readnone %0, i32 %1) {
ret i32* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("Hello World, test addIncludePath!\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Hello World, test addIncludePath!\0A\00"
define void @hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Hello World, test addIncludePath!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memimport_process_revoke() {
  printf("NOT IMPLEMENTED:"
         "pa_memimport_process_revoke"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_memimport_process_revoke\00"
define i32 @pa_memimport_process_revoke() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ thr_exit();
void *child(void *arg) {
  printf("child: I know you are waiting for me\n");
  thr_exit();
  return NULL;
}


x86 assembly (clang, -O0):
<child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <thr_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [38 x i8] c"child: I know you are waiting for me\0A\00"
define i8* @child(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @thr_exit()
ret i8* null
}

LLVM IR (-O2):
@str = [37 x i8] c"child: I know you are waiting for me\00"
define noalias i8* @child(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @thr_exit()
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __attribute__((no, noclone)) foo(int *pi) {
  if (*pi != 1)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
je     1130 <foo+0x20>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
cmpl   $0x1,(%rdi)
jne    1118 <foo+0x8>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @foo(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 1
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_buffer_notify_set_all();
void config_change_buffer_notify_default(const void *pointer, void *data,
                                         struct t_config_option *option) {
  (void)pointer;
  (void)data;
  (void)option;
  gui_buffer_notify_set_all();
}


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

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

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @config_change_buffer_notify_default(i8* %0, i8* %1, %struct.t_config_option* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.t_config_option*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.t_config_option* %2, %struct.t_config_option** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load %struct.t_config_option*, %struct.t_config_option** %6
%10 = call i32 (...) @gui_buffer_notify_set_all()
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @config_change_buffer_notify_default(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct.t_config_option* nocapture readnone %2) {
%4 = tail call i32 (...) @gui_buffer_notify_set_all()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ calloc(scalar_t__, int);
int /*<<< orphan*/ perror(char *);
char *strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strdup(char *source) {
  char *new;
  do {
    if (!((new) = (char *)calloc((strlen(source) + 1), sizeof(char)))) {
      perror("malloc failure");
      abort();
    }
  } while (0);
  return (strcpy(new, source));
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1197 <strdup+0x47>
lea    0xe75(%rip),%rdi
call   1070 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    119c <strdup+0x4c>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %rbx
mov    %rdi,%rbx
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1060 <calloc@plt>
test   %rax,%rax
je     1178 <strdup+0x28>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <strcpy@plt>
lea    0xe81(%rip),%rdi
call   1070 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"malloc failure\00"
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
br label %4
4: ; preds = %1
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i64 @calloc(i64 %7, i32 1)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %4
%12 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %4
br label %15
15: ; preds = %14
%16 = load i8*, i8** %3
%17 = load i8*, i8** %2
%18 = call i8* @strcpy(i8* %16, i8* %17)
ret i8* %18
}

LLVM IR (-O2):
@.str = [15 x i8] c"malloc failure\00"
define i8* @strdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @calloc(i64 %3, i32 1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %1
%10 = inttoptr i64 %4 to i8*
%11 = tail call i8* @strcpy(i8* %10, i8* dereferenceable(1) %0)
ret i8* %10
}
int is_valid(int x, int y) { return (x >= 0 && x <= 7 && y >= 0 && y <= 7); }


x86 assembly (clang, -O0):
<is_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jl     1141 <is_valid+0x41>
xor    %eax,%eax
cmpl   $0x7,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jg     1141 <is_valid+0x41>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1141 <is_valid+0x41>
cmpl   $0x7,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid>:
or     %esi,%edi
xor    %eax,%eax
cmp    $0x8,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_valid(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 = icmp sge i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 7
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, 7
br label %16
16: ; preds = %13, %10, %7, %2
%17 = phi i1 [ false, %10 ], [ false, %7 ], [ false, %2 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_valid(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ult i32 %3, 8
%5 = zext i1 %4 to i32
ret i32 %5
}
void console_destroy() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_v64_12_sse4() {
ret void
}
void glQueryMatrixxOES(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glQueryMatrixxOES() {
ret void
}
int bar(unsigned a) {}


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

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

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
ret i32 undef
}
void *sspm_default_new_part() { return 0; }


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

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

LLVM IR (-O0):
define i8* @sspm_default_new_part() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @sspm_default_new_part() {
ret i8* null
}
/* Type definitions */
typedef unsigned char uint32_t;

/* Variables and functions */
void unpack_uint32_t(const char in[4], uint32_t *out) {
  for (int i = 3; i >= 0; i--) {
    *out += (unsigned char)in[i];
    if (i != 0)
      *out <<= 8;
  }
}


x86 assembly (clang, -O0):
<unpack_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     115d <unpack_uint32_t+0x5d>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
add    %edx,%ecx
mov    %cl,(%rax)
cmpl   $0x0,-0x14(%rbp)
je     114a <unpack_uint32_t+0x4a>
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
shl    $0x8,%ecx
mov    %cl,(%rax)
jmp    114f <unpack_uint32_t+0x4f>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <unpack_uint32_t+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_uint32_t>:
movb   $0x0,(%rsi)
mov    (%rdi),%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @unpack_uint32_t(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 3, i32* %5
br label %6
6: ; preds = %30, %2
%7 = load i32, i32* %5
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %33
9: ; preds = %6
%10 = load i8*, i8** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = add nsw i32 %18, %15
%20 = trunc i32 %19 to i8
store i8 %20, i8* %16
%21 = load i32, i32* %5
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %29
23: ; preds = %9
%24 = load i8*, i8** %4
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = shl i32 %26, 8
%28 = trunc i32 %27 to i8
store i8 %28, i8* %24
br label %29
29: ; preds = %23, %9
br label %30
30: ; preds = %29
%31 = load i32, i32* %5
%32 = add nsw i32 %31, -1
store i32 %32, i32* %5
br label %6
33: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @unpack_uint32_t(i8* nocapture %0, i8* nocapture %1) {
store i8 0, i8* %1
%3 = load i8, i8* %0
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int main() {
  int *p;
  free(p);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @free(i32* undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put16(unsigned short);
int /*<<< orphan*/ put8(int);
void and_ax_imm16(unsigned short imm16) {
  put8(0x66);
  put8(0x25);
  put16(imm16);
}


x86 assembly (clang, -O0):
<and_ax_imm16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0x25,%edi
call   1030 <put8@plt>
movzwl -0x2(%rbp),%edi
call   1040 <put16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<and_ax_imm16>:
push   %rbx
mov    %edi,%ebx
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0x25,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put16@plt>

LLVM IR (-O0):
define void @and_ax_imm16(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @put8(i32 102)
%4 = call i32 @put8(i32 37)
%5 = load i16, i16* %2
%6 = call i32 @put16(i16 zeroext %5)
ret void
}

LLVM IR (-O2):
define void @and_ax_imm16(i16 zeroext %0) {
%2 = tail call i32 @put8(i32 102)
%3 = tail call i32 @put8(i32 37)
%4 = tail call i32 @put16(i16 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clear_screen() {
  if (0) {
    system("cls");
  } else {
    system("clear");
  }
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define void @clear_screen() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @clear_screen() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int getshort(unsigned char *buffer, int offset) {
  return (unsigned short int)buffer[offset] |
         ((unsigned short int)buffer[offset + 1] << 8);
}


x86 assembly (clang, -O0):
<getshort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
movzwl %ax,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
movzwl %cx,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getshort>:
movslq %esi,%rax
movzwl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @getshort(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i16
%11 = zext i16 %10 to i32
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = load i8, i8* %16
%18 = zext i8 %17 to i16
%19 = zext i16 %18 to i32
%20 = shl i32 %19, 8
%21 = or i32 %11, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @getshort(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = add nsw i32 %1, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 8
%13 = or i32 %12, %6
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void err_sigprocmask(void) {
  fprintf(stderr, "error: Failed to block SIGCHLD\n");
  fflush(stderr);
}


x86 assembly (clang, -O0):
<err_sigprocmask>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_sigprocmask>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"error: Failed to block SIGCHLD\0A\00"
define void @err_sigprocmask() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"error: Failed to block SIGCHLD\0A\00"
define void @err_sigprocmask() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stacktrace_pop();
float stacktrace_fpop(float val) {
  stacktrace_pop();
  return val;
}


x86 assembly (clang, -O0):
<stacktrace_fpop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <stacktrace_pop@plt>
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stacktrace_fpop>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <stacktrace_pop@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @stacktrace_fpop(float returned %0) {
%2 = tail call i32 (...) @stacktrace_pop()
ret float %0
}
/* Variables and functions */
scalar_t__ rand();
void ignore_character_symbols_constant_FP(char c) {
  for (; c < 'z';) {
    if (rand()) {
      c = 'a';
    }
  }
}


x86 assembly (clang, -O0):
<ignore_character_symbols_constant_FP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jge    1145 <ignore_character_symbols_constant_FP+0x35>
mov    $0x0,%al
call   1030 <rand@plt>
cmp    $0x0,%rax
je     1140 <ignore_character_symbols_constant_FP+0x30>
movb   $0x61,-0x1(%rbp)
jmp    111e <ignore_character_symbols_constant_FP+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_character_symbols_constant_FP>:
push   %rax
cmp    $0x79,%dil
jg     1129 <ignore_character_symbols_constant_FP+0x19>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
jmp    1120 <ignore_character_symbols_constant_FP+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @ignore_character_symbols_constant_FP(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %11, %1
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 122
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = call i64 (...) @rand()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 97, i8* %2
br label %11
11: ; preds = %10, %7
br label %3
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ignore_character_symbols_constant_FP(i8 signext %0) {
%2 = icmp slt i8 %0, 122
br i1 %2, label %3, label %5
3: ; preds = %1, %3
%4 = tail call i64 (...) @rand()
br label %3
5: ; preds = %1
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ report_error(char const *, int, char *, unsigned int);
int /*<<< orphan*/ rsh_exit(int);
void *rhash_malloc(size_t size, const char *srcfile, int srcline) {
  void *res = malloc(size);
  if (!res) {
    report_error(srcfile, srcline, "malloc(%u) failed\n", (unsigned)size);
    rsh_exit(2);
  }
  return res;
}


x86 assembly (clang, -O0):
<rhash_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    117e <rhash_malloc+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rax
mov    %eax,%ecx
lea    0xe91(%rip),%rdx
call   1040 <report_error@plt>
mov    $0x2,%edi
call   1050 <rsh_exit@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rhash_malloc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r15d
mov    %rsi,%rbp
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116c <rhash_malloc+0x3c>
lea    0xeac(%rip),%rdx
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r14d,%ecx
call   1040 <report_error@plt>
mov    $0x2,%edi
call   1050 <rsh_exit@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"malloc(%u) failed\0A\00"
define noalias i8* @rhash_malloc(i64 %0, i8* %1, i32 %2) {
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = trunc i64 %0 to i32
%8 = tail call i32 @report_error(i8* %1, i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @rsh_exit(i32 2)
br label %10
10: ; preds = %6, %3
ret i8* %4
}
int Greatest(int num, int num2) {
  if (num > num2)
    return num;
  return num2;
}


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

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

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

LLVM IR (-O2):
define i32 @Greatest(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
char *hash_plugin_detailed(void) {
  return ("mozilla - mozilla passphrase plugin\n"
          "------------------------------------------------\n"
          "Use this module to crack mozilla key3.db master key\n"
          "Input should be a mozilla db file (key3.db) specified with -f\n"
          "Known software that uses this password hashing method:\n"
          "Firefox, Thunderbird, etc.\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [327 x i8] c"mozilla - mozilla passphrase plugin\0A------------------------------------------------\0AUse this module to crack mozilla key3.db master key\0AInput should be a mozilla db file (key3.db) specified with -f\0AKnown software that uses this password hashing method:\0AFirefox, Thunderbird, etc.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([327 x i8], [327 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [327 x i8] c"mozilla - mozilla passphrase plugin\0A------------------------------------------------\0AUse this module to crack mozilla key3.db master key\0AInput should be a mozilla db file (key3.db) specified with -f\0AKnown software that uses this password hashing method:\0AFirefox, Thunderbird, etc.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([327 x i8], [327 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ AND_HOST_REG_B(int, int);
int /*<<< orphan*/ addbyte(int);
int TEST_HOST_REG_B(int dst_reg, int src_reg) {
  if (dst_reg & 8) {
    addbyte(0x44);
    addbyte(0x89);
    addbyte(0xc0 | ((dst_reg & 7) << 3) | 2);
    dst_reg = (dst_reg & 0x10) | 2;
  }
  AND_HOST_REG_B(dst_reg, src_reg);
  return dst_reg & ~0x10;
}


x86 assembly (clang, -O0):
<TEST_HOST_REG_B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1174 <TEST_HOST_REG_B+0x54>
mov    $0x44,%edi
call   1030 <addbyte@plt>
mov    $0x89,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
and    $0x7,%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     $0x2,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%eax
and    $0x10,%eax
or     $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <AND_HOST_REG_B@plt>
mov    -0x4(%rbp),%eax
and    $0xffffffef,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEST_HOST_REG_B>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
test   $0x8,%bl
je     115a <TEST_HOST_REG_B+0x3a>
mov    $0x44,%edi
call   1030 <addbyte@plt>
mov    $0x89,%edi
call   1030 <addbyte@plt>
lea    0x0(,%rbx,8),%eax
or     $0xc2,%eax
movzbl %al,%edi
call   1030 <addbyte@plt>
and    $0x10,%ebx
or     $0x2,%ebx
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <AND_HOST_REG_B@plt>
and    $0xffffffef,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @TEST_HOST_REG_B(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = and i32 %5, 8
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %20
8: ; preds = %2
%9 = call i32 @addbyte(i32 68)
%10 = call i32 @addbyte(i32 137)
%11 = load i32, i32* %3
%12 = and i32 %11, 7
%13 = shl i32 %12, 3
%14 = or i32 192, %13
%15 = or i32 %14, 2
%16 = call i32 @addbyte(i32 %15)
%17 = load i32, i32* %3
%18 = and i32 %17, 16
%19 = or i32 %18, 2
store i32 %19, i32* %3
br label %20
20: ; preds = %8, %2
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 @AND_HOST_REG_B(i32 %21, i32 %22)
%24 = load i32, i32* %3
%25 = and i32 %24, -17
ret i32 %25
}

LLVM IR (-O2):
define i32 @TEST_HOST_REG_B(i32 %0, i32 %1) {
%3 = and i32 %0, 8
%4 = icmp eq i32 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2
%6 = tail call i32 @addbyte(i32 68)
%7 = tail call i32 @addbyte(i32 137)
%8 = shl i32 %0, 3
%9 = and i32 %8, 56
%10 = or i32 %9, 194
%11 = tail call i32 @addbyte(i32 %10)
%12 = and i32 %0, 16
%13 = or i32 %12, 2
br label %14
14: ; preds = %5, %2
%15 = phi i32 [ %13, %5 ], [ %0, %2 ]
%16 = tail call i32 @AND_HOST_REG_B(i32 %15, i32 %1)
%17 = and i32 %15, -17
ret i32 %17
}
/* Type definitions */
struct passwd {
  char *pw_dir;
};

/* Variables and functions */
char *getenv(char *);
scalar_t__ getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ getuid();
const char *get_usr_home_dir(void) {
  char *usr_home;
  if ((usr_home = getenv("HOME")) == NULL)
    usr_home = ((struct passwd *)getpwuid(getuid()))->pw_dir;
  return usr_home;
}


x86 assembly (clang, -O0):
<get_usr_home_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1167 <get_usr_home_dir+0x37>
mov    $0x0,%al
call   1050 <getuid@plt>
mov    %eax,%edi
call   1040 <getpwuid@plt>
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_usr_home_dir>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1144 <get_usr_home_dir+0x14>
pop    %rcx
ret
xor    %eax,%eax
call   1050 <getuid@plt>
mov    %eax,%edi
call   1040 <getpwuid@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
@.str = [5 x i8] c"HOME\00"
define i8* @get_usr_home_dir() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = call i32 (...) @getuid()
%6 = call i64 @getpwuid(i32 %5)
%7 = inttoptr i64 %6 to %struct.passwd*
%8 = getelementptr inbounds %struct.passwd, %struct.passwd* %7, i32 0, i32 0
%9 = load i8*, i8** %8
store i8* %9, i8** %1
br label %10
10: ; preds = %4, %0
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
@.str = [5 x i8] c"HOME\00"
define i8* @get_usr_home_dir() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i32 (...) @getuid()
%5 = tail call i64 @getpwuid(i32 %4)
%6 = inttoptr i64 %5 to %struct.passwd*
%7 = getelementptr inbounds %struct.passwd, %struct.passwd* %6, i64 0, i32 0
%8 = load i8*, i8** %7
br label %9
9: ; preds = %3, %0
%10 = phi i8* [ %8, %3 ], [ %1, %0 ]
ret i8* %10
}
/* Variables and functions */
int prac2(int, int *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int arr[] = {2, 3, 15, 15, 13, 12, 11, 9, 0, -1, 2, -3, 5};
  printf("%d\n", prac2(13, arr));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x34,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rsi
mov    $0xd,%edi
call   1030 <prac2@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xf06(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0xd,%edi
call   1030 <prac2@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [13 x i32] [i32 2, i32 3, i32 15, i32 15, i32 13, i32 12, i32 11, i32 9, i32 0, i32 -1, i32 2, i32 -3, i32 5]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i32]
store i32 0, i32* %1
%3 = bitcast [13 x i32]* %2 to i8*
%4 = getelementptr inbounds [13 x i32], [13 x i32]* %2, i64 0, i64 0
%5 = call i32 @prac2(i32 13, i32* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [13 x i32] [i32 2, i32 3, i32 15, i32 15, i32 13, i32 12, i32 11, i32 9, i32 0, i32 -1, i32 2, i32 -3, i32 5]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [13 x i32]
%2 = bitcast [13 x i32]* %1 to i8*
%3 = getelementptr inbounds [13 x i32], [13 x i32]* %1, i64 0, i64 0
%4 = call i32 @prac2(i32 13, i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
addElement() {}


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

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

LLVM IR (-O0):
define i32 @addElement() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @addElement() {
ret i32 undef
}