xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ nli_bi_plug_acronym_load();
int /*<<< orphan*/ nli_bi_plug_datetime_load();
int /*<<< orphan*/ nli_bi_plug_emoticon_load();
int /*<<< orphan*/ nli_bi_plug_numbers_load();
int /*<<< orphan*/ nli_bi_plug_ss_load();
int /*<<< orphan*/ nli_bi_plug_wordizer_load();
int /*<<< orphan*/ nli_bi_plug_ws_load();
void nli_load_bi_plugs_(void) {
  nli_bi_plug_acronym_load();
  nli_bi_plug_emoticon_load();
  nli_bi_plug_datetime_load();
  nli_bi_plug_numbers_load();
  nli_bi_plug_wordizer_load();
  nli_bi_plug_ss_load();
  nli_bi_plug_ws_load();
}


x86 assembly (clang, -O0):
<nli_load_bi_plugs_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <nli_bi_plug_acronym_load@plt>
mov    $0x0,%al
call   1070 <nli_bi_plug_emoticon_load@plt>
mov    $0x0,%al
call   1040 <nli_bi_plug_datetime_load@plt>
mov    $0x0,%al
call   1090 <nli_bi_plug_numbers_load@plt>
mov    $0x0,%al
call   1080 <nli_bi_plug_wordizer_load@plt>
mov    $0x0,%al
call   1060 <nli_bi_plug_ss_load@plt>
mov    $0x0,%al
call   1030 <nli_bi_plug_ws_load@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nli_load_bi_plugs_>:
push   %rax
xor    %eax,%eax
call   1050 <nli_bi_plug_acronym_load@plt>
xor    %eax,%eax
call   1070 <nli_bi_plug_emoticon_load@plt>
xor    %eax,%eax
call   1040 <nli_bi_plug_datetime_load@plt>
xor    %eax,%eax
call   1090 <nli_bi_plug_numbers_load@plt>
xor    %eax,%eax
call   1080 <nli_bi_plug_wordizer_load@plt>
xor    %eax,%eax
call   1060 <nli_bi_plug_ss_load@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <nli_bi_plug_ws_load@plt>

LLVM IR (-O0):
define void @nli_load_bi_plugs_() {
%1 = call i32 (...) @nli_bi_plug_acronym_load()
%2 = call i32 (...) @nli_bi_plug_emoticon_load()
%3 = call i32 (...) @nli_bi_plug_datetime_load()
%4 = call i32 (...) @nli_bi_plug_numbers_load()
%5 = call i32 (...) @nli_bi_plug_wordizer_load()
%6 = call i32 (...) @nli_bi_plug_ss_load()
%7 = call i32 (...) @nli_bi_plug_ws_load()
ret void
}

LLVM IR (-O2):
define void @nli_load_bi_plugs_() {
%1 = tail call i32 (...) @nli_bi_plug_acronym_load()
%2 = tail call i32 (...) @nli_bi_plug_emoticon_load()
%3 = tail call i32 (...) @nli_bi_plug_datetime_load()
%4 = tail call i32 (...) @nli_bi_plug_numbers_load()
%5 = tail call i32 (...) @nli_bi_plug_wordizer_load()
%6 = tail call i32 (...) @nli_bi_plug_ss_load()
%7 = tail call i32 (...) @nli_bi_plug_ws_load()
ret void
}
/* Variables and functions */
void *xrealloc(void *in, int size) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture readnone %0, i32 %1) {
ret i8* null
}
unsigned int nonfatal(const unsigned int err) {
  return err & (1 << 4) ? (err ^ (1 << 4)) | (1 << 5) : err;
}


x86 assembly (clang, -O0):
<nonfatal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1127 <nonfatal+0x27>
mov    -0x4(%rbp),%eax
xor    $0x10,%eax
or     $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <nonfatal+0x2d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonfatal>:
mov    %edi,%eax
or     $0x20,%eax
xor    $0x10,%eax
test   $0x10,%dil
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @nonfatal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 16
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = xor i32 %7, 16
%9 = or i32 %8, 32
br label %12
10: ; preds = %1
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %9, %6 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @nonfatal(i32 %0) {
%2 = and i32 %0, 16
%3 = icmp eq i32 %2, 0
%4 = or i32 %0, 32
%5 = xor i32 %4, 16
%6 = select i1 %3, i32 %0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int);
int /*<<< orphan*/ raw();
int /*<<< orphan*/ stdscr;
void show_ncurs() {
  int row, col;
  initscr();
  raw();
  keypad(stdscr, true);
  getmaxyx(stdscr, row, col);
}


x86 assembly (clang, -O0):
<show_ncurs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <initscr@plt>
mov    $0x0,%al
call   1050 <raw@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1030 <keypad@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1060 <getmaxyx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_ncurs>:
push   %rbx
xor    %eax,%eax
call   1040 <initscr@plt>
xor    %eax,%eax
call   1050 <raw@plt>
mov    0x2e92(%rip),%rbx
mov    (%rbx),%edi
mov    $0x1,%esi
call   1030 <keypad@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1060 <getmaxyx@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @show_ncurs() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @initscr()
%4 = call i32 (...) @raw()
%5 = load i32, i32* @stdscr
%6 = call i32 @keypad(i32 %5, i32 1)
%7 = load i32, i32* @stdscr
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = call i32 @getmaxyx(i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @show_ncurs() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @raw()
%3 = load i32, i32* @stdscr
%4 = tail call i32 @keypad(i32 %3, i32 1)
%5 = load i32, i32* @stdscr
%6 = tail call i32 @getmaxyx(i32 %5, i32 undef, i32 undef)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
void systime(uint32_t *sec, uint32_t *cs) {
  struct timespec ti;
  clock_gettime(CLOCK_REALTIME, &ti);
  *sec = (uint32_t)ti.tv_sec;
  *cs = (uint32_t)(ti.tv_nsec / 10000000);
}


x86 assembly (clang, -O0):
<systime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%eax
mov    $0x989680,%ecx
cltd
idiv   %ecx
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<systime>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
mov    0x10(%rsp),%rax
mov    %rax,(%rbx)
movslq 0x8(%rsp),%rax
imul   $0x6b5fca6b,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x36,%rax
add    %ecx,%eax
cltq
mov    %rax,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_REALTIME = global i32 0
define void @systime(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca %struct.timespec
store i64* %0, i64** %3
store i64* %1, i64** %4
%6 = load i32, i32* @CLOCK_REALTIME
%7 = call i32 @clock_gettime(i32 %6, %struct.timespec* %5)
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
%9 = load i64, i64* %8
%10 = load i64*, i64** %3
store i64 %9, i64* %10
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%12 = load i32, i32* %11
%13 = sdiv i32 %12, 10000000
%14 = sext i32 %13 to i64
%15 = load i64*, i64** %4
store i64 %14, i64* %15
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_REALTIME = global i32 0
define void @systime(i64* nocapture writeonly %0, i64* nocapture writeonly %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = load i32, i32* @CLOCK_REALTIME
%6 = call i32 @clock_gettime(i32 %5, %struct.timespec* %3)
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 1
%8 = load i64, i64* %7
store i64 %8, i64* %0
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 0
%10 = load i32, i32* %9
%11 = sdiv i32 %10, 10000000
%12 = sext i32 %11 to i64
store i64 %12, i64* %1
ret void
}
unsigned long umax(int num_bits) {
  int i;
  unsigned long umax = 1ul;
  for (i = 0; i < num_bits; i++) {
    umax = umax * 2ul;
  }
  return umax - 1ul;
}


x86 assembly (clang, -O0):
<umax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    113c <umax+0x3c>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1116 <umax+0x16>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umax>:
test   %edi,%edi
jle    1118 <umax+0x18>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    111b <umax+0x1b>
mov    $0x1,%eax
jmp    1139 <umax+0x39>
xor    %eax,%eax
ret
and    $0xfffffff8,%edi
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
shl    $0x8,%rax
add    $0xfffffff8,%edi
jne    1130 <umax+0x30>
test   %ecx,%ecx
je     1148 <umax+0x48>
nopl   (%rax)
add    %rax,%rax
add    $0xffffffff,%ecx
jne    1140 <umax+0x40>
add    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @umax(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %2
store i64 1, i64* %4
store i32 0, i32* %3
br label %5
5: ; preds = %12, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i64, i64* %4
%11 = mul i64 %10, 2
store i64 %11, i64* %4
br label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %5
15: ; preds = %5
%16 = load i64, i64* %4
%17 = sub i64 %16, 1
ret i64 %17
}

LLVM IR (-O2):
define i64 @umax(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %28
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i64 [ 1, %7 ], [ %12, %9 ]
%11 = phi i32 [ 0, %7 ], [ %13, %9 ]
%12 = shl i64 %10, 8
%13 = add i32 %11, 8
%14 = icmp eq i32 %13, %8
br i1 %14, label %15, label %9
15: ; preds = %9, %3
%16 = phi i64 [ undef, %3 ], [ %12, %9 ]
%17 = phi i64 [ 1, %3 ], [ %12, %9 ]
%18 = icmp eq i32 %5, 0
br i1 %18, label %25, label %19
19: ; preds = %15, %19
%20 = phi i64 [ %22, %19 ], [ %17, %15 ]
%21 = phi i32 [ %23, %19 ], [ 0, %15 ]
%22 = shl i64 %20, 1
%23 = add i32 %21, 1
%24 = icmp eq i32 %23, %5
br i1 %24, label %25, label %19
25: ; preds = %19, %15
%26 = phi i64 [ %16, %15 ], [ %22, %19 ]
%27 = add i64 %26, -1
br label %28
28: ; preds = %25, %1
%29 = phi i64 [ 0, %1 ], [ %27, %25 ]
ret i64 %29
}
void copy(char to[], char from[]) {
  int i;
  i = 0;
  while (from[i] != '\0') {
    to[i] = from[i];
    i++;
  }
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <copy+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <copy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
mov    (%rsi),%al
test   %al,%al
je     1120 <copy+0x20>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rdi,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <copy+0x10>
ret

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

LLVM IR (-O2):
define void @copy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
char *slice(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char *buf2(char *text, int pos) {
  char *buffer2 = slice(text, pos, strlen(text));
  return buffer2;
}


x86 assembly (clang, -O0):
<buf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
call   1030 <slice@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <slice@plt>

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

LLVM IR (-O2):
define i8* @buf2(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i8* @slice(i8* %0, i32 %1, i32 %3)
ret i8* %4
}
void smp_init_pseries_xics(void) {}


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

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

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

LLVM IR (-O2):
define void @smp_init_pseries_xics() {
ret void
}
void gtk_accel_map_load_fd() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_map_load_fd() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parse_shutdown_options(int, char **);
int chshut(int argc, char *argv[]) {
  parse_shutdown_options(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @chshut(i32 %0, i8** %1) {
%3 = tail call i32 @parse_shutdown_options(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void rfree(void **v) {
  int i;
  if (v == NULL)
    return;
  for (i = 0; v[i] != NULL; ++i)
    free(v[i]);
  free(v);
}


x86 assembly (clang, -O0):
<rfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <rfree+0x1c>
jmp    116e <rfree+0x5e>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1165 <rfree+0x55>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <rfree+0x23>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfree>:
test   %rdi,%rdi
je     1150 <rfree+0x40>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <rfree+0x31>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <rfree+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @rfree(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %17, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = phi i8* [ %13, %6 ], [ %4, %3 ]
%9 = bitcast i8* %8 to i8**
%10 = tail call i32 @free(i8** %9)
%11 = add nuw nsw i64 %7, 1
%12 = getelementptr inbounds i8*, i8** %0, i64 %11
%13 = load i8*, i8** %12
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %6
15: ; preds = %6, %3
%16 = tail call i32 @free(i8** %0)
br label %17
17: ; preds = %1, %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bind_them_all();
int /*<<< orphan*/ canonicalization(char *, char *);
int /*<<< orphan*/ sort_by_target();
void mount_bindings(char *old_rootfs_mount_name, char *cwd) {
  canonicalization(old_rootfs_mount_name ? old_rootfs_mount_name : "", cwd);
  sort_by_target();
  bind_them_all();
}


x86 assembly (clang, -O0):
<mount_bindings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <mount_bindings+0x28>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1168 <mount_bindings+0x38>
lea    0xea1(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1168 <mount_bindings+0x38>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <canonicalization@plt>
mov    $0x0,%al
call   1040 <sort_by_target@plt>
mov    $0x0,%al
call   1050 <bind_them_all@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mount_bindings>:
push   %rax
test   %rdi,%rdi
lea    0xec5(%rip),%rax
cmove  %rax,%rdi
call   1030 <canonicalization@plt>
xor    %eax,%eax
call   1040 <sort_by_target@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <bind_them_all@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @mount_bindings(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i8*, i8** %3
br label %10
9: ; preds = %2
br label %10
10: ; preds = %9, %7
%11 = phi i8* [ %8, %7 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %9 ]
%12 = load i8*, i8** %4
%13 = call i32 @canonicalization(i8* %11, i8* %12)
%14 = call i32 (...) @sort_by_target()
%15 = call i32 (...) @bind_them_all()
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @mount_bindings(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %0
%5 = tail call i32 @canonicalization(i8* %4, i8* %1)
%6 = tail call i32 (...) @sort_by_target()
%7 = tail call i32 (...) @bind_them_all()
ret void
}
/* Variables and functions */
bool nrf52_errata_128(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_128() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ show_fun(char *, int);
int main() {
  show_fun("X_VALUE", 10);
  do {
    printf("%s", "hello");
  } while (0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0xa,%esi
call   1040 <show_fun@plt>
lea    0xecf(%rip),%rdi
lea    0xecb(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"X_VALUE\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @show_fun(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10)
br label %3
3: ; preds = %0
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"X_VALUE\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [6 x i8] c"hello\00"
define i32 @main() {
%1 = tail call i32 @show_fun(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ev_default_loop(int /*<<< orphan*/);
int /*<<< orphan*/ ev_loop_destroy(int /*<<< orphan*/);
void ev_default_destroy(void) { ev_loop_destroy(ev_default_loop(0)); }


x86 assembly (clang, -O0):
<ev_default_destroy>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <ev_default_loop@plt>
mov    %eax,%edi
call   1030 <ev_loop_destroy@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ev_default_destroy() {
%1 = call i32 @ev_default_loop(i32 0)
%2 = call i32 @ev_loop_destroy(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ev_default_destroy() {
%1 = tail call i32 @ev_default_loop(i32 0)
%2 = tail call i32 @ev_loop_destroy(i32 %1)
ret void
}
void ls_cost_nm3_decref(void) {}


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

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

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

LLVM IR (-O2):
define void @ls_cost_nm3_decref() {
ret void
}
/* Variables and functions */
int DoVprintf(char *, char);
int /*<<< orphan*/ Fail(char *, int, int);
int strlen(char *);
void DoCharTest(char *formatstr, char param, char *checkstr) {
  int ret;
  ret = DoVprintf(formatstr, param);
  if (ret != strlen(checkstr)) {
    Fail("Expected vprintf to return %d, got %d.\n", strlen(checkstr), ret);
  }
}


x86 assembly (clang, -O0):
<DoCharTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1040 <DoVprintf@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
je     118c <DoCharTest+0x5c>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x1c(%rbp),%edx
lea    0xe79(%rip),%rdi
call   1050 <Fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoCharTest>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
call   1040 <DoVprintf@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %eax,%ebp
jne    1150 <DoCharTest+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <Fail@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Expected vprintf to return %d, got %d.\0A\00"
define void @DoCharTest(i8* %0, i8 signext %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8, i8* %5
%10 = call i32 @DoVprintf(i8* %8, i8 signext %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = icmp ne i32 %11, %13
br i1 %14, label %15, label %20
15: ; preds = %3
%16 = load i8*, i8** %6
%17 = call i32 @strlen(i8* %16)
%18 = load i32, i32* %7
%19 = call i32 @Fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18)
br label %20
20: ; preds = %15, %3
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Expected vprintf to return %d, got %d.\0A\00"
define void @DoCharTest(i8* %0, i8 signext %1, i8* %2) {
%4 = tail call i32 @DoVprintf(i8* %0, i8 signext %1)
%5 = tail call i32 @strlen(i8* %2)
%6 = icmp eq i32 %4, %5
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i32 @strlen(i8* %2)
%9 = tail call i32 @Fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %4)
br label %10
10: ; preds = %7, %3
ret void
}
int Cyc_BansheeIf_banshee_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Cyc_BansheeIf_banshee_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int, int);
int /*<<< orphan*/ stderr;
__attribute__((hcos_noinstrument)) void check_int(const char *name,
                                                  int reported, int expected) {
  if (reported != expected)
    do {
      fprintf(
          stderr,
          "FAIL: "
          "Reported %s did not match expected. Reported: %d, Expected: %d\n",
          name, reported, expected);
      exit(1);
    } while (1);
}


x86 assembly (clang, -O0):
<check_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     116d <check_int+0x4d>
jmp    1143 <check_int+0x23>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_int>:
mov    %edx,%r8d
cmp    %edx,%esi
jne    1128 <check_int+0x8>
ret
push   %rax
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [70 x i8] c"FAIL: Reported %s did not match expected. Reported: %d, Expected: %d\0A\00"
define void @check_int(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 i32, i32* %5
%8 = load i32, i32* %6
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %3
br label %11
11: ; preds = %18, %10
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14, i32 %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; No predecessors!
br i1 true, label %11, label %19
19: ; preds = %18
br label %20
20: ; preds = %19, %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [70 x i8] c"FAIL: Reported %s did not match expected. Reported: %d, Expected: %d\0A\00"
define void @check_int(i8* %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, %2
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i32 %2)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
unsigned g2(void) {
  static unsigned z;
  z++;
  return z;
}


x86 assembly (clang, -O0):
<g2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f11(%rip)
mov    0x2f0b(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2>:
mov    0x2f1e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f15(%rip)
ret

LLVM IR (-O0):
@g2.z = internal global i32 0
define i32 @g2() {
%1 = load i32, i32* @g2.z
%2 = add i32 %1, 1
store i32 %2, i32* @g2.z
%3 = load i32, i32* @g2.z
ret i32 %3
}

LLVM IR (-O2):
@g2.z = internal unnamed_addr global i32 0
define i32 @g2() {
%1 = load i32, i32* @g2.z
%2 = add i32 %1, 1
store i32 %2, i32* @g2.z
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t log2_of_pow_2(uint32_t x) {
  static const int MultiplyDeBruijnBitPosition2[32] = {
      0,  1,  28, 2,  29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4,  8,
      31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6,  11, 5,  10, 9};
  return MultiplyDeBruijnBitPosition2[(uint32_t)(x * 0x077CB531U) >> 27];
}


x86 assembly (clang, -O0):
<log2_of_pow_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x77cb531,-0x4(%rbp),%eax
sar    $0x1b,%eax
movslq %eax,%rcx
lea    0xee5(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2_of_pow_2>:
imul   $0x77cb531,%edi,%eax
sar    $0x1b,%eax
cltq
lea    0xeee(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@log2_of_pow_2.MultiplyDeBruijnBitPosition2 = internal constant [32 x i32] [i32 0, i32 1, i32 28, i32 2, i32 29, i32 14, i32 24, i32 3, i32 30, i32 22, i32 20, i32 15, i32 25, i32 17, i32 4, i32 8, i32 31, i32 27, i32 13, i32 23, i32 21, i32 19, i32 16, i32 7, i32 26, i32 12, i32 18, i32 6, i32 11, i32 5, i32 10, i32 9]
define i32 @log2_of_pow_2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 125613361
%5 = ashr i32 %4, 27
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [32 x i32], [32 x i32]* @log2_of_pow_2.MultiplyDeBruijnBitPosition2, i64 0, i64 %6
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
@log2_of_pow_2.MultiplyDeBruijnBitPosition2 = internal unnamed_addr constant [32 x i32] [i32 0, i32 1, i32 28, i32 2, i32 29, i32 14, i32 24, i32 3, i32 30, i32 22, i32 20, i32 15, i32 25, i32 17, i32 4, i32 8, i32 31, i32 27, i32 13, i32 23, i32 21, i32 19, i32 16, i32 7, i32 26, i32 12, i32 18, i32 6, i32 11, i32 5, i32 10, i32 9]
define i32 @log2_of_pow_2(i32 %0) {
%2 = mul i32 %0, 125613361
%3 = ashr i32 %2, 27
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [32 x i32], [32 x i32]* @log2_of_pow_2.MultiplyDeBruijnBitPosition2, i64 0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
void psocMemoryBarrier() {
  __asm__ __volatile__("lock; addl $0,0(%%esp)" : : : "memory");
}


x86 assembly (clang, -O0):
<psocMemoryBarrier>:
push   %rbp
mov    %rsp,%rbp
lock addl $0x0,(%esp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<psocMemoryBarrier>:
lock addl $0x0,(%esp)
ret

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

LLVM IR (-O2):
define void @psocMemoryBarrier() {
tail call void asm sideeffect "lock; addl $$0,0(%esp)", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int _labels_compare(void *, void *);
int _labels_sort(const void *a, const void *b) {
  return _labels_compare(*(void **)a, *(void **)b);
}


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

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

LLVM IR (-O0):
define i32 @_labels_sort(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @_labels_compare(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @_labels_sort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @_labels_compare(i8* %4, i8* %6)
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
double to_real3(uint32_t v) {
  return (((double)v) + 0.5) * (1.0 / 4294967296.0);
}


x86 assembly (clang, -O0):
<to_real3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_real3>:
cvtsi2sd %rdi,%xmm0
addsd  0xef3(%rip),%xmm0
mulsd  0xef3(%rip),%xmm0
ret

LLVM IR (-O0):
define double @to_real3(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to double
%5 = fadd double %4, 5.000000e-01
%6 = fmul double %5, 0x3DF0000000000000
ret double %6
}

LLVM IR (-O2):
define double @to_real3(i64 %0) {
%2 = sitofp i64 %0 to double
%3 = fadd double %2, 5.000000e-01
%4 = fmul double %3, 0x3DF0000000000000
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_lock(pthread_mutex_t *mutex) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_mutex_lock(i32* nocapture readnone %0) {
ret i32 0
}
void pnv_smp_init(void) {}


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

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

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

LLVM IR (-O2):
define void @pnv_smp_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testAnual();
int main(void) {
  testAnual();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testAnual()
ret i32 0
}
unsigned long GET_BITS(unsigned long val, int bottombit, int topbit) {
  int total_nr_bits = topbit - bottombit;
  unsigned long mask = (1UL << total_nr_bits) - 1;
  return (val >> bottombit) & mask;
}


x86 assembly (clang, -O0):
<GET_BITS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    %cl,%rax
and    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GET_BITS>:
mov    %edx,%ecx
sub    %esi,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
not    %rax
mov    %esi,%ecx
shr    %cl,%rdi
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @GET_BITS(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = zext i32 %12 to i64
%14 = shl i64 1, %13
%15 = sub i64 %14, 1
store i64 %15, i64* %8
%16 = load i64, i64* %4
%17 = load i32, i32* %5
%18 = zext i32 %17 to i64
%19 = lshr i64 %16, %18
%20 = load i64, i64* %8
%21 = and i64 %19, %20
ret i64 %21
}

LLVM IR (-O2):
define i64 @GET_BITS(i64 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = zext i32 %4 to i64
%6 = shl nsw i64 -1, %5
%7 = xor i64 %6, -1
%8 = zext i32 %1 to i64
%9 = lshr i64 %0, %8
%10 = and i64 %9, %7
ret i64 %10
}
/* Type definitions */
typedef char uint8_t;
typedef int /*<<< orphan*/ magic;

/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ptg_write_file_magic(int fd) {
  static const uint8_t magic[2] = {'\x11', '\x03'};
  write(fd, magic, sizeof(magic));
}


x86 assembly (clang, -O0):
<ptg_write_file_magic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptg_write_file_magic>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@ptg_write_file_magic.magic = internal constant [2 x i8] c"\11\03"
define void @ptg_write_file_magic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @ptg_write_file_magic.magic, i64 0, i64 0), i32 2)
ret void
}

LLVM IR (-O2):
@ptg_write_file_magic.magic = internal constant [2 x i8] c"\11\03"
define void @ptg_write_file_magic(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @ptg_write_file_magic.magic, i64 0, i64 0), i32 2)
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t hangul_compose_lv(int32_t lpart, int32_t vpart) {
  int32_t lindex = lpart - 0x1100;
  int32_t vindex = vpart - 0x1161;
  int32_t lvindex = lindex * (21 * 28) + vindex * 28;
  int32_t s = 0xAC00 + lvindex;
  return s;
}


x86 assembly (clang, -O0):
<hangul_compose_lv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1100,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1161,%eax
mov    %eax,-0x10(%rbp)
imul   $0x24c,-0xc(%rbp),%eax
imul   $0x1c,-0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xac00,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hangul_compose_lv>:
imul   $0x24c,%edi,%eax
lea    (%rsi,%rsi,8),%ecx
lea    (%rcx,%rcx,2),%ecx
add    %esi,%ecx
add    %ecx,%eax
add    $0xffd7b964,%eax
ret

LLVM IR (-O0):
define i32 @hangul_compose_lv(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 4352
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 4449
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = mul nsw i32 %13, 588
%15 = load i32, i32* %6
%16 = mul nsw i32 %15, 28
%17 = add nsw i32 %14, %16
store i32 %17, i32* %7
%18 = load i32, i32* %7
%19 = add nsw i32 44032, %18
store i32 %19, i32* %8
%20 = load i32, i32* %8
ret i32 %20
}

LLVM IR (-O2):
define i32 @hangul_compose_lv(i32 %0, i32 %1) {
%3 = mul i32 %0, 588
%4 = mul i32 %1, 28
%5 = add i32 %3, -2639516
%6 = add i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ openServiceFile();
void onInitPlugin() { openServiceFile(); }


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

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

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

LLVM IR (-O2):
define void @onInitPlugin() {
%1 = tail call i32 (...) @openServiceFile()
ret void
}
int chmod(const char *filename, int mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @chmod(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(int);
int printer() {
  printf("Got yer lettas:\n");
  for (int i = 0; i < 128; i++) {
    printf("%d = ", i);
    putchar(i);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<printer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jge    117f <printer+0x5f>
mov    -0x4(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <printer+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printer>:
push   %rbp
push   %rbx
push   %rax
lea    0xecc(%rip),%rdi
call   1040 <puts@plt>
lea    0xeba(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0x80,%ebp
jne    1150 <printer+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Got yer lettas:\0A\00"
@.str.1 = [6 x i8] c"%d = \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @printer() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 128
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %1
%10 = call i32 @putchar(i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %6
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %3
15: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d = \00"
@str = [16 x i8] c"Got yer lettas:\00"
define i32 @printer() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %3
2: ; preds = %3
ret i32 0
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %8, %3 ]
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @putchar(i32 %4)
%7 = tail call i32 @putchar(i32 10)
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, 128
br i1 %9, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hoje está um \"LINDO\" dia!!!\n"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"Hoje est\C3\A1 um \22LINDO\22 dia!!!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"Hoje est\C3\A1 um \22LINDO\22 dia!!!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* 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__ xmaprequest;
};
typedef TYPE_2__ XEvent;

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


x86 assembly (clang, -O0):
<get_XEvent_xmaprequest_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_xmaprequest_serial>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xmaprequest_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_xmaprequest_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
void LoadAccum(void) { ol("ld\ta,l"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"ld\09a,l\00"
define void @LoadAccum() {
%1 = call i32 @ol(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"ld\09a,l\00"
define void @LoadAccum() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int tegra_set_wake_irq(unsigned int wake, int irq) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_set_wake_irq(i32 %0, i32 %1) {
ret i32 0
}