xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noraw();
int /*<<< orphan*/ stdscr;
void lnxcdispFinal() {
  noraw();
  nodelay(stdscr, FALSE);
  keypad(stdscr, FALSE);
  endwin();
}


x86 assembly (clang, -O0):
<lnxcdispFinal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <noraw@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
call   1050 <nodelay@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    0x2e66(%rip),%rax
mov    (%rax),%esi
call   1030 <keypad@plt>
mov    $0x0,%al
call   1060 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lnxcdispFinal>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <noraw@plt>
mov    0x2e96(%rip),%r14
mov    (%r14),%edi
mov    0x2e7c(%rip),%rbx
mov    (%rbx),%esi
call   1050 <nodelay@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
call   1030 <keypad@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <endwin@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@FALSE = global i32 0
define void @lnxcdispFinal() {
%1 = call i32 (...) @noraw()
%2 = load i32, i32* @stdscr
%3 = load i32, i32* @FALSE
%4 = call i32 @nodelay(i32 %2, i32 %3)
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @FALSE
%7 = call i32 @keypad(i32 %5, i32 %6)
%8 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@FALSE = global i32 0
define void @lnxcdispFinal() {
%1 = tail call i32 (...) @noraw()
%2 = load i32, i32* @stdscr
%3 = load i32, i32* @FALSE
%4 = tail call i32 @nodelay(i32 %2, i32 %3)
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @FALSE
%7 = tail call i32 @keypad(i32 %5, i32 %6)
%8 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ restore_tty();
void sigint_handler(int a) {
  restore_tty();
  exit(1);
}


x86 assembly (clang, -O0):
<sigint_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <restore_tty@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigint_handler>:
push   %rax
xor    %eax,%eax
call   1030 <restore_tty@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @sigint_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @restore_tty()
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @sigint_handler(i32 %0) {
%2 = tail call i32 (...) @restore_tty()
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char const *);
char *getcwd(char *, int);
int /*<<< orphan*/ printf(char *, char *);
void test4() {
  char buf[255];
  char *pwd = getcwd(buf, 255);
  printf("Your are in the %s\n", pwd);
  const char *cwd = "/usr";
  chdir(cwd);
  pwd = getcwd(buf, 255);
  printf("Your are in the %s\n", pwd);
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x100(%rbp),%rdi
mov    $0xff,%esi
call   1050 <getcwd@plt>
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
lea    0xea7(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    -0x110(%rbp),%rdi
call   1030 <chdir@plt>
lea    -0x100(%rbp),%rdi
mov    $0xff,%esi
call   1050 <getcwd@plt>
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rsi
lea    0xe5a(%rip),%rdi
call   1040 <printf@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0xff,%esi
call   1050 <getcwd@plt>
lea    0xeaf(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
call   1030 <chdir@plt>
mov    %r14,%rdi
mov    $0xff,%esi
call   1050 <getcwd@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Your are in the %s\0A\00"
@.str.1 = [5 x i8] c"/usr\00"
define void @test4() {
%1 = alloca [255 x i8]
%2 = alloca i8*
%3 = alloca i8*
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%5 = call i8* @getcwd(i8* %4, i32 255)
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6)
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @chdir(i8* %8)
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%11 = call i8* @getcwd(i8* %10, i32 255)
store i8* %11, i8** %2
%12 = load i8*, i8** %2
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Your are in the %s\0A\00"
@.str.1 = [5 x i8] c"/usr\00"
define void @test4() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i8* @getcwd(i8* %2, i32 255)
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @chdir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = call i8* @getcwd(i8* %2, i32 255)
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}
int XGetWMNormalHints() {}


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

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

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

LLVM IR (-O2):
define i32 @XGetWMNormalHints() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ _fail(char const *const, int const);
int /*<<< orphan*/ values_not_equal_display_error(int /*<<< orphan*/ const,
                                                  int /*<<< orphan*/ const);
void _assert_int_not_equal(const uint64_t a, const uint64_t b,
                           const char *const file, const int line) {
  if (!values_not_equal_display_error(a, b)) {
    _fail(file, line);
  }
}


x86 assembly (clang, -O0):
<_assert_int_not_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <values_not_equal_display_error@plt>
cmp    $0x0,%eax
jne    1155 <_assert_int_not_equal+0x35>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <_fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert_int_not_equal>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
call   1040 <values_not_equal_display_error@plt>
test   %eax,%eax
je     1138 <_assert_int_not_equal+0x18>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_fail@plt>

LLVM IR (-O0):
define void @_assert_int_not_equal(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @values_not_equal_display_error(i32 %9, i32 %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %17, label %13
13: ; preds = %4
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i32 @_fail(i8* %14, i32 %15)
br label %17
17: ; preds = %13, %4
ret void
}

LLVM IR (-O2):
define void @_assert_int_not_equal(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @values_not_equal_display_error(i32 %0, i32 %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @_fail(i8* %2, i32 %3)
br label %9
9: ; preds = %7, %4
ret void
}
void init_kio(void) {}


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

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

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

LLVM IR (-O2):
define void @init_kio() {
ret void
}
void help_message(void) {}


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

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

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

LLVM IR (-O2):
define void @help_message() {
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("p_bench_yield [-d?] \\\n");
  printf("\t[-c count] \\\n");
  printf("\t[-C thread count] \\\n");
  printf("\t[-O optimization level]\n");
  errno = 0;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e98(%rip),%rax
movq   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"p_bench_yield [-d?] \\\0A\00"
@.str.1 = [15 x i8] c"\09[-c count] \\\0A\00"
@.str.2 = [22 x i8] c"\09[-C thread count] \\\0A\00"
@.str.3 = [26 x i8] c"\09[-O optimization level]\0A\00"
@errno = global i64 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i64 0, i64* @errno
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@str = [22 x i8] c"p_bench_yield [-d?] \\\00"
@str.4 = [14 x i8] c"\09[-c count] \\\00"
@str.5 = [21 x i8] c"\09[-C thread count] \\\00"
@str.6 = [25 x i8] c"\09[-O optimization level]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.6, i64 0, i64 0))
store i64 0, i64* @errno
ret void
}
unsigned calc_width_bits(unsigned baudrate, unsigned widthselect,
                         unsigned clockselect) {
  unsigned tmp;
  if (widthselect) {
    return (clockselect) ? 12 : 24;
  }
  tmp = ((clockselect) ? 12 : 24) / (((115200 / (baudrate)) - 1) + 1);
  return (tmp > 0) ? (tmp - 1) : 0;
}


x86 assembly (clang, -O0):
<calc_width_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1132 <calc_width_bits+0x32>
mov    -0x10(%rbp),%edx
mov    $0x18,%eax
mov    $0xc,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    118c <calc_width_bits+0x8c>
mov    -0x10(%rbp),%edx
mov    $0x18,%eax
mov    $0xc,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x1c200,%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    $0x1,%ecx
add    $0x1,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jbe    117c <calc_width_bits+0x7c>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1186 <calc_width_bits+0x86>
xor    %eax,%eax
mov    %eax,-0x1c(%rbp)
jmp    1186 <calc_width_bits+0x86>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_width_bits>:
test   %edx,%edx
mov    $0x18,%eax
mov    $0xc,%ecx
cmove  %eax,%ecx
test   %esi,%esi
je     1116 <calc_width_bits+0x16>
mov    %ecx,%eax
ret
xor    %r8d,%r8d
mov    $0x1c200,%eax
xor    %edx,%edx
div    %edi
mov    %eax,%esi
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
add    $0xffffffff,%eax
cmp    %ecx,%esi
cmova  %r8d,%eax
mov    %eax,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @calc_width_bits(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 12, i32 24
store i32 %15, i32* %4
br label %34
16: ; preds = %3
%17 = load i32, i32* %7
%18 = icmp ne i32 %17, 0
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 12, i32 24
%21 = load i32, i32* %5
%22 = udiv i32 115200, %21
%23 = sub i32 %22, 1
%24 = add i32 %23, 1
%25 = udiv i32 %20, %24
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = icmp ugt i32 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %16
%29 = load i32, i32* %8
%30 = sub i32 %29, 1
br label %32
31: ; preds = %16
br label %32
32: ; preds = %31, %28
%33 = phi i32 [ %30, %28 ], [ 0, %31 ]
store i32 %33, i32* %4
br label %34
34: ; preds = %32, %11
%35 = load i32, i32* %4
ret i32 %35
}

LLVM IR (-O2):
define i32 @calc_width_bits(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = icmp eq i32 %2, 0
%6 = select i1 %5, i32 24, i32 12
br i1 %4, label %7, label %13
7: ; preds = %3
%8 = udiv i32 115200, %0
%9 = udiv i32 %6, %8
%10 = icmp ugt i32 %8, %6
%11 = add nsw i32 %9, -1
%12 = select i1 %10, i32 0, i32 %11
br label %13
13: ; preds = %3, %7
%14 = phi i32 [ %12, %7 ], [ %6, %3 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ SYS_dup;
int syscall_1(int /*<<< orphan*/, int);
int dup(int oldfd) {
  int ret;
  ret = syscall_1(SYS_dup, oldfd);
  return ret;
}


x86 assembly (clang, -O0):
<dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall_1@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall_1@plt>

LLVM IR (-O0):
@SYS_dup = global i32 0
define i32 @dup(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @SYS_dup
%5 = load i32, i32* %2
%6 = call i32 @syscall_1(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@SYS_dup = global i32 0
define i32 @dup(i32 %0) {
%2 = load i32, i32* @SYS_dup
%3 = tail call i32 @syscall_1(i32 %2, i32 %0)
ret i32 %3
}
int inbyte(char c) { return 0; }


x86 assembly (clang, -O0):
<inbyte>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @inbyte(i8 signext %0) {
ret i32 0
}
void av_packet_unref() {}


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

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

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

LLVM IR (-O2):
define void @av_packet_unref() {
ret void
}
int max(int num_seq[5]) {
  int max = num_seq[0];
  for (int i = 1; i < 5; i++) {
    if (num_seq[i] > max)
      max = num_seq[i];
  }
  return (max);
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    1157 <max+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
jle    1144 <max+0x44>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <max+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1118 <max+0x18>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
cmp    %eax,%ecx
cmovg  %ecx,%eax
mov    0x8(%rdi),%ecx
cmp    %eax,%ecx
cmovg  %ecx,%eax
mov    0xc(%rdi),%ecx
cmp    %eax,%ecx
cmovg  %ecx,%eax
mov    0x10(%rdi),%ecx
cmp    %eax,%ecx
cmovg  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, %2
%6 = select i1 %5, i32 %4, i32 %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = icmp sgt i32 %8, %6
%10 = select i1 %9, i32 %8, i32 %6
%11 = getelementptr inbounds i32, i32* %0, i64 3
%12 = load i32, i32* %11
%13 = icmp sgt i32 %12, %10
%14 = select i1 %13, i32 %12, i32 %10
%15 = getelementptr inbounds i32, i32* %0, i64 4
%16 = load i32, i32* %15
%17 = icmp sgt i32 %16, %14
%18 = select i1 %17, i32 %16, i32 %14
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double y;
  printf("몇 야드인지 입력하시오. ");
  scanf("%lf", &y);
  printf("%.1lf야드 = %.1lfcm", y, 91.44 * y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
lea    0xec9(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
movsd  0xeb5(%rip),%xmm1
mulsd  %xmm0,%xmm1
lea    0xed9(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"\EB\AA\87 \EC\95\BC\EB\93\9C\EC\9D\B8\EC\A7\80 \EC\9E\85\EB\A0\A5\ED\95\98\EC\8B\9C\EC\98\A4. \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [22 x i8] c"%.1lf\EC\95\BC\EB\93\9C = %.1lfcm\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = load double, double* %2
%7 = fmul double 0x4056DC28F5C28F5C, %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %5, double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"\EB\AA\87 \EC\95\BC\EB\93\9C\EC\9D\B8\EC\A7\80 \EC\9E\85\EB\A0\A5\ED\95\98\EC\8B\9C\EC\98\A4. \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [22 x i8] c"%.1lf\EC\95\BC\EB\93\9C = %.1lfcm\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fmul double %5, 0x4056DC28F5C28F5C
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %5, double %6)
ret i32 0
}
unsigned int _hrt_div_down(unsigned int a, unsigned int b) { return a / b; }


x86 assembly (clang, -O0):
<_hrt_div_down>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_hrt_div_down(i32 %0, i32 %1) {
%3 = udiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
float dot2_c(float *, float *);
float dot2_neon_sfp(float v0[2], float v1[2]) { return dot2_c(v0, v1); }


x86 assembly (clang, -O0):
<dot2_neon_sfp>:
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 <dot2_c@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot2_neon_sfp>:
jmp    1030 <dot2_c@plt>

LLVM IR (-O0):
define float @dot2_neon_sfp(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call float @dot2_c(float* %5, float* %6)
ret float %7
}

LLVM IR (-O2):
define float @dot2_neon_sfp(float* %0, float* %1) {
%3 = tail call float @dot2_c(float* %0, float* %1)
ret float %3
}
/* Variables and functions */
char *v_kget(int /*<<< orphan*/, int);
int /*<<< orphan*/ v_lookup(int, char const *);
char *v_get(int vs, const char *name, int pos) {
  return v_kget(v_lookup(vs, name), pos);
}


x86 assembly (clang, -O0):
<v_get>:
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    -0x10(%rbp),%rsi
call   1040 <v_lookup@plt>
mov    %eax,%edi
mov    -0x14(%rbp),%esi
call   1030 <v_kget@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_get>:
push   %rbx
mov    %edx,%ebx
call   1040 <v_lookup@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <v_kget@plt>

LLVM IR (-O0):
define i8* @v_get(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 i8*, i8** %5
%9 = call i32 @v_lookup(i32 %7, i8* %8)
%10 = load i32, i32* %6
%11 = call i8* @v_kget(i32 %9, i32 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @v_get(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @v_lookup(i32 %0, i8* %1)
%5 = tail call i8* @v_kget(i32 %4, i32 %2)
ret i8* %5
}
void loops(int *loopnr) {
  int i, j;
  for (i = 0; i < 10000000; i++)
    for (j = 0; j < 10000000; j++)
      (*loopnr)++;
}


x86 assembly (clang, -O0):
<loops>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x989680,-0xc(%rbp)
jge    115c <loops+0x5c>
movl   $0x0,-0x10(%rbp)
cmpl   $0x989680,-0x10(%rbp)
jge    1149 <loops+0x49>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1123 <loops+0x23>
jmp    114e <loops+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <loops+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<loops>:
addl   $0x107a4000,(%rdi)
ret

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

LLVM IR (-O2):
define void @loops(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add i32 %2, 276447232
store i32 %3, i32* %0
ret void
}
void c_phopar(int nwave, float *wavelength, float *throughput, float *phot) {
  phot[0] = 1.;
  phot[1] = 1.;
  phot[2] = 1.;
  phot[3] = 1.;
}


x86 assembly (clang, -O0):
<c_phopar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movss  0xee1(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movss  0xed1(%rip),%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x20(%rbp),%rax
movss  0xec0(%rip),%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
movss  0xeaf(%rip),%xmm0
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_phopar>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rcx)
ret

LLVM IR (-O0):
define void @c_phopar(i32 %0, float* %1, float* %2, float* %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store i32 %0, i32* %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load float*, float** %8
%10 = getelementptr inbounds float, float* %9, i64 0
store float 1.000000e+00, float* %10
%11 = load float*, float** %8
%12 = getelementptr inbounds float, float* %11, i64 1
store float 1.000000e+00, float* %12
%13 = load float*, float** %8
%14 = getelementptr inbounds float, float* %13, i64 2
store float 1.000000e+00, float* %14
%15 = load float*, float** %8
%16 = getelementptr inbounds float, float* %15, i64 3
store float 1.000000e+00, float* %16
ret void
}

LLVM IR (-O2):
define void @c_phopar(i32 %0, float* nocapture readnone %1, float* nocapture readnone %2, float* nocapture writeonly %3) {
%5 = bitcast float* %3 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, <4 x float>* %5
ret void
}
/* Variables and functions */
int geteuid();
int getuid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("real uid: %d\n", getuid());
  printf("effective uid: %d\n", geteuid());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"real uid: %d\0A\00"
@.str.1 = [19 x i8] c"effective uid: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @geteuid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
double show_bits(double a) { return a; }


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

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

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

LLVM IR (-O2):
define double @show_bits(double returned %0) {
ret double %0
}
int two_i_plus_1(int index, int x) { return 2 * index + 1; }


x86 assembly (clang, -O0):
<two_i_plus_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<two_i_plus_1>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @two_i_plus_1(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 = mul nsw i32 2, %5
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @two_i_plus_1(i32 %0, i32 %1) {
%3 = shl nsw i32 %0, 1
%4 = or i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void irq_unmask_all(void) {
  outb(0x21, 0x00);
  outb(0xA1, 0x00);
  return;
}


x86 assembly (clang, -O0):
<irq_unmask_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_unmask_all>:
push   %rax
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @irq_unmask_all() {
%1 = call i32 @outb(i32 33, i32 0)
%2 = call i32 @outb(i32 161, i32 0)
ret void
}

LLVM IR (-O2):
define void @irq_unmask_all() {
%1 = tail call i32 @outb(i32 33, i32 0)
%2 = tail call i32 @outb(i32 161, i32 0)
ret void
}
/* Variables and functions */
int ft_atoi(char *);
int /*<<< orphan*/ ft_putnbr(int);
void ft_mul(char *num1, char *num2) {
  int i_num1;
  int i_num2;
  i_num1 = ft_atoi(num1);
  i_num2 = ft_atoi(num2);
  ft_putnbr(i_num1 * i_num2);
}


x86 assembly (clang, -O0):
<ft_mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ft_atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
imul   -0x18(%rbp),%edi
call   1030 <ft_putnbr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_mul>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <ft_atoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <ft_atoi@plt>
imul   %eax,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_putnbr@plt>

LLVM IR (-O0):
define void @ft_mul(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @ft_atoi(i8* %7)
store i32 %8, i32* %5
%9 = load i8*, i8** %4
%10 = call i32 @ft_atoi(i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
%14 = call i32 @ft_putnbr(i32 %13)
ret void
}

LLVM IR (-O2):
define void @ft_mul(i8* %0, i8* %1) {
%3 = tail call i32 @ft_atoi(i8* %0)
%4 = tail call i32 @ft_atoi(i8* %1)
%5 = mul nsw i32 %4, %3
%6 = tail call i32 @ft_putnbr(i32 %5)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ bios_cfg_read_entry_dma(void *, int /*<<< orphan*/, int);
int /*<<< orphan*/ bios_cfg_read_entry_io(void *, int /*<<< orphan*/, int);
__attribute__((unused)) void
bios_cfg_read_entry(void *buf, uint16_t entry, uint32_t len, uint32_t version) {
  if (version & 0x02) {
    bios_cfg_read_entry_dma(buf, entry, len);
  } else {
    bios_cfg_read_entry_io(buf, entry, len);
  }
}


x86 assembly (clang, -O0):
<bios_cfg_read_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1158 <bios_cfg_read_entry+0x38>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <bios_cfg_read_entry_dma@plt>
jmp    1167 <bios_cfg_read_entry+0x47>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <bios_cfg_read_entry_io@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bios_cfg_read_entry>:
test   $0x2,%cl
jne    112a <bios_cfg_read_entry+0xa>
jmp    1030 <bios_cfg_read_entry_io@plt>
jmp    1040 <bios_cfg_read_entry_dma@plt>

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

LLVM IR (-O2):
define void @bios_cfg_read_entry(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %3, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @bios_cfg_read_entry_dma(i8* %0, i32 %1, i32 %2)
br label %11
9: ; preds = %4
%10 = tail call i32 @bios_cfg_read_entry_io(i8* %0, i32 %1, i32 %2)
br label %11
11: ; preds = %9, %7
ret void
}
int ti_trunc_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_trunc_start(double* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_statvfs(char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++) {
    print_statvfs(argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <print_statvfs@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <print_statvfs@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @print_statvfs(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x0a() {
  Assert_real((isalpha(10) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              55, ("isalpha should be 0 for 0x0a"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x0a>:
push   %rax
mov    $0xa,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x0a\00"
define void @t_isalpha_0x0a() {
%1 = call i64 @isalpha(i32 10)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 55, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x0a\00"
define void @t_isalpha_0x0a() {
%1 = tail call i64 @isalpha(i32 10)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 55, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ date;

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *write_date() {
  static char date[20];
  time_t now;
  time(&now);
  struct tm *tm = localtime(&now);
  strftime(date, sizeof(date), "%Y-%m-%d %H:%M:%S", tm);
  return date;
}


x86 assembly (clang, -O0):
<write_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    0x2ef7(%rip),%rdi
mov    $0x14,%esi
lea    0xe9b(%rip),%rdx
call   1050 <strftime@plt>
lea    0x2edf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_date>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0x2eff(%rip),%rbx
lea    0xea8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@write_date.date = internal global [20 x i8] zeroinitializer
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @write_date() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @strftime(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @write_date.date, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @write_date.date, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@write_date.date = internal global [20 x i8] zeroinitializer
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @write_date() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call i32 @strftime(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @write_date.date, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @write_date.date, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ AtmegaCompareP__0__AtmegaCompare__fired();
void HplAtmRfa1TimerMacP__CompareA__fired(void) {
  AtmegaCompareP__0__AtmegaCompare__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplAtmRfa1TimerMacP__CompareA__fired() {
%1 = tail call i32 (...) @AtmegaCompareP__0__AtmegaCompare__fired()
ret void
}
int sg_shutdown() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sg_shutdown() {
ret i32 0
}
void skeleton_redraw() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ resp_spin(struct scsi_cmd *);
uint8_t ssc_spin(struct scsi_cmd *cmd) {
  ;
  return resp_spin(cmd);
}


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

x86 assembly (clang, -O2):
<ssc_spin>:
jmp    1030 <resp_spin@plt>

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

LLVM IR (-O2):
%struct.scsi_cmd = type { i32 }
define i32 @ssc_spin(%struct.scsi_cmd* %0) {
%2 = tail call i32 @resp_spin(%struct.scsi_cmd* %0)
ret i32 %2
}
__typeof__(calloc(1, "")) test_calloc_101(void) { return calloc(1, ""); }


x86 assembly (clang, -O0):
<test_calloc_101>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <calloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_calloc_101>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @test_calloc_101() {
%1 = call i8* @calloc(i64 1, i64 ptrtoint ([1 x i8]* @.str to i64))
ret i8* %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define noalias i8* @test_calloc_101() {
%1 = tail call i8* @calloc(i64 1, i64 ptrtoint ([1 x i8]* @.str to i64))
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ OpenInventory(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *freopen(char const *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
FILE *NewInventory(const char *dest, FILE *file) {
  file = freopen(dest, "w", file);
  rewind(file);
  fputs("Inventory_Backup.txt\n", file);
  OpenInventory(dest, file);
  return file;
}


x86 assembly (clang, -O0):
<NewInventory>:
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    0xea1(%rip),%rsi
call   1060 <freopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <rewind@plt>
mov    -0x10(%rbp),%rsi
lea    0xe86(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <OpenInventory@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NewInventory>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rdx
mov    %rdi,%r14
lea    0xeaf(%rip),%rsi
call   1050 <freopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <rewind@plt>
lea    0xe9a(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <OpenInventory@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [22 x i8] c"Inventory_Backup.txt\0A\00"
define i32* @NewInventory(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = call i32* @freopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32* %7, i32** %4
%8 = load i32*, i32** %4
%9 = call i32 @rewind(i32* %8)
%10 = load i32*, i32** %4
%11 = call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = load i8*, i8** %3
%13 = load i32*, i32** %4
%14 = call i32 @OpenInventory(i8* %12, i32* %13)
%15 = load i32*, i32** %4
ret i32* %15
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [22 x i8] c"Inventory_Backup.txt\0A\00"
define i32* @NewInventory(i8* %0, i32* %1) {
%3 = tail call i32* @freopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = tail call i32 @rewind(i32* %3)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 21, i64 1, i32* %3)
%6 = tail call i32 @OpenInventory(i8* %0, i32* %3)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ jstp_tx_char(char);
void jstp_tx_null() {
  jstp_tx_char('n');
  jstp_tx_char('u');
  jstp_tx_char('l');
  jstp_tx_char('l');
}


x86 assembly (clang, -O0):
<jstp_tx_null>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6e,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x75,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x6c,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x6c,%edi
call   1030 <jstp_tx_char@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jstp_tx_null>:
push   %rax
mov    $0x6e,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x75,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x6c,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x6c,%edi
pop    %rax
jmp    1030 <jstp_tx_char@plt>

LLVM IR (-O0):
define void @jstp_tx_null() {
%1 = call i32 @jstp_tx_char(i8 signext 110)
%2 = call i32 @jstp_tx_char(i8 signext 117)
%3 = call i32 @jstp_tx_char(i8 signext 108)
%4 = call i32 @jstp_tx_char(i8 signext 108)
ret void
}

LLVM IR (-O2):
define void @jstp_tx_null() {
%1 = tail call i32 @jstp_tx_char(i8 signext 110)
%2 = tail call i32 @jstp_tx_char(i8 signext 117)
%3 = tail call i32 @jstp_tx_char(i8 signext 108)
%4 = tail call i32 @jstp_tx_char(i8 signext 108)
ret void
}