xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
void *malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void *pl_mm_malloc(int size) {
  void *ptr;
  ptr = malloc(size);
  if (((void *)0) == ptr) {
    printf("\n");
    printf("out of memory");
    printf("\n");
    fflush(stdout);
    assert(0);
  };
  return ptr;
}


x86 assembly (clang, -O0):
<pl_mm_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    119c <pl_mm_malloc+0x5c>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
xor    %edi,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_mm_malloc>:
push   %rbx
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1193 <pl_mm_malloc+0x43>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
xor    %edi,%edi
call   1050 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [14 x i8] c"out of memory\00"
@stdout = global i32 0
define i8* @pl_mm_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* null, %6
br i1 %7, label %8, label %15
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = call i32 @fflush(i32 %12)
%14 = call i32 @assert(i32 0)
br label %15
15: ; preds = %8, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"out of memory\00"
@stdout = global i32 0
define noalias i8* @pl_mm_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @putchar(i32 10)
%8 = load i32, i32* @stdout
%9 = tail call i32 @fflush(i32 %8)
%10 = tail call i32 @assert(i32 0)
br label %11
11: ; preds = %4, %1
ret i8* %2
}
unsigned int inw(unsigned long int port) {
  return *((volatile unsigned short *)((0x7c000000 + ((port) << 0))));
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x0,%rax
add    $0x7c000000,%rax
mov    (%rax),%ax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw>:
movzwl 0x7c000000(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @inw(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 0
%5 = add i64 2080374784, %4
%6 = inttoptr i64 %5 to i16*
%7 = load volatile i16, i16* %6
%8 = zext i16 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @inw(i64 %0) {
%2 = add i64 %0, 2080374784
%3 = inttoptr i64 %2 to i16*
%4 = load volatile i16, i16* %3
%5 = zext i16 %4 to i32
ret i32 %5
}
/* Variables and functions */
void *net_wait_all_generic(int);
void *net_wait_all(int tv) { return net_wait_all_generic(tv); }


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

x86 assembly (clang, -O2):
<net_wait_all>:
jmp    1030 <net_wait_all_generic@plt>

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

LLVM IR (-O2):
define i8* @net_wait_all(i32 %0) {
%2 = tail call i8* @net_wait_all_generic(i32 %0)
ret i8* %2
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ x;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xconfigurerequest_x(void *_p) {
  return (int)((XEvent *)_p)->xconfigurerequest.x;
}


x86 assembly (clang, -O0):
<get_XEvent_xconfigurerequest_x>:
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_xconfigurerequest_x>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xconfigurerequest_x(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
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xconfigurerequest_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void swap(int *p1, int *p2) {
  int *p = p1;
  p1 = p2;
  p2 = p;
}


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

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
long double scalbl(long double, long double);
long double test6l(long double x, long double exp) { return scalbl(x, exp); }


x86 assembly (clang, -O0):
<test6l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <scalbl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6l>:
jmp    1030 <scalbl@plt>

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

LLVM IR (-O2):
define x86_fp80 @test6l(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @scalbl(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawnattr_t;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int posix_spawnattr_setpgroup(posix_spawnattr_t *attr, pid_t pgroup) {
  ;
  errno = ENOSYS;
  return -1;
  ;
}


x86 assembly (clang, -O0):
<posix_spawnattr_setpgroup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_spawnattr_setpgroup>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_setpgroup(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_setpgroup(i32* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
scalar_t__ str_utf8_isstart(char const);
int str_utf8_rewind(const char *str, int cursor) {
  while (cursor) {
    cursor--;
    if (str_utf8_isstart(*(str + cursor)))
      break;
  }
  return cursor;
}


x86 assembly (clang, -O0):
<str_utf8_rewind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1157 <str_utf8_rewind+0x47>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <str_utf8_isstart@plt>
cmp    $0x0,%rax
je     1152 <str_utf8_rewind+0x42>
jmp    1157 <str_utf8_rewind+0x47>
jmp    111f <str_utf8_rewind+0xf>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_utf8_rewind>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
je     1153 <str_utf8_rewind+0x43>
mov    %esi,%r14d
movslq %esi,%rax
lea    (%rax,%rdi,1),%rbx
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <str_utf8_isstart@plt>
mov    %rax,%rcx
lea    -0x1(%r14),%eax
test   %rcx,%rcx
jne    1155 <str_utf8_rewind+0x45>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%r14d
mov    %eax,%r14d
jne    1130 <str_utf8_rewind+0x20>
jmp    1155 <str_utf8_rewind+0x45>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @str_utf8_rewind(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %18, label %4
4: ; preds = %2
%5 = sext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call i64 @str_utf8_isstart(i8 signext %10)
%12 = icmp eq i64 %11, 0
%13 = trunc i64 %8 to i32
%14 = icmp ne i32 %13, 0
%15 = select i1 %12, i1 %14, i1 false
br i1 %15, label %6, label %16
16: ; preds = %6
%17 = trunc i64 %8 to i32
br label %18
18: ; preds = %16, %2
%19 = phi i32 [ 0, %2 ], [ %17, %16 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void *realloc(void *, int);
void *dyad_realloc(void *ptr, int n) {
  ptr = realloc(ptr, n);
  if (!ptr && n != 0) {
    panic("out of memory");
  }
  return ptr;
}


x86 assembly (clang, -O0):
<dyad_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1160 <dyad_realloc+0x40>
cmpl   $0x0,-0xc(%rbp)
je     1160 <dyad_realloc+0x40>
lea    0xea5(%rip),%rdi
call   1030 <panic@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dyad_realloc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %ebp,%ebp
je     1142 <dyad_realloc+0x22>
test   %rbx,%rbx
jne    1142 <dyad_realloc+0x22>
lea    0xec3(%rip),%rdi
call   1030 <panic@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @dyad_realloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i8* @realloc(i8* %5, i32 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %15, label %10
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @panic(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %10, %2
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define i8* @dyad_realloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
%5 = icmp ne i32 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @panic(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
ret i8* %3
}
int main(int argc, const char *argv[]) {
  if (!argc) {
  }
  if (!argc) {
    return 0;
  }
  if (!argc) {
    return 0;
  }
  if (!argc) {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1121 <main+0x21>
jmp    1121 <main+0x21>
cmpl   $0x0,-0x8(%rbp)
jne    1137 <main+0x37>
movl   $0x0,-0x4(%rbp)
jmp    115e <main+0x5e>
cmpl   $0x0,-0x8(%rbp)
jne    114d <main+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    115e <main+0x5e>
cmpl   $0x0,-0x8(%rbp)
jne    115e <main+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %2
br label %9
9: ; preds = %8, %2
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %9
store i32 0, i32* %3
br label %21
13: ; preds = %9
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %13
store i32 0, i32* %3
br label %21
17: ; preds = %13
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %17
store i32 0, i32* %3
br label %21
21: ; preds = %12, %16, %20, %17
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ini_getbool_id(int *, char *);
int ini_getbool_id_def(char *param, int def) {
  int value;
  if (!ini_getbool_id(&value, param))
    return def;
  return value;
}


x86 assembly (clang, -O0):
<ini_getbool_id_def>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1030 <ini_getbool_id@plt>
cmp    $0x0,%eax
jne    1140 <ini_getbool_id_def+0x30>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <ini_getbool_id_def+0x36>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_getbool_id_def>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xc(%rsp),%rdi
call   1030 <ini_getbool_id@plt>
test   %eax,%eax
je     112c <ini_getbool_id_def+0x1c>
mov    0xc(%rsp),%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ini_getbool_id_def(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @ini_getbool_id(i32* %3, i8* %0)
%6 = icmp eq i32 %5, 0
%7 = load i32, i32* %3
%8 = select i1 %6, i32 %1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _eject_usage(void) {
  fputs("Usage: "
        "eject"
        " device...\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_eject_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_eject_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Usage: eject device...\0A\00"
@stderr = global i32 0
define i32 @_eject_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [24 x i8] c"Usage: eject device...\0A\00"
@stderr = global i32 0
define i32 @_eject_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
int main(int argc, char const *ar[]) { return 0; }


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int parport_pc_find_isa_ports(int, int);
int parport_pc_find_nonpci_ports(int autoirq, int autodma) {
  return parport_pc_find_isa_ports(autoirq, autodma);
}


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

x86 assembly (clang, -O2):
<parport_pc_find_nonpci_ports>:
jmp    1030 <parport_pc_find_isa_ports@plt>

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

LLVM IR (-O2):
define i32 @parport_pc_find_nonpci_ports(i32 %0, i32 %1) {
%3 = tail call i32 @parport_pc_find_isa_ports(i32 %0, i32 %1)
ret i32 %3
}
void gdk_cursor_get_display() {}


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

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

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

LLVM IR (-O2):
define void @gdk_cursor_get_display() {
ret void
}
/* Variables and functions */
scalar_t__ chdir(char const *);
scalar_t__ fs_is_dir(char const *);
int fs_chdir(const char *path) {
  if (fs_is_dir(path)) {
    if (chdir(path))
      return 1;
    else
      return 0;
  } else
    return 1;
}


x86 assembly (clang, -O0):
<fs_chdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fs_is_dir@plt>
cmp    $0x0,%rax
je     116a <fs_chdir+0x4a>
mov    -0x10(%rbp),%rdi
call   1030 <chdir@plt>
cmp    $0x0,%rax
je     115e <fs_chdir+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1171 <fs_chdir+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1171 <fs_chdir+0x51>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_chdir>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fs_is_dir@plt>
test   %rax,%rax
je     1143 <fs_chdir+0x23>
mov    %rbx,%rdi
call   1030 <chdir@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @fs_chdir(i8* %0) {
%2 = tail call i64 @fs_is_dir(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @chdir(i8* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 1, %1 ]
ret i32 %9
}
__attribute__((visibility("default"))) int echo_int(int arg, ...) {
  return arg;
}


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

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

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

LLVM IR (-O2):
define i32 @echo_int(i32 returned %0, ...) {
ret i32 %0
}
float deposit(float currentValue, float depositedValue) {
  currentValue -= currentValue * 0.00038;
  currentValue += depositedValue;
  return currentValue;
}


x86 assembly (clang, -O0):
<deposit>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xec1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deposit>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @deposit(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 = fpext float %5 to double
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = fneg double %6
%10 = call double @llvm.fmuladd.f64(double %9, double 3.800000e-04, double %8)
%11 = fptrunc double %10 to float
store float %11, float* %3
%12 = load float, float* %4
%13 = load float, float* %3
%14 = fadd float %13, %12
store float %14, float* %3
%15 = load float, float* %3
ret float %15
}

LLVM IR (-O2):
define float @deposit(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fneg double %3
%5 = tail call double @llvm.fmuladd.f64(double %4, double 3.800000e-04, double %3)
%6 = fptrunc double %5 to float
%7 = fadd float %6, %1
ret float %7
}
/* Variables and functions */
int lireligne(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int l;
  char ligne[1000];
  while ((l = lireligne(ligne, 1000)) >= -1) {
    if (l > 0)
      printf("%s", ligne);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <lireligne@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jl     1171 <main+0x51>
cmpl   $0x0,-0x8(%rbp)
jle    116c <main+0x4c>
lea    -0x3f0(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <lireligne@plt>
cmp    $0xffffffff,%eax
jl     1173 <main+0x53>
lea    0xebd(%rip),%r14
mov    %rsp,%rbx
jmp    1162 <main+0x42>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <lireligne@plt>
cmp    $0xfffffffe,%eax
jle    1173 <main+0x53>
test   %eax,%eax
jle    1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %14, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = call i32 @lireligne(i8* %5, i32 1000)
store i32 %6, i32* %2
%7 = icmp sge i32 %6, -1
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @lireligne(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, -2
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @lireligne(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, -2
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
double milesToInches(double miles) { return miles * 63360.0; }


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

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

LLVM IR (-O0):
define double @milesToInches(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 6.336000e+04
ret double %4
}

LLVM IR (-O2):
define double @milesToInches(double %0) {
%2 = fmul double %0, 6.336000e+04
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ memset(float *, int /*<<< orphan*/, int);
void glmGenerateZeroMatrix3f(float m[9]) { memset(m, 0, 9 * sizeof(float)); }


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

x86 assembly (clang, -O2):
<glmGenerateZeroMatrix3f>:
xor    %esi,%esi
mov    $0x24,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @glmGenerateZeroMatrix3f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = call i32 @memset(float* %3, i32 0, i32 36)
ret void
}

LLVM IR (-O2):
define void @glmGenerateZeroMatrix3f(float* %0) {
%2 = tail call i32 @memset(float* %0, i32 0, i32 36)
ret void
}
/* Variables and functions */
scalar_t__ pow(double, double);
long double powl(long double x, long double y) {
  return (long double)pow((double)x, (double)y);
}


x86 assembly (clang, -O0):
<powl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
call   1030 <pow@plt>
mov    %rax,-0x28(%rbp)
fildll -0x28(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powl>:
sub    $0x18,%rsp
fldt   0x30(%rsp)
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
fstpl  (%rsp)
movsd  (%rsp),%xmm1
call   1030 <pow@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @powl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call i64 @pow(double %6, double %8)
%10 = sitofp i64 %9 to x86_fp80
ret x86_fp80 %10
}

LLVM IR (-O2):
define x86_fp80 @powl(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call i64 @pow(double %3, double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}
/* Variables and functions */
int /*<<< orphan*/ PowerDownFeatures(int);
void powerDownModule() {
  PowerDownFeatures(0x00000001 | 0x00000002 | 0x00000004 | 0x00000008 |
                    0x00000010 | 0x00000020 | 0x00000040 | 0x00000080 |
                    0x00000100 | 0x00000200 | 0x00000400 | 0x00000800 |
                    0x00000800 | 0x00001000 | 0x00002000 | 0x00004000 |
                    0x00008000 | 0x00010000 | 0x00020000 | 0x00040000 |
                    0x00080000);
}


x86 assembly (clang, -O0):
<powerDownModule>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffff,%edi
call   1030 <PowerDownFeatures@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<powerDownModule>:
mov    $0xfffff,%edi
jmp    1030 <PowerDownFeatures@plt>

LLVM IR (-O0):
define void @powerDownModule() {
%1 = call i32 @PowerDownFeatures(i32 1048575)
ret void
}

LLVM IR (-O2):
define void @powerDownModule() {
%1 = tail call i32 @PowerDownFeatures(i32 1048575)
ret void
}
void skipWhites(char **ch) {
  while (**ch == ' ' || **ch == '\t')
    *ch = *ch + 1;
}


x86 assembly (clang, -O0):
<skipWhites>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1133 <skipWhites+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1143 <skipWhites+0x43>
jmp    115a <skipWhites+0x5a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1108 <skipWhites+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipWhites>:
mov    (%rdi),%rax
jmp    1113 <skipWhites+0x13>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,(%rdi)
add    $0x1,%rax
movzbl -0x1(%rax),%ecx
cmp    $0x20,%cl
je     1110 <skipWhites+0x10>
cmp    $0x9,%cl
je     1110 <skipWhites+0x10>
ret

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

LLVM IR (-O2):
define void @skipWhites(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 9, label %6
]
6: ; preds = %3, %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ KDSETLED;
long get_leds(int);
int ioctl(int, int /*<<< orphan*/, long);
int or_leds(int console, long int state) {
  return ioctl(console, KDSETLED, (state | get_leds(console)) & 7);
}


x86 assembly (clang, -O0):
<or_leds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <get_leds@plt>
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
or     %rax,%rdx
and    $0x7,%rdx
call   1040 <ioctl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<or_leds>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb0(%rip),%rax
mov    (%rax),%r14d
call   1030 <get_leds@plt>
or     %eax,%ebx
and    $0x7,%ebx
mov    %ebp,%edi
mov    %r14d,%esi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
@KDSETLED = global i32 0
define i32 @or_leds(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @KDSETLED
%7 = load i64, i64* %4
%8 = load i32, i32* %3
%9 = call i64 @get_leds(i32 %8)
%10 = or i64 %7, %9
%11 = and i64 %10, 7
%12 = call i32 @ioctl(i32 %5, i32 %6, i64 %11)
ret i32 %12
}

LLVM IR (-O2):
@KDSETLED = global i32 0
define i32 @or_leds(i32 %0, i64 %1) {
%3 = load i32, i32* @KDSETLED
%4 = tail call i64 @get_leds(i32 %0)
%5 = or i64 %4, %1
%6 = and i64 %5, 7
%7 = tail call i32 @ioctl(i32 %0, i32 %3, i64 %6)
ret i32 %7
}
void uart_printf(char *string) {
  static char *std_out_map = (char *)0x83e00000 + 0x1000;
  while (*string != '\0') {
    *std_out_map = *string;
    string++;
  }
}


x86 assembly (clang, -O0):
<uart_printf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1138 <uart_printf+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    0x2efb(%rip),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <uart_printf+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_printf>:
mov    (%rdi),%al
test   %al,%al
je     111d <uart_printf+0x1d>
add    $0x1,%rdi
mov    $0x83e01000,%ecx
nop
mov    %al,(%rcx)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <uart_printf+0x10>
ret

LLVM IR (-O0):
@uart_printf.std_out_map = internal global i8* inttoptr (i64 2212499456 to i8*)
define void @uart_printf(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = load i8*, i8** @uart_printf.std_out_map
store i8 %10, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @uart_printf(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %8, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
store i8 %5, i8* inttoptr (i64 2212499456 to i8*)
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %1
ret void
}
/* Type definitions */
struct drm_device {
  int dummy;
};

/* Variables and functions */
extern void psb_intel_opregion_enable_asle(struct drm_device *dev) {}


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

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

LLVM IR (-O0):
%struct.drm_device = type { i32 }
define void @psb_intel_opregion_enable_asle(%struct.drm_device* %0) {
%2 = alloca %struct.drm_device*
store %struct.drm_device* %0, %struct.drm_device** %2
ret void
}

LLVM IR (-O2):
%struct.drm_device = type { i32 }
define void @psb_intel_opregion_enable_asle(%struct.drm_device* nocapture %0) {
ret void
}
addnum(n) register long n;
{
  if (n >= 10)
    addnum(n / 10);
  addch((char)(n % 10 + '0'));
}


x86 assembly (clang, -O0):
<addnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0xa,-0x10(%rbp)
jl     114d <addnum+0x2d>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
call   1040 <addnum@plt>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
add    $0x30,%rdx
mov    %dl,%al
movsbl %al,%edi
mov    $0x0,%al
call   1030 <addch@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addnum>:
push   %rbx
mov    %rdi,%rbx
cmp    $0xa,%rdi
jl     1146 <addnum+0x26>
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mov    %rbx,%rax
mul    %rcx
mov    %rdx,%rdi
shr    $0x3,%rdi
call   1040 <addnum@plt>
movabs $0x6666666666666667,%rcx
66 66 66
mov    %rbx,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x2,%rdx
add    %eax,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%ebx
add    $0x30,%ebx
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <addch@plt>

LLVM IR (-O0):
define i32 @addnum(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp sge i64 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* %3
%8 = sdiv i64 %7, 10
%9 = call i32 @addnum(i64 %8)
br label %10
10: ; preds = %6, %1
%11 = load i64, i64* %3
%12 = srem i64 %11, 10
%13 = add nsw i64 %12, 48
%14 = trunc i64 %13 to i8
%15 = sext i8 %14 to i32
%16 = call i32 (i32, ...) bitcast (i32 (...)* @addch to i32 (i32, ...)*)(i32 %15)
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @addnum(i64 %0) {
%2 = icmp sgt i64 %0, 9
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = udiv i64 %0, 10
%5 = tail call i32 @addnum(i64 %4)
br label %6
6: ; preds = %3, %1
%7 = srem i64 %0, 10
%8 = trunc i64 %7 to i32
%9 = add nsw i32 %8, 48
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @addch to i32 (i32, ...)*)(i32 %9)
ret i32 undef
}
double dblOr(double a, double b) { return ((long)a) | ((long)b); }


x86 assembly (clang, -O0):
<dblOr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
cvttsd2si -0x8(%rbp),%rax
cvttsd2si -0x10(%rbp),%rcx
or     %rcx,%rax
cvtsi2sd %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dblOr>:
cvttsd2si %xmm0,%rax
cvttsd2si %xmm1,%rcx
or     %rax,%rcx
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
ret

LLVM IR (-O0):
define double @dblOr(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fptosi double %5 to i64
%7 = load double, double* %4
%8 = fptosi double %7 to i64
%9 = or i64 %6, %8
%10 = sitofp i64 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @dblOr(double %0, double %1) {
%3 = fptosi double %0 to i64
%4 = fptosi double %1 to i64
%5 = or i64 %4, %3
%6 = sitofp i64 %5 to double
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ abortIf(int, char *);
void ASSERT(unsigned cond, char *msg) { abortIf(!cond, msg); }


x86 assembly (clang, -O0):
<ASSERT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
mov    -0x10(%rbp),%rsi
call   1030 <abortIf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASSERT>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
mov    %eax,%edi
jmp    1030 <abortIf@plt>

LLVM IR (-O0):
define void @ASSERT(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 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = load i8*, i8** %4
%10 = call i32 @abortIf(i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
define void @ASSERT(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @abortIf(i32 %4, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int test();
main() {
  if (test() != 8)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test@plt>
cmp    $0x8,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test@plt>
cmp    $0x8,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test()
%3 = icmp ne i32 %2, 8
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test()
%2 = icmp eq i32 %1, 8
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fn_glutDestroyWindow(int);
void glutDestroyWindow(int win) { fn_glutDestroyWindow(win); }


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

x86 assembly (clang, -O2):
<glutDestroyWindow>:
jmp    1030 <fn_glutDestroyWindow@plt>

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

LLVM IR (-O2):
define void @glutDestroyWindow(i32 %0) {
%2 = tail call i32 @fn_glutDestroyWindow(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ permute(char *, int /*<<< orphan*/, int);
int strlen(char *);
int main() {
  char str[] = "ABC";
  int n = strlen(str);
  permute(str, 0, n - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <permute@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x434241,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    -0x1(%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <permute@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [4 x i8] c"ABC\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [4 x i8]* %2 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i32 @permute(i8* %7, i32 0, i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 4407873, i32* %1
%3 = call i32 @strlen(i8* %2)
%4 = add nsw i32 %3, -1
%5 = call i32 @permute(i8* %2, i32 0, i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear_rhs_vars();
int /*<<< orphan*/ rul__gen_decr_rhs_vars_simple();
void rul__gen_decr_rhs_vars(void) {
  rul__gen_decr_rhs_vars_simple();
  clear_rhs_vars();
}


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

x86 assembly (clang, -O2):
<rul__gen_decr_rhs_vars>:
push   %rax
xor    %eax,%eax
call   1030 <rul__gen_decr_rhs_vars_simple@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <clear_rhs_vars@plt>

LLVM IR (-O0):
define void @rul__gen_decr_rhs_vars() {
%1 = call i32 (...) @rul__gen_decr_rhs_vars_simple()
%2 = call i32 (...) @clear_rhs_vars()
ret void
}

LLVM IR (-O2):
define void @rul__gen_decr_rhs_vars() {
%1 = tail call i32 (...) @rul__gen_decr_rhs_vars_simple()
%2 = tail call i32 (...) @clear_rhs_vars()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void CloseKeyboard() { endwin(); }


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

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

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

LLVM IR (-O2):
define void @CloseKeyboard() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cplusplus();
int main() {
  Cplusplus();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Cplusplus()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Cplusplus()
ret i32 0
}
/* Variables and functions */
double distance_to_line_ratio(double, double, double, double, double, double,
                              double *);
double distance_to_line(double latitude, double longitude, double latitude_a,
                        double longitude_a, double latitude_b,
                        double longitude_b) {
  double ratio;
  return distance_to_line_ratio(latitude, longitude, latitude_a, longitude_a,
                                latitude_b, longitude_b, &ratio);
}


x86 assembly (clang, -O0):
<distance_to_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
lea    -0x38(%rbp),%rdi
call   1030 <distance_to_line_ratio@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance_to_line>:
push   %rax
mov    %rsp,%rdi
call   1030 <distance_to_line_ratio@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @distance_to_line(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%14 = load double, double* %7
%15 = load double, double* %8
%16 = load double, double* %9
%17 = load double, double* %10
%18 = load double, double* %11
%19 = load double, double* %12
%20 = call double @distance_to_line_ratio(double %14, double %15, double %16, double %17, double %18, double %19, double* %13)
ret double %20
}

LLVM IR (-O2):
define double @distance_to_line(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = bitcast double* %7 to i8*
%9 = call double @distance_to_line_ratio(double %0, double %1, double %2, double %3, double %4, double %5, double* %7)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void process(char *pt) { printf("inside process\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"inside process\0A\00"
define void @process(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"inside process\00"
define void @process(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}