xunge/DecIR huggingface dataset:
int ld_blt_rc2(long double a1) { return !(__builtin_isless(a1, 100)); }


x86 assembly (clang, -O0):
<ld_blt_rc2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blt_rc2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setbe  %al
ret

LLVM IR (-O0):
define i32 @ld_blt_rc2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp olt x86_fp80 %3, 0xK4005C800000000000000
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_blt_rc2(x86_fp80 %0) {
%2 = fcmp uge x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage: juniper-lex [-4h] [-r path] config_path\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"usage: juniper-lex [-4h] [-r path] config_path\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [47 x i8] c"usage: juniper-lex [-4h] [-r path] config_path\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ NullCheck(int *);
int _daysInMonth(int, int);
int date_time_daysInMonth(int year, int month, int *daysInMonth) {
  NullCheck(daysInMonth);
  *daysInMonth = _daysInMonth(month, year);
  return 0;
}


x86 assembly (clang, -O0):
<date_time_daysInMonth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <NullCheck@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <_daysInMonth@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_time_daysInMonth>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %edi,%r14d
mov    %rdx,%rdi
call   1040 <NullCheck@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <_daysInMonth@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @date_time_daysInMonth(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
%8 = call i32 @NullCheck(i32* %7)
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @_daysInMonth(i32 %9, i32 %10)
%12 = load i32*, i32** %6
store i32 %11, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @date_time_daysInMonth(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @NullCheck(i32* %2)
%5 = tail call i32 @_daysInMonth(i32 %1, i32 %0)
store i32 %5, i32* %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello world\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ wrtsac2(char const *, int, float const *, float const *,
                           int /*<<< orphan*/);
void wrtsac2_(const char *name, int n, const float *x, const float *y) {
  wrtsac2(name, n, x, y, 0);
}


x86 assembly (clang, -O0):
<wrtsac2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <wrtsac2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrtsac2_>:
xor    %r8d,%r8d
jmp    1030 <wrtsac2@plt>

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

LLVM IR (-O2):
define void @wrtsac2_(i8* %0, i32 %1, float* %2, float* %3) {
%5 = tail call i32 @wrtsac2(i8* %0, i32 %1, float* %2, float* %3, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x36() {
  Assert_real((isupper(54) == 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_isupper.c",
              275, ("isupper should be 0 for 6"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x36>:
push   %rax
mov    $0x36,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x113,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for 6\00"
define void @t_isupper_0x36() {
%1 = call i64 @isupper(i32 54)
%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 275, i8* getelementptr inbounds ([26 x i8], [26 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for 6\00"
define void @t_isupper_0x36() {
%1 = tail call i64 @isupper(i32 54)
%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 275, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ nrerror(char *);
int *ivector(int nl, int nh) {
  int *v;
  v = (int *)malloc((unsigned)(nh - nl + 1) * sizeof(int));
  if (!v)
    nrerror("allocation failure in ivector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <ivector+0x3f>
lea    0xea6(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x4(,%rsi,4),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <ivector+0x27>
lea    0xebe(%rip),%rdi
call   1030 <nrerror@plt>
movslq %ebp,%rax
shl    $0x2,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in ivector()\00"
define i32* @ivector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = icmp ne i32* %15, null
br i1 %16, label %19, label %17
17: ; preds = %2
%18 = call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
%20 = load i32*, i32** %5
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = sub i64 0, %22
%24 = getelementptr inbounds i32, i32* %20, i64 %23
ret i32* %24
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in ivector()\00"
define i32* @ivector(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = shl i32 %3, 2
%5 = add i32 %4, 4
%6 = tail call i64 @malloc(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to i32*
%12 = sext i32 %0 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds i32, i32* %11, i64 %13
ret i32* %14
}
/* Variables and functions */
int /*<<< orphan*/ prefix();
void f_empty_goto_loop_prefix() {
  prefix();
f_empty_goto_loop_prefix_label:
  goto f_empty_goto_loop_prefix_label;
}


x86 assembly (clang, -O0):
<f_empty_goto_loop_prefix>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <prefix@plt>
jmp    111b <f_empty_goto_loop_prefix+0xb>

x86 assembly (clang, -O2):
<f_empty_goto_loop_prefix>:
push   %rax
xor    %eax,%eax
call   1030 <prefix@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <f_empty_goto_loop_prefix+0x10>

LLVM IR (-O0):
define void @f_empty_goto_loop_prefix() {
%1 = call i32 (...) @prefix()
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
define void @f_empty_goto_loop_prefix() {
%1 = tail call i32 (...) @prefix()
br label %2
2: ; preds = %2, %0
br label %2
}
int my_tablen(char **tab) {
  int i;
  i = -1;
  while (tab && tab[++i])
    ;
  return (i);
}


x86 assembly (clang, -O0):
<my_tablen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     113a <my_tablen+0x3a>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114a <my_tablen+0x4a>
jmp    114f <my_tablen+0x4f>
jmp    110f <my_tablen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_tablen>:
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     111d <my_tablen+0x1d>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <my_tablen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_tablen(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ -1, %1 ]
%5 = add nsw i64 %4, 1
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %5 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ -1, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
unsigned int strlen(char *);
void truncsp(char *str) {
  unsigned int c;
  c = strlen(str);
  while (c && (unsigned char)str[c - 1] <= ' ')
    c--;
  str[c] = 0;
}


x86 assembly (clang, -O0):
<truncsp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1150 <truncsp+0x40>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1160 <truncsp+0x50>
jmp    116e <truncsp+0x5e>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <truncsp+0x18>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncsp>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
nopl   0x0(%rax,%rax,1)
mov    %rcx,%rax
test   %rcx,%rcx
je     1134 <truncsp+0x24>
lea    -0x1(%rax),%rcx
mov    %ecx,%edx
cmpb   $0x21,(%rbx,%rdx,1)
jb     1120 <truncsp+0x10>
mov    %eax,%eax
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @truncsp(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = zext i32 %2 to i64
br label %4
4: ; preds = %7, %1
%5 = phi i64 [ %8, %7 ], [ %3, %1 ]
%6 = icmp eq i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = add nsw i64 %5, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp ult i8 %11, 33
br i1 %12, label %4, label %13
13: ; preds = %4, %7
%14 = and i64 %5, 4294967295
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
ret void
}
int left_child(int i) {
  int index = (2 * i) + 1;
  return index;
}


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

x86 assembly (clang, -O2):
<left_child>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @left_child(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
void foo228(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo228(i32 %0) {
ret void
}
/* Variables and functions */
bool cancelled(void *cancelledData) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cancelled(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
double round(double);
double roundmul(double x, double y) { return (round(x / y) * y); }


x86 assembly (clang, -O0):
<roundmul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <round@plt>
mulsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundmul>:
push   %rax
movsd  %xmm1,(%rsp)
divsd  %xmm1,%xmm0
call   1030 <round@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @roundmul(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
%8 = call double @llvm.round.f64(double %7)
%9 = load double, double* %4
%10 = fmul double %8, %9
ret double %10
}

LLVM IR (-O2):
define double @roundmul(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = tail call double @llvm.round.f64(double %3)
%5 = fmul double %4, %1
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ s;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main() {
  char s[500010];
  fgets(s, sizeof(s), stdin);
  printf("%s\n", s + 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a130,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7a130(%rbp),%rdi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
mov    $0x7a12a,%esi
call   1040 <fgets@plt>
lea    -0x7a130(%rbp),%rsi
add    $0x4,%rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7a130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x7a138,%rsp
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x7a12a,%esi
call   1040 <fgets@plt>
lea    0x4(%rsp),%rsi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7a138,%rsp
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [500010 x i8]
%2 = getelementptr inbounds [500010 x i8], [500010 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 500010, i32 %3)
%5 = getelementptr inbounds [500010 x i8], [500010 x i8]* %1, i64 0, i64 4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
int fun339() { return 339; }


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

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

LLVM IR (-O0):
define i32 @fun339() {
ret i32 339
}

LLVM IR (-O2):
define i32 @fun339() {
ret i32 339
}
/* Variables and functions */
int /*<<< orphan*/ __flush_tlb();
void __flush_tlb_all(void) { __flush_tlb(); }


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

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

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

LLVM IR (-O2):
define void @__flush_tlb_all() {
%1 = tail call i32 (...) @__flush_tlb()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dprintf(int, char *, int, int);
scalar_t__ errno;
int read(int, char *, int);
int ReadFromFile(int fdFile, char *pchTo, int cchMax) {
  int cchOut;
  cchOut = read(fdFile, pchTo, cchMax);
  dprintf(0x0008, "buffer: read %d byte(s) (errno=%d)\n", cchOut, (int)errno);
  return cchOut;
}


x86 assembly (clang, -O0):
<ReadFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <read@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edx
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    %eax,%ecx
mov    $0x8,%edi
lea    0xea1(%rip),%rsi
call   1030 <dprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadFromFile>:
push   %rbx
call   1040 <read@plt>
mov    %eax,%ebx
mov    0x2eb1(%rip),%rax
mov    (%rax),%ecx
lea    0xec8(%rip),%rsi
mov    $0x8,%edi
mov    %ebx,%edx
call   1030 <dprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"buffer: read %d byte(s) (errno=%d)\0A\00"
@errno = global i64 0
define i32 @ReadFromFile(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @read(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = load i64, i64* @errno
%14 = trunc i64 %13 to i32
%15 = call i32 @dprintf(i32 8, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14)
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
@.str = [36 x i8] c"buffer: read %d byte(s) (errno=%d)\0A\00"
@errno = global i64 0
define i32 @ReadFromFile(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%5 = load i64, i64* @errno
%6 = trunc i64 %5 to i32
%7 = tail call i32 @dprintf(i32 8, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_nondet_int_val();
int /*<<< orphan*/ rotate(int /*<<< orphan*/);
int main() {
  rotate(__VERIFIER_nondet_int_val());
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int_val()
%2 = tail call i32 @rotate(i32 %1)
ret i32 0
}
/* Type definitions */
typedef int __u32;

/* Variables and functions */
__u32 ceph_frag_value(__u32 f) { return f & 0xffffffu; }


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

x86 assembly (clang, -O2):
<ceph_frag_value>:
mov    %edi,%eax
and    $0xffffff,%eax
ret

LLVM IR (-O0):
define i32 @ceph_frag_value(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 16777215
ret i32 %4
}

LLVM IR (-O2):
define i32 @ceph_frag_value(i32 %0) {
%2 = and i32 %0, 16777215
ret i32 %2
}
void prefetch(void *a __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @prefetch(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hang();
void main() { hang(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @hang()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
void test_range_float_gt_le(float f) {
  if (f > 3)
    if (f <= 4)
      __analyzer_eval(f == 4);
}


x86 assembly (clang, -O0):
<test_range_float_gt_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    116c <test_range_float_gt_le+0x5c>
movss  0xec9(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     1167 <test_range_float_gt_le+0x57>
movss  -0x4(%rbp),%xmm0
movss  0xeb2(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
jmp    116c <test_range_float_gt_le+0x5c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_range_float_gt_le>:
ucomiss 0xee9(%rip),%xmm0
jbe    113b <test_range_float_gt_le+0x2b>
movss  0xee3(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     113b <test_range_float_gt_le+0x2b>
cmpeqss 0xed5(%rip),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
jmp    1030 <__analyzer_eval@plt>
ret

LLVM IR (-O0):
define void @test_range_float_gt_le(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 3.000000e+00
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load float, float* %2
%7 = fcmp ole float %6, 4.000000e+00
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load float, float* %2
%10 = fcmp oeq float %9, 4.000000e+00
%11 = zext i1 %10 to i32
%12 = call i32 @__analyzer_eval(i32 %11)
br label %13
13: ; preds = %8, %5
br label %14
14: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
define void @test_range_float_gt_le(float %0) {
%2 = fcmp ogt float %0, 3.000000e+00
%3 = fcmp ole float %0, 4.000000e+00
%4 = and i1 %2, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = fcmp oeq float %0, 4.000000e+00
%7 = zext i1 %6 to i32
%8 = tail call i32 @__analyzer_eval(i32 %7)
br label %9
9: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpackhi_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_unpackhi_epi16(__m128i A, __m128i B) {
  return _mm_unpackhi_epi16(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_unpackhi_epi16>:
jmp    1030 <_mm_unpackhi_epi16@plt>

LLVM IR (-O0):
define i32 @test_mm_unpackhi_epi16(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 @_mm_unpackhi_epi16(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_unpackhi_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpackhi_epi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ isPrime(int);
int findPrimeGreaterThan(int val) {
  if (val & 1)
    val += 2;
  else
    val++;
  while (!isPrime(val))
    val += 2;
  return val;
}


x86 assembly (clang, -O0):
<findPrimeGreaterThan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1138 <findPrimeGreaterThan+0x28>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <findPrimeGreaterThan+0x31>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <findPrimeGreaterThan+0x36>
mov    -0x4(%rbp),%edi
call   1030 <isPrime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1163 <findPrimeGreaterThan+0x53>
jmp    1171 <findPrimeGreaterThan+0x61>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <findPrimeGreaterThan+0x36>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findPrimeGreaterThan>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0x1,%eax
cmp    $0x1,%eax
sbb    $0x0,%ebx
add    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <isPrime@plt>
add    $0x2,%ebx
test   %eax,%eax
je     1130 <findPrimeGreaterThan+0x20>
add    $0xfffffffe,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @findPrimeGreaterThan(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 2
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
br label %13
13: ; preds = %18, %12
%14 = load i32, i32* %2
%15 = call i32 @isPrime(i32 %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 2
store i32 %20, i32* %2
br label %13
21: ; preds = %13
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @findPrimeGreaterThan(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 1, i32 2
%5 = add nsw i32 %4, %0
br label %6
6: ; preds = %6, %1
%7 = phi i32 [ %5, %1 ], [ %10, %6 ]
%8 = tail call i32 @isPrime(i32 %7)
%9 = icmp eq i32 %8, 0
%10 = add nsw i32 %7, 2
br i1 %9, label %6, label %11
11: ; preds = %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ recv(int, char *, size_t, int /*<<< orphan*/);
ssize_t raw_recv(int sock, char *buffer, size_t len) {
  return (recv(sock, buffer, len, 0));
}


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

x86 assembly (clang, -O2):
<raw_recv>:
xor    %ecx,%ecx
jmp    1030 <recv@plt>

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

LLVM IR (-O2):
define i32 @raw_recv(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void preinit_2(void) { write(STDOUT_FILENO, "preinit array 2\n", 16); }


x86 assembly (clang, -O0):
<preinit_2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x10,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<preinit_2>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
mov    $0x10,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [17 x i8] c"preinit array 2\0A\00"
define void @preinit_2() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [17 x i8] c"preinit array 2\0A\00"
define void @preinit_2() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t VbExKeyboardRead(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @VbExKeyboardRead() {
ret i32 0
}
void re_start_window_input() {}


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

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

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

LLVM IR (-O2):
define void @re_start_window_input() {
ret void
}
int HelpItem9(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem9() {
ret i32 0
}
/* Type definitions */
struct world_allocator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct world_allocator *);
int /*<<< orphan*/ free(void *);
void world_allocator_free(struct world_allocator *restrict a,
                          void *restrict ptr) {
  assert(a);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<world_allocator_free>:
push   %rbx
mov    %rsi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.world_allocator = type { i32 }
define void @world_allocator_free(%struct.world_allocator* noalias %0, i8* noalias %1) {
%3 = alloca %struct.world_allocator*
%4 = alloca i8*
store %struct.world_allocator* %0, %struct.world_allocator** %3
store i8* %1, i8** %4
%5 = load %struct.world_allocator*, %struct.world_allocator** %3
%6 = call i32 @assert(%struct.world_allocator* %5)
%7 = load i8*, i8** %4
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
%struct.world_allocator = type { i32 }
define void @world_allocator_free(%struct.world_allocator* noalias %0, i8* noalias nocapture %1) {
%3 = tail call i32 @assert(%struct.world_allocator* %0)
%4 = tail call i32 @free(i8* %1)
ret void
}
int listint_match(unsigned long *entry, unsigned long *key) {
  return (*entry == *key);
}


x86 assembly (clang, -O0):
<listint_match>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<listint_match>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @listint_match(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = icmp eq i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @listint_match(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void print_version() {
  printf("tee %s\n", "0.01");
  printf("Written by Constantinos Georgiades\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec9(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"tee %s\0A\00"
@.str.1 = [5 x i8] c"0.01\00"
@.str.2 = [36 x i8] c"Written by Constantinos Georgiades\0A\00"
@EXIT_SUCCESS = global i32 0
define void @print_version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"tee %s\0A\00"
@.str.1 = [5 x i8] c"0.01\00"
@EXIT_SUCCESS = global i32 0
@str = [35 x i8] c"Written by Constantinos Georgiades\00"
define void @print_version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_ENCRYPT;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_ENCRYPT_it;
int i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_ENCRYPT_it);
}


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

x86 assembly (clang, -O2):
<i2d_PKCS7_ENCRYPT>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@PKCS7_ENCRYPT_it = global i32 0
define i32 @i2d_PKCS7_ENCRYPT(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PKCS7_ENCRYPT_it)
ret i32 %3
}
int init_const_array() {
  int z;
  int a[2][3] = {{z + 1, 2, 3}, {5, 6, 7}};
}


x86 assembly (clang, -O0):
<init_const_array>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0x5,-0x14(%rbp)
movl   $0x6,-0x10(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @init_const_array() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x [3 x i32]]
%4 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %3, i64 0, i64 0
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %5
%8 = getelementptr inbounds i32, i32* %5, i64 1
store i32 2, i32* %8
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 3, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 1
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
store i32 5, i32* %11
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 6, i32* %12
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 7, i32* %13
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @init_const_array() {
ret i32 undef
}
/* Variables and functions */
int randint();
int rand255(void) { return (randint() & 255); }


x86 assembly (clang, -O0):
<rand255>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <randint@plt>
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand255>:
push   %rax
xor    %eax,%eax
call   1030 <randint@plt>
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rand255() {
%1 = call i32 (...) @randint()
%2 = and i32 %1, 255
ret i32 %2
}

LLVM IR (-O2):
define i32 @rand255() {
%1 = tail call i32 (...) @randint()
%2 = and i32 %1, 255
ret i32 %2
}
/* Variables and functions */
scalar_t__ parseInteger(char const *);
int parseBool(const char *value) { return (((parseInteger(value)) ? 1 : 0)); }


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

x86 assembly (clang, -O2):
<parseBool>:
push   %rax
call   1030 <parseInteger@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @parseBool(i8* %0) {
%2 = tail call i64 @parseInteger(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ die(char *);
int /*<<< orphan*/ ftruncate(int, int);
int lseek(int, int, int /*<<< orphan*/);
void skip_zero_blocks(size_t blks) {
  off_t pos;
  if ((pos = lseek(1, 512 * (off_t)blks, SEEK_CUR)) == -1)
    die("Seek error\n");
  ftruncate(1, pos);
}


x86 assembly (clang, -O0):
<skip_zero_blocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
shl    $0x9,%esi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1040 <lseek@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
jne    1170 <skip_zero_blocks+0x40>
lea    0xe95(%rip),%rdi
call   1050 <die@plt>
mov    -0xc(%rbp),%esi
mov    $0x1,%edi
call   1030 <ftruncate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_zero_blocks>:
push   %rbx
mov    %rdi,%rsi
shl    $0x9,%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1040 <lseek@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    115d <skip_zero_blocks+0x2d>
lea    0xea8(%rip),%rdi
call   1050 <die@plt>
mov    $0x1,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <ftruncate@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
@.str = [12 x i8] c"Seek error\0A\00"
define void @skip_zero_blocks(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 512, %5
%7 = load i32, i32* @SEEK_CUR
%8 = call i32 @lseek(i32 1, i32 %6, i32 %7)
store i32 %8, i32* %3
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %1
%13 = load i32, i32* %3
%14 = call i32 @ftruncate(i32 1, i32 %13)
ret void
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
@.str = [12 x i8] c"Seek error\0A\00"
define void @skip_zero_blocks(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = shl nsw i32 %2, 9
%4 = load i32, i32* @SEEK_CUR
%5 = tail call i32 @lseek(i32 1, i32 %3, i32 %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = tail call i32 @ftruncate(i32 1, i32 %5)
ret void
}
void usart_init() {}


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

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

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

LLVM IR (-O2):
define void @usart_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ EPERM;
int /*<<< orphan*/ errno;
long telldir(DIR *dirp) {
  errno = EPERM;
  return -1;
}


x86 assembly (clang, -O0):
<telldir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<telldir>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
@EPERM = global i32 0
@errno = global i32 0
define i64 @telldir(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @EPERM
store i32 %3, i32* @errno
ret i64 -1
}

LLVM IR (-O2):
@EPERM = global i32 0
@errno = global i32 0
define i64 @telldir(i32* nocapture readnone %0) {
%2 = load i32, i32* @EPERM
store i32 %2, i32* @errno
ret i64 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void dbr_abort(int err_code) { exit(err_code); }


x86 assembly (clang, -O0):
<dbr_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<dbr_abort>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @dbr_abort(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
void call0c(int i, long l, char c, short s) {
  i = 3;
  l = 4;
  c = 'k';
  s = 5;
}


x86 assembly (clang, -O0):
<call0c>:
push   %rbp
mov    %rsp,%rbp
mov    %cx,%ax
mov    %dl,%cl
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %ax,-0x14(%rbp)
movl   $0x3,-0x4(%rbp)
movq   $0x4,-0x10(%rbp)
movb   $0x6b,-0x11(%rbp)
movw   $0x5,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call0c(i32 %0, i64 %1, i8 signext %2, i16 signext %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i8
%8 = alloca i16
store i32 %0, i32* %5
store i64 %1, i64* %6
store i8 %2, i8* %7
store i16 %3, i16* %8
store i32 3, i32* %5
store i64 4, i64* %6
store i8 107, i8* %7
store i16 5, i16* %8
ret void
}

LLVM IR (-O2):
define void @call0c(i32 %0, i64 %1, i8 signext %2, i16 signext %3) {
ret void
}