xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  long n = 1;
  if (n == -1) {
    printf("1\n");
    return 1;
  }
  printf("%ld\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    114c <main+0x3c>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1165 <main+0x55>
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int /*<<< orphan*/ checksum(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ wrapsum(int /*<<< orphan*/);
uint16_t ipv4_chksum(u_char *buff, int len) {
  return wrapsum(checksum(buff, len, 0));
}


x86 assembly (clang, -O0):
<ipv4_chksum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <checksum@plt>
mov    %eax,%edi
call   1040 <wrapsum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_chksum>:
push   %rax
xor    %edx,%edx
call   1030 <checksum@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <wrapsum@plt>

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

LLVM IR (-O2):
define i32 @ipv4_chksum(i32* %0, i32 %1) {
%3 = tail call i32 @checksum(i32* %0, i32 %1, i32 0)
%4 = tail call i32 @wrapsum(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xac() {
  Assert_real((ispunct(172) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              865, ("ispunct should be 0 for 0xac"));
}


x86 assembly (clang, -O0):
<t_ispunct_0xac>:
push   %rbp
mov    %rsp,%rbp
mov    $0xac,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x361,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0xac>:
push   %rax
mov    $0xac,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x361,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xac\00"
define void @t_ispunct_0xac() {
%1 = call i64 @ispunct(i32 172)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 865, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xac\00"
define void @t_ispunct_0xac() {
%1 = tail call i64 @ispunct(i32 172)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 865, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int lReverse(int fval) {
  unsigned int in = fval;
  int result = 0, cnt = 0;
  while (in) {
    result <<= 1;
    result |= in & 1;
    in >>= 1;
    cnt++;
  }
  if (cnt < 20)
    result <<= 20 - cnt;
  return result;
}


x86 assembly (clang, -O0):
<lReverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1151 <lReverse+0x51>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111b <lReverse+0x1b>
cmpl   $0x14,-0x10(%rbp)
jge    116b <lReverse+0x6b>
mov    $0x14,%ecx
sub    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lReverse>:
xor    %r8d,%r8d
mov    $0x0,%eax
mov    $0x0,%esi
test   %edi,%edi
je     1134 <lReverse+0x34>
xor    %esi,%esi
xor    %eax,%eax
mov    %edi,%ecx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
lea    (%rdx,%rax,2),%eax
shr    %ecx
add    $0x1,%esi
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1120 <lReverse+0x20>
mov    $0x14,%ecx
sub    %esi,%ecx
cmovb  %r8d,%ecx
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @lReverse(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
store i32 %6, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %10, %1
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load i32, i32* %4
%12 = shl i32 %11, 1
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = and i32 %13, 1
%15 = load i32, i32* %4
%16 = or i32 %15, %14
store i32 %16, i32* %4
%17 = load i32, i32* %3
%18 = lshr i32 %17, 1
store i32 %18, i32* %3
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %7
21: ; preds = %7
%22 = load i32, i32* %5
%23 = icmp slt i32 %22, 20
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = load i32, i32* %5
%26 = sub nsw i32 20, %25
%27 = load i32, i32* %4
%28 = shl i32 %27, %26
store i32 %28, i32* %4
br label %29
29: ; preds = %24, %21
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @lReverse(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %11, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = phi i32 [ %10, %3 ], [ %0, %1 ]
%7 = shl i32 %5, 1
%8 = and i32 %6, 1
%9 = or i32 %7, %8
%10 = lshr i32 %6, 1
%11 = add nuw nsw i32 %4, 1
%12 = icmp ult i32 %6, 2
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %9, %3 ]
%15 = phi i32 [ 0, %1 ], [ %11, %3 ]
%16 = tail call i32 @llvm.usub.sat.i32(i32 20, i32 %15)
%17 = shl i32 %14, %16
ret i32 %17
}
int load1r(int *array) {
  int a = 0;
  a += array[200];
  a += array[201];
  a += array[202];
  a += array[203];
  return a;
}


x86 assembly (clang, -O0):
<load1r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x320(%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x324(%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x328(%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x32c(%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load1r>:
movdqu 0x320(%rdi),%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @load1r(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 200
%6 = load i32, i32* %5
%7 = load i32, i32* %3
%8 = add nsw i32 %7, %6
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 201
%11 = load i32, i32* %10
%12 = load i32, i32* %3
%13 = add nsw i32 %12, %11
store i32 %13, i32* %3
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 202
%16 = load i32, i32* %15
%17 = load i32, i32* %3
%18 = add nsw i32 %17, %16
store i32 %18, i32* %3
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 203
%21 = load i32, i32* %20
%22 = load i32, i32* %3
%23 = add nsw i32 %22, %21
store i32 %23, i32* %3
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @load1r(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 200
%3 = bitcast i32* %2 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ stack_size();
int vm_set(int /*<<< orphan*/);
int vm_topst(void) { return vm_set(stack_size()); }


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

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

LLVM IR (-O0):
define i32 @vm_topst() {
%1 = call i32 (...) @stack_size()
%2 = call i32 @vm_set(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @vm_topst() {
%1 = tail call i32 (...) @stack_size()
%2 = tail call i32 @vm_set(i32 %1)
ret i32 %2
}
void timer0_init(void) {}


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

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

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

LLVM IR (-O2):
define void @timer0_init() {
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
int stat(char *, struct stat *);
int make_dir(char *dirname) {
  struct stat st = {0};
  if (-1 == stat(dirname, &st))
    mkdir(dirname, 0700);
  return 0;
}


x86 assembly (clang, -O0):
<make_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <stat@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1176 <make_dir+0x46>
mov    -0x8(%rbp),%rdi
mov    $0x1c0,%esi
call   1030 <mkdir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_dir>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
jne    114c <make_dir+0x2c>
mov    %rbx,%rdi
mov    $0x1c0,%esi
call   1030 <mkdir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @make_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = bitcast %struct.stat* %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %3)
%7 = icmp eq i32 -1, %6
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @mkdir(i8* %9, i32 448)
br label %11
11: ; preds = %8, %1
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @make_dir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
store i32 0, i32* %4
%5 = call i32 @stat(i8* %0, %struct.stat* %2)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @mkdir(i8* %0, i32 448)
br label %9
9: ; preds = %7, %1
ret i32 0
}
void hostapd_ubus_add(struct hapd_interfaces *interfaces) {}


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

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

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

LLVM IR (-O2):
%struct.hapd_interfaces = type opaque
define void @hostapd_ubus_add(%struct.hapd_interfaces* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ enable_servos();
void lib_enable_servos() { enable_servos(); }


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

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

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

LLVM IR (-O2):
define void @lib_enable_servos() {
%1 = tail call i32 (...) @enable_servos()
ret void
}
/* Variables and functions */
char tolower(int);
char *lmsc_U2l(char *p) {
  char *s;
  for (s = p; *s; s++) {
    *s = tolower((int)*s);
  }
  return p;
}


x86 assembly (clang, -O0):
<lmsc_U2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <lmsc_U2l+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <lmsc_U2l+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmsc_U2l>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <lmsc_U2l+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <lmsc_U2l+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @lmsc_U2l(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call signext i8 @tolower(i32 %7)
store i8 %8, i8* %6
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  if (x < 1 || x > 2 || x != 1) {
  } else
    __VERIFIER_assert(x == 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)
cmpl   $0x1,-0x8(%rbp)
jl     1157 <main+0x37>
cmpl   $0x2,-0x8(%rbp)
jg     1157 <main+0x37>
cmpl   $0x1,-0x8(%rbp)
je     115c <main+0x3c>
jmp    116d <main+0x4d>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
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>
cmp    $0x1,%eax
jne    1137 <main+0x17>
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @__VERIFIER_assert(i32 1)
br label %5
5: ; preds = %0, %3
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int *test_4(void) {
  int *ptr = (int *)malloc(sizeof(int));
  if (ptr)
    *ptr = 42;
  else
    *ptr = 43;
  return ptr;
}


x86 assembly (clang, -O0):
<test_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <test_4+0x30>
mov    -0x8(%rbp),%rax
movl   $0x2a,(%rax)
jmp    114a <test_4+0x3a>
mov    -0x8(%rbp),%rax
movl   $0x2b,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_4>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x2a,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i32* @test_4() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32*, i32** %1
store i32 42, i32* %7
br label %10
8: ; preds = %0
%9 = load i32*, i32** %1
store i32 43, i32* %9
br label %10
10: ; preds = %8, %6
%11 = load i32*, i32** %1
ret i32* %11
}

LLVM IR (-O2):
define i32* @test_4() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = icmp ne i64 %1, 0
tail call void @llvm.assume(i1 %3)
store i32 42, i32* %2
ret i32* %2
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ vmem_write(int, int);
void init_data(int length) {
  int i;
  int val;
  srand(2806);
  for (i = 0; i < length; i++) {
    val = rand() % 1000;
    vmem_write(i, val);
  }
}


x86 assembly (clang, -O0):
<init_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xaf6,%edi
call   1030 <srand@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1183 <init_data+0x53>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <vmem_write@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114c <init_data+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_data>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xaf6,%edi
call   1030 <srand@plt>
test   %ebx,%ebx
jle    1184 <init_data+0x54>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1050 <rand@plt>
movslq %eax,%rsi
imul   $0x10624dd3,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%esi
mov    %ebp,%edi
call   1040 <vmem_write@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1150 <init_data+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @init_data(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 @srand(i32 2806)
store i32 0, i32* %3
br label %6
6: ; preds = %16, %1
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = call i32 (...) @rand()
%12 = srem i32 %11, 1000
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @vmem_write(i32 %13, i32 %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @init_data(i32 %0) {
%2 = tail call i32 @srand(i32 2806)
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %11
4: ; preds = %1, %4
%5 = phi i32 [ %9, %4 ], [ 0, %1 ]
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 1000
%8 = tail call i32 @vmem_write(i32 %5, i32 %7)
%9 = add nuw nsw i32 %5, 1
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void test_return_address() {}


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

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

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

LLVM IR (-O2):
define void @test_return_address() {
ret void
}
long long foo(void) {
  long long C = 1ULL << 63, X;
  int Y = 32;
  X = C >> (Y & 31);
  return X;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movabs $0x8000000000000000,%rax
mov    %rax,-0x8(%rbp)
movl   $0x20,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    $0x1f,%ecx
mov    %ecx,%ecx
sar    %cl,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movabs $0x8000000000000000,%rax
ret

LLVM IR (-O0):
define i64 @foo() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
store i64 -9223372036854775808, i64* %1
store i32 32, i32* %3
%4 = load i64, i64* %1
%5 = load i32, i32* %3
%6 = and i32 %5, 31
%7 = zext i32 %6 to i64
%8 = ashr i64 %4, %7
store i64 %8, i64* %2
%9 = load i64, i64* %2
ret i64 %9
}

LLVM IR (-O2):
define i64 @foo() {
ret i64 -9223372036854775808
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void displayPreGameMenu() {
  puts("\nWould you like to play or quit? Please choose one.");
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"\0AWould you like to play or quit? Please choose one.\00"
define void @displayPreGameMenu() {
%1 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0AWould you like to play or quit? Please choose one.\00"
define void @displayPreGameMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned xrop3_129_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = D ^ S;
  stk1 = stk1 | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_129_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_129_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
and    $0xffffff00,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_129_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %8
%25 = load i32, i32* %5
%26 = load i32, i32* %6
%27 = xor i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = xor i32 %31, -1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %6
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
ret i32 %40
}

LLVM IR (-O2):
define i32 @xrop3_129_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = or i32 %7, 255
%9 = xor i32 %8, -1
%10 = or i32 %9, %3
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ sdmmc_mask16(int, int, int);
void setckl(unsigned int data) {
  sdmmc_mask16(0x24, 0x100, 0);
  sdmmc_mask16(0x24, 0x2FF, data & 0x2FF);
  sdmmc_mask16(0x24, 0x0, 0x100);
}


x86 assembly (clang, -O0):
<setckl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x24,%edi
mov    $0x100,%esi
xor    %edx,%edx
call   1030 <sdmmc_mask16@plt>
mov    -0x4(%rbp),%edx
and    $0x2ff,%edx
mov    $0x24,%edi
mov    $0x2ff,%esi
call   1030 <sdmmc_mask16@plt>
mov    $0x24,%edi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <sdmmc_mask16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setckl>:
push   %rbx
mov    %edi,%ebx
mov    $0x24,%edi
mov    $0x100,%esi
xor    %edx,%edx
call   1030 <sdmmc_mask16@plt>
and    $0x2ff,%ebx
mov    $0x24,%edi
mov    $0x2ff,%esi
mov    %ebx,%edx
call   1030 <sdmmc_mask16@plt>
mov    $0x24,%edi
xor    %esi,%esi
mov    $0x100,%edx
pop    %rbx
jmp    1030 <sdmmc_mask16@plt>

LLVM IR (-O0):
define void @setckl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @sdmmc_mask16(i32 36, i32 256, i32 0)
%4 = load i32, i32* %2
%5 = and i32 %4, 767
%6 = call i32 @sdmmc_mask16(i32 36, i32 767, i32 %5)
%7 = call i32 @sdmmc_mask16(i32 36, i32 0, i32 256)
ret void
}

LLVM IR (-O2):
define void @setckl(i32 %0) {
%2 = tail call i32 @sdmmc_mask16(i32 36, i32 256, i32 0)
%3 = and i32 %0, 767
%4 = tail call i32 @sdmmc_mask16(i32 36, i32 767, i32 %3)
%5 = tail call i32 @sdmmc_mask16(i32 36, i32 0, i32 256)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(void *);
int /*<<< orphan*/ fprintf(void *, char *, char *, unsigned int);
void *stderr;
void syck_assert(char *file_name, unsigned line_num) {
  fflush((void *)0);
  fprintf(stderr, "\nAssertion failed: %s, line %u\n", file_name, line_num);
  fflush(stderr);
  abort();
}


x86 assembly (clang, -O0):
<syck_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <fflush@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%rdi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<syck_assert>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   1050 <fflush@plt>
mov    0x2e99(%rip),%r14
mov    (%r14),%rdi
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1040 <fprintf@plt>
mov    (%r14),%rdi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i8* null
@.str = [32 x i8] c"\0AAssertion failed: %s, line %u\0A\00"
define void @syck_assert(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @fflush(i8* null)
%6 = load i8*, i8** @stderr
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @fprintf(i8* %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
%10 = load i8*, i8** @stderr
%11 = call i32 @fflush(i8* %10)
%12 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i8* null
@.str = [32 x i8] c"\0AAssertion failed: %s, line %u\0A\00"
define void @syck_assert(i8* %0, i32 %1) {
%3 = tail call i32 @fflush(i8* null)
%4 = load i8*, i8** @stderr
%5 = tail call i32 @fprintf(i8* %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%6 = load i8*, i8** @stderr
%7 = tail call i32 @fflush(i8* %6)
%8 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr, "Not compiled with WITH_MAKE_LICENSE\n");
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Not compiled with WITH_MAKE_LICENSE\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Not compiled with WITH_MAKE_LICENSE\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, char *argv[], char *envp[]) {
  char s[1024];
  scanf("%s", s);
  printf("scan:: read from pipe: %s \n", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
lea    0xed1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [28 x i8] c"scan:: read from pipe: %s \0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca [1024 x i8]
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [28 x i8] c"scan:: read from pipe: %s \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}
int DRV_USB_PHY_SWITCH_SET(unsigned char ucValue) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DRV_USB_PHY_SWITCH_SET(i8 zeroext %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ readline(char *, int);
int /*<<< orphan*/ runline(char *);
int main(int argc, char *argv[]) {
  char prompt[] = "nachos% ";
  char buffer[64];
  while (1) {
    printf("%s", prompt);
    readline(buffer, 64);
    runline(buffer);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x19(%rbp)
mov    0xeb1(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x19(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    $0x40,%esi
call   1050 <readline@plt>
lea    -0x60(%rbp),%rdi
call   1030 <runline@plt>
jmp    115a <main+0x2a>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
movabs $0x2025736f6863616e,%rax
73 25 20
mov    %rax,(%rsp)
movb   $0x0,0x8(%rsp)
lea    0xeb6(%rip),%r14
mov    %rsp,%r15
lea    0x10(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x40,%esi
call   1050 <readline@plt>
mov    %rbx,%rdi
call   1030 <runline@plt>
jmp    1160 <main+0x30>

LLVM IR (-O0):
@__const.main.prompt = [9 x i8] c"nachos% \00"
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x i8]
%7 = alloca [64 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [9 x i8]* %6 to i8*
br label %9
9: ; preds = %2, %9
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%13 = call i32 @readline(i8* %12, i32 64)
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%15 = call i32 @runline(i8* %14)
br label %9
}

LLVM IR (-O2):
@__const.main.prompt = [9 x i8] c"nachos% \00"
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x i8]
%4 = alloca [64 x i8]
%5 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
br label %7
7: ; preds = %7, %2
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%9 = call i32 @readline(i8* %6, i32 64)
%10 = call i32 @runline(i8* %6)
br label %7
}
/* Variables and functions */
int path_exists_internal(char const *, char const *, int);
int path_exists_at(const char path[], const char filename[], int deref) {
  return path_exists_internal(path, filename, deref);
}


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

x86 assembly (clang, -O2):
<path_exists_at>:
jmp    1030 <path_exists_internal@plt>

LLVM IR (-O0):
define i32 @path_exists_at(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @path_exists_internal(i8* %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @path_exists_at(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @path_exists_internal(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void f6(void) {
  int t[4][3];
  typedef int arr[3];
  typedef arr(*brr)[4];
  int(*a)[4][3];
  brr b = &t;
  a = b;
  (*a)[0][0] = 'd';
  putchar((*a)[0][0]);
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movl   $0x64,(%rax)
mov    -0x38(%rbp),%rax
mov    (%rax),%edi
call   1030 <putchar@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
mov    $0x64,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @f6() {
%1 = alloca [4 x [3 x i32]]
%2 = alloca [4 x [3 x i32]]*
%3 = alloca [4 x [3 x i32]]*
store [4 x [3 x i32]]* %1, [4 x [3 x i32]]** %3
%4 = load [4 x [3 x i32]]*, [4 x [3 x i32]]** %3
store [4 x [3 x i32]]* %4, [4 x [3 x i32]]** %2
%5 = load [4 x [3 x i32]]*, [4 x [3 x i32]]** %2
%6 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %5, i64 0, i64 0
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 100, i32* %7
%8 = load [4 x [3 x i32]]*, [4 x [3 x i32]]** %2
%9 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %8, i64 0, i64 0
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%11 = load i32, i32* %10
%12 = call i32 @putchar(i32 %11)
ret void
}

LLVM IR (-O2):
define void @f6() {
%1 = tail call i32 @putchar(i32 100)
ret void
}
/* Variables and functions */
void *mm_alloc_(unsigned int, int /*<<< orphan*/, int);
void *mm_alloc_lax(unsigned int size) { return mm_alloc_(size, 0, 1); }


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

x86 assembly (clang, -O2):
<mm_alloc_lax>:
xor    %esi,%esi
mov    $0x1,%edx
jmp    1030 <mm_alloc_@plt>

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

LLVM IR (-O2):
define i8* @mm_alloc_lax(i32 %0) {
%2 = tail call i8* @mm_alloc_(i32 %0, i32 0, i32 1)
ret i8* %2
}
int compare(const void *i1, const void *i2) { return *(int *)i1 - *(int *)i2; }


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

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

LLVM IR (-O0):
define i32 @compare(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 i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

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

/* Variables and functions */
int /*<<< orphan*/ ident32(int /*<<< orphan*/);
int /*<<< orphan*/ ident64(size_t);
scalar_t__ padd(int /*<<< orphan*/ *, size_t);
void place_length(uint8_t *buffer, size_t bufsize, size_t length) {
  if (sizeof(size_t) == 4) {
    *(uint32_t *)padd(buffer, bufsize - 4) = ident32((uint32_t)length);
  } else {
    *(uint64_t *)padd(buffer, bufsize - 8) = ident64(length);
  }
}


x86 assembly (clang, -O0):
<place_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ident64@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
sub    $0x8,%rsi
call   1040 <padd@plt>
mov    -0x1c(%rbp),%ecx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<place_length>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rdx,%rdi
call   1030 <ident64@plt>
mov    %eax,%ebp
add    $0xfffffffffffffff8,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <padd@plt>
mov    %ebp,(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @place_length(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = call i32 @ident64(i64 %7)
%9 = load i32*, i32** %4
%10 = load i64, i64* %5
%11 = sub i64 %10, 8
%12 = call i64 @padd(i32* %9, i64 %11)
%13 = inttoptr i64 %12 to i32*
store i32 %8, i32* %13
ret void
}

LLVM IR (-O2):
define void @place_length(i32* %0, i64 %1, i64 %2) {
%4 = tail call i32 @ident64(i64 %2)
%5 = add i64 %1, -8
%6 = tail call i64 @padd(i32* %0, i64 %5)
%7 = inttoptr i64 %6 to i32*
store i32 %4, i32* %7
ret void
}
__attribute__((no, noclone)) unsigned __int128 t154_5sub(unsigned __int128 x) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(
          x,
          (unsigned __int128)((
              -((signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1)) -
              1)),
          &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t154_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
movabs $0x8000000000000000,%rax
sub    %rax,%rcx
setb   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    115d <t154_5sub+0x4d>
jmp    1164 <t154_5sub+0x54>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t154_5sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movabs $0x8000000000000000,%rax
sub    %rax,%rbx
jae    1130 <t154_5sub+0x20>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t154_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %11, i128 -170141183460469231731687303715884105728)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t154_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %6, i128 -170141183460469231731687303715884105728)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int __set_memory(unsigned long, int, unsigned long);
int set_memory_rw(unsigned long addr, int numpages) {
  return __set_memory(addr, numpages, 2UL);
}


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

x86 assembly (clang, -O2):
<set_memory_rw>:
mov    $0x2,%edx
jmp    1030 <__set_memory@plt>

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

LLVM IR (-O2):
define i32 @set_memory_rw(i64 %0, i32 %1) {
%3 = tail call i32 @__set_memory(i64 %0, i32 %1, i64 2)
ret i32 %3
}
void gpmc_smc91x_init(struct omap_smc91x_platform_data *d) {}


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

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

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

LLVM IR (-O2):
%struct.omap_smc91x_platform_data = type opaque
define void @gpmc_smc91x_init(%struct.omap_smc91x_platform_data* nocapture %0) {
ret void
}