xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ time;
};
struct TYPE_4__ {
  TYPE_1__ xkey;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xkey_time(void *_p) {
  return (unsigned long)((XEvent *)_p)->xkey.time;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xkey_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xkey_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t hw_get_itrig_ma(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hw_get_itrig_ma() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mark();
int /*<<< orphan*/ sweep();
void stop_the_world_mark_and_sweep(void) {
  mark();
  sweep();
}


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

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

LLVM IR (-O0):
define void @stop_the_world_mark_and_sweep() {
%1 = call i32 (...) @mark()
%2 = call i32 (...) @sweep()
ret void
}

LLVM IR (-O2):
define void @stop_the_world_mark_and_sweep() {
%1 = tail call i32 (...) @mark()
%2 = tail call i32 (...) @sweep()
ret void
}
int iscntrl(int c) { return (((c >= 0x00) && (c <= 0x1F)) || (c == 0x7F)); }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1120 <iscntrl+0x20>
mov    $0x1,%al
cmpl   $0x1f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    112a <iscntrl+0x2a>
cmpl   $0x7f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
cmp    $0x20,%edi
setb   %al
cmp    $0x7f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @iscntrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 31
br i1 %7, label %11, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 127
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp ult i32 %0, 32
%3 = icmp eq i32 %0, 127
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ thr0(int /*<<< orphan*/);
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr0(0);
__CPROVER_ASYNC_1:
  thr1(0);
__CPROVER_ASYNC_2:
  thr2(0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <thr0@plt>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1040 <thr2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @thr0(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @thr1(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @thr2(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr0(i32 0)
%2 = tail call i32 @thr1(i32 0)
%3 = tail call i32 @thr2(i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ f(int);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ g(int, int *);
int main(int argc, char **argv) {
  int *r = (int *)f(argc);
  r[0] = 42;
  g(argc, r);
  free(r);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <f@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x2a,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1050 <g@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <f@plt>
mov    %rax,%rbx
movl   $0x2a,(%rax)
mov    %ebp,%edi
mov    %rax,%rsi
call   1050 <g@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = call i64 @f(i32 %6)
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 42, i32* %10
%11 = load i32, i32* %3
%12 = load i32*, i32** %5
%13 = call i32 @g(i32 %11, i32* %12)
%14 = load i32*, i32** %5
%15 = call i32 @free(i32* %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @f(i32 %0)
%4 = inttoptr i64 %3 to i32*
store i32 42, i32* %4
%5 = tail call i32 @g(i32 %0, i32* %4)
%6 = tail call i32 @free(i32* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("result=%d\n", 2 * 3 + 4 * 5);
  return 0;
}


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)
lea    0xed3(%rip),%rdi
mov    $0x1a,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"result=%d\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 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 26)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"result=%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 26)
ret i32 0
}
/* Variables and functions */
float cos(float);
float sin(float);
void SinCos(float radians, float *sine, float *cosine) {
  *sine = sin(radians);
  *cosine = cos(radians);
}


x86 assembly (clang, -O0):
<SinCos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sin@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
call   1040 <cos@plt>
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SinCos>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movss  %xmm0,0x4(%rsp)
call   1030 <sin@plt>
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1040 <cos@plt>
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @SinCos(float %0, float* %1, float* %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
store float %0, float* %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = call float @sin(float %7)
%9 = load float*, float** %5
store float %8, float* %9
%10 = load float, float* %4
%11 = call float @cos(float %10)
%12 = load float*, float** %6
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @SinCos(float %0, float* nocapture writeonly %1, float* nocapture writeonly %2) {
%4 = tail call float @sin(float %0)
store float %4, float* %1
%5 = tail call float @cos(float %0)
store float %5, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lum(int, int, int);
int /*<<< orphan*/ setlum(int, int, int, int /*<<< orphan*/, int *, int *,
                          int *);
void fz_color_rgb(int *bdr, int *bdg, int *bdb, int sr, int sg, int sb) {
  setlum(sr, sg, sb, lum(*bdr, *bdg, *bdb), bdr, bdg, bdb);
}


x86 assembly (clang, -O0):
<fz_color_rgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
call   1040 <lum@plt>
mov    -0x30(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    %eax,%ecx
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    -0x18(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <setlum@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fz_color_rgb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %rdx,%rbp
mov    %rsi,%r13
mov    %rdi,%rbx
mov    (%rdi),%edi
mov    (%rsi),%esi
mov    (%rdx),%edx
call   1040 <lum@plt>
mov    %rbp,(%rsp)
mov    %r12d,%edi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %eax,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1030 <setlum@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @fz_color_rgb(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %10
%14 = load i32, i32* %11
%15 = load i32, i32* %12
%16 = load i32*, i32** %7
%17 = load i32, i32* %16
%18 = load i32*, i32** %8
%19 = load i32, i32* %18
%20 = load i32*, i32** %9
%21 = load i32, i32* %20
%22 = call i32 @lum(i32 %17, i32 %19, i32 %21)
%23 = load i32*, i32** %7
%24 = load i32*, i32** %8
%25 = load i32*, i32** %9
%26 = call i32 @setlum(i32 %13, i32 %14, i32 %15, i32 %22, i32* %23, i32* %24, i32* %25)
ret void
}

LLVM IR (-O2):
define void @fz_color_rgb(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = load i32, i32* %0
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = tail call i32 @lum(i32 %7, i32 %8, i32 %9)
%11 = tail call i32 @setlum(i32 %3, i32 %4, i32 %5, i32 %10, i32* %0, i32* %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int yyerror(const char *s) {
  printf("error %s \n", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"error %s \0A\00"
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"error %s \0A\00"
define i32 @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ settitle(char *);
int Xnam(int modifier, char *label, char *mnemo, char *oper) {
  if (!oper) {
    error("need an operand");
  }
  settitle(oper);
  return 0;
}


x86 assembly (clang, -O0):
<Xnam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    114e <Xnam+0x2e>
lea    0xeb7(%rip),%rdi
call   1030 <error@plt>
mov    -0x20(%rbp),%rdi
call   1040 <settitle@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xnam>:
push   %rbx
mov    %rcx,%rbx
test   %rcx,%rcx
jne    1135 <Xnam+0x15>
lea    0xed0(%rip),%rdi
call   1030 <error@plt>
mov    %rbx,%rdi
call   1040 <settitle@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"need an operand\00"
define i32 @Xnam(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = icmp eq i8* %3, null
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @settitle(i8* %3)
ret i32 0
}
void setupMotors() {}


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

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

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

LLVM IR (-O2):
define void @setupMotors() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("No FIPS AES support\n");
  return (0);
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"No FIPS AES support\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 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"No FIPS AES support\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct lwan_var_descriptor {
  int dummy;
};
struct lwan_tpl {
  int dummy;
};

/* Variables and functions */
struct lwan_tpl *
lwan_tpl_compile_string_full(char const *, struct lwan_var_descriptor const *,
                             int /*<<< orphan*/);
struct lwan_tpl *
lwan_tpl_compile_string(const char *string,
                        const struct lwan_var_descriptor *descriptor) {
  return lwan_tpl_compile_string_full(string, descriptor, 0);
}


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

x86 assembly (clang, -O2):
<lwan_tpl_compile_string>:
xor    %edx,%edx
jmp    1030 <lwan_tpl_compile_string_full@plt>

LLVM IR (-O0):
%struct.lwan_tpl = type { i32 }
%struct.lwan_var_descriptor = type { i32 }
define %struct.lwan_tpl* @lwan_tpl_compile_string(i8* %0, %struct.lwan_var_descriptor* %1) {
%3 = alloca i8*
%4 = alloca %struct.lwan_var_descriptor*
store i8* %0, i8** %3
store %struct.lwan_var_descriptor* %1, %struct.lwan_var_descriptor** %4
%5 = load i8*, i8** %3
%6 = load %struct.lwan_var_descriptor*, %struct.lwan_var_descriptor** %4
%7 = call %struct.lwan_tpl* @lwan_tpl_compile_string_full(i8* %5, %struct.lwan_var_descriptor* %6, i32 0)
ret %struct.lwan_tpl* %7
}

LLVM IR (-O2):
%struct.lwan_tpl = type { i32 }
%struct.lwan_var_descriptor = type { i32 }
define %struct.lwan_tpl* @lwan_tpl_compile_string(i8* %0, %struct.lwan_var_descriptor* %1) {
%3 = tail call %struct.lwan_tpl* @lwan_tpl_compile_string_full(i8* %0, %struct.lwan_var_descriptor* %1, i32 0)
ret %struct.lwan_tpl* %3
}
long to32bit(int c1, int c2, int c3, int c4) {
  long value = 0L;
  value = (c1 & 0xff);
  value = (value << 8) + (c2 & 0xff);
  value = (value << 8) + (c3 & 0xff);
  value = (value << 8) + (c4 & 0xff);
  return (value);
}


x86 assembly (clang, -O0):
<to32bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    -0x10(%rbp),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to32bit>:
shl    $0x18,%edi
movzbl %sil,%eax
shl    $0x10,%eax
or     %edi,%eax
shl    $0x8,%edx
movzwl %dx,%edx
or     %eax,%edx
movzbl %cl,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i64 @to32bit(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i64 0, i64* %9
%10 = load i32, i32* %5
%11 = and i32 %10, 255
%12 = sext i32 %11 to i64
store i64 %12, i64* %9
%13 = load i64, i64* %9
%14 = shl i64 %13, 8
%15 = load i32, i32* %6
%16 = and i32 %15, 255
%17 = sext i32 %16 to i64
%18 = add nsw i64 %14, %17
store i64 %18, i64* %9
%19 = load i64, i64* %9
%20 = shl i64 %19, 8
%21 = load i32, i32* %7
%22 = and i32 %21, 255
%23 = sext i32 %22 to i64
%24 = add nsw i64 %20, %23
store i64 %24, i64* %9
%25 = load i64, i64* %9
%26 = shl i64 %25, 8
%27 = load i32, i32* %8
%28 = and i32 %27, 255
%29 = sext i32 %28 to i64
%30 = add nsw i64 %26, %29
store i64 %30, i64* %9
%31 = load i64, i64* %9
ret i64 %31
}

LLVM IR (-O2):
define i64 @to32bit(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %0, 24
%6 = shl i32 %1, 16
%7 = and i32 %6, 16711680
%8 = or i32 %7, %5
%9 = shl i32 %2, 8
%10 = and i32 %9, 65280
%11 = or i32 %8, %10
%12 = and i32 %3, 255
%13 = or i32 %11, %12
%14 = zext i32 %13 to i64
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ big(unsigned int);
void doit(unsigned int a, unsigned int b, char *id) {
  big(*id);
  big(a);
  big(b);
}


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

x86 assembly (clang, -O2):
<doit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movsbl (%rdx),%edi
call   1030 <big@plt>
mov    %ebp,%edi
call   1030 <big@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <big@plt>

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

LLVM IR (-O2):
define void @doit(i32 %0, i32 %1, i8* nocapture %2) {
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = tail call i32 @big(i32 %5)
%7 = tail call i32 @big(i32 %0)
%8 = tail call i32 @big(i32 %1)
ret void
}
void notification_backend_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @notification_backend_deinit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_adcimm(int /*<<< orphan*/, int);
int /*<<< orphan*/ emit_cmpimm(int, int);
int /*<<< orphan*/ emit_movimm(int /*<<< orphan*/, int);
int /*<<< orphan*/ emit_zeroreg(int);
void emit_sltiu32(int rs, int imm, int rt) {
  if (rs != rt)
    emit_zeroreg(rt);
  emit_cmpimm(rs, imm);
  if (rs == rt)
    emit_movimm(0, rt);
  emit_adcimm(0, rt);
}


x86 assembly (clang, -O0):
<emit_sltiu32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1165 <emit_sltiu32+0x25>
mov    -0xc(%rbp),%edi
call   1040 <emit_zeroreg@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <emit_cmpimm@plt>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1186 <emit_sltiu32+0x46>
mov    -0xc(%rbp),%esi
xor    %edi,%edi
call   1060 <emit_movimm@plt>
mov    -0xc(%rbp),%esi
xor    %edi,%edi
call   1030 <emit_adcimm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_sltiu32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
cmp    %edx,%edi
jne    1164 <emit_sltiu32+0x24>
mov    %ebp,%edi
mov    %r14d,%esi
call   1050 <emit_cmpimm@plt>
xor    %edi,%edi
mov    %ebp,%esi
call   1060 <emit_movimm@plt>
jmp    1175 <emit_sltiu32+0x35>
mov    %ebx,%edi
call   1040 <emit_zeroreg@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1050 <emit_cmpimm@plt>
xor    %edi,%edi
mov    %ebx,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <emit_adcimm@plt>

LLVM IR (-O0):
define void @emit_sltiu32(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* %4
%8 = load i32, i32* %6
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* %6
%12 = call i32 @emit_zeroreg(i32 %11)
br label %13
13: ; preds = %10, %3
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @emit_cmpimm(i32 %14, i32 %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %6
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %13
%21 = load i32, i32* %6
%22 = call i32 @emit_movimm(i32 0, i32 %21)
br label %23
23: ; preds = %20, %13
%24 = load i32, i32* %6
%25 = call i32 @emit_adcimm(i32 0, i32 %24)
ret void
}

LLVM IR (-O2):
define void @emit_sltiu32(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %2
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @emit_zeroreg(i32 %2)
%7 = tail call i32 @emit_cmpimm(i32 %0, i32 %1)
br label %11
8: ; preds = %3
%9 = tail call i32 @emit_cmpimm(i32 %0, i32 %1)
%10 = tail call i32 @emit_movimm(i32 0, i32 %0)
br label %11
11: ; preds = %5, %8
%12 = tail call i32 @emit_adcimm(i32 0, i32 %2)
ret void
}
/* Variables and functions */
int abs(int);
int render_point(int x0, int y0, int x1, int y1, int X) {
  int off = abs(y1 - y0) * (X - x0) / (x1 - x0);
  if (y1 < y0) {
    return y0 - off;
  } else {
    return y0 + off;
  }
}


x86 assembly (clang, -O0):
<render_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x14(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    -0x18(%rbp),%ecx
sub    -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    -0x10(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1162 <render_point+0x52>
mov    -0xc(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116b <render_point+0x5b>
mov    -0xc(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_point>:
mov    %edx,%r9d
mov    %ecx,%edx
sub    %esi,%edx
mov    %edx,%eax
neg    %eax
cmovs  %edx,%eax
sub    %edi,%r8d
imul   %r8d,%eax
sub    %edi,%r9d
cltd
idiv   %r9d
mov    %eax,%edx
neg    %edx
cmp    %esi,%ecx
cmovl  %edx,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @render_point(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
%13 = load i32, i32* %10
%14 = load i32, i32* %8
%15 = sub nsw i32 %13, %14
%16 = call i32 @abs(i32 %15)
%17 = load i32, i32* %11
%18 = load i32, i32* %7
%19 = sub nsw i32 %17, %18
%20 = mul nsw i32 %16, %19
%21 = load i32, i32* %9
%22 = load i32, i32* %7
%23 = sub nsw i32 %21, %22
%24 = sdiv i32 %20, %23
store i32 %24, i32* %12
%25 = load i32, i32* %10
%26 = load i32, i32* %8
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %32
28: ; preds = %5
%29 = load i32, i32* %8
%30 = load i32, i32* %12
%31 = sub nsw i32 %29, %30
store i32 %31, i32* %6
br label %36
32: ; preds = %5
%33 = load i32, i32* %8
%34 = load i32, i32* %12
%35 = add nsw i32 %33, %34
store i32 %35, i32* %6
br label %36
36: ; preds = %32, %28
%37 = load i32, i32* %6
ret i32 %37
}

LLVM IR (-O2):
define i32 @render_point(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = sub nsw i32 %3, %1
%7 = tail call i32 @llvm.abs.i32(i32 %6, i1 true)
%8 = sub nsw i32 %4, %0
%9 = mul nsw i32 %7, %8
%10 = sub nsw i32 %2, %0
%11 = sdiv i32 %9, %10
%12 = icmp slt i32 %3, %1
%13 = sub i32 0, %11
%14 = select i1 %12, i32 %13, i32 %11
%15 = add i32 %14, %1
ret i32 %15
}
void ice_free_cpu_rx_rmap(struct ice_vsi *vsi) {}


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

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

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

LLVM IR (-O2):
%struct.ice_vsi = type opaque
define void @ice_free_cpu_rx_rmap(%struct.ice_vsi* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GINT1_DriverIRQHandler();
__attribute__((weak)) void GINT1_IRQHandler(void) { GINT1_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @GINT1_IRQHandler() {
%1 = call i32 (...) @GINT1_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @GINT1_IRQHandler() {
%1 = tail call i32 (...) @GINT1_DriverIRQHandler()
ret void
}
int blklen(av)
register char **av;
{
  register int i = 0;
  while (*av++)
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<blklen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
cmpq   $0x0,(%rax)
je     1136 <blklen+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <blklen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blklen>:
cmpq   $0x0,(%rdi)
je     111d <blklen+0x1d>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <blklen+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @blklen(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i8**, i8*** %2
%6 = getelementptr inbounds i8*, i8** %5, i32 1
store i8** %6, i8*** %2
%7 = load i8*, i8** %5
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @blklen(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8** [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8*, i8** %7
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo() { printf("Hello World from a constructor\n"); }


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Hello World from a constructor\0A\00"
define void @foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"Hello World from a constructor\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_D1int16_reg(short val) {
  return ((val) & (0xD1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D1int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xd1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D1int16_reg>:
test   $0xd1,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D1int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 209
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_D1int16_reg(i16 signext %0) {
%2 = and i16 %0, 209
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i = __VERIFIER_nondet_int();
  int j = __VERIFIER_nondet_int();
  int k = __VERIFIER_nondet_int();
  int ell;
  while (i <= 100 && j <= k) {
    ell = i;
    i = j;
    j = ell + 1;
    k--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x64,-0x8(%rbp)
mov    %al,-0x15(%rbp)
jg     1158 <main+0x48>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setle  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1168 <main+0x58>
jmp    118b <main+0x7b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x2d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %2
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %3
%8 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %8, i32* %4
br label %9
9: ; preds = %18, %0
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 100
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp sle i32 %13, %14
br label %16
16: ; preds = %12, %9
%17 = phi i1 [ false, %9 ], [ %15, %12 ]
br i1 %17, label %18, label %25
18: ; preds = %16
%19 = load i32, i32* %2
store i32 %19, i32* %5
%20 = load i32, i32* %3
store i32 %20, i32* %2
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
%23 = load i32, i32* %4
%24 = add nsw i32 %23, -1
store i32 %24, i32* %4
br label %9
25: ; preds = %16
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
char *frob();
int /*<<< orphan*/ oof();
void test_4(int code) {
  char *temp = frob();
  int rotate = (code == 22);
  if (temp == 0 || !rotate)
    oof();
}


x86 assembly (clang, -O0):
<test_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <frob@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x16,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <test_4+0x3a>
cmpl   $0x0,-0x14(%rbp)
jne    1161 <test_4+0x41>
mov    $0x0,%al
call   1030 <oof@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_4>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <frob@plt>
cmp    $0x16,%ebx
jne    1136 <test_4+0x16>
test   %rax,%rax
je     1136 <test_4+0x16>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1030 <oof@plt>

LLVM IR (-O0):
define void @test_4(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i8* (...) @frob()
store i8* %5, i8** %3
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 22
%8 = zext i1 %7 to i32
store i32 %8, i32* %4
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %1
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %11, %1
%15 = call i32 (...) @oof()
br label %16
16: ; preds = %14, %11
ret void
}

LLVM IR (-O2):
define void @test_4(i32 %0) {
%2 = tail call i8* (...) @frob()
%3 = icmp eq i32 %0, 22
%4 = icmp ne i8* %2, null
%5 = and i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 (...) @oof()
br label %8
8: ; preds = %1, %6
ret void
}
void simple_rename(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<simple_rename>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_rename>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.simple_rename = [14 x i8] c"simple_rename\00"
define void @simple_rename() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.simple_rename, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.simple_rename = [14 x i8] c"simple_rename\00"
define void @simple_rename() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.simple_rename, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fcpeek(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, long);
int main() {
  FILE *f = fopen("tmp.txt", "r");
  printf("Char: %c\n", fcpeek(f));
  printf("Current Pos: %d\n", (long int)ftell(f));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeab(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <fcpeek@plt>
movslq %eax,%rsi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,%rsi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <fcpeek@plt>
movslq %eax,%rsi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
lea    0xe97(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"tmp.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"Char: %c\0A\00"
@.str.3 = [17 x i8] c"Current Pos: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fcpeek(i32* %4)
%6 = sext i32 %5 to i64
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i64 %6)
%8 = load i32*, i32** %2
%9 = call i64 @ftell(i32* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i64 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"tmp.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"Char: %c\0A\00"
@.str.3 = [17 x i8] c"Current Pos: %d\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @fcpeek(i32* %1)
%3 = sext i32 %2 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i64 %3)
%5 = tail call i64 @ftell(i32* %1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i64 %5)
ret i32 0
}
void uartB_puts(const char *s) {}


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

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

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

LLVM IR (-O2):
define void @uartB_puts(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ remove_status(struct battle_char *, int);
void remove_stone_gun(struct battle_char *bc) { remove_status(bc, 9); }


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

x86 assembly (clang, -O2):
<remove_stone_gun>:
mov    $0x9,%esi
jmp    1030 <remove_status@plt>

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @remove_stone_gun(%struct.battle_char* %0) {
%2 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %2
%3 = load %struct.battle_char*, %struct.battle_char** %2
%4 = call i32 @remove_status(%struct.battle_char* %3, i32 9)
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @remove_stone_gun(%struct.battle_char* %0) {
%2 = tail call i32 @remove_status(%struct.battle_char* %0, i32 9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led1Toggle();
void BlinkNoTimerTaskC__Leds__led1Toggle(void) { LedsP__Leds__led1Toggle(); }


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

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

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

LLVM IR (-O2):
define void @BlinkNoTimerTaskC__Leds__led1Toggle() {
%1 = tail call i32 (...) @LedsP__Leds__led1Toggle()
ret void
}
/* Variables and functions */
unsigned int bar();
void foo20xff(void) {
  unsigned int a = bar();
  if (a > 0xff)
    bar();
}


x86 assembly (clang, -O0):
<foo20xff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jbe    1136 <foo20xff+0x26>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo20xff>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
cmp    $0x100,%eax
jb     1127 <foo20xff+0x17>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @foo20xff() {
%1 = alloca i32
%2 = call i32 (...) @bar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ugt i32 %3, 255
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @bar()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @foo20xff() {
%1 = tail call i32 (...) @bar()
%2 = icmp ugt i32 %1, 255
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %0
ret void
}
void vfree(void *addr) {}


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

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

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

LLVM IR (-O2):
define void @vfree(i8* nocapture %0) {
ret void
}
int cvmx_atomic_get32(int *ptr) { return *(volatile int *)ptr; }


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

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

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

LLVM IR (-O2):
define i32 @cvmx_atomic_get32(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
void __attribute__((weak)) adc1_2_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<adc1_2_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc1_2_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.adc1_2_isr = [11 x i8] c"adc1_2_isr\00"
define weak void @adc1_2_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.adc1_2_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.adc1_2_isr = [11 x i8] c"adc1_2_isr\00"
define weak void @adc1_2_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.adc1_2_isr, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timeval {
  long tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
uint64_t get_time(void) {
  static struct timeval tv;
  gettimeofday(&tv, 0);
  return (tv.tv_sec * 1000000L + tv.tv_usec);
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x2f03(%rip),%rax
add    0x2f04(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
push   %rax
lea    0x2f18(%rip),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x2f06(%rip),%rax
add    0x2f07(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
@get_time.tv = internal global %struct.timeval zeroinitializer
define i64 @get_time() {
%1 = call i32 @gettimeofday(%struct.timeval* @get_time.tv, i32 0)
%2 = load i64, i64* getelementptr inbounds (%struct.timeval, %struct.timeval* @get_time.tv, i32 0, i32 0)
%3 = mul nsw i64 %2, 1000000
%4 = load i64, i64* getelementptr inbounds (%struct.timeval, %struct.timeval* @get_time.tv, i32 0, i32 1)
%5 = add nsw i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
@get_time.tv = internal global %struct.timeval zeroinitializer
define i64 @get_time() {
%1 = tail call i32 @gettimeofday(%struct.timeval* @get_time.tv, i32 0)
%2 = load i64, i64* getelementptr inbounds (%struct.timeval, %struct.timeval* @get_time.tv, i64 0, i32 0)
%3 = mul nsw i64 %2, 1000000
%4 = load i64, i64* getelementptr inbounds (%struct.timeval, %struct.timeval* @get_time.tv, i64 0, i32 1)
%5 = add nsw i64 %3, %4
ret i64 %5
}
int intcmp(const void *a, const void *b, void *thunk) {
  if (thunk) {
    return (*((int *)b)) - (*((int *)a));
  }
  return (*((int *)a)) - (*((int *)b));
}


x86 assembly (clang, -O0):
<intcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     112f <intcmp+0x2f>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    113e <intcmp+0x3e>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcmp>:
test   %rdx,%rdx
mov    %rsi,%rax
cmove  %rdi,%rax
cmove  %rsi,%rdi
mov    (%rax),%eax
sub    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @intcmp(i8* nocapture %0, i8* nocapture %1, i8* readnone %2) {
%4 = icmp eq i8* %2, null
%5 = select i1 %4, i8* %0, i8* %1
%6 = select i1 %4, i8* %1, i8* %0
%7 = bitcast i8* %5 to i32*
%8 = load i32, i32* %7
%9 = bitcast i8* %6 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %8, %10
ret i32 %11
}