xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
void error(char *str) {
  if (strcmp(str, "arg") == 0)
    fprintf(stderr, "Chyba argumentu zadejte argument --help pro upresneni\n");
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115b <error+0x3b>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rax
lea    0xed8(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1134 <error+0x14>
pop    %rax
ret
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
pop    %rax
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"arg\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Chyba argumentu zadejte argument --help pro upresneni\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"arg\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Chyba argumentu zadejte argument --help pro upresneni\0A\00"
define void @error(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %4, %1
ret void
}
unsigned long mss_envm_size(void) { return (1024 * 256); }


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

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

LLVM IR (-O0):
define i64 @mss_envm_size() {
ret i64 262144
}

LLVM IR (-O2):
define i64 @mss_envm_size() {
ret i64 262144
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, size_t);
void __aeabi_memset(void *dest, size_t n, int c) { memset(dest, c, n); }


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

x86 assembly (clang, -O2):
<__aeabi_memset>:
mov    %rsi,%rax
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @__aeabi_memset(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = load i64, i64* %5
%10 = call i32 @memset(i8* %7, i32 %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @__aeabi_memset(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %2, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(char *p, int length) {
  for (int i = 0; i < length; i++)
    printf("%c ", p[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <print_array+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1158 <print_array+0x38>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

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

/* Variables and functions */
uint8_t get_byte(uint32_t word, int byte) {
  uint32_t mask = 0xFF000000;
  mask >>= (byte * 8);
  return (word & mask) >> (24 - (byte * 8));
}


x86 assembly (clang, -O0):
<get_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xff000000,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
mov    -0xc(%rbp),%eax
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x3,%edx
mov    $0x18,%ecx
sub    %edx,%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_byte>:
mov    %esi,%ecx
shl    $0x3,%ecx
mov    $0xff000000,%eax
sar    %cl,%eax
and    %edi,%eax
mov    $0x18,%dl
sub    %cl,%dl
mov    %edx,%ecx
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @get_byte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 -16777216, i32* %5
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 8
%8 = load i32, i32* %5
%9 = ashr i32 %8, %7
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = and i32 %10, %11
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 8
%15 = sub nsw i32 24, %14
%16 = ashr i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_byte(i32 %0, i32 %1) {
%3 = shl nsw i32 %1, 3
%4 = ashr i32 -16777216, %3
%5 = and i32 %4, %0
%6 = sub nsw i32 24, %3
%7 = ashr i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int cupkee_module_export(void *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ val_mk_boolean(int);
int cupkee_module_export_boolean(void *m, const char *k, int v) {
  return cupkee_module_export(m, k, val_mk_boolean(v));
}


x86 assembly (clang, -O0):
<cupkee_module_export_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <val_mk_boolean@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <cupkee_module_export@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cupkee_module_export_boolean>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %edx,%edi
call   1030 <val_mk_boolean@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <cupkee_module_export@plt>

LLVM IR (-O0):
define i32 @cupkee_module_export_boolean(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @val_mk_boolean(i32 %9)
%11 = call i32 @cupkee_module_export(i8* %7, i8* %8, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @cupkee_module_export_boolean(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @val_mk_boolean(i32 %2)
%5 = tail call i32 @cupkee_module_export(i8* %0, i8* %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int LINES;
int /*<<< orphan*/ addstr(char *);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ refresh();
int main(int argc, char *argv[]) {
  initscr();
  clear();
  move(10, 20);
  addstr("Helo, world");
  move(LINES - 1, 0);
  refresh();
  getch();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
mov    $0x0,%al
call   1080 <clear@plt>
mov    $0xa,%edi
mov    $0x14,%esi
call   1090 <move@plt>
lea    0xe56(%rip),%rdi
call   1070 <addstr@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
sub    $0x1,%edi
xor    %esi,%esi
call   1090 <move@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <getch@plt>
mov    $0x0,%al
call   1060 <endwin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initscr@plt>
xor    %eax,%eax
call   1080 <clear@plt>
mov    $0xa,%edi
mov    $0x14,%esi
call   1090 <move@plt>
lea    0xe6b(%rip),%rdi
call   1070 <addstr@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
add    $0xffffffff,%edi
xor    %esi,%esi
call   1090 <move@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
call   1060 <endwin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Helo, world\00"
@LINES = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @initscr()
%7 = call i32 (...) @clear()
%8 = call i32 @move(i32 10, i32 20)
%9 = call i32 @addstr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @LINES
%11 = sub nsw i32 %10, 1
%12 = call i32 @move(i32 %11, i32 0)
%13 = call i32 (...) @refresh()
%14 = call i32 (...) @getch()
%15 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Helo, world\00"
@LINES = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initscr()
%4 = tail call i32 (...) @clear()
%5 = tail call i32 @move(i32 10, i32 20)
%6 = tail call i32 @addstr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @LINES
%8 = add nsw i32 %7, -1
%9 = tail call i32 @move(i32 %8, i32 0)
%10 = tail call i32 (...) @refresh()
%11 = tail call i32 (...) @getch()
%12 = tail call i32 (...) @endwin()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void usage(void) {
  printf("options:\n"
         "    -i <input file>           this option is mandatory\n"
         "    -p <port>                 wait connection on given port (default "
         "%d)\n"
         "    -w                        user must press a key after each sent "
         "event\n",
         2021);
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x7e5,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [212 x i8] c"options:\0A -i <input file> this option is mandatory\0A -p <port> wait connection on given port (default %d)\0A -w user must press a key after each sent event\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i32 2021)
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [212 x i8] c"options:\0A -i <input file> this option is mandatory\0A -p <port> wait connection on given port (default %d)\0A -w user must press a key after each sent event\0A\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i32 2021)
%2 = tail call i32 @exit(i32 1)
unreachable
}
void OBJ_NAME_add(void) {}


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

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

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

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

/* Variables and functions */
struct typed_rb_entry *rbe_remove(struct typed_rb_root *,
                                  struct typed_rb_entry *);
struct typed_rb_entry *typed_rb_remove(struct typed_rb_root *rbt,
                                       struct typed_rb_entry *rbe) {
  return rbe_remove(rbt, rbe);
}


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

x86 assembly (clang, -O2):
<typed_rb_remove>:
jmp    1030 <rbe_remove@plt>

LLVM IR (-O0):
%struct.typed_rb_root = type { i32 }
%struct.typed_rb_entry = type { i32 }
define %struct.typed_rb_entry* @typed_rb_remove(%struct.typed_rb_root* %0, %struct.typed_rb_entry* %1) {
%3 = alloca %struct.typed_rb_root*
%4 = alloca %struct.typed_rb_entry*
store %struct.typed_rb_root* %0, %struct.typed_rb_root** %3
store %struct.typed_rb_entry* %1, %struct.typed_rb_entry** %4
%5 = load %struct.typed_rb_root*, %struct.typed_rb_root** %3
%6 = load %struct.typed_rb_entry*, %struct.typed_rb_entry** %4
%7 = call %struct.typed_rb_entry* @rbe_remove(%struct.typed_rb_root* %5, %struct.typed_rb_entry* %6)
ret %struct.typed_rb_entry* %7
}

LLVM IR (-O2):
%struct.typed_rb_root = type { i32 }
%struct.typed_rb_entry = type { i32 }
define %struct.typed_rb_entry* @typed_rb_remove(%struct.typed_rb_root* %0, %struct.typed_rb_entry* %1) {
%3 = tail call %struct.typed_rb_entry* @rbe_remove(%struct.typed_rb_root* %0, %struct.typed_rb_entry* %1)
ret %struct.typed_rb_entry* %3
}
/* Variables and functions */
scalar_t__ sqrt(int);
int bulbSwitch3(int n) { return (int)sqrt(n); }


x86 assembly (clang, -O0):
<bulbSwitch3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bulbSwitch3>:
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define i32 @bulbSwitch3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @sqrt(i32 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @bulbSwitch3(i32 %0) {
%2 = tail call i64 @sqrt(i32 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ acc_free(void *);
void *acc_malloc(int const);
int /*<<< orphan*/ acc_map_data(unsigned char *, int /*<<< orphan*/, int const);
int /*<<< orphan*/ acc_unmap_data(unsigned char *);
int /*<<< orphan*/ free(unsigned char *);
scalar_t__ malloc(int const);
int main(int argc, char **argv) {
  const int N = 256;
  unsigned char *h;
  void *d;
  h = (unsigned char *)malloc(N);
  d = acc_malloc(N);
  acc_map_data(h, 0, N);
  acc_unmap_data(h);
  acc_free(d);
  free(h);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x100,-0x14(%rbp)
mov    $0x100,%edi
call   1070 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x100,%edi
call   1040 <acc_malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <acc_map_data@plt>
mov    -0x20(%rbp),%rdi
call   1050 <acc_unmap_data@plt>
mov    -0x28(%rbp),%rdi
call   1080 <acc_free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x100,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0x100,%edi
call   1040 <acc_malloc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <acc_map_data@plt>
mov    %rbx,%rdi
call   1050 <acc_unmap_data@plt>
mov    %r14,%rdi
call   1080 <acc_free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 256, i32* %6
%9 = call i64 @malloc(i32 256)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = call i8* @acc_malloc(i32 256)
store i8* %11, i8** %8
%12 = load i8*, i8** %7
%13 = call i32 @acc_map_data(i8* %12, i32 0, i32 256)
%14 = load i8*, i8** %7
%15 = call i32 @acc_unmap_data(i8* %14)
%16 = load i8*, i8** %8
%17 = call i32 @acc_free(i8* %16)
%18 = load i8*, i8** %7
%19 = call i32 @free(i8* %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 256)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i8* @acc_malloc(i32 256)
%6 = tail call i32 @acc_map_data(i8* %4, i32 0, i32 256)
%7 = tail call i32 @acc_unmap_data(i8* %4)
%8 = tail call i32 @acc_free(i8* %5)
%9 = tail call i32 @free(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xmpp_hash_free(void *p) { free(p); }


x86 assembly (clang, -O0):
<xmpp_hash_free>:
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):
<xmpp_hash_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @xmpp_hash_free(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 @xmpp_hash_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void useropt(const char *arg) {
  fprintf(stderr, "unknown user option: %s.  Ignoring.\n", arg);
}


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

x86 assembly (clang, -O2):
<useropt>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"unknown user option: %s. Ignoring.\0A\00"
define void @useropt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"unknown user option: %s. Ignoring.\0A\00"
define void @useropt(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
double env_maze_maxpayoff(const struct XCSF *xcsf) {
  (void)xcsf;
  return (1.);
}


x86 assembly (clang, -O0):
<env_maze_maxpayoff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.XCSF = type opaque
define double @env_maze_maxpayoff(%struct.XCSF* %0) {
%2 = alloca %struct.XCSF*
store %struct.XCSF* %0, %struct.XCSF** %2
%3 = load %struct.XCSF*, %struct.XCSF** %2
ret double 1.000000e+00
}

LLVM IR (-O2):
%struct.XCSF = type opaque
define double @env_maze_maxpayoff(%struct.XCSF* nocapture readnone %0) {
ret double 1.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ box(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void clear_win_char(WINDOW *wp) {
  wclear(wp);
  box(wp, 0, 0);
  wrefresh(wp);
  return;
}


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

x86 assembly (clang, -O2):
<clear_win_char>:
push   %rbx
mov    %rdi,%rbx
call   1050 <wclear@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <box@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wrefresh@plt>

LLVM IR (-O0):
define void @clear_win_char(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @wclear(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @box(i32* %5, i32 0, i32 0)
%7 = load i32*, i32** %2
%8 = call i32 @wrefresh(i32* %7)
ret void
}

LLVM IR (-O2):
define void @clear_win_char(i32* %0) {
%2 = tail call i32 @wclear(i32* %0)
%3 = tail call i32 @box(i32* %0, i32 0, i32 0)
%4 = tail call i32 @wrefresh(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ leconvert_uint32_to(int /*<<< orphan*/);
int32_t leconvert_int32_to(int32_t native) {
  return leconvert_uint32_to(native);
}


x86 assembly (clang, -O0):
<leconvert_int32_to>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <leconvert_uint32_to@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leconvert_int32_to>:
jmp    1030 <leconvert_uint32_to@plt>

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

LLVM IR (-O2):
define i32 @leconvert_int32_to(i32 %0) {
%2 = tail call i32 @leconvert_uint32_to(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 0xefbeadde;
  printf("0x%x\n", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -272716322)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("use AF4 as default\n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"use AF4 as default\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"use AF4 as default\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double *realloc(double *, int);
int reserve_double(int n, double **arr) {
  int ok = 0;
  double *newArr = realloc(*arr, n * sizeof(double));
  if (newArr) {
    *arr = newArr;
    ok = 1;
  }
  return ok;
}


x86 assembly (clang, -O0):
<reserve_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%esi
call   1030 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115d <reserve_double+0x4d>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reserve_double>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rax
lea    0x0(,%rdi,8),%esi
mov    %rax,%rdi
call   1030 <realloc@plt>
test   %rax,%rax
je     1135 <reserve_double+0x25>
mov    %rax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @reserve_double(i32 %0, double** %1) {
%3 = alloca i32
%4 = alloca double**
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store double** %1, double*** %4
store i32 0, i32* %5
%7 = load double**, double*** %4
%8 = load double*, double** %7
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 8
%12 = trunc i64 %11 to i32
%13 = call double* @realloc(double* %8, i32 %12)
store double* %13, double** %6
%14 = load double*, double** %6
%15 = icmp ne double* %14, null
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = load double*, double** %6
%18 = load double**, double*** %4
store double* %17, double** %18
store i32 1, i32* %5
br label %19
19: ; preds = %16, %2
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @reserve_double(i32 %0, double** nocapture %1) {
%3 = load double*, double** %1
%4 = shl i32 %0, 3
%5 = tail call double* @realloc(double* %3, i32 %4)
%6 = icmp eq double* %5, null
br i1 %6, label %8, label %7
7: ; preds = %2
store double* %5, double** %1
br label %8
8: ; preds = %7, %2
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ flush();
int /*<<< orphan*/ putc(char);
void putstr(const char *ptr) {
  char c;
  while ((c = *ptr++) != '\0') {
    if (c == '\n')
      putc('\r');
    putc(c);
  }
  flush();
}


x86 assembly (clang, -O0):
<putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1171 <putstr+0x51>
movsbl -0x9(%rbp),%eax
cmp    $0xa,%eax
jne    1163 <putstr+0x43>
mov    $0xd,%edi
call   1040 <putc@plt>
movsbl -0x9(%rbp),%edi
call   1040 <putc@plt>
jmp    112c <putstr+0xc>
mov    $0x0,%al
call   1030 <flush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putstr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
jmp    1146 <putstr+0x26>
nopl   0x0(%rax)
mov    $0xd,%edi
call   1040 <putc@plt>
add    $0x1,%r14
movsbl %bl,%edi
call   1040 <putc@plt>
movzbl (%r14),%ebx
cmp    $0xa,%bl
je     1130 <putstr+0x10>
test   %bl,%bl
jne    113a <putstr+0x1a>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <flush@plt>

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

LLVM IR (-O2):
define void @putstr(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %4, %8 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %10
i8 10, label %6
]
6: ; preds = %2
%7 = tail call i32 @putc(i8 signext 13)
br label %8
8: ; preds = %2, %6
%9 = tail call i32 @putc(i8 signext %5)
br label %2
10: ; preds = %2
%11 = tail call i32 (...) @flush()
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ times(struct tms *);
void set_seed_for_random_number_generation(void) {
  struct tms tmsbuf;
  srandom(times(&tmsbuf));
}


x86 assembly (clang, -O0):
<set_seed_for_random_number_generation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <times@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_seed_for_random_number_generation>:
push   %rax
mov    %rsp,%rdi
call   1040 <times@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srandom@plt>

LLVM IR (-O0):
%struct.tms = type { i32 }
define void @set_seed_for_random_number_generation() {
%1 = alloca %struct.tms
%2 = call i32 @times(%struct.tms* %1)
%3 = call i32 @srandom(i32 %2)
ret void
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define void @set_seed_for_random_number_generation() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = call i32 @times(%struct.tms* %1)
%4 = tail call i32 @srandom(i32 %3)
ret void
}
void gcspy_wait(int ms) {}


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

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

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

LLVM IR (-O2):
define void @gcspy_wait(i32 %0) {
ret void
}
/* Variables and functions */
int addTwoNumbers(int, int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, int);
int scanf(char *, int *, int *);
int main() {
  int a, b;
  assert(scanf("%d%d", &a, &b) == 2);
  int ans = addTwoNumbers(a, b);
  printf("%d\n", ans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1060 <scanf@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <addTwoNumbers@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1060 <scanf@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1050 <assert@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1030 <addTwoNumbers@plt>
lea    0xe8f(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%6 = icmp eq i32 %5, 2
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @addTwoNumbers(i32 %9, i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = icmp eq i32 %5, 2
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @addTwoNumbers(i32 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Variables and functions */
void plat_video_menu_leave(void) {}


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

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

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

LLVM IR (-O2):
define void @plat_video_menu_leave() {
ret void
}
/* Variables and functions */
void *ft_memset(void *b, int c, size_t len) {
  size_t i;
  unsigned char *ptr;
  i = 0;
  ptr = ((unsigned char *)b);
  while (i < len) {
    ptr[i] = ((unsigned char)c);
    i++;
  }
  return (b);
}


x86 assembly (clang, -O0):
<ft_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    114e <ft_memset+0x4e>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111f <ft_memset+0x1f>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memset>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     1121 <ft_memset+0x11>
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %3
ret i8* %0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISREG(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
bool file_exists(const char *path) {
  struct stat st;
  if (stat(path, &st) != 0) {
    return false;
  }
  if (S_ISREG(st.st_mode)) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     114f <file_exists+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1174 <file_exists+0x54>
mov    -0x18(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
je     116d <file_exists+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <file_exists+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <file_exists+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @S_ISREG(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 1, i32* %2
br label %16
15: ; preds = %9
store i32 0, i32* %2
br label %16
16: ; preds = %15, %14, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISREG(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
void MPI_Recv() {}


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

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

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

LLVM IR (-O2):
define void @MPI_Recv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_RADIO_VREF_OUTPUT() { set_io_bit(-3, 1); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RADIO_VREF_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffd,%edi
mov    $0x1,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RADIO_VREF_OUTPUT>:
mov    $0xfffffffd,%edi
mov    $0x1,%esi
jmp    1030 <set_io_bit@plt>

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

LLVM IR (-O2):
define void @TOSH_MAKE_RADIO_VREF_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 -3, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnge_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpnge_sd(__m128d A, __m128d B) { return _mm_cmpnge_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_cmpnge_sd>:
jmp    1030 <_mm_cmpnge_sd@plt>

LLVM IR (-O0):
define i32 @test_mm_cmpnge_sd(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 @_mm_cmpnge_sd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_cmpnge_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnge_sd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int run_with_arg(char const *, char *, char const *);
int hook(const char *p1, const char *p2) {
  return run_with_arg(p1, "hook", p2);
}


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

x86 assembly (clang, -O2):
<hook>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <run_with_arg@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"hook\00"
define i32 @hook(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 @run_with_arg(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [5 x i8] c"hook\00"
define i32 @hook(i8* %0, i8* %1) {
%3 = tail call i32 @run_with_arg(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 %3
}
void HSMMCSDBlkLenSet(unsigned int baseAddr, unsigned int blklen) {
  (*((volatile unsigned int *)(baseAddr + (0x204)))) &= ~(0x00000FFFu);
  (*((volatile unsigned int *)(baseAddr + (0x204)))) |= blklen;
}


x86 assembly (clang, -O0):
<HSMMCSDBlkLenSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffff000,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HSMMCSDBlkLenSet>:
add    $0x204,%edi
andl   $0xfffff000,(%rdi)
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @HSMMCSDBlkLenSet(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 = add i32 %5, 516
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -4096
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = add i32 %12, 516
%14 = zext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = or i32 %16, %11
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @HSMMCSDBlkLenSet(i32 %0, i32 %1) {
%3 = add i32 %0, 516
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -4096
store volatile i32 %7, i32* %5
%8 = load volatile i32, i32* %5
%9 = or i32 %8, %1
store volatile i32 %9, i32* %5
ret void
}
int ltrim(float x) {
  int di = x + ((x > 0) ? 0.5f : -0.5f);
  di += (x - di == 0.5f);
  return di;
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xee5(%rip),%xmm4
movss  0xee1(%rip),%xmm3
xorps  %xmm1,%xmm1
cmpltss %xmm2,%xmm1
movaps %xmm1,%xmm2
andps  %xmm4,%xmm2
andnps %xmm3,%xmm1
orps   %xmm2,%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  0xea8(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
lea    0xeee(%rip),%rcx
movss  (%rcx,%rax,4),%xmm1
addss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
cvttps2dq %xmm1,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
cmpeqss 0xed5(%rip),%xmm0
movd   %xmm0,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ltrim(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = load float, float* %2
%6 = fcmp ogt float %5, 0.000000e+00
%7 = zext i1 %6 to i64
%8 = select i1 %6, float 5.000000e-01, float -5.000000e-01
%9 = fadd float %4, %8
%10 = fptosi float %9 to i32
store i32 %10, i32* %3
%11 = load float, float* %2
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to float
%14 = fsub float %11, %13
%15 = fcmp oeq float %14, 5.000000e-01
%16 = zext i1 %15 to i32
%17 = load i32, i32* %3
%18 = add nsw i32 %17, %16
store i32 %18, i32* %3
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @ltrim(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float 5.000000e-01, float -5.000000e-01
%4 = fadd float %3, %0
%5 = fptosi float %4 to i32
%6 = sitofp i32 %5 to float
%7 = fsub float %0, %6
%8 = fcmp oeq float %7, 5.000000e-01
%9 = zext i1 %8 to i32
%10 = add nsw i32 %9, %5
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ uvarint_decode32(int /*<<< orphan*/ *, int,
                                    int /*<<< orphan*/ *);
uint32_t *Varint_To_Num_32(uint8_t TON32INPUT[60]) {
  static uint32_t varintdecode_032 = 0;
  uvarint_decode32(TON32INPUT, 60, &varintdecode_032);
  return &varintdecode_032;
}


x86 assembly (clang, -O0):
<Varint_To_Num_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3c,%esi
lea    0x2f00(%rip),%rdx
call   1030 <uvarint_decode32@plt>
lea    0x2ef4(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Varint_To_Num_32>:
push   %rbx
lea    0x2f14(%rip),%rbx
mov    $0x3c,%esi
mov    %rbx,%rdx
call   1030 <uvarint_decode32@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@Varint_To_Num_32.varintdecode_032 = internal global i32 0
define i32* @Varint_To_Num_32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @uvarint_decode32(i32* %3, i32 60, i32* @Varint_To_Num_32.varintdecode_032)
ret i32* @Varint_To_Num_32.varintdecode_032
}

LLVM IR (-O2):
@Varint_To_Num_32.varintdecode_032 = internal global i32 0
define i32* @Varint_To_Num_32(i32* %0) {
%2 = tail call i32 @uvarint_decode32(i32* %0, i32 60, i32* @Varint_To_Num_32.varintdecode_032)
ret i32* @Varint_To_Num_32.varintdecode_032
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int read_at_le32(void const *, int);
int read_le32(void const *);
uint64_t read_le64(const void *src) {
  uint64_t val;
  val = read_at_le32(src, sizeof(uint32_t));
  val <<= 32;
  val |= read_le32(src);
  return val;
}


x86 assembly (clang, -O0):
<read_le64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <read_at_le32@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <read_le32@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_le64>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%esi
call   1030 <read_at_le32@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <read_le32@plt>

LLVM IR (-O0):
define i32 @read_le64(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @read_at_le32(i8* %4, i32 4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 32
store i32 %7, i32* %3
%8 = load i8*, i8** %2
%9 = call i32 @read_le32(i8* %8)
%10 = load i32, i32* %3
%11 = or i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @read_le64(i8* %0) {
%2 = tail call i32 @read_at_le32(i8* %0, i32 4)
%3 = tail call i32 @read_le32(i8* %0)
ret i32 poison
}