xunge/DecIR huggingface dataset:
/* Variables and functions */
int __VERIFIER_nondet_int_val();
int /*<<< orphan*/ assert(int);
int main() {
  int i = 0, x = 0, y = 0;
  int n = __VERIFIER_nondet_int_val();
  for (i = 0; 1; i++) {
    assert(x == 0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int_val@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1164 <main+0x44>
jmp    1183 <main+0x63>
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <main+0x35>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int_val@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <assert@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%6 = call i32 (...) @__VERIFIER_nondet_int_val()
store i32 %6, i32* %5
store i32 0, i32* %2
br label %7
7: ; preds = %13, %0
br i1 true, label %8, label %16
8: ; preds = %7
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %7
16: ; preds = %7
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int_val()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @assert(i32 1)
br label %2
}
int do_293() { return 293; }


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

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

LLVM IR (-O0):
define i32 @do_293() {
ret i32 293
}

LLVM IR (-O2):
define i32 @do_293() {
ret i32 293
}
/* Variables and functions */
int /*<<< orphan*/ set_servo_speedB(unsigned char, unsigned int);
void set_servo_speed_b(unsigned char servoNum, unsigned int speed) {
  set_servo_speedB(servoNum, speed);
}


x86 assembly (clang, -O0):
<set_servo_speed_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
movzbl %al,%edi
call   1030 <set_servo_speedB@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_servo_speed_b>:
jmp    1030 <set_servo_speedB@plt>

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

LLVM IR (-O2):
define void @set_servo_speed_b(i8 zeroext %0, i32 %1) {
%3 = tail call i32 @set_servo_speedB(i8 zeroext %0, i32 %1)
ret void
}
short bswapw(short data) {
  short res;
  __asm__("bswap %%eax" : "=a"(res) : "a"(data << 16));
  return res;
}


x86 assembly (clang, -O0):
<bswapw>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
shl    $0x10,%eax
bswap  %eax
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswapw>:
mov    %edi,%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define signext i16 @bswapw(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
%6 = shl i32 %5, 16
%7 = call i16 asm "bswap %eax", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %6)
store i16 %7, i16* %3
%8 = load i16, i16* %3
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @bswapw(i16 signext %0) {
%2 = zext i16 %0 to i32
%3 = shl nuw i32 %2, 16
%4 = tail call i16 asm "bswap %eax", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %3)
ret i16 %4
}
/* Variables and functions */
void do_preload_rhash(int r) {}


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

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

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

LLVM IR (-O2):
define void @do_preload_rhash(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_fmt(char *, char *, double);
void log_idouble(char *name, double v) { log_fmt(name, "%.0lf", v); }


x86 assembly (clang, -O0):
<log_idouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
lea    0xecf(%rip),%rsi
call   1030 <log_fmt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_idouble>:
lea    0xee9(%rip),%rsi
jmp    1030 <log_fmt@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%.0lf\00"
define void @log_idouble(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i8*, i8** %3
%6 = load double, double* %4
%7 = call i32 @log_fmt(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %6)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.0lf\00"
define void @log_idouble(i8* %0, double %1) {
%3 = tail call i32 @log_fmt(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DATA_hh();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_hh();
LIBRARY_hh() {
  LibraryHeader("hh", "Sat Feb  1 10:41:13 2014 ");
  DATA_hh();
  STARTUP_hh();
}


x86 assembly (clang, -O0):
<LIBRARY_hh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1030 <LibraryHeader@plt>
mov    $0x0,%al
call   1040 <DATA_hh@plt>
mov    $0x0,%al
call   1050 <STARTUP_hh@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_hh>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1030 <LibraryHeader@plt>
xor    %eax,%eax
call   1040 <DATA_hh@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <STARTUP_hh@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"hh\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:13 2014 \00"
define i32 @LIBRARY_hh() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_hh()
%4 = call i32 (...) @STARTUP_hh()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [3 x i8] c"hh\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:13 2014 \00"
define i32 @LIBRARY_hh() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_hh()
%3 = tail call i32 (...) @STARTUP_hh()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void main(void) {
  int i;
  printf("TASK: executing...\n");
  i = 0;
  while (1) {
    printf("TASK: %d\n", i);
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xeca(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [20 x i8] c"TASK: executing...\0A\00"
@.str.1 = [10 x i8] c"TASK: %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %3
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"TASK: %d\0A\00"
@str = [19 x i8] c"TASK: executing...\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = add nuw nsw i32 %3, 1
br label %2
}
int do_770() { return 770; }


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

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

LLVM IR (-O0):
define i32 @do_770() {
ret i32 770
}

LLVM IR (-O2):
define i32 @do_770() {
ret i32 770
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ assert(int);
void *calloc(size_t, size_t);
int /*<<< orphan*/ perror(char *);
void *utils_calloc(size_t nmemb, size_t size) {
  void *ptr;
  assert(nmemb > 0);
  assert(size > 0);
  if (!(ptr = calloc(nmemb, size))) {
    perror("calloc()");
    abort();
  }
  return ptr;
}


x86 assembly (clang, -O0):
<utils_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    11a2 <utils_calloc+0x62>
lea    0xe6a(%rip),%rdi
call   1060 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utils_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1050 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <calloc@plt>
test   %rax,%rax
je     117e <utils_calloc+0x3e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe7b(%rip),%rdi
call   1060 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"calloc()\00"
define i8* @utils_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = icmp ugt i64 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i64, i64* %4
%11 = icmp ugt i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = call i8* @calloc(i64 %14, i64 %15)
store i8* %16, i8** %5
%17 = icmp ne i8* %16, null
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %2
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
@.str = [9 x i8] c"calloc()\00"
define noalias i8* @utils_calloc(i64 %0, i64 %1) {
%3 = icmp ne i64 %0, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i64 %1, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i8* @calloc(i64 %0, i64 %1)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 (...) @abort()
unreachable
14: ; preds = %2
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ destroy_wins();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free_mats();
void refresh_exit() {
  destroy_wins();
  free_mats();
  endwin();
  exit(1);
}


x86 assembly (clang, -O0):
<refresh_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <destroy_wins@plt>
mov    $0x0,%al
call   1030 <free_mats@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<refresh_exit>:
push   %rax
xor    %eax,%eax
call   1040 <destroy_wins@plt>
xor    %eax,%eax
call   1030 <free_mats@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define void @refresh_exit() {
%1 = call i32 (...) @destroy_wins()
%2 = call i32 (...) @free_mats()
%3 = call i32 (...) @endwin()
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @refresh_exit() {
%1 = tail call i32 (...) @destroy_wins()
%2 = tail call i32 (...) @free_mats()
%3 = tail call i32 (...) @endwin()
%4 = tail call i32 @exit(i32 1)
unreachable
}
void writeu2(unsigned char *p, unsigned int x) {
  *p++ = x;
  *p++ = x >> 8;
}


x86 assembly (clang, -O0):
<writeu2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeu2>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @writeu2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = trunc i32 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %3
store i8 %6, i8* %7
%9 = load i32, i32* %4
%10 = lshr i32 %9, 8
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @writeu2(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %0
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
store i8 %6, i8* %4
ret void
}
int main(void) {
  int x;
  int y;
  x = 42;
  x = y = 4711;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void dbg_dump_sleb(const struct ubifs_info *c,
                   const struct ubifs_scan_leb *sleb, int offs) {
  return;
}


x86 assembly (clang, -O0):
<dbg_dump_sleb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ubifs_info = type opaque
%struct.ubifs_scan_leb = type opaque
define void @dbg_dump_sleb(%struct.ubifs_info* %0, %struct.ubifs_scan_leb* %1, i32 %2) {
%4 = alloca %struct.ubifs_info*
%5 = alloca %struct.ubifs_scan_leb*
%6 = alloca i32
store %struct.ubifs_info* %0, %struct.ubifs_info** %4
store %struct.ubifs_scan_leb* %1, %struct.ubifs_scan_leb** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.ubifs_info = type opaque
%struct.ubifs_scan_leb = type opaque
define void @dbg_dump_sleb(%struct.ubifs_info* nocapture %0, %struct.ubifs_scan_leb* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
int main() {
  char a = 'A';
  char b = 'B';
  char c = 'C';
  printf("%c, %c, %c\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movb   $0x42,-0x6(%rbp)
movb   $0x43,-0x7(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x6(%rbp),%al
lea    0xec8(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x7(%rbp),%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%c, %c, %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 66, i8 signext 67)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x - y > 0) {
    x = y - x;
    y = y + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
jle    1159 <main+0x49>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void direct_exit_example_ok() {
  int *p = NULL;
  exit(1);
  *p = 42;
}


x86 assembly (clang, -O0):
<direct_exit_example_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @direct_exit_example_ok() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @direct_exit_example_ok() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
bool ADCBusy(uint32_t ui32Base) {
  ASSERT((ui32Base == 0x40038000) || (ui32Base == 0x40039000));
  return (((*((volatile uint32_t *)(ui32Base + 0x00000000))) & 0x00010000)
              ? true
              : false);
}


x86 assembly (clang, -O0):
<ADCBusy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x40038000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113a <ADCBusy+0x2a>
cmpl   $0x40039000,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%edx
and    $0x10000,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCBusy>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40038000,%eax
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
mov    (%rax),%eax
shr    $0x10,%eax
and    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ADCBusy(i32 %0) {
%2 = and i32 %0, -4097
%3 = icmp eq i32 %2, 1073971200
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = sext i32 %0 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = lshr i32 %8, 16
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ niceprint(char *);
void themberchaud() {
  niceprint("An adult red dragon, Themberchaud, is out on his regular rounds, "
            "keeping the city's forges aflame. "
            "Themberchaud has long been keeping his eye out for mercenaries in "
            "the city that could be bent to his service.  "
            "If he spots the characters, he might take an interest in them.");
}


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

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

LLVM IR (-O0):
@.str = [273 x i8] c"An adult red dragon, Themberchaud, is out on his regular rounds, keeping the city's forges aflame. Themberchaud has long been keeping his eye out for mercenaries in the city that could be bent to his service. If he spots the characters, he might take an interest in them.\00"
define void @themberchaud() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([273 x i8], [273 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [273 x i8] c"An adult red dragon, Themberchaud, is out on his regular rounds, keeping the city's forges aflame. Themberchaud has long been keeping his eye out for mercenaries in the city that could be bent to his service. If he spots the characters, he might take an interest in them.\00"
define void @themberchaud() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([273 x i8], [273 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__44__IO__selectIOFunc();
void Msp430Adc12ImplP__Port64__selectIOFunc(void) {
  HplMsp430GeneralIOP__44__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @Msp430Adc12ImplP__Port64__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__44__IO__selectIOFunc()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RemoteIO_SendMouseDown(int, int, int);
int /*<<< orphan*/
UpnpResponse_RemoteIOClient_RemoteInput_InputMouseDown(void *);
void UpnpRemoteIOClient_RemoteInput_InputMouseDown(void *upnptoken, int X,
                                                   int Y, int Button) {
  RemoteIO_SendMouseDown(X, Y, Button);
  UpnpResponse_RemoteIOClient_RemoteInput_InputMouseDown(upnptoken);
}


x86 assembly (clang, -O0):
<UpnpRemoteIOClient_RemoteInput_InputMouseDown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <RemoteIO_SendMouseDown@plt>
mov    -0x8(%rbp),%rdi
call   1030 <UpnpResponse_RemoteIOClient_RemoteInput_InputMouseDown@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpRemoteIOClient_RemoteInput_InputMouseDown>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
call   1040 <RemoteIO_SendMouseDown@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <UpnpResponse_RemoteIOClient_RemoteInput_InputMouseDown@plt>

LLVM IR (-O0):
define void @UpnpRemoteIOClient_RemoteInput_InputMouseDown(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = call i32 @RemoteIO_SendMouseDown(i32 %9, i32 %10, i32 %11)
%13 = load i8*, i8** %5
%14 = call i32 @UpnpResponse_RemoteIOClient_RemoteInput_InputMouseDown(i8* %13)
ret void
}

LLVM IR (-O2):
define void @UpnpRemoteIOClient_RemoteInput_InputMouseDown(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @RemoteIO_SendMouseDown(i32 %1, i32 %2, i32 %3)
%6 = tail call i32 @UpnpResponse_RemoteIOClient_RemoteInput_InputMouseDown(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 5;
  i *= 2 + 3;
  printf("i=%d\n", i);
  printf("/=%d\n", i /= 5 - 2);
  printf("<<=%d\n", i << 1 + 2);
  printf("i=%d\n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
imul   $0x5,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    %esi,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
shl    $0x3,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x19,%esi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x40,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"i=%d\0A\00"
@.str.1 = [6 x i8] c"/=%d\0A\00"
@.str.2 = [7 x i8] c"<<=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 25)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 8)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 64)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}
void kbase_ipa_model_use_fallback_locked(struct kbase_device *kbdev) {}


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

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

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

LLVM IR (-O2):
%struct.kbase_device = type opaque
define void @kbase_ipa_model_use_fallback_locked(%struct.kbase_device* nocapture %0) {
ret void
}
/* Variables and functions */
int get_l_offset(int);
int proctal_x86_64_dr_l(unsigned long long dr7, int r) {
  int offset = get_l_offset(r);
  if (offset == -1) {
    return 0;
  }
  unsigned int mask = 1u << offset;
  return (dr7 & mask) >> offset;
}


x86 assembly (clang, -O0):
<proctal_x86_64_dr_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <get_l_offset@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1140 <proctal_x86_64_dr_l+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1160 <proctal_x86_64_dr_l+0x50>
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
and    %rcx,%rax
mov    -0x18(%rbp),%ecx
shr    %cl,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proctal_x86_64_dr_l>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <get_l_offset@plt>
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %eax,%ebx
shr    %cl,%rbx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
cmove  %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @proctal_x86_64_dr_l(i64 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
%8 = load i32, i32* %5
%9 = call i32 @get_l_offset(i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %24
13: ; preds = %2
%14 = load i32, i32* %6
%15 = shl i32 1, %14
store i32 %15, i32* %7
%16 = load i64, i64* %4
%17 = load i32, i32* %7
%18 = zext i32 %17 to i64
%19 = and i64 %16, %18
%20 = load i32, i32* %6
%21 = zext i32 %20 to i64
%22 = lshr i64 %19, %21
%23 = trunc i64 %22 to i32
store i32 %23, i32* %3
br label %24
24: ; preds = %13, %12
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @proctal_x86_64_dr_l(i64 %0, i32 %1) {
%3 = tail call i32 @get_l_offset(i32 %1)
%4 = icmp eq i32 %3, -1
%5 = shl nuw i32 1, %3
%6 = zext i32 %5 to i64
%7 = and i64 %6, %0
%8 = zext i32 %3 to i64
%9 = lshr i64 %7, %8
%10 = trunc i64 %9 to i32
%11 = select i1 %4, i32 0, i32 %10
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int ENOSYS;
int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) { return -ENOSYS; }


x86 assembly (clang, -O0):
<pthread_rwlock_rdlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ed7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_rwlock_rdlock>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_rwlock_rdlock(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int HadTu_decoding(void const *);
int HadTu_size(void const *);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
char *HadTu_2charP(const void *my) {
  static char buf[80];
  sprintf(buf, "size: 0x%08x\tdecoding: 0x%08x", HadTu_size(my),
          HadTu_decoding(my));
  return buf;
}


x86 assembly (clang, -O0):
<HadTu_2charP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <HadTu_size@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <HadTu_decoding@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0x2ef3(%rip),%rdi
lea    0xe9c(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ee0(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HadTu_2charP>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <HadTu_size@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <HadTu_decoding@plt>
lea    0x2f04(%rip),%rbx
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
mov    %eax,%ecx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@HadTu_2charP.buf = internal global [80 x i8] zeroinitializer
@.str = [30 x i8] c"size: 0x%08x\09decoding: 0x%08x\00"
define i8* @HadTu_2charP(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @HadTu_size(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @HadTu_decoding(i8* %5)
%7 = call i32 @sprintf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @HadTu_2charP.buf, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6)
ret i8* getelementptr inbounds ([80 x i8], [80 x i8]* @HadTu_2charP.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@HadTu_2charP.buf = internal global [80 x i8] zeroinitializer
@.str = [30 x i8] c"size: 0x%08x\09decoding: 0x%08x\00"
define i8* @HadTu_2charP(i8* %0) {
%2 = tail call i32 @HadTu_size(i8* %0)
%3 = tail call i32 @HadTu_decoding(i8* %0)
%4 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @HadTu_2charP.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
ret i8* getelementptr inbounds ([80 x i8], [80 x i8]* @HadTu_2charP.buf, i64 0, i64 0)
}
/* Type definitions */
struct smpEle {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ prtSmpEle(struct smpEle *);
void prtSmpEle2(void *obj) { prtSmpEle((struct smpEle *)obj); }


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

x86 assembly (clang, -O2):
<prtSmpEle2>:
jmp    1030 <prtSmpEle@plt>

LLVM IR (-O0):
%struct.smpEle = type { i32 }
define void @prtSmpEle2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.smpEle*
%5 = call i32 @prtSmpEle(%struct.smpEle* %4)
ret void
}

LLVM IR (-O2):
%struct.smpEle = type { i32 }
define void @prtSmpEle2(i8* %0) {
%2 = bitcast i8* %0 to %struct.smpEle*
%3 = tail call i32 @prtSmpEle(%struct.smpEle* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putMessage(unsigned char *, int);
void nrf_init() {
  unsigned char cmd;
  cmd = 0x02;
  putMessage(&cmd, 1);
}


x86 assembly (clang, -O0):
<nrf_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x2,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <putMessage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_init>:
push   %rax
movb   $0x2,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <putMessage@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @nrf_init() {
%1 = alloca i8
store i8 2, i8* %1
%2 = call i32 @putMessage(i8* %1, i32 1)
ret void
}

LLVM IR (-O2):
define void @nrf_init() {
%1 = alloca i8
store i8 2, i8* %1
%2 = call i32 @putMessage(i8* %1, i32 1)
ret void
}
/* Type definitions */
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int NSS_STATUS_SUCCESS;
enum nss_status _nss_inject_endhostent() { return NSS_STATUS_SUCCESS; }


x86 assembly (clang, -O0):
<_nss_inject_endhostent>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_inject_endhostent>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@NSS_STATUS_SUCCESS = global i32 0
define i32 @_nss_inject_endhostent() {
%1 = load i32, i32* @NSS_STATUS_SUCCESS
ret i32 %1
}

LLVM IR (-O2):
@NSS_STATUS_SUCCESS = global i32 0
define i32 @_nss_inject_endhostent() {
%1 = load i32, i32* @NSS_STATUS_SUCCESS
ret i32 %1
}
long long int opt_numint_abs(long long int num) {
  return ((num < 0) ? -num : num);
}


x86 assembly (clang, -O0):
<opt_numint_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <opt_numint_abs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <opt_numint_abs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @opt_numint_abs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @opt_numint_abs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
int SysLogClose(void) {
  closelog();
  return 1;
}


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

x86 assembly (clang, -O2):
<SysLogClose>:
push   %rax
xor    %eax,%eax
call   1030 <closelog@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SysLogClose() {
%1 = call i32 (...) @closelog()
ret i32 1
}

LLVM IR (-O2):
define i32 @SysLogClose() {
%1 = tail call i32 (...) @closelog()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ TCSBRK;
int ioctl(int, int /*<<< orphan*/, int);
int tcdrain(int fd) { return ioctl(fd, TCSBRK, 1); }


x86 assembly (clang, -O0):
<tcdrain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ecb(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcdrain>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@TCSBRK = global i32 0
define i32 @tcdrain(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @TCSBRK
%5 = call i32 @ioctl(i32 %3, i32 %4, i32 1)
ret i32 %5
}

LLVM IR (-O2):
@TCSBRK = global i32 0
define i32 @tcdrain(i32 %0) {
%2 = load i32, i32* @TCSBRK
%3 = tail call i32 @ioctl(i32 %0, i32 %2, i32 1)
ret i32 %3
}
void yy_1_HorizontalRuleAutoCorrect(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_HorizontalRuleAutoCorrect(i8* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_spinlock_t;

/* Variables and functions */
int /*<<< orphan*/ _unsupported();
int pthread_spin_init(pthread_spinlock_t *spinlock, int pshared) {
  _unsupported();
  return -1;
}


x86 assembly (clang, -O0):
<pthread_spin_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <_unsupported@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_spin_init>:
push   %rax
xor    %eax,%eax
call   1030 <_unsupported@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pthread_spin_init(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 (...) @_unsupported()
ret i32 -1
}

LLVM IR (-O2):
define i32 @pthread_spin_init(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @_unsupported()
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ system(char *);
void pi_reboot_blocking(int delay) {
  sleep(delay);
  system("sudo shutdown -r now");
}


x86 assembly (clang, -O0):
<pi_reboot_blocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sleep@plt>
lea    0xec6(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pi_reboot_blocking>:
push   %rax
call   1040 <sleep@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"sudo shutdown -r now\00"
define void @pi_reboot_blocking(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sleep(i32 %3)
%5 = call i32 @system(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"sudo shutdown -r now\00"
define void @pi_reboot_blocking(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
%3 = tail call i32 @system(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int hex2num(char const);
char hex2char(const char *s) { return 16 * hex2num(s[0]) + hex2num(s[1]); }


x86 assembly (clang, -O0):
<hex2char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <hex2num@plt>
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <hex2num@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex2char>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <hex2num@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
movsbl 0x1(%rbx),%edi
call   1030 <hex2num@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @hex2char(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call i32 @hex2num(i8 signext %5)
%7 = mul nsw i32 16, %6
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = call i32 @hex2num(i8 signext %10)
%12 = add nsw i32 %7, %11
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @hex2char(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @hex2num(i8 signext %2)
%4 = shl nsw i32 %3, 4
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = tail call i32 @hex2num(i8 signext %6)
%8 = add nsw i32 %7, %4
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int open64(char const *, int, int /*<<< orphan*/);
int creat64(const char *pathname, mode_t mode) {
  return open64(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode);
}


x86 assembly (clang, -O0):
<creat64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
mov    0x2e95(%rip),%rax
or     (%rax),%esi
mov    0x2eb4(%rip),%rax
or     (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <open64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat64>:
mov    0x2ee1(%rip),%rcx
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %esi,%edx
mov    0x2ec5(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%esi
jmp    1030 <open64@plt>

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@O_TRUNC = global i32 0
define i32 @creat64(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* @O_CREAT
%7 = load i32, i32* @O_WRONLY
%8 = or i32 %6, %7
%9 = load i32, i32* @O_TRUNC
%10 = or i32 %8, %9
%11 = load i32, i32* %4
%12 = call i32 @open64(i8* %5, i32 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@O_TRUNC = global i32 0
define i32 @creat64(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @O_CREAT
%4 = load i32, i32* @O_WRONLY
%5 = or i32 %4, %3
%6 = load i32, i32* @O_TRUNC
%7 = or i32 %5, %6
%8 = tail call i32 @open64(i8* %0, i32 %7, i32 %1)
ret i32 %8
}
double long_long_to_double(long long *p) { return (double)*p; }


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

x86 assembly (clang, -O2):
<long_long_to_double>:
cvtsi2sdq (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @long_long_to_double(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @long_long_to_double(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = sitofp i64 %2 to double
ret double %3
}
void test_random() {}


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

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

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

LLVM IR (-O2):
define void @test_random() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int getCartMass(int cart) {
  int m;
  printf("\nEnter the mass of cart %d (kg): ", cart);
  scanf("%d", &m);
  return m;
}


x86 assembly (clang, -O0):
<getCartMass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCartMass>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"\0AEnter the mass of cart %d (kg): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @getCartMass(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@.str = [34 x i8] c"\0AEnter the mass of cart %d (kg): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @getCartMass(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
ret i32 %6
}