xunge/DecIR huggingface dataset:
void markquote() {
  extern char commentstate;
  extern char quotestate;
  if (0 == commentstate) {
    if (7 == quotestate) {
      quotestate = 6;
    } else {
      quotestate = 7;
    }
  }
}


x86 assembly (clang, -O0):
<markquote>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    114d <markquote+0x4d>
mov    0x2eb9(%rip),%rax
movsbl (%rax),%ecx
mov    $0x7,%eax
cmp    %ecx,%eax
jne    113e <markquote+0x3e>
mov    0x2ea2(%rip),%rax
movb   $0x6,(%rax)
jmp    1148 <markquote+0x48>
mov    0x2e93(%rip),%rax
movb   $0x7,(%rax)
jmp    114d <markquote+0x4d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<markquote>:
mov    0x2ee1(%rip),%rax
cmpb   $0x0,(%rax)
je     110d <markquote+0xd>
ret
mov    0x2ec4(%rip),%rax
cmpb   $0x7,(%rax)
sete   %cl
xor    $0x7,%cl
mov    %cl,(%rax)
ret

LLVM IR (-O0):
@commentstate = external global i8
@quotestate = external global i8
define void @markquote() {
%1 = load i8, i8* @commentstate
%2 = sext i8 %1 to i32
%3 = icmp eq i32 0, %2
br i1 %3, label %4, label %11
4: ; preds = %0
%5 = load i8, i8* @quotestate
%6 = sext i8 %5 to i32
%7 = icmp eq i32 7, %6
br i1 %7, label %8, label %9
8: ; preds = %4
store i8 6, i8* @quotestate
br label %10
9: ; preds = %4
store i8 7, i8* @quotestate
br label %10
10: ; preds = %9, %8
br label %11
11: ; preds = %10, %0
ret void
}

LLVM IR (-O2):
@commentstate = external global i8
@quotestate = external global i8
define void @markquote() {
%1 = load i8, i8* @commentstate
%2 = icmp eq i8 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = load i8, i8* @quotestate
%5 = icmp eq i8 %4, 7
%6 = select i1 %5, i8 6, i8 7
store i8 %6, i8* @quotestate
br label %7
7: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vsnprintf(char *, size_t, char const *, int /*<<< orphan*/);
int vsprintf(char *str, const char *format, va_list ap) {
  return vsnprintf(str, (size_t)-1, format, ap);
}


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

x86 assembly (clang, -O2):
<vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0xffffffffffffffff,%rsi
jmp    1030 <vsnprintf@plt>

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

LLVM IR (-O2):
define i32 @vsprintf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @vsnprintf(i8* %0, i64 -1, i8* %1, i32 %2)
ret i32 %4
}
void sim_report() {}


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

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

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

LLVM IR (-O2):
define void @sim_report() {
ret void
}
/* Variables and functions */
double __infer_nondet_double();
double lgamma(double x) { return __infer_nondet_double(); }


x86 assembly (clang, -O0):
<lgamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @lgamma(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @lgamma(double %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
int modi(int v, int m) {
  return ((((v) < 0.0) ? (-1.0) : (((v) > 0.0) ? (1.0) : (0.0))) *
          ((((v) < 0.0) ? -(v) : (v)) % m));
}


x86 assembly (clang, -O0):
<modi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    112e <modi+0x2e>
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    115a <modi+0x5a>
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xec5(%rip),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1183 <modi+0x83>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1189 <modi+0x89>
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2sd %edx,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modi>:
xorpd  %xmm0,%xmm0
test   %edi,%edi
je     1110 <modi+0x10>
movsd  0xef0(%rip),%xmm0
jns    111a <modi+0x1a>
movsd  0xeee(%rip),%xmm0
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
cltd
idiv   %esi
cvtsi2sd %edx,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @modi(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 = sitofp i32 %5 to double
%7 = fcmp olt double %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %2
br label %15
9: ; preds = %2
%10 = load i32, i32* %3
%11 = sitofp i32 %10 to double
%12 = fcmp ogt double %11, 0.000000e+00
%13 = zext i1 %12 to i64
%14 = select i1 %12, double 1.000000e+00, double 0.000000e+00
br label %15
15: ; preds = %9, %8
%16 = phi double [ -1.000000e+00, %8 ], [ %14, %9 ]
%17 = load i32, i32* %3
%18 = sitofp i32 %17 to double
%19 = fcmp olt double %18, 0.000000e+00
br i1 %19, label %20, label %23
20: ; preds = %15
%21 = load i32, i32* %3
%22 = sub nsw i32 0, %21
br label %25
23: ; preds = %15
%24 = load i32, i32* %3
br label %25
25: ; preds = %23, %20
%26 = phi i32 [ %22, %20 ], [ %24, %23 ]
%27 = load i32, i32* %4
%28 = srem i32 %26, %27
%29 = sitofp i32 %28 to double
%30 = fmul double %16, %29
%31 = fptosi double %30 to i32
ret i32 %31
}

LLVM IR (-O2):
define i32 @modi(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, double 0.000000e+00, double 1.000000e+00
%6 = select i1 %3, double -1.000000e+00, double %5
%7 = sub nsw i32 0, %0
%8 = select i1 %3, i32 %7, i32 %0
%9 = srem i32 %8, %1
%10 = sitofp i32 %9 to double
%11 = fmul double %6, %10
%12 = fptosi double %11 to i32
ret i32 %12
}
int isalpha(int c) { return (((unsigned)c | 32) - 'a') < 26; }


x86 assembly (clang, -O0):
<isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x20,%eax
sub    $0x61,%eax
cmp    $0x1a,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalpha>:
or     $0x20,%edi
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = or i32 %3, 32
%5 = sub i32 %4, 97
%6 = icmp ult i32 %5, 26
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = or i32 %0, 32
%3 = add i32 %2, -97
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
main() {
  int count, check;
  char first[7];
  scanf("%d@", &count);
  printf("%d", count);
  scanf("%6c", first);
  printf("%s", first);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xf(%rbp),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0xf(%rbp),%rsi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
lea    0x9(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xea4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d@\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%6c\00"
@.str.3 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void error(void) {
  perror("error: no hay suficiente espacio en la pila\n\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"error: no hay suficiente espacio en la pila\0A\0A\00"
define void @error() {
%1 = call i32 @perror(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [46 x i8] c"error: no hay suficiente espacio en la pila\0A\0A\00"
define void @error() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_19uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x19 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_19uint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x19,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_19uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 25
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ getegid();
__attribute__((__weak__, __always___)) gid_t softboundcets_getegid(void) {
  return getegid();
}


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

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

LLVM IR (-O0):
define weak i32 @softboundcets_getegid() {
%1 = call i32 (...) @getegid()
ret i32 %1
}

LLVM IR (-O2):
define weak i32 @softboundcets_getegid() {
%1 = tail call i32 (...) @getegid()
ret i32 %1
}
/* Variables and functions */
double randomn(double);
double perturb(double value, double amount) {
  value = value + randomn(value * amount) - (value * amount / 2.0);
  return value;
}


x86 assembly (clang, -O0):
<perturb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <randomn@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xea7(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perturb>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   1030 <randomn@plt>
addsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xebf(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @perturb(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* %3
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = call double @randomn(double %8)
%10 = fadd double %5, %9
%11 = load double, double* %3
%12 = load double, double* %4
%13 = fmul double %11, %12
%14 = fdiv double %13, 2.000000e+00
%15 = fsub double %10, %14
store double %15, double* %3
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @perturb(double %0, double %1) {
%3 = fmul double %0, %1
%4 = tail call double @randomn(double %3)
%5 = fadd double %4, %0
%6 = fmul double %3, 5.000000e-01
%7 = fsub double %5, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun() { printf("fun() \n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"fun() \00"
define void @fun() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ulint_put(unsigned long const, int /*<<< orphan*/ *);
void std_ulint_str(const void *restrict self, const char *restrict format,
                   FILE *restrict stream) {
  (void)format;
  if (self)
    ulint_put(*(const unsigned long int *)self, stream);
}


x86 assembly (clang, -O0):
<std_ulint_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113f <std_ulint_str+0x2f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ulint_put@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_ulint_str>:
test   %rdi,%rdi
je     1120 <std_ulint_str+0x10>
mov    (%rdi),%rdi
mov    %rdx,%rsi
jmp    1030 <ulint_put@plt>
ret

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

LLVM IR (-O2):
define void @std_ulint_str(i8* noalias %0, i8* noalias nocapture readnone %1, i32* noalias %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = bitcast i8* %0 to i64*
%7 = load i64, i64* %6
%8 = tail call i32 @ulint_put(i64 %7, i32* %2)
br label %9
9: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(void *, int, size_t, int /*<<< orphan*/ *);
void vread(void *ptr, size_t s, FILE *fp, bool *is_valid) {
  if (is_valid && fread(ptr, sizeof(unsigned char), s, fp) != s)
    is_valid = false;
}


x86 assembly (clang, -O0):
<vread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115b <vread+0x4b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
cmp    -0x10(%rbp),%rax
je     115b <vread+0x4b>
movq   $0x0,-0x20(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vread>:
test   %rcx,%rcx
je     1128 <vread+0x18>
mov    %rdx,%rax
mov    %rsi,%rdx
mov    $0x1,%esi
mov    %rax,%rcx
jmp    1030 <fread@plt>
ret

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

LLVM IR (-O2):
define void @vread(i8* nocapture %0, i64 %1, i32* nocapture %2, i32* readnone %3) {
%5 = icmp eq i32* %3, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i64 @fread(i8* %0, i32 1, i64 %1, i32* %2)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_ALRM(int /*<<< orphan*/);
int gen_ALRM() {
  handle_ALRM(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gen_ALRM() {
%1 = call i32 @handle_ALRM(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_ALRM() {
%1 = tail call i32 @handle_ALRM(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  if (-2)
    printf("-ve is true ");
  else
    printf("-ve is false");
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"-ve is true \00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"-ve is true \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
__attribute__((always_)) void *radix_tree_ptr_to_indirect(void *ptr) {
  return (void *)((unsigned long)ptr | 1);
}


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

x86 assembly (clang, -O2):
<radix_tree_ptr_to_indirect>:
mov    %rdi,%rax
or     $0x1,%rax
ret

LLVM IR (-O0):
define i8* @radix_tree_ptr_to_indirect(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = or i64 %4, 1
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @radix_tree_ptr_to_indirect(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = or i64 %2, 1
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int WEXITSTATUS(int /*<<< orphan*/);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ sprintf(char *, char *, char const *);
scalar_t__ strlen(char const *);
int /*<<< orphan*/ system(char *);
int check_command(const char *cmd) {
  char *system_command;
  int res;
  system_command = (char *)malloc(24 + strlen(cmd) + 1);
  sprintf(system_command, "command -v %s >> /dev/null", cmd);
  res = WEXITSTATUS(system(system_command));
  return res;
}


x86 assembly (clang, -O0):
<check_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x18,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe78(%rip),%rsi
call   1070 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <system@plt>
mov    %eax,%edi
call   1060 <WEXITSTATUS@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_command>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x19(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xe91(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1070 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <WEXITSTATUS@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"command -v %s >> /dev/null\00"
define i32 @check_command(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 24, %6
%8 = add nsw i64 %7, 1
%9 = call i64 @malloc(i64 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %3
%15 = call i32 @system(i8* %14)
%16 = call i32 @WEXITSTATUS(i32 %15)
store i32 %16, i32* %4
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
@.str = [27 x i8] c"command -v %s >> /dev/null\00"
define i32 @check_command(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 25
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %5, i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = tail call i32 @system(i8* %5)
%8 = tail call i32 @WEXITSTATUS(i32 %7)
ret i32 %8
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int _stat(const char *file __attribute__((unused)),
          struct stat *st __attribute__((unused))) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<_stat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stat>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ throw(char *);
void destroy_segment(int segment_id) {
  if (shmctl(segment_id, IPC_RMID, NULL) == -1) {
    throw("Error destroying shared memory segment");
  }
}


x86 assembly (clang, -O0):
<destroy_segment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <shmctl@plt>
cmp    $0xffffffff,%eax
jne    1155 <destroy_segment+0x35>
lea    0xeb0(%rip),%rdi
call   1030 <throw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_segment>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <shmctl@plt>
cmp    $0xffffffff,%eax
je     1138 <destroy_segment+0x18>
pop    %rax
ret
lea    0xec1(%rip),%rdi
pop    %rax
jmp    1030 <throw@plt>

LLVM IR (-O0):
@IPC_RMID = global i32 0
@.str = [39 x i8] c"Error destroying shared memory segment\00"
define void @destroy_segment(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @IPC_RMID
%5 = call i32 @shmctl(i32 %3, i32 %4, i32* null)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @throw(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
@.str = [39 x i8] c"Error destroying shared memory segment\00"
define void @destroy_segment(i32 %0) {
%2 = load i32, i32* @IPC_RMID
%3 = tail call i32 @shmctl(i32 %0, i32 %2, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @throw(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assume(int);
int /*<<< orphan*/ assert(int);
int nondet_int();
int main() {
  int i = 0, x = 0, y = 0;
  int n = nondet_int();
  __ESBMC_assume(n > 0);
  for (i = 0; 1; i++) {
    assert(x == 0);
  }
  assert(x != 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__ESBMC_assume@plt>
movl   $0x0,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1185 <main+0x55>
jmp    11a4 <main+0x74>
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1176 <main+0x46>
cmpl   $0x0,-0xc(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <nondet_int@plt>
xor    %edi,%edi
test   %eax,%eax
setg   %dil
call   1040 <__ESBMC_assume@plt>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1,%edi
call   1050 <assert@plt>
jmp    1150 <main+0x20>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet_int()
%2 = icmp sgt i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @__ESBMC_assume(i32 %3)
br label %5
5: ; preds = %5, %0
%6 = tail call i32 @assert(i32 1)
br label %5
}
int test_imm_0Cint64_midword_reg(long long val) {
  return ((val >> 16) & (0x0C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Cint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xc,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Cint64_midword_reg>:
test   $0xc0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_0Cint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 12
%6 = icmp ne i64 %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_0Cint64_midword_reg(i64 %0) {
%2 = and i64 %0, 786432
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void ASAPWriter_TwoDigitsToString(unsigned char *result, int offset,
                                  int value) {
  result[offset] = 48 + value / 10;
  result[offset + 1] = 48 + value % 10;
}


x86 assembly (clang, -O0):
<ASAPWriter_TwoDigitsToString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASAPWriter_TwoDigitsToString>:
movslq %edx,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    0x30(%rcx),%edx
movslq %esi,%rsi
mov    %dl,(%rdi,%rsi,1)
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    $0x30,%al
mov    %al,0x1(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @ASAPWriter_TwoDigitsToString(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 10
%9 = add nsw i32 48, %8
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 %10, i8* %14
%15 = load i32, i32* %6
%16 = srem i32 %15, 10
%17 = add nsw i32 48, %16
%18 = trunc i32 %17 to i8
%19 = load i8*, i8** %4
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
store i8 %18, i8* %23
ret void
}

LLVM IR (-O2):
define void @ASAPWriter_TwoDigitsToString(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = sdiv i32 %2, 10
%5 = trunc i32 %4 to i8
%6 = add i8 %5, 48
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %6, i8* %8
%9 = srem i32 %2, 10
%10 = trunc i32 %9 to i8
%11 = add nsw i8 %10, 48
%12 = add nsw i32 %1, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
store i8 %11, i8* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("No FIPS 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 = [17 x i8] c"No FIPS 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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"No FIPS support\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printa(char **);
void help_log() {
  char *msg[] = {"Show summary information about your Pit database. This "
                 "command is as simple as:\n",
                 "   pit log\n", NULL};
  printa(msg);
}


x86 assembly (clang, -O0):
<help_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ce1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cde(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cdb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <printa@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_log>:
sub    $0x18,%rsp
mov    0x2cf5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <printa@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [81 x i8] c"Show summary information about your Pit database. This command is as simple as:\0A\00"
@.str.1 = [12 x i8] c" pit log\0A\00"
@__const.help_log.msg = [3 x i8*] [i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0), i8* null]
define void @help_log() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%4 = call i32 @printa(i8** %3)
ret void
}

LLVM IR (-O2):
@.str = [81 x i8] c"Show summary information about your Pit database. This command is as simple as:\0A\00"
@.str.1 = [12 x i8] c" pit log\0A\00"
@__const.help_log.msg = [3 x i8*] [i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0), i8* null]
define void @help_log() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%4 = call i32 @printa(i8** %3)
ret void
}
int multiply(int i) { return i * i; }


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

x86 assembly (clang, -O2):
<multiply>:
mov    %edi,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @multiply(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void vfree(void *arg) { free(arg); }


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

x86 assembly (clang, -O2):
<vfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @vfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblock_set_is_silence() {
  printf("NOT IMPLEMENTED:"
         "pa_memblock_set_is_silence"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"NOT IMPLEMENTED:pa_memblock_set_is_silence\0A\00"
define i32 @pa_memblock_set_is_silence() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_memblock_set_is_silence\00"
define i32 @pa_memblock_set_is_silence() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  printf("%d", is_prime(a));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <is_prime@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @is_prime(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void mostrarFatal(char *texto) {
  printf("\x1b[31m"
         "[FATAL]\t%s\n"
         "\x1b[0m",
         texto);
}


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

x86 assembly (clang, -O2):
<mostrarFatal>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"\1B[31m[FATAL]\09%s\0A\1B[0m\00"
define void @mostrarFatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"\1B[31m[FATAL]\09%s\0A\1B[0m\00"
define void @mostrarFatal(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLshort;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord4sv(int /*<<< orphan*/ *);
void TexCoord4sv(GLshort v[4]) { glTexCoord4sv(v); }


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

x86 assembly (clang, -O2):
<TexCoord4sv>:
jmp    1030 <glTexCoord4sv@plt>

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

LLVM IR (-O2):
define void @TexCoord4sv(i32* %0) {
%2 = tail call i32 @glTexCoord4sv(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void g10_cb(void *arg) { puts("GPIO_10 triggered"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"GPIO_10 triggered\00"
define void @g10_cb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"GPIO_10 triggered\00"
define void @g10_cb(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
char *sixteen() {
  char *s = malloc(5);
  strcpy(s, "Hello");
}


x86 assembly (clang, -O0):
<sixteen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sixteen>:
push   %rax
mov    $0x5,%edi
call   1040 <malloc@plt>
lea    0xece(%rip),%rsi
mov    %rax,%rdi
pop    %rax
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
define i8* @sixteen() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @malloc(i32 5)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %1
ret i8* %6
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define noalias i8* @sixteen() {
%1 = tail call dereferenceable_or_null(5) i8* @malloc(i32 5)
%2 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("cd /mnt/user/code/SimpleMotors/bin && /mnt/user/jvm/java Main");
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"cd /mnt/user/code/SimpleMotors/bin && /mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [62 x i8] c"cd /mnt/user/code/SimpleMotors/bin && /mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mintaka_record3(int, int /*<<< orphan*/, int /*<<< orphan*/);
void mintaka_record1(int state) { mintaka_record3(state, 0, 0); }


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

x86 assembly (clang, -O2):
<mintaka_record1>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <mintaka_record3@plt>

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

LLVM IR (-O2):
define void @mintaka_record1(i32 %0) {
%2 = tail call i32 @mintaka_record3(i32 %0, i32 0, i32 0)
ret void
}
void lockSemaphore(int semaphore_id) {}


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

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

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

LLVM IR (-O2):
define void @lockSemaphore(i32 %0) {
ret void
}
int sbf(float x) { return __builtin_signbitf(x); }


x86 assembly (clang, -O0):
<sbf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbf>:
movmskps %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @sbf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = bitcast float %3 to i32
%5 = icmp slt i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @sbf(float %0) {
%2 = bitcast float %0 to i32
%3 = lshr i32 %2, 31
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ heart_layer(int, int);
void heart_shape(uint8_t i) {
  heart_layer(1, i >> 2);
  heart_layer(2, i >> 1);
  heart_layer(3, i);
  heart_layer(4, i);
  heart_layer(5, i >> 1);
  heart_layer(6, i >> 2);
}


x86 assembly (clang, -O0):
<heart_shape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
sar    $0x2,%esi
mov    $0x1,%edi
call   1030 <heart_layer@plt>
mov    -0x4(%rbp),%esi
sar    $0x1,%esi
mov    $0x2,%edi
call   1030 <heart_layer@plt>
mov    -0x4(%rbp),%esi
mov    $0x3,%edi
call   1030 <heart_layer@plt>
mov    -0x4(%rbp),%esi
mov    $0x4,%edi
call   1030 <heart_layer@plt>
mov    -0x4(%rbp),%esi
sar    $0x1,%esi
mov    $0x5,%edi
call   1030 <heart_layer@plt>
mov    -0x4(%rbp),%esi
sar    $0x2,%esi
mov    $0x6,%edi
call   1030 <heart_layer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heart_shape>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    %edi,%r14d
sar    $0x2,%r14d
mov    $0x1,%edi
mov    %r14d,%esi
call   1030 <heart_layer@plt>
mov    %ebx,%ebp
sar    %ebp
mov    $0x2,%edi
mov    %ebp,%esi
call   1030 <heart_layer@plt>
mov    $0x3,%edi
mov    %ebx,%esi
call   1030 <heart_layer@plt>
mov    $0x4,%edi
mov    %ebx,%esi
call   1030 <heart_layer@plt>
mov    $0x5,%edi
mov    %ebp,%esi
call   1030 <heart_layer@plt>
mov    $0x6,%edi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <heart_layer@plt>

LLVM IR (-O0):
define void @heart_shape(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 2
%5 = call i32 @heart_layer(i32 1, i32 %4)
%6 = load i32, i32* %2
%7 = ashr i32 %6, 1
%8 = call i32 @heart_layer(i32 2, i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @heart_layer(i32 3, i32 %9)
%11 = load i32, i32* %2
%12 = call i32 @heart_layer(i32 4, i32 %11)
%13 = load i32, i32* %2
%14 = ashr i32 %13, 1
%15 = call i32 @heart_layer(i32 5, i32 %14)
%16 = load i32, i32* %2
%17 = ashr i32 %16, 2
%18 = call i32 @heart_layer(i32 6, i32 %17)
ret void
}

LLVM IR (-O2):
define void @heart_shape(i32 %0) {
%2 = ashr i32 %0, 2
%3 = tail call i32 @heart_layer(i32 1, i32 %2)
%4 = ashr i32 %0, 1
%5 = tail call i32 @heart_layer(i32 2, i32 %4)
%6 = tail call i32 @heart_layer(i32 3, i32 %0)
%7 = tail call i32 @heart_layer(i32 4, i32 %0)
%8 = tail call i32 @heart_layer(i32 5, i32 %4)
%9 = tail call i32 @heart_layer(i32 6, i32 %2)
ret void
}