xunge/DecIR huggingface dataset:
/* Variables and functions */
char *itoa(int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *s1 = "hello";
  printf("%s\n", s1);
  char s[100];
  printf("%s\n", itoa(123, s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
lea    -0x80(%rbp),%rsi
mov    $0x7b,%edi
call   1040 <itoa@plt>
mov    %rax,%rsi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xeda(%rip),%rbx
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rsp,%rsi
mov    $0x7b,%edi
call   1040 <itoa@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = call i8* @itoa(i32 123, i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
unsigned int cpumask_next_and(int n, const struct cpumask *srcp,
                              const struct cpumask *andp) {
  return n + 1;
}


x86 assembly (clang, -O0):
<cpumask_next_and>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpumask_next_and>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
%struct.cpumask = type opaque
define i32 @cpumask_next_and(i32 %0, %struct.cpumask* %1, %struct.cpumask* %2) {
%4 = alloca i32
%5 = alloca %struct.cpumask*
%6 = alloca %struct.cpumask*
store i32 %0, i32* %4
store %struct.cpumask* %1, %struct.cpumask** %5
store %struct.cpumask* %2, %struct.cpumask** %6
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
%struct.cpumask = type opaque
define i32 @cpumask_next_and(i32 %0, %struct.cpumask* nocapture readnone %1, %struct.cpumask* nocapture readnone %2) {
%4 = add nsw i32 %0, 1
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xselectionrequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xselectionrequest_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xselectionrequest.serial;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xselectionrequest_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xselectionrequest_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_7720(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_7720() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cmd_reget_get(int, char *, int /*<<< orphan*/);
void cmd_get(int idx, char *par) { cmd_reget_get(idx, par, 0); }


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

x86 assembly (clang, -O2):
<cmd_get>:
xor    %edx,%edx
jmp    1030 <cmd_reget_get@plt>

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

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

/* Variables and functions */
char *regatoi(const regex_t *preg, char *localbuf) {
  *localbuf = '\0';
  return (localbuf);
}


x86 assembly (clang, -O0):
<regatoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @regatoi(i32* nocapture readnone %0, i8* returned writeonly %1) {
store i8 0, i8* %1
ret i8* %1
}
void MD5_memset(output, value, len) void *output;
int value;
unsigned int len;
{ memset(output, (char)value, len); }


x86 assembly (clang, -O0):
<MD5_memset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
movsbl %al,%eax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
movzbl %al,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MD5_memset>:
mov    %edx,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @MD5_memset(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = trunc i32 %8 to i8
%10 = sext i8 %9 to i32
%11 = trunc i32 %10 to i8
%12 = load i32, i32* %6
%13 = zext i32 %12 to i64
ret void
}

LLVM IR (-O2):
define void @MD5_memset(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = trunc i32 %1 to i8
%5 = zext i32 %2 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 %4, i64 %5, i1 false)
ret void
}
int foo(arg)
int arg;
{ return arg + 1; }


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

x86 assembly (clang, -O2):
<foo>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int fdt_add_reservemap_entry(void *, int /*<<< orphan*/, int /*<<< orphan*/);
int fdt_finish_reservemap(void *fdt) {
  return fdt_add_reservemap_entry(fdt, 0, 0);
}


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

x86 assembly (clang, -O2):
<fdt_finish_reservemap>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <fdt_add_reservemap_entry@plt>

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

LLVM IR (-O2):
define i32 @fdt_finish_reservemap(i8* %0) {
%2 = tail call i32 @fdt_add_reservemap_entry(i8* %0, i32 0, i32 0)
ret i32 %2
}
/* Variables and functions */
int isascii(int c) { return c >= 0 && c < 128; }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1123 <isascii+0x23>
cmpl   $0x80,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 128
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 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
int toupper(int ch) {
  if (ch >= 'a' && ch <= 'z') {
    return ch - ('a' - 'A');
  }
  return ch;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1129 <toupper+0x29>
cmpl   $0x7a,-0x8(%rbp)
jg     1129 <toupper+0x29>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <toupper+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ score();
normend() {
  score();
  exit(-1);
}


x86 assembly (clang, -O0):
<normend>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <score@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define i32 @normend() {
%1 = call i32 (...) @score()
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i32 @normend() {
%1 = tail call i32 (...) @score()
%2 = tail call i32 @exit(i32 -1)
unreachable
}
void foo811() {}


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

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

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

LLVM IR (-O2):
define void @foo811() {
ret void
}
int main() {
  int a = 1;
  int *ptr = &a;
  int **bisptr = &ptr;
  printf("%d", *ptr);
  printf("\n%d", **bisptr);
  printf("\n%d", *bisptr);
  printf("\n%d", ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x1,0x4(%rsp)
lea    0xede(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeca(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_dobldobl_container_to_start_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(258, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_dobldobl_container_to_start_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x102,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_dobldobl_container_to_start_solutions>:
mov    $0x102,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_dobldobl_container_to_start_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 258, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_dobldobl_container_to_start_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 258, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
scalar_t__ chaz_Util_can_open_file(char const *);
int /*<<< orphan*/ remove(char const *);
int chaz_Util_remove_and_verify(const char *file_path) {
  remove(file_path);
  return chaz_Util_can_open_file(file_path) ? 0 : 1;
}


x86 assembly (clang, -O0):
<chaz_Util_remove_and_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
mov    -0x8(%rbp),%rdi
call   1040 <chaz_Util_can_open_file@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chaz_Util_remove_and_verify>:
push   %rbx
mov    %rdi,%rbx
call   1030 <remove@plt>
mov    %rbx,%rdi
call   1040 <chaz_Util_can_open_file@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @chaz_Util_remove_and_verify(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @remove(i8* %3)
%5 = load i8*, i8** %2
%6 = call i64 @chaz_Util_can_open_file(i8* %5)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 0, i32 1
ret i32 %9
}

LLVM IR (-O2):
define i32 @chaz_Util_remove_and_verify(i8* %0) {
%2 = tail call i32 @remove(i8* %0)
%3 = tail call i64 @chaz_Util_can_open_file(i8* %0)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
void io_default_errhandler(int level, char *msg) {
  fprintf(stderr, "%d: %s", level, msg);
  if (!level) {
    exit(0);
  }
}


x86 assembly (clang, -O0):
<io_default_errhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    115c <io_default_errhandler+0x3c>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_default_errhandler>:
push   %rbx
mov    %rsi,%rcx
mov    %edi,%ebx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
test   %ebx,%ebx
je     1143 <io_default_errhandler+0x23>
pop    %rbx
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%d: %s\00"
define void @io_default_errhandler(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %7)
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%d: %s\00"
define void @io_default_errhandler(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ outw(int /*<<< orphan*/, int);
__attribute__((unused)) void bios_cfg_select(uint16_t key) { outw(key, 0x510); }


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

x86 assembly (clang, -O2):
<bios_cfg_select>:
mov    $0x510,%esi
jmp    1030 <outw@plt>

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

LLVM IR (-O2):
define void @bios_cfg_select(i32 %0) {
%2 = tail call i32 @outw(i32 %0, i32 1296)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\033[0m"
         "Hello!, This is "
         "\033[92m"
         "ok"
         "\033[0m"
         ", "
         "\033[93m"
         "warning"
         "\033[0m"
         ", "
         "\033[91m"
         "error"
         "\033[0m"
         "...\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [70 x i8] c"\1B[0mHello!, This is \1B[92mok\1B[0m, \1B[93mwarning\1B[0m, \1B[91merror\1B[0m...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [69 x i8] c"\1B[0mHello!, This is \1B[92mok\1B[0m, \1B[93mwarning\1B[0m, \1B[91merror\1B[0m...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_str(int /*<<< orphan*/);
int /*<<< orphan*/ t16_memio_reg_op();
void t16_str_reg() { arm_memio_str(t16_memio_reg_op()); }


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

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

LLVM IR (-O0):
define void @t16_str_reg() {
%1 = call i32 (...) @t16_memio_reg_op()
%2 = call i32 @arm_memio_str(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_str_reg() {
%1 = tail call i32 (...) @t16_memio_reg_op()
%2 = tail call i32 @arm_memio_str(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long ftell(int /*<<< orphan*/ *);
long ftell_file_func(void *opaque, void *stream) {
  return ftell((FILE *)stream);
}


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

x86 assembly (clang, -O2):
<ftell_file_func>:
mov    %rsi,%rdi
jmp    1030 <ftell@plt>

LLVM IR (-O0):
define i64 @ftell_file_func(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = call i64 @ftell(i32* %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @ftell_file_func(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i64 @ftell(i32* %3)
ret i64 %4
}
/* Variables and functions */
char inb(int);
int /*<<< orphan*/ outb(int, char);
char readcoms(char index) {
  outb(0x70, index);
  return inb(0x71);
}


x86 assembly (clang, -O0):
<readcoms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x70,%edi
movsbl -0x1(%rbp),%esi
call   1030 <outb@plt>
mov    $0x71,%edi
call   1040 <inb@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readcoms>:
push   %rax
mov    %edi,%esi
mov    $0x70,%edi
call   1030 <outb@plt>
mov    $0x71,%edi
pop    %rax
jmp    1040 <inb@plt>

LLVM IR (-O0):
define signext i8 @readcoms(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @outb(i32 112, i8 signext %3)
%5 = call signext i8 @inb(i32 113)
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @readcoms(i8 signext %0) {
%2 = tail call i32 @outb(i32 112, i8 signext %0)
%3 = tail call signext i8 @inb(i32 113)
ret i8 %3
}
/* Type definitions */
struct sigvec {
  int dummy;
};

/* Variables and functions */
int sigvec__(int, struct sigvec *, struct sigvec *, int);
int sigvec(int signo, struct sigvec *sv, struct sigvec *osv) {
  return sigvec__(signo, sv, osv, 1);
}


x86 assembly (clang, -O0):
<sigvec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <sigvec__@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigvec>:
mov    $0x1,%ecx
jmp    1030 <sigvec__@plt>

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

LLVM IR (-O2):
%struct.sigvec = type { i32 }
define i32 @sigvec(i32 %0, %struct.sigvec* %1, %struct.sigvec* %2) {
%4 = tail call i32 @sigvec__(i32 %0, %struct.sigvec* %1, %struct.sigvec* %2, i32 1)
ret i32 %4
}
void RTSemXRoadsNSLeave(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemXRoadsNSLeave() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IN_ALL_EVENTS;
int inotify_add_watch(int, char *, int /*<<< orphan*/);
int inotify_init();
int /*<<< orphan*/ inotify_rm_watch(int, int);
int main() {
  int fd = inotify_init();
  int wd = inotify_add_watch(fd, "/tmp", IN_ALL_EVENTS);
  inotify_rm_watch(fd, wd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <inotify_init@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e8d(%rip),%rax
mov    (%rax),%edx
lea    0xea4(%rip),%rsi
call   1040 <inotify_add_watch@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <inotify_rm_watch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <inotify_init@plt>
mov    %eax,%ebx
mov    0x2e9f(%rip),%rax
mov    (%rax),%edx
lea    0xeb6(%rip),%rsi
mov    %ebx,%edi
call   1040 <inotify_add_watch@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <inotify_rm_watch@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"/tmp\00"
@IN_ALL_EVENTS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @inotify_init()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* @IN_ALL_EVENTS
%7 = call i32 @inotify_add_watch(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @inotify_rm_watch(i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"/tmp\00"
@IN_ALL_EVENTS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @inotify_init()
%2 = load i32, i32* @IN_ALL_EVENTS
%3 = tail call i32 @inotify_add_watch(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @inotify_rm_watch(i32 %1, i32 %3)
ret i32 0
}
int qd_to_int(const double *a) { return ((int)a[0]); }


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

x86 assembly (clang, -O2):
<qd_to_int>:
cvttsd2si (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @qd_to_int(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @qd_to_int(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
ret i32 %3
}
/* Type definitions */
struct bst {
  int dummy;
};

/* Variables and functions */
struct bst *bst_create(void) {
  return (struct bst *)NULL;
}


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

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

LLVM IR (-O0):
%struct.bst = type { i32 }
define %struct.bst* @bst_create() {
ret %struct.bst* null
}

LLVM IR (-O2):
%struct.bst = type { i32 }
define noalias %struct.bst* @bst_create() {
ret %struct.bst* null
}
char *_getabbrhostname(char *buf) {
  char *dot_ptr;
  if (_gethostname(buf) == 0x0)
    return 0x0;
  if ((dot_ptr = strstr(buf, ".")) == 0x0)
    return buf;
  *dot_ptr = '\0';
  return buf;
}


x86 assembly (clang, -O0):
<_getabbrhostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <_gethostname@plt>
cmp    $0x0,%eax
jne    114d <_getabbrhostname+0x2d>
movq   $0x0,-0x8(%rbp)
jmp    1187 <_getabbrhostname+0x67>
mov    -0x10(%rbp),%rdi
lea    0xea8(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1178 <_getabbrhostname+0x58>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1187 <_getabbrhostname+0x67>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getabbrhostname>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <_gethostname@plt>
test   %eax,%eax
je     1146 <_getabbrhostname+0x26>
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1148 <_getabbrhostname+0x28>
movb   $0x0,(%rax)
jmp    1148 <_getabbrhostname+0x28>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @_getabbrhostname(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @_gethostname to i32 (i8*, ...)*)(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 46)
%6 = icmp eq i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %4
store i8 0, i8* %5
br label %8
8: ; preds = %4, %1, %7
%9 = phi i8* [ %0, %7 ], [ null, %1 ], [ %0, %4 ]
ret i8* %9
}
/* Type definitions */
struct buffer {
  int dummy;
};

/* Variables and functions */
int add_int_data(struct buffer *, int, unsigned int);
int add_minbps_avp(struct buffer *buf, unsigned int speed) {
  return add_int_data(buf, 16, speed);
}


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

x86 assembly (clang, -O2):
<add_minbps_avp>:
mov    %esi,%edx
mov    $0x10,%esi
jmp    1030 <add_int_data@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @add_minbps_avp(%struct.buffer* %0, i32 %1) {
%3 = alloca %struct.buffer*
%4 = alloca i32
store %struct.buffer* %0, %struct.buffer** %3
store i32 %1, i32* %4
%5 = load %struct.buffer*, %struct.buffer** %3
%6 = load i32, i32* %4
%7 = call i32 @add_int_data(%struct.buffer* %5, i32 16, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @add_minbps_avp(%struct.buffer* %0, i32 %1) {
%3 = tail call i32 @add_int_data(%struct.buffer* %0, i32 16, i32 %1)
ret i32 %3
}
void main() { char **********ptr = (char **********)0x09388173; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9388173,%eax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i8**********
store i8********** inttoptr (i64 154698099 to i8**********), i8*********** %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
int /*<<< orphan*/ ngen(char *, char *, int);
void cgscaleby(int v) {
  ngen("%s\tcx,%d", "mov", v);
  gen("mul\tcx");
}


x86 assembly (clang, -O0):
<cgscaleby>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xecb(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1030 <ngen@plt>
lea    0xec5(%rip),%rdi
call   1040 <gen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgscaleby>:
push   %rax
mov    %edi,%edx
lea    0xed6(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1030 <ngen@plt>
lea    0xed0(%rip),%rdi
pop    %rax
jmp    1040 <gen@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s\09cx,%d\00"
@.str.1 = [4 x i8] c"mov\00"
@.str.2 = [7 x i8] c"mul\09cx\00"
define void @cgscaleby(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ngen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @gen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s\09cx,%d\00"
@.str.1 = [4 x i8] c"mov\00"
@.str.2 = [7 x i8] c"mul\09cx\00"
define void @cgscaleby(i32 %0) {
%2 = tail call i32 @ngen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%3 = tail call i32 @gen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
float __nv_fmul_rd(float, float);
float __fmul_rd(float __a, float __b) { return __nv_fmul_rd(__a, __b); }


x86 assembly (clang, -O0):
<__fmul_rd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__nv_fmul_rd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fmul_rd>:
jmp    1030 <__nv_fmul_rd@plt>

LLVM IR (-O0):
define float @__fmul_rd(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 @__nv_fmul_rd(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @__fmul_rd(float %0, float %1) {
%3 = tail call float @__nv_fmul_rd(float %0, float %1)
ret float %3
}
void attachInterrupt(int pin, void (*interrupt)(), int level) {}


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

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

LLVM IR (-O0):
define void @attachInterrupt(i32 %0, void (...)* %1, i32 %2) {
%4 = alloca i32
%5 = alloca void (...)*
%6 = alloca i32
store i32 %0, i32* %4
store void (...)* %1, void (...)** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @attachInterrupt(i32 %0, void (...)* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf(
      "Usage: myfind <file or directory> [ <options> ] ...\n"
      "default path is the current directory if none is specified; default "
      "expression is -print\n"
      "Options: (You can specify any of the following options)\n"
      "       : -help                   Shows all necessary informations for "
      "this command\n"
      "       : -user <name>/<uid>     file or directory belongig to specified "
      "user\n"
      "       : -name <pattern>        file or directory with specified name\n"
      "       : -type [bcdpfls]        All entry with specified file type\n"
      "       : -print                 print entries with the path\n"
      "       : -ls                    print entries with more details\n"
      "");
}


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

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

LLVM IR (-O0):
@.str = [619 x i8] c"Usage: myfind <file or directory> [ <options> ] ...\0Adefault path is the current directory if none is specified; default expression is -print\0AOptions: (You can specify any of the following options)\0A : -help Shows all necessary informations for this command\0A : -user <name>/<uid> file or directory belongig to specified user\0A : -name <pattern> file or directory with specified name\0A : -type [bcdpfls] All entry with specified file type\0A : -print print entries with the path\0A : -ls print entries with more details\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([619 x i8], [619 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [618 x i8] c"Usage: myfind <file or directory> [ <options> ] ...\0Adefault path is the current directory if none is specified; default expression is -print\0AOptions: (You can specify any of the following options)\0A : -help Shows all necessary informations for this command\0A : -user <name>/<uid> file or directory belongig to specified user\0A : -name <pattern> file or directory with specified name\0A : -type [bcdpfls] All entry with specified file type\0A : -print print entries with the path\0A : -ls print entries with more details\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([618 x i8], [618 x i8]* @str, i64 0, i64 0))
ret void
}
int outOfChina(double lat, double lng) {
  if (lng < 72.004 || lng > 137.8347) {
    return 1;
  }
  if (lat < 0.8293 || lat > 55.8271) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<outOfChina>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  0xeea(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     1138 <outOfChina+0x38>
movsd  -0x18(%rbp),%xmm0
movsd  0xeda(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1144 <outOfChina+0x44>
movl   $0x1,-0x4(%rbp)
jmp    1181 <outOfChina+0x81>
movsd  0xec4(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     116e <outOfChina+0x6e>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    117a <outOfChina+0x7a>
movl   $0x1,-0x4(%rbp)
jmp    1181 <outOfChina+0x81>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<outOfChina>:
movsd  0xef8(%rip),%xmm2
ucomisd %xmm1,%xmm2
seta   %al
ucomisd 0xef1(%rip),%xmm1
seta   %cl
or     %al,%cl
movsd  0xeec(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
ucomisd 0xee5(%rip),%xmm0
seta   %dl
or     %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @outOfChina(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp olt double %6, 7.200400e+01
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load double, double* %5
%10 = fcmp ogt double %9, 0x40613AB5DCC63F14
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 1, i32* %3
br label %20
12: ; preds = %8
%13 = load double, double* %4
%14 = fcmp olt double %13, 8.293000e-01
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load double, double* %4
%17 = fcmp ogt double %16, 5.582710e+01
br i1 %17, label %18, label %19
18: ; preds = %15, %12
store i32 1, i32* %3
br label %20
19: ; preds = %15
store i32 0, i32* %3
br label %20
20: ; preds = %19, %18, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @outOfChina(double %0, double %1) {
%3 = fcmp olt double %1, 7.200400e+01
%4 = fcmp ogt double %1, 0x40613AB5DCC63F14
%5 = or i1 %3, %4
%6 = fcmp olt double %0, 8.293000e-01
%7 = fcmp ogt double %0, 5.582710e+01
%8 = or i1 %6, %7
%9 = or i1 %8, %5
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int sa_port(void *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
const char *sa_strport(void *sa) {
  static char str[6];
  snprintf(str, sizeof(str), "%i", sa_port(sa));
  return str;
}


x86 assembly (clang, -O0):
<sa_strport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <sa_port@plt>
mov    %eax,%ecx
lea    0x2ef3(%rip),%rdi
mov    $0x6,%esi
lea    0xeb6(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2edb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sa_strport>:
push   %rbx
call   1040 <sa_port@plt>
lea    0x2f04(%rip),%rbx
lea    0xecc(%rip),%rdx
mov    %rbx,%rdi
mov    $0x6,%esi
mov    %eax,%ecx
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@sa_strport.str = internal global [6 x i8] zeroinitializer
@.str = [3 x i8] c"%i\00"
define i8* @sa_strport(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sa_port(i8* %3)
%5 = call i32 @snprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @sa_strport.str, i64 0, i64 0), i32 6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @sa_strport.str, i64 0, i64 0)
}

LLVM IR (-O2):
@sa_strport.str = internal global [6 x i8] zeroinitializer
@.str = [3 x i8] c"%i\00"
define i8* @sa_strport(i8* %0) {
%2 = tail call i32 @sa_port(i8* %0)
%3 = tail call i32 @snprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @sa_strport.str, i64 0, i64 0), i32 6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @sa_strport.str, i64 0, i64 0)
}
int do_278() { return 278; }


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

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

LLVM IR (-O0):
define i32 @do_278() {
ret i32 278
}

LLVM IR (-O2):
define i32 @do_278() {
ret i32 278
}
/* Variables and functions */
int /*<<< orphan*/ box_boolean(int);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_eq(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_boolean(x == y);
}


x86 assembly (clang, -O0):
<primitive_float_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <box_boolean@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_eq>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
cmpeqsd (%rsp),%xmm0
movq   %xmm0,%rdi
and    $0x1,%edi
pop    %rax
jmp    1040 <box_boolean@plt>

LLVM IR (-O0):
define void @primitive_float_eq() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @dpop()
%4 = call double @untag_float_fast(i32 %3)
store double %4, double* %1
%5 = call i32 (...) @dpop()
%6 = call double @untag_float_fast(i32 %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fcmp oeq double %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @box_boolean(i32 %10)
ret void
}

LLVM IR (-O2):
define void @primitive_float_eq() {
%1 = tail call i32 (...) @dpop()
%2 = tail call double @untag_float_fast(i32 %1)
%3 = tail call i32 (...) @dpop()
%4 = tail call double @untag_float_fast(i32 %3)
%5 = fcmp oeq double %4, %2
%6 = zext i1 %5 to i32
%7 = tail call i32 @box_boolean(i32 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fopen_extension_release(char const *, int /*<<< orphan*/ *, char **,
                            int /*<<< orphan*/ **);
int fopen_os_release(const char *root, char **ret_path, FILE **ret_file) {
  return fopen_extension_release(root, NULL, ret_path, ret_file);
}


x86 assembly (clang, -O0):
<fopen_os_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <fopen_extension_release@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fopen_os_release>:
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <fopen_extension_release@plt>

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

LLVM IR (-O2):
define i32 @fopen_os_release(i8* %0, i8** %1, i32** %2) {
%4 = tail call i32 @fopen_extension_release(i8* %0, i32* null, i8** %1, i32** %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void break_in_this_function() { uart_puts("Breakpoint not hit\n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Breakpoint not hit\0A\00"
define void @break_in_this_function() {
%1 = call i32 @uart_puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Breakpoint not hit\0A\00"
define void @break_in_this_function() {
%1 = tail call i32 @uart_puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
void RTStrNCmp(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrNCmp() {
ret void
}
int read_toc(int fd, struct cdrom_tocentry *btoc) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.cdrom_tocentry = type opaque
define i32 @read_toc(i32 %0, %struct.cdrom_tocentry* nocapture readnone %1) {
ret i32 0
}