xunge/DecIR huggingface dataset:
int fn4(int x, int y) {
  int tem1 = y | x;
  int tem2 = ~(y & x);
  return tem1 & tem2;
}


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = or i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = and i32 %10, %11
%13 = xor i32 %12, -1
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void die_MEM(void) { die("Out of memory"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define void @die_MEM() {
%1 = call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define void @die_MEM() {
%1 = tail call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
int /*<<< orphan*/ show_version();
int show_help(void) {
  const char *info = ""
                     "Usage : bigint <testname> <arguments>\n"
                     "\n"
                     "Arithmetic:\n"
                     "add <num1> <num2>\n"
                     "sub <num1> <num2>\n"
                     "mul <num1> <num2>\n"
                     "div <num1> <num2>\n"
                     "mod <num1> <num2>\n"
                     "\n"
                     "Public-Key Cryptography:\n"
                     "random    <length:bit>     Random Number generate\n"
                     "prime     <length:bit>     Big prime number generate\n"
                     "dh        <length:bit>     Diffie–Hellman key exchange\n"
                     "\n"
                     "Others:\n"
                     "fib       <n:int>          nth item in fibonacci array\n"
                     "";
  show_version();
  puts(info);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [392 x i8] c"Usage : bigint <testname> <arguments>\0A\0AArithmetic:\0Aadd <num1> <num2>\0Asub <num1> <num2>\0Amul <num1> <num2>\0Adiv <num1> <num2>\0Amod <num1> <num2>\0A\0APublic-Key Cryptography:\0Arandom <length:bit> Random Number generate\0Aprime <length:bit> Big prime number generate\0Adh <length:bit> Diffie\E2\80\93Hellman key exchange\0A\0AOthers:\0Afib <n:int> nth item in fibonacci array\0A\00"
define i32 @show_help() {
%1 = alloca i8*
store i8* getelementptr inbounds ([392 x i8], [392 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = call i32 (...) @show_version()
%3 = load i8*, i8** %1
%4 = call i32 @puts(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [392 x i8] c"Usage : bigint <testname> <arguments>\0A\0AArithmetic:\0Aadd <num1> <num2>\0Asub <num1> <num2>\0Amul <num1> <num2>\0Adiv <num1> <num2>\0Amod <num1> <num2>\0A\0APublic-Key Cryptography:\0Arandom <length:bit> Random Number generate\0Aprime <length:bit> Big prime number generate\0Adh <length:bit> Diffie\E2\80\93Hellman key exchange\0A\0AOthers:\0Afib <n:int> nth item in fibonacci array\0A\00"
define i32 @show_help() {
%1 = tail call i32 (...) @show_version()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([392 x i8], [392 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void ShiftCharP(char **charp_ref) {
  char *charp;
  charp = *charp_ref;
  charp++;
  while (*charp != ' ' && *charp != '\0')
    charp++;
  *charp_ref = charp;
}


x86 assembly (clang, -O0):
<ShiftCharP>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1144 <ShiftCharP+0x44>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1154 <ShiftCharP+0x54>
jmp    1165 <ShiftCharP+0x65>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111f <ShiftCharP+0x1f>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShiftCharP>:
mov    (%rdi),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
testb  $0xdf,0x1(%rax)
lea    0x1(%rax),%rax
jne    1110 <ShiftCharP+0x10>
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @ShiftCharP(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
br label %8
8: ; preds = %20, %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 32
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %8
%19 = phi i1 [ false, %8 ], [ %17, %13 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %8
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = load i8**, i8*** %2
store i8* %24, i8** %25
ret void
}

LLVM IR (-O2):
define void @ShiftCharP(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ %2, %1 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
switch i8 %6, label %3 [
i8 32, label %7
i8 0, label %7
]
7: ; preds = %3, %3
store i8* %5, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintWelcome(void) {
  printf("\nmakefsfile - Generate a file containing a file system image.\n");
  printf("Copyright (c) 2008 Texas Instruments Incorporated.  All rights "
         "reserved.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [63 x i8] c"\0Amakefsfile - Generate a file containing a file system image.\0A\00"
@.str.1 = [75 x i8] c"Copyright (c) 2008 Texas Instruments Incorporated. All rights reserved.\0A\0A\00"
define void @PrintWelcome() {
%1 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [62 x i8] c"\0Amakefsfile - Generate a file containing a file system image.\00"
@str.2 = [74 x i8] c"Copyright (c) 2008 Texas Instruments Incorporated. All rights reserved.\0A\00"
define void @PrintWelcome() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void prior_free_unif(void *data) { free(data); }


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

x86 assembly (clang, -O2):
<prior_free_unif>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @prior_free_unif(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
char *k_strlwr(char *p) {
  char *s = p;
  for (; *s; ++s) {
    if ((*s >= 'A') && (*s <= 'Z'))
      *s += 'a' - 'A';
  }
  return p;
}


x86 assembly (clang, -O0):
<k_strlwr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <k_strlwr+0x5f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1149 <k_strlwr+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1149 <k_strlwr+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
jmp    114e <k_strlwr+0x4e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <k_strlwr+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<k_strlwr>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <k_strlwr+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <k_strlwr+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <k_strlwr+0x2c>
lea    -0x41(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <k_strlwr+0x10>
add    $0x20,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <k_strlwr+0x10>
ret

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

LLVM IR (-O2):
define i8* @k_strlwr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
void gtk_radio_menu_item_new_with_mnemonic() {}


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

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

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

LLVM IR (-O2):
define void @gtk_radio_menu_item_new_with_mnemonic() {
ret void
}
int is_digit(int v) { return (v >= 0x30 && v <= 0x39); }


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <is_digit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_digit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
struct cell *prim_list(struct cell *args) {
  return args;
}


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

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

LLVM IR (-O0):
%struct.cell = type opaque
define %struct.cell* @prim_list(%struct.cell* %0) {
%2 = alloca %struct.cell*
store %struct.cell* %0, %struct.cell** %2
%3 = load %struct.cell*, %struct.cell** %2
ret %struct.cell* %3
}

LLVM IR (-O2):
%struct.cell = type opaque
define %struct.cell* @prim_list(%struct.cell* readnone returned %0) {
ret %struct.cell* %0
}
int setruid(ruid)
int ruid;
{ return (setreuid(ruid, -1)); }


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

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

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

LLVM IR (-O2):
define i32 @setruid(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @setreuid to i32 (i32, i32, ...)*)(i32 %0, i32 -1)
ret i32 %2
}
void parser_end_copying() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_ui_manager_get_accel_group() {
ret void
}
void fn1(const int *p1) {
  static void *a = &&conv_1234_123C;
conv_1234_123C:;
}


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

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

LLVM IR (-O0):
@fn1.a = internal global i8* blockaddress(@fn1, %3)
define void @fn1(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
br label %3
3: ; preds = %1, %4
ret void
4: ; No predecessors!
indirectbr i8* undef, [label %3]
}

LLVM IR (-O2):
define void @fn1(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
scalar_t__ getppid();
int /*<<< orphan*/ kill(scalar_t__, int /*<<< orphan*/);
void sl_send_info(pid_t pid) {
  if (pid)
    kill(pid, SIGUSR1);
  else
    kill(getppid(), SIGUSR1);
}


x86 assembly (clang, -O0):
<sl_send_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114e <sl_send_info+0x2e>
mov    -0x8(%rbp),%rdi
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
jmp    1166 <sl_send_info+0x46>
mov    $0x0,%al
call   1040 <getppid@plt>
mov    %rax,%rdi
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sl_send_info>:
push   %rax
test   %rdi,%rdi
jne    1130 <sl_send_info+0x10>
xor    %eax,%eax
call   1040 <getppid@plt>
mov    %rax,%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
pop    %rax
jmp    1030 <kill@plt>

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define void @sl_send_info(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = load i32, i32* @SIGUSR1
%8 = call i32 @kill(i64 %6, i32 %7)
br label %13
9: ; preds = %1
%10 = call i64 (...) @getppid()
%11 = load i32, i32* @SIGUSR1
%12 = call i32 @kill(i64 %10, i32 %11)
br label %13
13: ; preds = %9, %5
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define void @sl_send_info(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i64 (...) @getppid()
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ %4, %3 ], [ %0, %1 ]
%7 = load i32, i32* @SIGUSR1
%8 = tail call i32 @kill(i64 %6, i32 %7)
ret void
}
unsigned int gen_seed(const double *const cs, const int n, const int k) {
  return n * k * ((int)cs[n / 2] * 100);
}


x86 assembly (clang, -O0):
<gen_seed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x14(%rbp),%eax
movslq %edx,%rdx
cvttsd2si (%rcx,%rdx,8),%ecx
imul   $0x64,%ecx,%ecx
imul   %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_seed>:
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
sar    %eax
cltq
cvttsd2si (%rdi,%rax,8),%eax
imul   %esi,%edx
imul   %eax,%edx
imul   $0x64,%edx,%eax
ret

LLVM IR (-O0):
define i32 @gen_seed(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = mul nsw i32 %7, %8
%10 = load double*, double** %4
%11 = load i32, i32* %5
%12 = sdiv i32 %11, 2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %10, i64 %13
%15 = load double, double* %14
%16 = fptosi double %15 to i32
%17 = mul nsw i32 %16, 100
%18 = mul nsw i32 %9, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @gen_seed(double* nocapture %0, i32 %1, i32 %2) {
%4 = sdiv i32 %1, 2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds double, double* %0, i64 %5
%7 = load double, double* %6
%8 = fptosi double %7 to i32
%9 = mul i32 %1, 100
%10 = mul i32 %9, %2
%11 = mul i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
unsigned long EPINonBlockingReadAvail(unsigned long ulBase) {
  DEBUG_ASSERT(ulBase == 0x400D0000);
  return ((*((volatile unsigned long *)(ulBase + 0x0000006C))));
}


x86 assembly (clang, -O0):
<EPINonBlockingReadAvail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x400d0000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0x6c(%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPINonBlockingReadAvail>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x400d0000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x6c(%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @EPINonBlockingReadAvail(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1074593792
%5 = zext i1 %4 to i32
%6 = call i32 @DEBUG_ASSERT(i32 %5)
%7 = load i64, i64* %2
%8 = add i64 %7, 108
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @EPINonBlockingReadAvail(i64 %0) {
%2 = icmp eq i64 %0, 1074593792
%3 = zext i1 %2 to i32
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = add i64 %0, 108
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
ret i64 %7
}
int getSystemCoreNum() {
  int nprocs = -1;
  return nprocs;
}


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

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

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

LLVM IR (-O2):
define i32 @getSystemCoreNum() {
ret i32 -1
}
/* Variables and functions */
char *ckmalloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
char *zmalloc(int bytes) {
  char *ptr = ckmalloc(bytes);
  if (ptr)
    memset(ptr, 0, bytes);
  return ptr;
}


x86 assembly (clang, -O0):
<zmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <ckmalloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1150 <zmalloc+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zmalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <ckmalloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113e <zmalloc+0x1e>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @zmalloc(i32 %0) {
%2 = tail call i8* @ckmalloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
char *_dup_str(char const *);
extern char *cfustring_dup_c_str(const char *str) { return _dup_str(str); }


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

x86 assembly (clang, -O2):
<cfustring_dup_c_str>:
jmp    1030 <_dup_str@plt>

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

LLVM IR (-O2):
define i8* @cfustring_dup_c_str(i8* %0) {
%2 = tail call i8* @_dup_str(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ ata_get_string(unsigned char const *, int, int, char *);
void ata_get_ata_identify_additional_product_identifier(
    const unsigned char *buf, char *out) {
  ata_get_string(buf, 170, 173, out);
}


x86 assembly (clang, -O0):
<ata_get_ata_identify_additional_product_identifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0xaa,%esi
mov    $0xad,%edx
call   1030 <ata_get_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ata_get_ata_identify_additional_product_identifier>:
mov    %rsi,%rcx
mov    $0xaa,%esi
mov    $0xad,%edx
jmp    1030 <ata_get_string@plt>

LLVM IR (-O0):
define void @ata_get_ata_identify_additional_product_identifier(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @ata_get_string(i8* %5, i32 170, i32 173, i8* %6)
ret void
}

LLVM IR (-O2):
define void @ata_get_ata_identify_additional_product_identifier(i8* %0, i8* %1) {
%3 = tail call i32 @ata_get_string(i8* %0, i32 170, i32 173, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;

/* Variables and functions */
int /*<<< orphan*/ memWrite(char **, float *, int);
void memWriteFloat(char **pPt, float val) {
  memWrite((pPt), &(val), sizeof(val));
}


x86 assembly (clang, -O0):
<memWriteFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memWriteFloat>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memWrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @memWriteFloat(i8** %0, float %1) {
%3 = alloca i8**
%4 = alloca float
store i8** %0, i8*** %3
store float %1, float* %4
%5 = load i8**, i8*** %3
%6 = call i32 @memWrite(i8** %5, float* %4, i32 4)
ret void
}

LLVM IR (-O2):
define void @memWriteFloat(i8** %0, float %1) {
%3 = alloca float
store float %1, float* %3
%4 = call i32 @memWrite(i8** %0, float* %3, i32 4)
ret void
}
void U_EMRWIDENPATH_print(const char *contents) { (void)(contents); }


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

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

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

LLVM IR (-O2):
define void @U_EMRWIDENPATH_print(i8* nocapture %0) {
ret void
}
__attribute__((no, noclone)) unsigned __int128 t100_5mul(signed __int128 x) {
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, (unsigned __int128)(0), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
test   $0x1,%al
jne    114f <t100_5mul+0x3f>
jmp    1156 <t100_5mul+0x46>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
xor    %eax,%eax
xor    %edx,%edx
ret

LLVM IR (-O0):
define { i64, i64 } @t100_5mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = icmp slt i128 %11, 0
%13 = sub i128 0, %11
%14 = select i1 %12, i128 %13, i128 %11
%15 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %14, i128 0)
%16 = extractvalue { i128, i1 } %15, 1
%17 = extractvalue { i128, i1 } %15, 0
%18 = icmp ne i128 %17, 0
%19 = and i1 %12, %18
%20 = or i1 %16, %19
%21 = sub i128 0, %17
%22 = select i1 %12, i128 %21, i128 %17
store i128 %22, i128* %6
br i1 %20, label %23, label %25
23: ; preds = %2
%24 = call i32 (...) @bar()
br label %25
25: ; preds = %23, %2
%26 = load i128, i128* %6
store i128 %26, i128* %3
%27 = bitcast i128* %3 to { i64, i64 }*
%28 = load { i64, i64 }, { i64, i64 }* %27
ret { i64, i64 } %28
}

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

/* Variables and functions */
int /*<<< orphan*/ fisError(char *);
int /*<<< orphan*/ printf(char *, char *);
FILE *fisOpenFile(char *file, char *mode) {
  FILE *fp, *fopen();
  if ((fp = fopen(file, mode)) == NULL) {
    printf("The file %s cannot be opened.", file);
    fisError("\n");
  }
  return (fp);
}


x86 assembly (clang, -O0):
<fisOpenFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1177 <fisOpenFile+0x47>
mov    -0x8(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    0xeac(%rip),%rdi
call   1030 <fisError@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fisOpenFile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115f <fisOpenFile+0x2f>
lea    0xeb5(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
call   1030 <fisError@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c"The file %s cannot be opened.\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32* @fisOpenFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @fisError(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %10, %2
%15 = load i32*, i32** %5
ret i32* %15
}

LLVM IR (-O2):
@.str = [30 x i8] c"The file %s cannot be opened.\00"
@.str.1 = [2 x i8] c"\0A\00"
define noalias i32* @fisOpenFile(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = tail call i32 @fisError(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %5, %2
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ rinit_vector(int *, unsigned int const);
void bench_random() {
  const static unsigned int iterations = 1;
  const static unsigned int size = 64;
  int i, j;
  int data[size];
  for (j = 0; j < iterations; j++) {
    for (i = 0; i < size; i++) {
      rinit_vector(data, size);
    }
  }
}


x86 assembly (clang, -O0):
<bench_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jae    1176 <bench_random+0x66>
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jae    1163 <bench_random+0x53>
lea    -0x110(%rbp),%rdi
mov    $0x40,%esi
call   1030 <rinit_vector@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113a <bench_random+0x2a>
jmp    1168 <bench_random+0x58>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <bench_random+0x19>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bench_random>:
push   %rbp
push   %rbx
sub    $0x108,%rsp
mov    $0x40,%ebp
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x40,%esi
call   1030 <rinit_vector@plt>
add    $0xffffffff,%ebp
jne    1130 <bench_random+0x20>
add    $0x108,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@bench_random.iterations = internal constant i32 1
@bench_random.size = internal constant i32 64
define void @bench_random() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = call i8* @llvm.stacksave()
store i8* %4, i8** %3
%5 = alloca i32, i64 64
store i32 0, i32* %2
br label %6
6: ; preds = %19, %0
%7 = load i32, i32* %2
%8 = icmp ult i32 %7, 1
br i1 %8, label %9, label %22
9: ; preds = %6
store i32 0, i32* %1
br label %10
10: ; preds = %15, %9
%11 = load i32, i32* %1
%12 = icmp ult i32 %11, 64
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = call i32 @rinit_vector(i32* %5, i32 64)
br label %15
15: ; preds = %13
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %10
18: ; preds = %10
br label %19
19: ; preds = %18
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %6
22: ; preds = %6
%23 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @bench_random() {
%1 = alloca [64 x i32]
%2 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = call i32 @rinit_vector(i32* %2, i32 64)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 64
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ *createCardSet();
int /*<<< orphan*/ *createPlayersGameData();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void beginGame(void) {
  if ((createCardSet() == NULL) || (createPlayersGameData() == NULL)) {
    fprintf(stderr, "Memory allocation error. Unable to run game.");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<beginGame>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <createCardSet@plt>
cmp    $0x0,%rax
je     1166 <beginGame+0x26>
mov    $0x0,%al
call   1050 <createPlayersGameData@plt>
cmp    $0x0,%rax
jne    1189 <beginGame+0x49>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
lea    0xe8a(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<beginGame>:
push   %rax
xor    %eax,%eax
call   1030 <createCardSet@plt>
test   %rax,%rax
je     115b <beginGame+0x1b>
xor    %eax,%eax
call   1050 <createPlayersGameData@plt>
test   %rax,%rax
je     115b <beginGame+0x1b>
pop    %rax
ret
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"Memory allocation error. Unable to run game.\00"
@EXIT_FAILURE = global i32 0
define void @beginGame() {
%1 = call i32* (...) @createCardSet()
%2 = icmp eq i32* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i32* (...) @createPlayersGameData()
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %11
6: ; preds = %3, %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"Memory allocation error. Unable to run game.\00"
@EXIT_FAILURE = global i32 0
define void @beginGame() {
%1 = tail call i32* (...) @createCardSet()
%2 = icmp eq i32* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32* (...) @createPlayersGameData()
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %11
6: ; preds = %3, %0
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _writei(int, int);
int /*<<< orphan*/ write(int, char *, int);
void _writeslen(int fd, char *s, int i) {
  _writei(fd, i);
  write(fd, s, i);
}


x86 assembly (clang, -O0):
<_writeslen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <_writei@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_writeslen>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%ebp
mov    %edx,%esi
call   1040 <_writei@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @_writeslen(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @_writei(i32 %0, i32 %2)
%5 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
ret void
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  unsigned char local1;
  {
    state[0UL] = (input[0UL] & 914778474UL) << (unsigned char)7;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] &= state[local1];
      local1++;
    }
    output[0UL] = (state[0UL] << (unsigned char)1) >> (unsigned char)1;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0x3686696a,%rax
shl    $0x7,%rax
mov    %al,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x1,%rax
jae    1151 <RandomFunc+0x51>
movzbl -0x12(%rbp),%eax
movzbl -0x11(%rbp,%rax,1),%ecx
movzbl -0x11(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x11(%rbp)
mov    -0x12(%rbp),%al
add    $0x1,%al
mov    %al,-0x12(%rbp)
jmp    1124 <RandomFunc+0x24>
movzbl -0x11(%rbp),%eax
shl    $0x1,%eax
sar    $0x1,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movb   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i64
%11 = and i64 %10, 914778474
%12 = shl i64 %11, 7
%13 = trunc i64 %12 to i8
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %13, i8* %14
store i8 0, i8* %6
br label %15
15: ; preds = %19, %2
%16 = load i8, i8* %6
%17 = zext i8 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %32
19: ; preds = %15
%20 = load i8, i8* %6
%21 = zext i8 %20 to i64
%22 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = and i32 %27, %24
%29 = trunc i32 %28 to i8
store i8 %29, i8* %25
%30 = load i8, i8* %6
%31 = add i8 %30, 1
store i8 %31, i8* %6
br label %15
32: ; preds = %15
%33 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = shl i32 %35, 1
%37 = ashr i32 %36, 1
%38 = trunc i32 %37 to i8
%39 = load i8*, i8** %4
%40 = getelementptr inbounds i8, i8* %39, i64 0
store i8 %38, i8* %40
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture readnone %0, i8* nocapture writeonly %1) {
store i8 0, i8* %1
ret void
}
/* Variables and functions */
int syscall_cp(int, int, void const *, size_t, int);
int msgsnd(int q, const void *m, size_t len, int flag) {
  return syscall_cp(301, q, m, len, flag);
}


x86 assembly (clang, -O0):
<msgsnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x12d,%edi
call   1030 <syscall_cp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgsnd>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x12d,%edi
jmp    1030 <syscall_cp@plt>

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

LLVM IR (-O2):
define i32 @msgsnd(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @syscall_cp(i32 301, i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ finalize();
int /*<<< orphan*/ opencscad_init();
int /*<<< orphan*/ tower(double, int);
int main(int argc, char *argv[]) {
  opencscad_init();
  tower(70.0, 70 * 5.0);
  finalize();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <opencscad_init@plt>
movsd  0xeb2(%rip),%xmm0
mov    $0x15e,%edi
call   1050 <tower@plt>
mov    $0x0,%al
call   1030 <finalize@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <opencscad_init@plt>
movsd  0xec0(%rip),%xmm0
mov    $0x15e,%edi
call   1050 <tower@plt>
xor    %eax,%eax
call   1030 <finalize@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @opencscad_init()
%6 = call i32 @tower(double 7.000000e+01, i32 350)
%7 = call i32 (...) @finalize()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @opencscad_init()
%4 = tail call i32 @tower(double 7.000000e+01, i32 350)
%5 = tail call i32 (...) @finalize()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int uint32_cmp(const void *l1, const void *l2) {
  if (*(uint32_t *)l1 > *(uint32_t *)l2)
    return -1;
  if (*(uint32_t *)l1 < *(uint32_t *)l2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<uint32_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jle    112c <uint32_cmp+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <uint32_cmp+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jge    114c <uint32_cmp+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <uint32_cmp+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint32_cmp>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @uint32_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp slt i64 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ wNotYet(char *);
void wBuiltinQuickSort() { wNotYet("QuickSort"); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"QuickSort\00"
define void @wBuiltinQuickSort() {
%1 = tail call i32 @wNotYet(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_D1uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xD1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D1uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0xd1,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D1uint64_midword_reg>:
test   $0xd10000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D1uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 209
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_D1uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 13697024
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ add(unsigned char *, unsigned char *, unsigned char *);
int main() {
  unsigned char num1[] = "987654321";
  unsigned char num2[] = "123456789";
  unsigned char nadd[10];
  add(num1, num2, nadd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xede(%rip),%ax
mov    %ax,-0x2(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    0xed2(%rip),%ax
mov    %ax,-0xc(%rbp)
lea    -0xa(%rbp),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x1e(%rbp),%rdx
call   1030 <add@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movabs $0x3233343536373839,%rax
34 33 32
mov    %rax,0x10(%rsp)
movw   $0x31,0x18(%rsp)
movabs $0x3837363534333231,%rax
36 37 38
mov    %rax,(%rsp)
movw   $0x39,0x8(%rsp)
lea    0x10(%rsp),%rdi
mov    %rsp,%rsi
lea    0x1e(%rsp),%rdx
call   1030 <add@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.num1 = [10 x i8] c"987654321\00"
@__const.main.num2 = [10 x i8] c"123456789\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = alloca [10 x i8]
%4 = bitcast [10 x i8]* %1 to i8*
%5 = bitcast [10 x i8]* %2 to i8*
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%9 = call i32 @add(i8* %6, i8* %7, i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.num1 = [10 x i8] c"987654321\00"
@__const.main.num2 = [10 x i8] c"123456789\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = call i32 @add(i8* %4, i8* %5, i8* %6)
ret i32 0
}
int(test_and_set_bit)(int nr, unsigned long volatile *addr) {
  int oldbit;
  {
    ;
    return (oldbit);
  }
}


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

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

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

LLVM IR (-O2):
define i32 @test_and_set_bit(i32 %0, i64* nocapture readnone %1) {
ret i32 undef
}