xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ INT_MAX;
int /*<<< orphan*/ LONG_MAX;
int /*<<< orphan*/ UINT_MAX;
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  printf("%llu %llu %llu\n", INT_MAX, UINT_MAX, LONG_MAX);
  printf("%llu\n", 52437589423594);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    0x2e98(%rip),%rax
mov    (%rax),%ecx
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
mov    $0x13e3f5ea,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edx
mov    0x2ea6(%rip),%rax
mov    (%rax),%ecx
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0x13e3f5ea,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"%llu %llu %llu\0A\00"
@INT_MAX = global i32 0
@UINT_MAX = global i32 0
@LONG_MAX = global i32 0
@.str.1 = [6 x i8] c"%llu\0A\00"
define i32 @main() {
%1 = load i32, i32* @INT_MAX
%2 = load i32, i32* @UINT_MAX
%3 = load i32, i32* @LONG_MAX
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 333706730)
ret i32 0
}
/* Variables and functions */
void *user_alloc(size_t);
void *os_mmap(size_t size) {
  void *ptr = user_alloc(size);
  return (ptr != 0) ? ptr : ((void *)((~(size_t)0)));
}


x86 assembly (clang, -O0):
<os_mmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <user_alloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1141 <os_mmap+0x31>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1151 <os_mmap+0x41>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1151 <os_mmap+0x41>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_mmap>:
push   %rax
call   1030 <user_alloc@plt>
cmp    $0x1,%rax
sbb    %rcx,%rcx
or     %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @os_mmap(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @user_alloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %8
%12 = phi i8* [ %9, %8 ], [ inttoptr (i64 -1 to i8*), %10 ]
ret i8* %12
}

LLVM IR (-O2):
define i8* @os_mmap(i64 %0) {
%2 = tail call i8* @user_alloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* inttoptr (i64 -1 to i8*), i8* %2
ret i8* %4
}
/* Type definitions */
struct context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ make_bmp(struct context *);
int /*<<< orphan*/ write_image_file(struct context *);
int make_bmp_file(struct context *c) {
  if (!make_bmp(c))
    return 0;
  if (!write_image_file(c))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<make_bmp_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <make_bmp@plt>
cmp    $0x0,%eax
jne    114a <make_bmp_file+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    116f <make_bmp_file+0x4f>
mov    -0x10(%rbp),%rdi
call   1030 <write_image_file@plt>
cmp    $0x0,%eax
jne    1168 <make_bmp_file+0x48>
movl   $0x0,-0x4(%rbp)
jmp    116f <make_bmp_file+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_bmp_file>:
push   %rbx
mov    %rdi,%rbx
call   1040 <make_bmp@plt>
test   %eax,%eax
je     1140 <make_bmp_file+0x20>
mov    %rbx,%rdi
call   1030 <write_image_file@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.context = type { i32 }
define i32 @make_bmp_file(%struct.context* %0) {
%2 = alloca i32
%3 = alloca %struct.context*
store %struct.context* %0, %struct.context** %3
%4 = load %struct.context*, %struct.context** %3
%5 = call i32 @make_bmp(%struct.context* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %14
8: ; preds = %1
%9 = load %struct.context*, %struct.context** %3
%10 = call i32 @write_image_file(%struct.context* %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8
store i32 0, i32* %2
br label %14
13: ; preds = %8
store i32 1, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.context = type { i32 }
define i32 @make_bmp_file(%struct.context* %0) {
%2 = tail call i32 @make_bmp(%struct.context* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @write_image_file(%struct.context* %0)
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void g_key_file_error_quark() {}


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

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

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

LLVM IR (-O2):
define void @g_key_file_error_quark() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mousehide();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basMouseHide() { pushNumber(mousehide()); }


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

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

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

LLVM IR (-O2):
define void @basMouseHide() {
%1 = tail call i32 (...) @mousehide()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int num;
  num = 1;
  printf("I am a simple ");
  printf("computer.\n");
  printf("My favorite number is %d because it is first.\n", num);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"I am a simple \00"
@.str.1 = [11 x i8] c"computer.\0A\00"
@.str.2 = [47 x i8] c"My favorite number is %d because it is first.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"I am a simple \00"
@.str.2 = [47 x i8] c"My favorite number is %d because it is first.\0A\00"
@str = [10 x i8] c"computer.\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_lptr(void *);
size_t get_num_pages(int /*<<< orphan*/);
size_t get_num_pages_from_payload(void *pptr) {
  return get_num_pages(get_lptr(pptr));
}


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

x86 assembly (clang, -O2):
<get_num_pages_from_payload>:
push   %rax
call   1030 <get_lptr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <get_num_pages@plt>

LLVM IR (-O0):
define i64 @get_num_pages_from_payload(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @get_lptr(i8* %3)
%5 = call i64 @get_num_pages(i32 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @get_num_pages_from_payload(i8* %0) {
%2 = tail call i32 @get_lptr(i8* %0)
%3 = tail call i64 @get_num_pages(i32 %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void menu_start() {
  printf("\n\t************ WELCOME ************\n");
  printf("\t1. Farm Machinery, Belt Conveyor\n");
  printf("\t2. Saw Mills, Paper Mills\n");
  printf("\t3. Other\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"\0A\09************ WELCOME ************\0A\00"
@.str.1 = [35 x i8] c"\091. Farm Machinery, Belt Conveyor\0A\00"
@.str.2 = [28 x i8] c"\092. Saw Mills, Paper Mills\0A\00"
@.str.3 = [11 x i8] c"\093. Other\0A\00"
define void @menu_start() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"\0A\09************ WELCOME ************\00"
@str.4 = [34 x i8] c"\091. Farm Machinery, Belt Conveyor\00"
@str.5 = [27 x i8] c"\092. Saw Mills, Paper Mills\00"
@str.6 = [10 x i8] c"\093. Other\00"
define void @menu_start() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.6, i64 0, i64 0))
ret void
}
int int_cmp_key(void *key1, void *key2) {
  long k1 = *(long *)key1;
  long k2 = *(long *)key2;
  return k1 - k2;
}


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

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

LLVM IR (-O0):
define i32 @int_cmp_key(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = sub nsw i64 %13, %14
%16 = trunc i64 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @int_cmp_key(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
void putint(FILE *outf, unsigned int val) {
  unsigned char buf[4];
  buf[0] = (unsigned char)(val >> 24);
  buf[1] = (unsigned char)(val >> 16);
  buf[2] = (unsigned char)(val >> 8);
  buf[3] = (unsigned char)(val & 0xff);
  fwrite(buf, 4, 1, outf);
}


x86 assembly (clang, -O0):
<putint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
mov    %al,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
mov    %al,-0xf(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %al,-0xe(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,-0xd(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putint>:
push   %rax
mov    %rdi,%rcx
bswap  %esi
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @putint(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [4 x i8]
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = lshr i32 %6, 24
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
store i8 %8, i8* %9
%10 = load i32, i32* %4
%11 = lshr i32 %10, 16
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 1
store i8 %12, i8* %13
%14 = load i32, i32* %4
%15 = lshr i32 %14, 8
%16 = trunc i32 %15 to i8
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 2
store i8 %16, i8* %17
%18 = load i32, i32* %4
%19 = and i32 %18, 255
%20 = trunc i32 %19 to i8
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 3
store i8 %20, i8* %21
%22 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%23 = load i32*, i32** %3
%24 = call i32 @fwrite(i8* %22, i32 4, i32 1, i32* %23)
ret void
}

LLVM IR (-O2):
define void @putint(i32* nocapture %0, i32 %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = lshr i32 %1, 24
%6 = trunc i32 %5 to i8
store i8 %6, i8* %4
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 %8, i8* %9
%10 = lshr i32 %1, 8
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 %11, i8* %12
%13 = trunc i32 %1 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 %13, i8* %14
%15 = call i32 @fwrite(i8* %4, i32 4, i32 1, i32* %0)
ret void
}
int WuLaiGunFa_cost(struct Ability *self) { return 80; }


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

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

LLVM IR (-O0):
%struct.Ability = type opaque
define i32 @WuLaiGunFa_cost(%struct.Ability* %0) {
%2 = alloca %struct.Ability*
store %struct.Ability* %0, %struct.Ability** %2
ret i32 80
}

LLVM IR (-O2):
%struct.Ability = type opaque
define i32 @WuLaiGunFa_cost(%struct.Ability* nocapture readnone %0) {
ret i32 80
}
int close(int fd) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(fd);
  return 0;
}


x86 assembly (clang, -O0):
<close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.close = [6 x i8] c"close\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.close, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%7 = load i32, i32* %2
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.close = [6 x i8] c"close\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @close(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.close, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_64(int /*<<< orphan*/);
uint64_t ntohll(uint64_t netlong) { return bswap_64(netlong); }


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

x86 assembly (clang, -O2):
<ntohll>:
jmp    1030 <bswap_64@plt>

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

LLVM IR (-O2):
define i32 @ntohll(i32 %0) {
%2 = tail call i32 @bswap_64(i32 %0)
ret i32 %2
}
void phyUartDebug_event(char byte) {}


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

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

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

LLVM IR (-O2):
define void @phyUartDebug_event(i8 signext %0) {
ret void
}
/* Variables and functions */
char *__itt_get_env_var(char *);
const char *__itt_get_lib_name(void) {
  const char *lib_name = __itt_get_env_var("INTEL_LIBITTNOTIFY64");
  return lib_name;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"INTEL_LIBITTNOTIFY64\00"
define i8* @__itt_get_lib_name() {
%1 = alloca i8*
%2 = call i8* @__itt_get_env_var(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
@.str = [21 x i8] c"INTEL_LIBITTNOTIFY64\00"
define i8* @__itt_get_lib_name() {
%1 = tail call i8* @__itt_get_env_var(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
signed int atoi(const char *__nptr) {
  signed long int return_value_strtol$1;
  return_value_strtol$1 = strtol(__nptr, ((char **)((void *)0)), 10);
  return (signed int)return_value_strtol$1;
}


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

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strtol(i8* %4, i8** null, i32 10)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i8** null, i32 10)
%3 = trunc i64 %2 to i32
ret i32 %3
}
__attribute__((weak)) int _wait(int *status) { return -1; }


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

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

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

LLVM IR (-O2):
define weak i32 @_wait(i32* %0) {
ret i32 -1
}
void fbe(int *y) {
  char x;
  asm(""
      : "=@cc"
        "be"(x));
  if (!x)
    *y = 0;
}


x86 assembly (clang, -O0):
<fbe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
setbe  %al
mov    %al,-0x9(%rbp)
cmpb   $0x0,-0x9(%rbp)
jne    1122 <fbe+0x22>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fbe>:
ja     1103 <fbe+0x3>
ret
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @fbe(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = call i8 asm "", "={@ccbe},~{dirflag},~{fpsr},~{flags}"()
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = icmp ne i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32*, i32** %2
store i32 0, i32* %8
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @fbe(i32* nocapture writeonly %0) {
%2 = tail call i8 asm "", "={@ccbe},~{dirflag},~{fpsr},~{flags}"()
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
store i32 0, i32* %0
br label %5
5: ; preds = %4, %1
ret void
}
char strpartcmp(char *str, char *part) {
  while (1) {
    if (*part == 0)
      return 0;
    if (*(str++) != *(part++))
      return 1;
  }
}


x86 assembly (clang, -O0):
<strpartcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1125 <strpartcmp+0x25>
movb   $0x0,-0x1(%rbp)
jmp    115f <strpartcmp+0x5f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     115a <strpartcmp+0x5a>
movb   $0x1,-0x1(%rbp)
jmp    115f <strpartcmp+0x5f>
jmp    110c <strpartcmp+0xc>
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpartcmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
test   %cl,%cl
je     1127 <strpartcmp+0x27>
lea    0x1(%rax),%rdx
cmp    %cl,(%rdi,%rax,1)
mov    %rdx,%rax
je     1110 <strpartcmp+0x10>
mov    $0x1,%al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define signext i8 @strpartcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = phi i8* [ %1, %2 ], [ %11, %8 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = load i8, i8* %4
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %10, %6
br i1 %12, label %3, label %13
13: ; preds = %8, %3
%14 = phi i8 [ 0, %3 ], [ 1, %8 ]
ret i8 %14
}
/* Type definitions */
struct dentry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pr_debug(char *, struct dentry *, char const *, int);
int vfs_removexattr(struct dentry *, char const *);
int ovl_do_removexattr(struct dentry *dentry, const char *name) {
  int err = vfs_removexattr(dentry, name);
  pr_debug("removexattr(%pd2, \"%s\") = %i\n", dentry, name, err);
  return err;
}


x86 assembly (clang, -O0):
<ovl_do_removexattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <vfs_removexattr@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xeae(%rip),%rdi
call   1040 <pr_debug@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ovl_do_removexattr>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <vfs_removexattr@plt>
mov    %eax,%ebp
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
call   1040 <pr_debug@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.dentry = type { i32 }
@.str = [30 x i8] c"removexattr(%pd2, \22%s\22) = %i\0A\00"
define i32 @ovl_do_removexattr(%struct.dentry* %0, i8* %1) {
%3 = alloca %struct.dentry*
%4 = alloca i8*
%5 = alloca i32
store %struct.dentry* %0, %struct.dentry** %3
store i8* %1, i8** %4
%6 = load %struct.dentry*, %struct.dentry** %3
%7 = load i8*, i8** %4
%8 = call i32 @vfs_removexattr(%struct.dentry* %6, i8* %7)
store i32 %8, i32* %5
%9 = load %struct.dentry*, %struct.dentry** %3
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = call i32 @pr_debug(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), %struct.dentry* %9, i8* %10, i32 %11)
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
%struct.dentry = type { i32 }
@.str = [30 x i8] c"removexattr(%pd2, \22%s\22) = %i\0A\00"
define i32 @ovl_do_removexattr(%struct.dentry* %0, i8* %1) {
%3 = tail call i32 @vfs_removexattr(%struct.dentry* %0, i8* %1)
%4 = tail call i32 @pr_debug(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), %struct.dentry* %0, i8* %1, i32 %3)
ret i32 %3
}
/* Variables and functions */
int memcmp(void *, void *, int);
int xmemcmp(void *a, void *b, int n) { return memcmp(a, b, n); }


x86 assembly (clang, -O0):
<xmemcmp>:
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    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmemcmp>:
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @xmemcmp(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 @memcmp(i8* %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmemcmp(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcmp(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int size_t_cmp(const void *elt1, const void *elt2) {
  return memcmp(elt1, elt2, sizeof(size_t));
}


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

x86 assembly (clang, -O2):
<size_t_cmp>:
mov    $0x8,%edx
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @size_t_cmp(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 @memcmp(i8* %5, i8* %6, i32 8)
ret i32 %7
}

LLVM IR (-O2):
define i32 @size_t_cmp(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 8)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank2(int);
int /*<<< orphan*/ chr1setBank3(int);
void m80setParams7EF1(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank2((val & 0xFE) << 10);
  chr1setBank3((val | 0x01) << 10);
}


x86 assembly (clang, -O0):
<m80setParams7EF1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0xfe,%edi
shl    $0xa,%edi
call   1030 <chr1setBank2@plt>
mov    -0x8(%rbp),%edi
or     $0x1,%edi
shl    $0xa,%edi
call   1040 <chr1setBank3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m80setParams7EF1>:
push   %rbx
mov    %esi,%ebx
shl    $0xa,%ebx
mov    %ebx,%edi
and    $0x3f800,%edi
call   1030 <chr1setBank2@plt>
or     $0x400,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <chr1setBank3@plt>

LLVM IR (-O0):
define void @m80setParams7EF1(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 = and i32 %6, 254
%8 = shl i32 %7, 10
%9 = call i32 @chr1setBank2(i32 %8)
%10 = load i32, i32* %4
%11 = or i32 %10, 1
%12 = shl i32 %11, 10
%13 = call i32 @chr1setBank3(i32 %12)
ret void
}

LLVM IR (-O2):
define void @m80setParams7EF1(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = and i32 %3, 260096
%5 = tail call i32 @chr1setBank2(i32 %4)
%6 = or i32 %3, 1024
%7 = tail call i32 @chr1setBank3(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ int_shifts_are_arithemetic();
int main(int argc, char *argv[]) {
  assert(int_shifts_are_arithemetic());
  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   1040 <int_shifts_are_arithemetic@plt>
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 (...) @int_shifts_are_arithemetic()
%7 = call i32 @assert(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @int_shifts_are_arithemetic()
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
int copyLSB(int n) {}


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

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

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

LLVM IR (-O2):
define i32 @copyLSB(i32 %0) {
ret i32 undef
}
int sarprintf_ret(const char *format, ...) {
  format = format;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sarprintf_ret(i8* nocapture readnone %0, ...) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ putst_uart(int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
void putint_uart(int32_t v) {
  uint8_t buf[32];
  sprintf((char *)buf, "%ld", v);
  putst_uart(buf);
}


x86 assembly (clang, -O0):
<putint_uart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <putst_uart@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putint_uart>:
push   %rbx
sub    $0x80,%rsp
mov    %edi,%edx
lea    0xecf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <putst_uart@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define void @putint_uart(i32 %0) {
%2 = alloca i32
%3 = alloca [32 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 0
%5 = bitcast i32* %4 to i8*
%6 = load i32, i32* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 0
%9 = call i32 @putst_uart(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define void @putint_uart(i32 %0) {
%2 = alloca [32 x i32]
%3 = bitcast [32 x i32]* %2 to i8*
%4 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = call i32 @putst_uart(i32* %4)
ret void
}
void INT_Excep_IRQ2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_IRQ2() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void QEIIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ASSERT((ui32Base == 0x4002C000) || (ui32Base == 0x4002D000));
  (*((volatile uint32_t *)(ui32Base + 0x00000020))) |= ui32IntFlags;
}


x86 assembly (clang, -O0):
<QEIIntEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x4002c000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113d <QEIIntEnable+0x2d>
cmpl   $0x4002d000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x20,%eax
cltq
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIIntEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x4002c000,%eax
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
or     %ebx,0x20(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @QEIIntEnable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1073922048
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1073926144
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 32
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load volatile i32, i32* %18
%20 = or i32 %19, %14
store volatile i32 %20, i32* %18
ret void
}

LLVM IR (-O2):
define void @QEIIntEnable(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073922048
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = add nsw i32 %0, 32
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = or i32 %10, %1
store volatile i32 %11, i32* %9
ret void
}
int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid) { return 0; }


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

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

LLVM IR (-O0):
%struct.inode = type opaque
%struct.p9_fid = type opaque
define i32 @v9fs_acl_chmod(%struct.inode* %0, %struct.p9_fid* %1) {
%3 = alloca %struct.inode*
%4 = alloca %struct.p9_fid*
store %struct.inode* %0, %struct.inode** %3
store %struct.p9_fid* %1, %struct.p9_fid** %4
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.p9_fid = type opaque
define i32 @v9fs_acl_chmod(%struct.inode* nocapture readnone %0, %struct.p9_fid* nocapture readnone %1) {
ret i32 0
}
int __pipe(pipedes)
int pipedes[2];
{ return pipe(pipedes); }


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

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

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

LLVM IR (-O2):
define i32 @__pipe(i32* %0) {
%2 = tail call i32 (i32*, ...) bitcast (i32 (...)* @pipe to i32 (i32*, ...)*)(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
char *toHex(int);
int main(void) {
  int num;
  scanf("%d", &num);
  printf("%s\n", toHex(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <toHex@plt>
mov    %rax,%rsi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <toHex@plt>
lea    0xeb1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i8* @toHex(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ screen_sendch(char);
void putsln(char string[]) {
  putsln(string);
  screen_sendch('\n');
}


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

x86 assembly (clang, -O2):
<putsln>:
push   %rax
call   1040 <putsln@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <screen_sendch@plt>

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

LLVM IR (-O2):
define void @putsln(i8* nocapture readnone %0) {
tail call void @putsln(i8* %0)
%2 = tail call i32 @screen_sendch(i8 signext 10)
ret void
}
int nullgetpoint(int *x, int *y) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nullgetpoint(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
void XReadBitmapFileData() {}


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

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

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

LLVM IR (-O2):
define void @XReadBitmapFileData() {
ret void
}
/* Variables and functions */
int omap_rev();
int is_omap1510(void) {
  return (((omap_rev() >> 16) & 0xffff) == (0x1510)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_omap1510>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omap_rev@plt>
mov    %eax,%edx
sar    $0x10,%edx
and    $0xffff,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x1510,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_omap1510>:
push   %rax
xor    %eax,%eax
call   1030 <omap_rev@plt>
and    $0xffff0000,%eax
xor    %ecx,%ecx
cmp    $0x15100000,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_omap1510() {
%1 = call i32 (...) @omap_rev()
%2 = ashr i32 %1, 16
%3 = and i32 %2, 65535
%4 = icmp eq i32 %3, 5392
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_omap1510() {
%1 = tail call i32 (...) @omap_rev()
%2 = and i32 %1, -65536
%3 = icmp eq i32 %2, 353370112
%4 = zext i1 %3 to i32
ret i32 %4
}
void disclaim_vspace() {}


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

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

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

LLVM IR (-O2):
define void @disclaim_vspace() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_putchar(char);
void uart_puts(const char *string) {
  while (*string) {
    if (*string == '\n')
      uart_putchar('\r');
    uart_putchar(*string++);
  }
}


x86 assembly (clang, -O0):
<uart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <uart_puts+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1143 <uart_puts+0x33>
mov    $0xd,%edi
call   1030 <uart_putchar@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <uart_putchar@plt>
jmp    111c <uart_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_puts>:
push   %rbx
mov    %rdi,%rbx
jmp    1139 <uart_puts+0x29>
cs nopw 0x0(%rax,%rax,1)
mov    $0xd,%edi
call   1030 <uart_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
movsbl %al,%edi
call   1030 <uart_putchar@plt>
movzbl (%rbx),%eax
cmp    $0xa,%al
je     1120 <uart_puts+0x10>
test   %al,%al
jne    112d <uart_puts+0x1d>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @uart_puts(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = load i8, i8* %3
switch i8 %4, label %8 [
i8 0, label %12
i8 10, label %5
]
5: ; preds = %2
%6 = tail call i32 @uart_putchar(i8 signext 13)
%7 = load i8, i8* %3
br label %8
8: ; preds = %2, %5
%9 = phi i8 [ %4, %2 ], [ %7, %5 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
%11 = tail call i32 @uart_putchar(i8 signext %9)
br label %2
12: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Lia_TestArray();
int /*<<< orphan*/ Lia_TestArrayMain();
int main(int argc, char **argv) {
  Lia_TestArrayMain();
  Lia_TestArray();
  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   1040 <Lia_TestArrayMain@plt>
mov    $0x0,%al
call   1030 <Lia_TestArray@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 (...) @Lia_TestArrayMain()
%7 = call i32 (...) @Lia_TestArray()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @Lia_TestArrayMain()
%4 = tail call i32 (...) @Lia_TestArray()
ret i32 0
}
int isgraph(int c) { return (c >= 0x21 && c <= 0x7E); }


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

x86 assembly (clang, -O2):
<isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}