xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sscanf(char const *, char const *, int *);
const char *skip_string(const char *string, const char *skipstring) {
  int n = 0;
  sscanf(string, skipstring, &n);
  return &string[n];
}


x86 assembly (clang, -O0):
<skip_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_string>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdx
call   1030 <sscanf@plt>
movslq 0xc(%rsp),%rax
add    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @sscanf(i8* %6, i8* %7, i32* %5)
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
ret i8* %12
}

LLVM IR (-O2):
define i8* @skip_string(i8* %0, i8* nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @sscanf(i8* %0, i8* %1, i32* %3)
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("Hello, world!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
double cos_integ0(const double x, const double sinx, const double cosx) {
  return sinx;
}


x86 assembly (clang, -O0):
<cos_integ0>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cos_integ0>:
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cos_integ0(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
ret double %7
}

LLVM IR (-O2):
define double @cos_integ0(double %0, double returned %1, double %2) {
ret double %1
}
void WideTimer1A_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<WideTimer1A_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <WideTimer1A_Handler+0x9>
jmp    1109 <WideTimer1A_Handler+0x9>

x86 assembly (clang, -O2):
<WideTimer1A_Handler>:
jmp    1100 <WideTimer1A_Handler>

LLVM IR (-O0):
define void @WideTimer1A_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @WideTimer1A_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int main() {
  long adr = 0;
  int sum = 0;
  sum += adr > &adr;
  sum += adr < &adr;
  sum += adr >= &adr;
  sum += adr <= &adr;
  sum += adr == &adr;
  sum += adr != &adr;
  return sum;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setae  %al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
store i32 0, i32* %1
store i64 0, i64* %2
store i32 0, i32* %3
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to i64*
%6 = icmp ugt i64* %5, %2
%7 = zext i1 %6 to i32
%8 = load i32, i32* %3
%9 = add nsw i32 %8, %7
store i32 %9, i32* %3
%10 = load i64, i64* %2
%11 = inttoptr i64 %10 to i64*
%12 = icmp ult i64* %11, %2
%13 = zext i1 %12 to i32
%14 = load i32, i32* %3
%15 = add nsw i32 %14, %13
store i32 %15, i32* %3
%16 = load i64, i64* %2
%17 = inttoptr i64 %16 to i64*
%18 = icmp uge i64* %17, %2
%19 = zext i1 %18 to i32
%20 = load i32, i32* %3
%21 = add nsw i32 %20, %19
store i32 %21, i32* %3
%22 = load i64, i64* %2
%23 = inttoptr i64 %22 to i64*
%24 = icmp ule i64* %23, %2
%25 = zext i1 %24 to i32
%26 = load i32, i32* %3
%27 = add nsw i32 %26, %25
store i32 %27, i32* %3
%28 = load i64, i64* %2
%29 = inttoptr i64 %28 to i64*
%30 = icmp eq i64* %29, %2
%31 = zext i1 %30 to i32
%32 = load i32, i32* %3
%33 = add nsw i32 %32, %31
store i32 %33, i32* %3
%34 = load i64, i64* %2
%35 = inttoptr i64 %34 to i64*
%36 = icmp ne i64* %35, %2
%37 = zext i1 %36 to i32
%38 = load i32, i32* %3
%39 = add nsw i32 %38, %37
store i32 %39, i32* %3
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int type;
};
struct TYPE_4__ {
  TYPE_1__ xmap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xmap_type(void *_p, int _v) {
  ((XEvent *)_p)->xmap.type = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xmap_type>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xmap_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void gtk_menu_shell_prepend() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_shell_prepend() {
ret void
}
/* Variables and functions */
int cgiVarExists(char *);
int cgiBoolean(char *varName) { return cgiVarExists(varName); }


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

x86 assembly (clang, -O2):
<cgiBoolean>:
jmp    1030 <cgiVarExists@plt>

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

LLVM IR (-O2):
define i32 @cgiBoolean(i8* %0) {
%2 = tail call i32 @cgiVarExists(i8* %0)
ret i32 %2
}
double acceleration(double force, double mass, double altitude) {
  return force / mass;
}


x86 assembly (clang, -O0):
<acceleration>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<acceleration>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @acceleration(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fdiv double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @acceleration(double %0, double %1, double %2) {
%4 = fdiv double %0, %1
ret double %4
}
signed short signedshort_ignoring_signedlonglongint(signed short x,
                                                    signed long long int y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshort_ignoring_signedlonglongint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @signedshort_ignoring_signedlonglongint(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshort_ignoring_signedlonglongint(i16 returned signext %0, i64 %1) {
ret i16 %0
}
void raise_limit() {}


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

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

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

LLVM IR (-O2):
define void @raise_limit() {
ret void
}
int up_lim(int maxval, int val) { return val > maxval ? maxval : val; }


x86 assembly (clang, -O0):
<up_lim>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1121 <up_lim+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <up_lim+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<up_lim>:
mov    %esi,%eax
cmp    %edi,%esi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @up_lim(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @up_lim(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ C(char *, int);
char *TAG(char *, int /*<<< orphan*/, int, int, int, int /*<<< orphan*/);
char *H1(char *str, int ilev) {
  return TAG("h1", 0, 1, 1, ilev, C(str, ilev + 1));
}


x86 assembly (clang, -O0):
<H1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1040 <C@plt>
mov    -0x10(%rbp),%r8d
mov    %eax,%r9d
lea    0xeae(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <TAG@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<H1>:
push   %rbx
mov    %esi,%ebx
lea    0x1(%rbx),%esi
call   1040 <C@plt>
lea    0xece(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    %ebx,%r8d
mov    %eax,%r9d
pop    %rbx
jmp    1030 <TAG@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"h1\00"
define i8* @H1(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = call i32 @C(i8* %6, i32 %8)
%10 = call i8* @TAG(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i32 1, i32 %5, i32 %9)
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"h1\00"
define i8* @H1(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i32 @C(i8* %0, i32 %3)
%5 = tail call i8* @TAG(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i32 1, i32 %1, i32 %4)
ret i8* %5
}
unsigned int is_prime(int number) {
  for (unsigned int i = 2; (i * i) <= number; i++) {
    if (number % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     114e <is_prime+0x4e>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
cmp    $0x0,%edx
jne    113b <is_prime+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1155 <is_prime+0x55>
jmp    1140 <is_prime+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <is_prime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
mov    $0x1,%eax
cmp    $0x4,%edi
jb     112d <is_prime+0x2d>
mov    $0x2,%ecx
nop
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
test   %edx,%edx
je     1126 <is_prime+0x26>
add    $0x1,%ecx
mov    %ecx,%eax
imul   %ecx,%eax
cmp    %edi,%eax
jbe    1110 <is_prime+0x10>
xor    %eax,%eax
test   %edx,%edx
setne  %al
ret

LLVM IR (-O0):
define i32 @is_prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 2, i32* %4
br label %5
5: ; preds = %18, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = mul i32 %6, %7
%9 = load i32, i32* %3
%10 = icmp ule i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %5
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = urem i32 %12, %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 0, i32* %2
br label %22
17: ; preds = %11
br label %18
18: ; preds = %17
%19 = load i32, i32* %4
%20 = add i32 %19, 1
store i32 %20, i32* %4
br label %5
21: ; preds = %5
store i32 1, i32* %2
br label %22
22: ; preds = %21, %16
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 2, %1 ]
%5 = urem i32 %0, %4
%6 = icmp eq i32 %5, 0
%7 = add i32 %4, 1
%8 = mul i32 %7, %7
%9 = icmp ugt i32 %8, %0
%10 = select i1 %6, i1 true, i1 %9
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = xor i1 %6, true
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %11, %1
%15 = phi i32 [ 1, %1 ], [ %13, %11 ]
ret i32 %15
}
signed int rt_mutex_lock(union anon$40 *mp) {
  signed int status = 0;
  status = pthread_mutex_lock(mp);
  return status;
}


x86 assembly (clang, -O0):
<rt_mutex_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <pthread_mutex_lock@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%"union.anon$40" = type opaque
define i32 @rt_mutex_lock(%"union.anon$40"* %0) {
%2 = alloca %"union.anon$40"*
%3 = alloca i32
store %"union.anon$40"* %0, %"union.anon$40"** %2
store i32 0, i32* %3
%4 = load %"union.anon$40"*, %"union.anon$40"** %2
%5 = call i32 (%"union.anon$40"*, ...) bitcast (i32 (...)* @pthread_mutex_lock to i32 (%"union.anon$40"*, ...)*)(%"union.anon$40"* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%"union.anon$40" = type opaque
define i32 @rt_mutex_lock(%"union.anon$40"* %0) {
%2 = tail call i32 (%"union.anon$40"*, ...) bitcast (i32 (...)* @pthread_mutex_lock to i32 (%"union.anon$40"*, ...)*)(%"union.anon$40"* %0)
ret i32 %2
}
int I_NoAppServicesHasAchievement(const char *nameID) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @I_NoAppServicesHasAchievement(i8* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef char *uint64_t;

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


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

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

LLVM IR (-O0):
define i8* @ROL64_44(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$44, $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_44(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$44, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int errno;
int serial_errcode(void) { return errno; }


x86 assembly (clang, -O0):
<serial_errcode>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_errcode>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @serial_errcode() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @serial_errcode() {
%1 = load i32, i32* @errno
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRB0_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRB0_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRB0_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int foo(int *p1, int p2) {
  int z = *p1;
  while (z > p2)
    p2 = 2;
  return z;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    112c <foo+0x2c>
movl   $0x2,-0xc(%rbp)
jmp    1114 <foo+0x14>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
br label %8
8: ; preds = %12, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 2, i32* %4
br label %8
13: ; preds = %8
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
ret i32 %3
}
int test_imm_38int8_reg(signed char val) {
  return ((val) & (-0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffc8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_38int8_reg(i8 signext %0) {
%2 = and i8 %0, -56
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFD;
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int sw_sync_timeline_is_valid(int fd) {
  int status;
  if (fd == -1)
    return 0;
  status = fcntl(fd, F_GETFD, 0);
  return (status >= 0);
}


x86 assembly (clang, -O0):
<sw_sync_timeline_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1131 <sw_sync_timeline_is_valid+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1156 <sw_sync_timeline_is_valid+0x46>
mov    -0x8(%rbp),%edi
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sw_sync_timeline_is_valid>:
cmp    $0xffffffff,%edi
je     1130 <sw_sync_timeline_is_valid+0x20>
push   %rax
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
not    %eax
shr    $0x1f,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@F_GETFD = global i32 0
define i32 @sw_sync_timeline_is_valid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %15
8: ; preds = %1
%9 = load i32, i32* %3
%10 = load i32, i32* @F_GETFD
%11 = call i32 @fcntl(i32 %9, i32 %10, i32 0)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp sge i32 %12, 0
%14 = zext i1 %13 to i32
store i32 %14, i32* %2
br label %15
15: ; preds = %8, %7
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@F_GETFD = global i32 0
define i32 @sw_sync_timeline_is_valid(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i32, i32* @F_GETFD
%5 = tail call i32 @fcntl(i32 %0, i32 %4, i32 0)
%6 = xor i32 %5, -1
%7 = lshr i32 %6, 31
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
float __ocml_exp_f32(float);
float __expf(float x) { return __ocml_exp_f32(x); }


x86 assembly (clang, -O0):
<__expf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__ocml_exp_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__expf>:
jmp    1030 <__ocml_exp_f32@plt>

LLVM IR (-O0):
define float @__expf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @__ocml_exp_f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @__expf(float %0) {
%2 = tail call float @__ocml_exp_f32(float %0)
ret float %2
}
int dstLongAt(int idx) { return (*((int *)(idx))); }


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

x86 assembly (clang, -O2):
<dstLongAt>:
movslq %edi,%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
define i32 @dstLongAt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @dstLongAt(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xe8() {
  Assert_real((isspace(232) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              1165, ("isspace should be 0 for 0xe8"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xe8\00"
define void @t_isspace_0xe8() {
%1 = tail call i64 @isspace(i32 232)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1165, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test1(int, int);
int /*<<< orphan*/ test2(int, int);
int /*<<< orphan*/ test3(int, int);
int /*<<< orphan*/ test4(int, int);
int /*<<< orphan*/ test5(int, int);
int /*<<< orphan*/ test6(int, int);
void all_tests(int x, int y) {
  test1(x, y);
  test2(x, y);
  test3(x, y);
  test4(x, y);
  test5(x, y);
  test6(x, y);
}


x86 assembly (clang, -O0):
<all_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <test1@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1080 <test2@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <test3@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1070 <test4@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <test5@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1060 <test6@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_tests>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <test1@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1080 <test2@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <test3@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1070 <test4@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <test5@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <test6@plt>

LLVM IR (-O0):
define void @all_tests(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @test1(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @test2(i32 %8, i32 %9)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @test3(i32 %11, i32 %12)
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = call i32 @test4(i32 %14, i32 %15)
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = call i32 @test5(i32 %17, i32 %18)
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = call i32 @test6(i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
define void @all_tests(i32 %0, i32 %1) {
%3 = tail call i32 @test1(i32 %0, i32 %1)
%4 = tail call i32 @test2(i32 %0, i32 %1)
%5 = tail call i32 @test3(i32 %0, i32 %1)
%6 = tail call i32 @test4(i32 %0, i32 %1)
%7 = tail call i32 @test5(i32 %0, i32 %1)
%8 = tail call i32 @test6(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
void emit_get_while_end(char *str, const char *ctxpush, const char *label) {
  sprintf(str, "  push {%s}\n  b %s\n", ctxpush, label);
}


x86 assembly (clang, -O0):
<emit_get_while_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_get_while_end>:
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee3(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c" push {%s}\0A b %s\0A\00"
define void @emit_get_while_end(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c" push {%s}\0A b %s\0A\00"
define void @emit_get_while_end(i8* nocapture writeonly %0, i8* %1, i8* %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x39_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x39_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x39_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x39_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x39_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ test_null();
int /*<<< orphan*/ test_stack_init_with_null();
int /*<<< orphan*/ test_stack_init_with_value();
int /*<<< orphan*/ test_stack_init_without_value();
int /*<<< orphan*/ test_stack_peek();
int /*<<< orphan*/ test_stack_pushback_1();
int /*<<< orphan*/ test_stack_pushback_2();
int /*<<< orphan*/ test_type_change();
int main() {
  test_type_change();
  test_null();
  test_stack_init_with_value();
  test_stack_init_without_value();
  test_stack_init_with_null();
  test_stack_pushback_1();
  test_stack_pushback_2();
  test_stack_peek();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_type_change@plt>
mov    $0x0,%al
call   1060 <test_null@plt>
mov    $0x0,%al
call   1050 <test_stack_init_with_value@plt>
mov    $0x0,%al
call   10a0 <test_stack_init_without_value@plt>
mov    $0x0,%al
call   1070 <test_stack_init_with_null@plt>
mov    $0x0,%al
call   1090 <test_stack_pushback_1@plt>
mov    $0x0,%al
call   1040 <test_stack_pushback_2@plt>
mov    $0x0,%al
call   1080 <test_stack_peek@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_type_change@plt>
xor    %eax,%eax
call   1060 <test_null@plt>
xor    %eax,%eax
call   1050 <test_stack_init_with_value@plt>
xor    %eax,%eax
call   10a0 <test_stack_init_without_value@plt>
xor    %eax,%eax
call   1070 <test_stack_init_with_null@plt>
xor    %eax,%eax
call   1090 <test_stack_pushback_1@plt>
xor    %eax,%eax
call   1040 <test_stack_pushback_2@plt>
xor    %eax,%eax
call   1080 <test_stack_peek@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_type_change()
%3 = call i32 (...) @test_null()
%4 = call i32 (...) @test_stack_init_with_value()
%5 = call i32 (...) @test_stack_init_without_value()
%6 = call i32 (...) @test_stack_init_with_null()
%7 = call i32 (...) @test_stack_pushback_1()
%8 = call i32 (...) @test_stack_pushback_2()
%9 = call i32 (...) @test_stack_peek()
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @test_type_change()
%2 = tail call i32 (...) @test_null()
%3 = tail call i32 (...) @test_stack_init_with_value()
%4 = tail call i32 (...) @test_stack_init_without_value()
%5 = tail call i32 (...) @test_stack_init_with_null()
%6 = tail call i32 (...) @test_stack_pushback_1()
%7 = tail call i32 (...) @test_stack_pushback_2()
%8 = tail call i32 (...) @test_stack_peek()
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
int execute_getrusage() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_getrusage() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, scalar_t__);
int make_file_path(char *filename, char *path) {
  strncpy(path, ".wil", strlen(".wil") + 1);
  strcat(path, "/");
  strcat(path, filename);
  return 1;
}


x86 assembly (clang, -O0):
<make_file_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xeb1(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rdx
add    $0x1,%rdx
lea    0xe9a(%rip),%rsi
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xe8f(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_file_path>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecf(%rip),%rsi
mov    $0x5,%edx
mov    %rbx,%rdi
call   1030 <strncpy@plt>
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c".wil\00"
@.str.1 = [2 x i8] c"/\00"
define i32 @make_file_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = add nsw i64 %6, 1
%8 = call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i8*, i8** %4
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = load i8*, i8** %4
%12 = load i8*, i8** %3
%13 = call i32 @strcat(i8* %11, i8* %12)
ret i32 1
}

LLVM IR (-O2):
@.str = [5 x i8] c".wil\00"
@.str.1 = [2 x i8] c"/\00"
define i32 @make_file_path(i8* %0, i8* %1) {
%3 = tail call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
%4 = tail call i32 @strcat(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @strcat(i8* %1, i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int getB2Graph(int sizeGraph) {
  assert(sizeGraph <= 14);
  return sizeGraph * sizeGraph + 3;
}


x86 assembly (clang, -O0):
<getB2Graph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xe,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
add    $0x3,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getB2Graph>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0xf,%ebx
setl   %dil
call   1030 <assert@plt>
imul   %ebx,%ebx
add    $0x3,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getB2Graph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 14
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = mul nsw i32 %7, %8
%10 = add nsw i32 %9, 3
ret i32 %10
}

LLVM IR (-O2):
define i32 @getB2Graph(i32 %0) {
%2 = icmp slt i32 %0, 15
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = mul nsw i32 %0, %0
%6 = add nuw nsw i32 %5, 3
ret i32 %6
}
float Sign(float x) {
  if (x < 0.0) {
    return -1.0;
  } else if (x > 0.0) {
    return 1.0;
  } else {
    return 0.0;
  }
}


x86 assembly (clang, -O0):
<Sign>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <Sign+0x31>
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1161 <Sign+0x61>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1159 <Sign+0x59>
movss  0xeb1(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1161 <Sign+0x61>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sign>:
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm0,%xmm2
movss  0xeed(%rip),%xmm3
andps  %xmm2,%xmm3
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andnps %xmm3,%xmm1
movss  0xedb(%rip),%xmm2
andps  %xmm2,%xmm0
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Sign(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %1
store float -1.000000e+00, float* %2
br label %14
8: ; preds = %1
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fcmp ogt double %10, 0.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %8
store float 1.000000e+00, float* %2
br label %14
13: ; preds = %8
store float 0.000000e+00, float* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @Sign(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fcmp ogt float %0, 0.000000e+00
%4 = select i1 %3, float 1.000000e+00, float 0.000000e+00
%5 = select i1 %2, float -1.000000e+00, float %4
ret float %5
}
/* Variables and functions */
double const exner_c(double const);
double theta_c(const double p0, const double T) { return T / exner_c(p0); }


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

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

LLVM IR (-O0):
define double @theta_c(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = call double @exner_c(double %6)
%8 = fdiv double %5, %7
ret double %8
}

LLVM IR (-O2):
define double @theta_c(double %0, double %1) {
%3 = tail call double @exner_c(double %0)
%4 = fdiv double %1, %3
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_load_sd(double *);
int /*<<< orphan*/ _mm_loadh_pd(int /*<<< orphan*/, double *);
__m128d load_2(double *a) {
  __m128d res;
  res = _mm_load_sd(&a[1]);
  res = _mm_loadh_pd(res, &a[2]);
  return res;
}


x86 assembly (clang, -O0):
<load_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
call   1030 <_mm_load_sd@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
add    $0x10,%rsi
call   1040 <_mm_loadh_pd@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_2>:
push   %rbx
mov    %rdi,%rbx
add    $0x8,%rdi
call   1030 <_mm_load_sd@plt>
add    $0x10,%rbx
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <_mm_loadh_pd@plt>

LLVM IR (-O0):
define i32 @load_2(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 1
%6 = call i32 @_mm_load_sd(double* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load double*, double** %2
%9 = getelementptr inbounds double, double* %8, i64 2
%10 = call i32 @_mm_loadh_pd(i32 %7, double* %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @load_2(double* %0) {
%2 = getelementptr inbounds double, double* %0, i64 1
%3 = tail call i32 @_mm_load_sd(double* %2)
%4 = getelementptr inbounds double, double* %0, i64 2
%5 = tail call i32 @_mm_loadh_pd(i32 %3, double* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
void main() {
  int i;
  for (i = 0; i < 1000000; i++)
    ;
  __VERIFIER_assert(i == 1000000);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xf4240,-0x4(%rbp)
jge    113f <main+0x2f>
jmp    1131 <main+0x21>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
cmpl   $0xf4240,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
jmp    1030 <__VERIFIER_assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 1000000
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 1000000
%12 = zext i1 %11 to i32
%13 = call i32 @__VERIFIER_assert(i32 %12)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
ret void
}
void hmd_persp() {}


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

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

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

LLVM IR (-O2):
define void @hmd_persp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ maybe_init();
__attribute__((constructor)) void dummy() { maybe_init(); }


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @dummy, i8* null }]
define void @dummy() {
%1 = call i32 (...) @maybe_init()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @dummy, i8* null }]
define void @dummy() {
%1 = tail call i32 (...) @maybe_init()
ret void
}
/* Variables and functions */
int readb(void *);
int /*<<< orphan*/ writeb(int, void *);
int i8254_mm_status(void *base_address, unsigned int regshift,
                    unsigned int counter_number) {
  writeb(0xE0 | (2 << counter_number), base_address + (3 << regshift));
  return readb(base_address + (counter_number << regshift));
}


x86 assembly (clang, -O0):
<i8254_mm_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x2,%edi
shl    %cl,%edi
or     $0xe0,%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%ecx
mov    $0x3,%eax
shl    %cl,%eax
cltq
add    %rax,%rsi
call   1040 <writeb@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%eax
add    %rax,%rdi
call   1030 <readb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i8254_mm_status>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    $0x2,%eax
mov    %ebx,%ecx
shl    %cl,%eax
mov    $0x3,%edx
mov    %r14d,%ecx
shl    %cl,%edx
mov    %rdi,%rbp
or     $0xe0,%eax
movslq %edx,%rsi
add    %rdi,%rsi
mov    %eax,%edi
call   1040 <writeb@plt>
mov    %r14d,%ecx
shl    %cl,%ebx
add    %rbp,%rbx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <readb@plt>

LLVM IR (-O0):
define i32 @i8254_mm_status(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 = shl i32 2, %7
%9 = or i32 224, %8
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = shl i32 3, %11
%13 = sext i32 %12 to i64
%14 = getelementptr i8, i8* %10, i64 %13
%15 = call i32 @writeb(i32 %9, i8* %14)
%16 = load i8*, i8** %4
%17 = load i32, i32* %6
%18 = load i32, i32* %5
%19 = shl i32 %17, %18
%20 = zext i32 %19 to i64
%21 = getelementptr i8, i8* %16, i64 %20
%22 = call i32 @readb(i8* %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @i8254_mm_status(i8* %0, i32 %1, i32 %2) {
%4 = shl i32 2, %2
%5 = or i32 %4, 224
%6 = shl i32 3, %1
%7 = sext i32 %6 to i64
%8 = getelementptr i8, i8* %0, i64 %7
%9 = tail call i32 @writeb(i32 %5, i8* %8)
%10 = shl i32 %2, %1
%11 = zext i32 %10 to i64
%12 = getelementptr i8, i8* %0, i64 %11
%13 = tail call i32 @readb(i8* %12)
ret i32 %13
}