xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ hook_signal_send(char *, char *, int /*<<< orphan*/ *);
void gui_input_text_cursor_moved_signal() {
  hook_signal_send("input_text_cursor_moved", "string", NULL);
}


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

x86 assembly (clang, -O2):
<gui_input_text_cursor_moved_signal>:
lea    0xee9(%rip),%rdi
lea    0xefa(%rip),%rsi
xor    %edx,%edx
jmp    1030 <hook_signal_send@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"input_text_cursor_moved\00"
@.str.1 = [7 x i8] c"string\00"
define void @gui_input_text_cursor_moved_signal() {
%1 = call i32 @hook_signal_send(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"input_text_cursor_moved\00"
@.str.1 = [7 x i8] c"string\00"
define void @gui_input_text_cursor_moved_signal() {
%1 = tail call i32 @hook_signal_send(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
void XSetWMColormapWindows() {}


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

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

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

LLVM IR (-O2):
define void @XSetWMColormapWindows() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
double *get_double_vec(int x) {
  int i;
  double *vec;
  vec = (double *)malloc(x * sizeof(double));
  for (i = 0; i < x; i++) {
    vec[i] = 0.0;
  }
  return vec;
}


x86 assembly (clang, -O0):
<get_double_vec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115f <get_double_vec+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <get_double_vec+0x25>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_double_vec>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x0(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %ebx,%ebx
jle    1149 <get_double_vec+0x29>
mov    %ebx,%edx
shl    $0x3,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double* @get_double_vec(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = mul i64 %6, 8
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to double*
store double* %10, double** %4
store i32 0, i32* %3
br label %11
11: ; preds = %20, %1
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %23
15: ; preds = %11
%16 = load double*, double** %4
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
store double 0.000000e+00, double* %19
br label %20
20: ; preds = %15
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %11
23: ; preds = %11
%24 = load double*, double** %4
ret double* %24
}

LLVM IR (-O2):
define double* @get_double_vec(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = inttoptr i64 %3 to i8*
%7 = zext i32 %0 to i64
%8 = shl nuw nsw i64 %7, 3
br label %9
9: ; preds = %5, %1
%10 = inttoptr i64 %3 to double*
ret double* %10
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
const char *skip_blanks(const char *s) {
  while (isspace((unsigned char)*s) && *s != '\n')
    ++s;
  return s;
}


x86 assembly (clang, -O0):
<skip_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     114a <skip_blanks+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115a <skip_blanks+0x4a>
jmp    116b <skip_blanks+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_blanks+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_blanks>:
push   %rbx
mov    %rdi,%rbx
movzbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <skip_blanks+0x29>
cmpb   $0xa,(%rbx)
je     1139 <skip_blanks+0x29>
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1120 <skip_blanks+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_blanks(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isspace(i8 zeroext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %9
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = tail call i64 @isspace(i8 zeroext %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %9, %1
%15 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %5 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int is_leap_year(int);
void is_leap_year_test(void) {
  assert(is_leap_year(2000) == 1);
  assert(is_leap_year(1900) == 0);
  assert(is_leap_year(1904) == 1);
  assert(is_leap_year(1903) == 0);
}


x86 assembly (clang, -O0):
<is_leap_year_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7d0,%edi
call   1040 <is_leap_year@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x76c,%edi
call   1040 <is_leap_year@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x770,%edi
call   1040 <is_leap_year@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x76f,%edi
call   1040 <is_leap_year@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year_test>:
push   %rax
mov    $0x7d0,%edi
call   1040 <is_leap_year@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x76c,%edi
call   1040 <is_leap_year@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x770,%edi
call   1040 <is_leap_year@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x76f,%edi
call   1040 <is_leap_year@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @is_leap_year_test() {
%1 = call i32 @is_leap_year(i32 2000)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @is_leap_year(i32 1900)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @is_leap_year(i32 1904)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @is_leap_year(i32 1903)
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret void
}

LLVM IR (-O2):
define void @is_leap_year_test() {
%1 = tail call i32 @is_leap_year(i32 2000)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @is_leap_year(i32 1900)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @is_leap_year(i32 1904)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @is_leap_year(i32 1903)
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int main(void) {
  char mem[30000];
  register char *mem_ptr = mem;
  register char *end = mem + 30000;
  putchar(*mem_ptr);
  *mem_ptr += 1;
  while (*mem_ptr) {
    putchar(*mem_ptr);
    *mem_ptr += 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7550,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7540(%rbp),%rax
mov    %rax,-0x7548(%rbp)
lea    -0x7540(%rbp),%rax
add    $0x7530,%rax
mov    %rax,-0x7550(%rbp)
mov    -0x7548(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x7548(%rbp),%rax
movsbl (%rax),%ecx
add    $0x1,%ecx
mov    %cl,(%rax)
mov    -0x7548(%rbp),%rax
cmpb   $0x0,(%rax)
je     1195 <main+0x85>
mov    -0x7548(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x7548(%rbp),%rax
movsbl (%rax),%ecx
add    $0x1,%ecx
mov    %cl,(%rax)
jmp    1162 <main+0x52>
mov    -0x4(%rbp),%eax
add    $0x7550,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1030 <putchar@plt>
mov    $0x1,%bl
nopw   0x0(%rax,%rax,1)
movsbl %bl,%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
inc    %bl
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [30000 x i8]
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
%5 = getelementptr inbounds [30000 x i8], [30000 x i8]* %2, i64 0, i64 0
store i8* %5, i8** %3
%6 = getelementptr inbounds [30000 x i8], [30000 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds i8, i8* %6, i64 30000
store i8* %7, i8** %4
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = call i32 @putchar(i8 signext %9)
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 1
%15 = trunc i32 %14 to i8
store i8 %15, i8* %11
br label %16
16: ; preds = %20, %0
%17 = load i8*, i8** %3
%18 = load i8, i8* %17
%19 = icmp ne i8 %18, 0
br i1 %19, label %20, label %29
20: ; preds = %16
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = call i32 @putchar(i8 signext %22)
%24 = load i8*, i8** %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = add nsw i32 %26, 1
%28 = trunc i32 %27 to i8
store i8 %28, i8* %24
br label %16
29: ; preds = %16
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i8 signext undef)
br label %2
2: ; preds = %0, %2
%3 = phi i8 [ 1, %0 ], [ %5, %2 ]
%4 = tail call i32 @putchar(i8 signext %3)
%5 = add i8 %3, 1
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float);
void ecrire_reel_ascii(FILE *fichier, float reel) {
  fprintf(fichier, "%g ", reel);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%g \00"
define void @ecrire_reel_ascii(i32* nocapture %0, float %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %1)
ret void
}
/* Variables and functions */
int isThere(int, int, char, char);
int isCoin(int level, char x, char y) { return isThere(level, 2, x, y); }


x86 assembly (clang, -O0):
<isCoin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %edi,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x5(%rbp),%al
mov    $0x2,%esi
movsbl %al,%edx
movsbl -0x6(%rbp),%ecx
call   1030 <isThere@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isCoin>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x2,%esi
jmp    1030 <isThere@plt>

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

LLVM IR (-O2):
define i32 @isCoin(i32 %0, i8 signext %1, i8 signext %2) {
%4 = tail call i32 @isThere(i32 %0, i32 2, i8 signext %1, i8 signext %2)
ret i32 %4
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_48(uint64_t x) {
  __asm__("rolq $48, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_48>:
mov    %rdi,%rax
rol    $0x30,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_48(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$48, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_48(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$48, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int rand();
int get_random(int n) { return (rand() >> 8) % n; }


x86 assembly (clang, -O0):
<get_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
sar    $0x8,%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_random>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
sar    $0x8,%eax
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_random(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = srem i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @get_random(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = ashr i32 %2, 8
%4 = srem i32 %3, %0
ret i32 %4
}
/* Type definitions */
struct mspack_system {
  int dummy;
};

/* Variables and functions */
void *malloc(size_t);
void *msp_alloc(struct mspack_system *self, size_t bytes) {
  return malloc(bytes);
}


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

x86 assembly (clang, -O2):
<msp_alloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
%struct.mspack_system = type { i32 }
define i8* @msp_alloc(%struct.mspack_system* %0, i64 %1) {
%3 = alloca %struct.mspack_system*
%4 = alloca i64
store %struct.mspack_system* %0, %struct.mspack_system** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
%struct.mspack_system = type { i32 }
define noalias i8* @msp_alloc(%struct.mspack_system* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void explain() { fprintf(stderr, "Usage: ... hpfq \n"); }


x86 assembly (clang, -O0):
<explain>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<explain>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: ... hpfq \0A\00"
define void @explain() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: ... hpfq \0A\00"
define void @explain() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
void I210ToAB30() {}


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

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

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

LLVM IR (-O2):
define void @I210ToAB30() {
ret void
}
unsigned ShrTest4(int X) { return -(X >> 31); }


x86 assembly (clang, -O0):
<ShrTest4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
xor    %eax,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShrTest4>:
mov    %edi,%eax
shr    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @ShrTest4(i32 %0) {
%2 = lshr i32 %0, 31
ret i32 %2
}
/* Variables and functions */
scalar_t__ random();
int rand_range(int min, int max) {
  unsigned int r = (unsigned int)random();
  return (r % (max - min) + min);
}


x86 assembly (clang, -O0):
<rand_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <random@plt>
sub    %ebp,%ebx
xor    %edx,%edx
div    %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_range(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i64 (...) @random()
%7 = trunc i64 %6 to i32
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = urem i32 %8, %11
%13 = load i32, i32* %3
%14 = add i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @rand_range(i32 %0, i32 %1) {
%3 = tail call i64 (...) @random()
%4 = trunc i64 %3 to i32
%5 = sub nsw i32 %1, %0
%6 = urem i32 %4, %5
%7 = add i32 %6, %0
ret i32 %7
}
unsigned xrop3_253_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S | stk3;
  stk1 = T | stk2;
  return stk1;
}


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

x86 assembly (clang, -O2):
<xrop3_253_0_0>:
or     %esi,%edi
lea    -0x100(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_253_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
%5 = or i32 %4, -256
ret i32 %5
}
int gtty(int __fd, int x) { return -1; }


x86 assembly (clang, -O0):
<gtty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @gtty(i32 %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
void *calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
void *my_malloc(int size, char *rs) {
  void *buf = calloc(size, 1);
  if (size && !buf) {
    fprintf(stderr, "Error: Memory exceeded (%d for %s)!\n", size, rs);
    exit(2);
  }
  return buf;
}


x86 assembly (clang, -O0):
<my_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     118b <my_malloc+0x5b>
cmpq   $0x0,-0x18(%rbp)
jne    118b <my_malloc+0x5b>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xe84(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_malloc>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x1,%esi
call   1030 <calloc@plt>
test   %ebp,%ebp
je     114b <my_malloc+0x1b>
test   %rax,%rax
je     1152 <my_malloc+0x22>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
mov    %ebp,%edx
mov    %rbx,%rcx
call   1040 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Error: Memory exceeded (%d for %s)!\0A\00"
define i8* @my_malloc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = call i8* @calloc(i32 %6, i32 1)
store i8* %7, i8** %5
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %19, label %13
13: ; preds = %10
%14 = load i32, i32* @stderr
%15 = load i32, i32* %3
%16 = load i8*, i8** %4
%17 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %15, i8* %16)
%18 = call i32 @exit(i32 2)
unreachable
19: ; preds = %10, %2
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Error: Memory exceeded (%d for %s)!\0A\00"
define noalias i8* @my_malloc(i32 %0, i8* %1) {
%3 = tail call i8* @calloc(i32 %0, i32 1)
%4 = icmp eq i32 %0, 0
%5 = icmp ne i8* %3, null
%6 = or i1 %4, %5
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
%10 = tail call i32 @exit(i32 2)
unreachable
11: ; preds = %2
ret i8* %3
}
/* Variables and functions */
float vectorDot(float const *, float const *);
float vectorAngleBetween_norm(const float normA[3], const float normB[3]) {
  return 90.0f - 90.0f * vectorDot(normA, normB);
}


x86 assembly (clang, -O0):
<vectorAngleBetween_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <vectorDot@plt>
movss  0xecb(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xec3(%rip),%xmm1
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vectorAngleBetween_norm>:
push   %rax
call   1030 <vectorDot@plt>
mulss  0xee2(%rip),%xmm0
addss  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @vectorAngleBetween_norm(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call float @vectorDot(float* %5, float* %6)
%8 = call float @llvm.fmuladd.f32(float -9.000000e+01, float %7, float 9.000000e+01)
ret float %8
}

LLVM IR (-O2):
define float @vectorAngleBetween_norm(float* %0, float* %1) {
%3 = tail call float @vectorDot(float* %0, float* %1)
%4 = tail call float @llvm.fmuladd.f32(float %3, float -9.000000e+01, float 9.000000e+01)
ret float %4
}
int obj2func1(int a __attribute__((unused))) { return 43; }


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

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

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

LLVM IR (-O2):
define i32 @obj2func1(i32 %0) {
ret i32 43
}
/* Variables and functions */
int /*<<< orphan*/ pc(char);
void pr(char ch, int r) {
  while (r-- > 0)
    pc(ch);
}


x86 assembly (clang, -O0):
<pr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    1143 <pr+0x33>
movsbl -0x1(%rbp),%edi
call   1030 <pc@plt>
jmp    1121 <pr+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    112f <pr+0x1f>
mov    %esi,%ebx
add    $0x1,%ebx
movsbl %dil,%ebp
mov    %ebp,%edi
call   1030 <pc@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <pr+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @pr(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8, i8* %3
%11 = call i32 @pc(i8 signext %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @pr(i8 signext %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @pc(i8 signext %0)
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
ret void
}
int okn_tsm_rot_z(struct okn_tsm *t, float z) { return 1; }


x86 assembly (clang, -O0):
<okn_tsm_rot_z>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.okn_tsm = type opaque
define i32 @okn_tsm_rot_z(%struct.okn_tsm* %0, float %1) {
%3 = alloca %struct.okn_tsm*
%4 = alloca float
store %struct.okn_tsm* %0, %struct.okn_tsm** %3
store float %1, float* %4
ret i32 1
}

LLVM IR (-O2):
%struct.okn_tsm = type opaque
define i32 @okn_tsm_rot_z(%struct.okn_tsm* nocapture readnone %0, float %1) {
ret i32 1
}
float dist3dsqrd(float dx, float dy, float dz) {
  return dx * dx + dy * dy + dz * dz;
}


x86 assembly (clang, -O0):
<dist3dsqrd>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist3dsqrd>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
mulss  %xmm2,%xmm2
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @dist3dsqrd(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 = load float, float* %4
%9 = load float, float* %5
%10 = load float, float* %5
%11 = fmul float %9, %10
%12 = call float @llvm.fmuladd.f32(float %7, float %8, float %11)
%13 = load float, float* %6
%14 = load float, float* %6
%15 = call float @llvm.fmuladd.f32(float %13, float %14, float %12)
ret float %15
}

LLVM IR (-O2):
define float @dist3dsqrd(float %0, float %1, float %2) {
%4 = fmul float %1, %1
%5 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %4)
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ handle_61(int /*<<< orphan*/);
int gen_61() { handle_61(0); }


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

x86 assembly (clang, -O2):
<gen_61>:
xor    %edi,%edi
jmp    1030 <handle_61@plt>

LLVM IR (-O0):
define i32 @gen_61() {
%1 = alloca i32
%2 = call i32 @handle_61(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_61() {
%1 = tail call i32 @handle_61(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_check_stability(float *, float *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  float a[] = {1.000000000000000, -1.593750000000000, 1.750000000000000,
               -1.031250000000000, 0.312500000000000};
  float b[] = {0.031250000000000, 0.093750000000000, 0.156250000000000,
               0.093750000000000, 0.031250000000000};
  assert(__ESBMC_check_stability(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec6(%rip),%eax
mov    %eax,-0x30(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0xef0(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [5 x float] [float 1.000000e+00, float -1.593750e+00, float 1.750000e+00, float -1.031250e+00, float 3.125000e-01]
@__const.main.b = [5 x float] [float 3.125000e-02, float 9.375000e-02, float 1.562500e-01, float 9.375000e-02, float 3.125000e-02]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca [5 x float]
store i32 0, i32* %1
%4 = bitcast [5 x float]* %2 to i8*
%5 = bitcast [5 x float]* %3 to i8*
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%7 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 0
%8 = call i32 @__ESBMC_check_stability(float* %6, float* %7)
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x float] [float 1.000000e+00, float -1.593750e+00, float 1.750000e+00, float -1.031250e+00, float 3.125000e-01]
@__const.main.b = [5 x float] [float 3.125000e-02, float 9.375000e-02, float 1.562500e-01, float 9.375000e-02, float 3.125000e-02]
define i32 @main() {
%1 = alloca [5 x float]
%2 = alloca [5 x float]
%3 = bitcast [5 x float]* %1 to i8*
%4 = bitcast [5 x float]* %2 to i8*
%5 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%7 = call i32 @__ESBMC_check_stability(float* %5, float* %6)
%8 = call i32 @assert(i32 %7)
ret i32 0
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double get_wall_time_in_msec() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_sec) * 1000 + tv.tv_usec / 1000;
}


x86 assembly (clang, -O0):
<get_wall_time_in_msec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_wall_time_in_msec>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,(%rsp),%eax
movslq 0x4(%rsp),%rcx
imul   $0x10624dd3,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
add    %eax,%ecx
cvtsi2sd %ecx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define double @get_wall_time_in_msec() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define double @get_wall_time_in_msec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
%11 = sitofp i32 %10 to double
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ my_reboot(int);
void do_reboot(void) { my_reboot(0x01234567); }


x86 assembly (clang, -O0):
<do_reboot>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1234567,%edi
call   1030 <my_reboot@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_reboot>:
mov    $0x1234567,%edi
jmp    1030 <my_reboot@plt>

LLVM IR (-O0):
define void @do_reboot() {
%1 = call i32 @my_reboot(i32 19088743)
ret void
}

LLVM IR (-O2):
define void @do_reboot() {
%1 = tail call i32 @my_reboot(i32 19088743)
ret void
}
/* Variables and functions */
int strspn(char *, char *);
char *string_trim_left(char *str) { return str + strspn(str, " \f\n\r\t\v"); }


x86 assembly (clang, -O0):
<string_trim_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_trim_left>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strspn@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c" \0C\0A\0D\09\0B\00"
define i8* @string_trim_left(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strspn(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
ret i8* %7
}

LLVM IR (-O2):
@.str = [7 x i8] c" \0C\0A\0D\09\0B\00"
define i8* @string_trim_left(i8* %0) {
%2 = tail call i32 @strspn(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
ret i8* %4
}
void ensure_sse_init() {}


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

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

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

LLVM IR (-O2):
define void @ensure_sse_init() {
ret void
}
void OS_SigpipeHandler(int signo) { ; }


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

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

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

LLVM IR (-O2):
define void @OS_SigpipeHandler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C(int **);
void B(void) {
  int a;
  int *ptr = &a;
  C(&ptr);
}


x86 assembly (clang, -O0):
<B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <C@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<B>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <C@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @B() {
%1 = alloca i32
%2 = alloca i32*
store i32* %1, i32** %2
%3 = call i32 @C(i32** %2)
ret void
}

LLVM IR (-O2):
define void @B() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%5 = call i32 @C(i32** %2)
ret void
}
/* Variables and functions */
float log10f(float);
void __hv_log10_f(float bIn, float *bOut) {
  *bOut = (bIn > 0.0f) ? log10f(bIn) : 0.0f;
}


x86 assembly (clang, -O0):
<__hv_log10_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1146 <__hv_log10_f+0x36>
movss  -0x4(%rbp),%xmm0
call   1030 <log10f@plt>
movss  %xmm0,-0x14(%rbp)
jmp    1153 <__hv_log10_f+0x43>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1153 <__hv_log10_f+0x43>
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_log10_f>:
push   %rbx
mov    %rdi,%rbx
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jbe    1127 <__hv_log10_f+0x17>
movaps %xmm1,%xmm0
call   1030 <log10f@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @__hv_log10_f(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = fcmp ogt float %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load float, float* %3
%9 = call float @log10f(float %8)
br label %11
10: ; preds = %2
br label %11
11: ; preds = %10, %7
%12 = phi float [ %9, %7 ], [ 0.000000e+00, %10 ]
%13 = load float*, float** %4
store float %12, float* %13
ret void
}

LLVM IR (-O2):
define void @__hv_log10_f(float %0, float* nocapture writeonly %1) {
%3 = fcmp ogt float %0, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call float @log10f(float %0)
br label %6
6: ; preds = %2, %4
%7 = phi float [ %5, %4 ], [ 0.000000e+00, %2 ]
store float %7, float* %1
ret void
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double scalblnl(long double x, long int n) {
  return __infer_nondet_long_double();
}


x86 assembly (clang, -O0):
<scalblnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @scalblnl(x86_fp80 %0, i64 %1) {
%3 = alloca x86_fp80
%4 = alloca i64
store x86_fp80 %0, x86_fp80* %3
store i64 %1, i64* %4
%5 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @scalblnl(x86_fp80 %0, i64 %1) {
%3 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *ts_realloc(void *buffer, size_t size) {
  void *result = realloc(buffer, size);
  if (size > 0 && !result) {
    fprintf(stderr, "tree-sitter failed to reallocate %lu bytes", size);
    exit(1);
  }
  return result;
}


x86 assembly (clang, -O0):
<ts_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    118a <ts_realloc+0x5a>
cmpq   $0x0,-0x18(%rbp)
jne    118a <ts_realloc+0x5a>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe85(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_realloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rbx,%rbx
je     1143 <ts_realloc+0x13>
test   %rax,%rax
je     1145 <ts_realloc+0x15>
pop    %rbx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"tree-sitter failed to reallocate %lu bytes\00"
define i8* @ts_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i64, i64* %4
%10 = icmp ugt i64 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %19, label %14
14: ; preds = %11
%15 = load i32, i32* @stderr
%16 = load i64, i64* %4
%17 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 %16)
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %11, %2
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"tree-sitter failed to reallocate %lu bytes\00"
define noalias i8* @ts_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i64 %1, 0
%5 = icmp ne i8* %3, null
%6 = or i1 %4, %5
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 %1)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int client_in_callback(int sock, char *ip, void *param) {
  printf("[CLIENT IN] fd = %d\n", sock);
  return 0;
}


x86 assembly (clang, -O0):
<client_in_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"[CLIENT IN] fd = %d\0A\00"
define i32 @client_in_callback(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"[CLIENT IN] fd = %d\0A\00"
define i32 @client_in_callback(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  signed int i, min, max;
  i = min = max = 0;
  while (++i) {
    if (i > max)
      max = i;
    if (i < min)
      min = i;
  }
  printf("min: %d\n", min);
  printf("Max: %d\n", max);
  printf("Size: %d byte(s)\n", sizeof(i));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1176 <main+0x66>
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    115f <main+0x4f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1171 <main+0x61>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    113b <main+0x2b>
mov    -0x18(%rbp),%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
lea    0xe77(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [9 x i8] c"min: %d\0A\00"
@.str.1 = [9 x i8] c"Max: %d\0A\00"
@.str.2 = [18 x i8] c"Size: %d byte(s)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
store i32 0, i32* %7
store i32 0, i32* %6
br label %9
9: ; preds = %25, %2
%10 = load i32, i32* %6
%11 = add nsw i32 %10, 1
store i32 %11, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %26
13: ; preds = %9
%14 = load i32, i32* %6
%15 = load i32, i32* %8
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load i32, i32* %6
store i32 %18, i32* %8
br label %19
19: ; preds = %17, %13
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = load i32, i32* %6
store i32 %24, i32* %7
br label %25
25: ; preds = %23, %19
br label %9
26: ; preds = %9
%27 = load i32, i32* %7
%28 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %8
%30 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 4)
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):