xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memmove(void *, void *, int);
int strlen(char *);
scalar_t__ wMalloc(int);
char *wCharCopy(char *text) {
  int len;
  char *buffer;
  len = strlen(text);
  buffer = (char *)wMalloc(len + 1);
  memmove((void *)buffer, (void *)text, len + 1);
  return buffer;
}


x86 assembly (clang, -O0):
<wCharCopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <wMalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
call   1050 <memmove@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wCharCopy>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1040 <wMalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <memmove@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @wCharCopy(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i64 @wMalloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
%15 = call i32 @memmove(i8* %11, i8* %12, i32 %14)
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
define i8* @wCharCopy(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @wMalloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memmove(i8* %5, i8* %0, i32 %3)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int *nums, int sz) {
  for (int i = 0; i < sz; i++) {
    printf("%d ", nums[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
double br(int packetsize, int ip_int, int normal_ip, int big_ip) {
  if ((normal_ip == 0) || (big_ip == 0)) {
    normal_ip = 1;
    big_ip = 0;
  }
  return 270000000 * 0.8 * packetsize /
         (packetsize + ip_int + (double)big_ip / (normal_ip + big_ip) + 2);
}


x86 assembly (clang, -O0):
<br>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1124 <br+0x24>
cmpl   $0x0,-0x10(%rbp)
jne    1132 <br+0x32>
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xec9(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm1
cvtsi2sdl -0x10(%rbp),%xmm2
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movsd  0xe94(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<br>:
test   %edx,%edx
sete   %r8b
test   %ecx,%ecx
sete   %r9b
xor    %eax,%eax
or     %r8b,%r9b
mov    $0x1,%r8d
cmove  %edx,%r8d
cmove  %ecx,%eax
cvtsi2sd %edi,%xmm0
mulsd  0xed6(%rip),%xmm0
add    %edi,%esi
cvtsi2sd %esi,%xmm1
cvtsi2sd %eax,%xmm2
add    %r8d,%eax
cvtsi2sd %eax,%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
addsd  0xebd(%rip),%xmm2
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @br(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %4
%12 = load i32, i32* %8
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %11, %4
store i32 1, i32* %7
store i32 0, i32* %8
br label %15
15: ; preds = %14, %11
%16 = load i32, i32* %5
%17 = sitofp i32 %16 to double
%18 = fmul double 2.160000e+08, %17
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = add nsw i32 %19, %20
%22 = sitofp i32 %21 to double
%23 = load i32, i32* %8
%24 = sitofp i32 %23 to double
%25 = load i32, i32* %7
%26 = load i32, i32* %8
%27 = add nsw i32 %25, %26
%28 = sitofp i32 %27 to double
%29 = fdiv double %24, %28
%30 = fadd double %22, %29
%31 = fadd double %30, 2.000000e+00
%32 = fdiv double %18, %31
ret double %32
}

LLVM IR (-O2):
define double @br(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %2, 0
%6 = icmp eq i32 %3, 0
%7 = or i1 %5, %6
%8 = select i1 %7, i32 1, i32 %2
%9 = select i1 %7, i32 0, i32 %3
%10 = sitofp i32 %0 to double
%11 = fmul double %10, 2.160000e+08
%12 = add nsw i32 %1, %0
%13 = sitofp i32 %12 to double
%14 = sitofp i32 %9 to double
%15 = add nsw i32 %8, %9
%16 = sitofp i32 %15 to double
%17 = fdiv double %14, %16
%18 = fadd double %17, %13
%19 = fadd double %18, 2.000000e+00
%20 = fdiv double %11, %19
ret double %20
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version() { printf("version.\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"version.\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__17__IO__selectModuleFunc();
void HplMsp430Usart0P__SIMO__selectModuleFunc(void) {
  HplMsp430GeneralIOP__17__IO__selectModuleFunc();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430Usart0P__SIMO__selectModuleFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__17__IO__selectModuleFunc()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ stb_fput_varlenu(int /*<<< orphan*/ *, int);
void stb_fput_varlen(FILE *f, int v) {
  stb_fput_varlenu(f, (v < 0 ? (~v << 1) + 1 : (v << 1)));
}


x86 assembly (clang, -O0):
<stb_fput_varlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1145 <stb_fput_varlen+0x35>
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114e <stb_fput_varlen+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <stb_fput_varlenu@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_fput_varlen>:
lea    (%rsi,%rsi,1),%eax
test   %esi,%esi
not    %esi
lea    0x1(%rsi,%rsi,1),%esi
cmovns %eax,%esi
jmp    1030 <stb_fput_varlenu@plt>

LLVM IR (-O0):
define void @stb_fput_varlen(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 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %4
%10 = xor i32 %9, -1
%11 = shl i32 %10, 1
%12 = add nsw i32 %11, 1
br label %16
13: ; preds = %2
%14 = load i32, i32* %4
%15 = shl i32 %14, 1
br label %16
16: ; preds = %13, %8
%17 = phi i32 [ %12, %8 ], [ %15, %13 ]
%18 = call i32 @stb_fput_varlenu(i32* %5, i32 %17)
ret void
}

LLVM IR (-O2):
define void @stb_fput_varlen(i32* %0, i32 %1) {
%3 = icmp slt i32 %1, 0
%4 = xor i32 %1, -1
%5 = shl i32 %4, 1
%6 = or i32 %5, 1
%7 = shl i32 %1, 1
%8 = select i1 %3, i32 %6, i32 %7
%9 = tail call i32 @stb_fput_varlenu(i32* %0, i32 %8)
ret void
}
/* Variables and functions */
float M_PI;
float pif() { return M_PI; }


x86 assembly (clang, -O0):
<pif>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
movss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pif>:
mov    0x2ee1(%rip),%rax
movss  (%rax),%xmm0
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @pif() {
%1 = load float, float* @M_PI
ret float %1
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @pif() {
%1 = load float, float* @M_PI
ret float %1
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void div_m32(void *_m32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0xF7);
  put8(0x35);
  put32((unsigned long)(m32));
}


x86 assembly (clang, -O0):
<div_m32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0xf7,%edi
call   1030 <put8@plt>
mov    $0x35,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_m32>:
push   %rbx
mov    %rdi,%rbx
mov    $0xf7,%edi
call   1030 <put8@plt>
mov    $0x35,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @div_m32(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = call i32 @put8(i32 247)
%7 = call i32 @put8(i32 53)
%8 = load i64*, i64** %3
%9 = ptrtoint i64* %8 to i64
%10 = call i32 @put32(i64 %9)
ret void
}

LLVM IR (-O2):
define void @div_m32(i8* %0) {
%2 = tail call i32 @put8(i32 247)
%3 = tail call i32 @put8(i32 53)
%4 = ptrtoint i8* %0 to i64
%5 = tail call i32 @put32(i64 %4)
ret void
}
int do_027() { return 27; }


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

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

LLVM IR (-O0):
define i32 @do_027() {
ret i32 27
}

LLVM IR (-O2):
define i32 @do_027() {
ret i32 27
}
int val_hex(char *pos, int caps) {
  char *bnum = "0123456789abcdef";
  if (caps)
    bnum = "0123456789ABCDEF";
  return strchr(bnum, *pos) - bnum;
}


x86 assembly (clang, -O0):
<val_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113f <val_hex+0x2f>
lea    0xed6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<val_hex>:
push   %rbx
test   %esi,%esi
lea    0xee6(%rip),%rax
lea    0xef0(%rip),%rbx
cmove  %rax,%rbx
movsbl (%rdi),%esi
mov    $0x11,%edx
mov    %rbx,%rdi
call   1030 <memchr@plt>
sub    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789abcdef\00"
@.str.1 = [17 x i8] c"0123456789ABCDEF\00"
define i32 @val_hex(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %5
br label %9
9: ; preds = %8, %2
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = call i8* @strchr(i8* %10, i32 %13)
%15 = load i8*, i8** %5
%16 = ptrtoint i8* %14 to i64
%17 = ptrtoint i8* %15 to i64
%18 = sub i64 %16, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
@.str.1 = [17 x i8] c"0123456789ABCDEF\00"
define i32 @val_hex(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0)
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = tail call i8* @memchr(i8* dereferenceable(17) %4, i32 %6, i64 17)
%8 = ptrtoint i8* %7 to i64
%9 = ptrtoint i8* %4 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
void mem_put_le16(char *mem, unsigned int val) {
  mem[0] = val;
  mem[1] = val >> 8;
}


x86 assembly (clang, -O0):
<mem_put_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_put_le16>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @mem_put_le16(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 = trunc i32 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i32, i32* %4
%10 = lshr i32 %9, 8
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
ret void
}

LLVM IR (-O2):
define void @mem_put_le16(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, size_t);
int try_given_string(char **cc, char *s) {
  size_t n = strlen(s);
  if (!strncmp(*cc, s, n)) {
    *cc += n;
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<try_given_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1174 <try_given_string+0x54>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    117b <try_given_string+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_given_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rax,%r15
mov    (%r14),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
jne    115d <try_given_string+0x3d>
add    %r15,%r12
mov    %r12,(%r14)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @try_given_string(i8** nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = load i8*, i8** %0
%5 = tail call i32 @strncmp(i8* %4, i8* %1, i64 %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %4, i64 %3
store i8* %8, i8** %0
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ cdiStreamWriteVarSlice(int, int, int, int, double const *,
                                          int);
void streamWriteVarSlice(int streamID, int varID, int levelID,
                         const double *data, int nmiss) {
  cdiStreamWriteVarSlice(streamID, varID, levelID, 1, data, nmiss);
}


x86 assembly (clang, -O0):
<streamWriteVarSlice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    $0x1,%ecx
call   1030 <cdiStreamWriteVarSlice@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streamWriteVarSlice>:
mov    %r8d,%r9d
mov    %rcx,%r8
mov    $0x1,%ecx
jmp    1030 <cdiStreamWriteVarSlice@plt>

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

LLVM IR (-O2):
define void @streamWriteVarSlice(i32 %0, i32 %1, i32 %2, double* %3, i32 %4) {
%6 = tail call i32 @cdiStreamWriteVarSlice(i32 %0, i32 %1, i32 %2, i32 1, double* %3, i32 %4)
ret void
}
/* Variables and functions */
int syscall(int, int, int, int);
int sys_pidfd_getfd(int pidfd, int fd, int flags) {
  return syscall(-1, pidfd, fd, flags);
}


x86 assembly (clang, -O0):
<sys_pidfd_getfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_pidfd_getfd>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0xffffffff,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @sys_pidfd_getfd(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 -1, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
void notAnOption(char *stream) {
  sprintf(stream, "HTTP/1.1 406 Not Acceptable\r\n");
}


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

x86 assembly (clang, -O2):
<notAnOption>:
movups 0xf07(%rip),%xmm0
movups %xmm0,0xe(%rdi)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
@.str = [30 x i8] c"HTTP/1.1 406 Not Acceptable\0D\0A\00"
define void @notAnOption(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"HTTP/1.1 406 Not Acceptable\0D\0A\00"
define void @notAnOption(i8* nocapture writeonly %0) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(30) %0, i8* align 1 dereferenceable(30) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 30, i1 false)
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvwins_wch(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvwins_wch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvwins_wch+0x2a>
jmp    1170 <cmd_mvwins_wch+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvwins_wch>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvwins_wch+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwins_wch(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwins_wch(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
int command_not_on_this_platform(int argc, char *const *argv) { return 0; }


x86 assembly (clang, -O0):
<command_not_on_this_platform>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @command_not_on_this_platform(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void Error(s) char *s;
{}


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

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

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

LLVM IR (-O2):
define void @Error(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fill(int, int, int, int, int);
void clear_pillar(int x, int gap) {
  if (x >= 320)
    return;
  fill(0x001F, x + 45, 0, 5, gap);
  fill(0x001F, x + 45, gap + 90, 5, 140 - gap);
}


x86 assembly (clang, -O0):
<clear_pillar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x140,-0x4(%rbp)
jl     1130 <clear_pillar+0x20>
jmp    1170 <clear_pillar+0x60>
mov    -0x4(%rbp),%esi
add    $0x2d,%esi
mov    -0x8(%rbp),%r8d
mov    $0x1f,%edi
xor    %edx,%edx
mov    $0x5,%ecx
call   1030 <fill@plt>
mov    -0x4(%rbp),%esi
add    $0x2d,%esi
mov    -0x8(%rbp),%edx
add    $0x5a,%edx
mov    $0x8c,%r8d
sub    -0x8(%rbp),%r8d
mov    $0x1f,%edi
mov    $0x5,%ecx
call   1030 <fill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_pillar>:
cmp    $0x13f,%edi
jle    1119 <clear_pillar+0x9>
ret
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x2d,%ebp
mov    $0x1f,%edi
mov    %ebp,%esi
xor    %edx,%edx
mov    $0x5,%ecx
mov    %ebx,%r8d
call   1030 <fill@plt>
mov    $0x8c,%r8d
sub    %ebx,%r8d
add    $0x5a,%ebx
mov    $0x1f,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x5,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fill@plt>

LLVM IR (-O0):
define void @clear_pillar(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 = icmp sge i32 %5, 320
br i1 %6, label %7, label %8
7: ; preds = %2
br label %20
8: ; preds = %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 45
%11 = load i32, i32* %4
%12 = call i32 @fill(i32 31, i32 %10, i32 0, i32 5, i32 %11)
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 45
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 90
%17 = load i32, i32* %4
%18 = sub nsw i32 140, %17
%19 = call i32 @fill(i32 31, i32 %14, i32 %16, i32 5, i32 %18)
br label %20
20: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @clear_pillar(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 319
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = add nsw i32 %0, 45
%6 = tail call i32 @fill(i32 31, i32 %5, i32 0, i32 5, i32 %1)
%7 = add nsw i32 %1, 90
%8 = sub nsw i32 140, %1
%9 = tail call i32 @fill(i32 31, i32 %5, i32 %7, i32 5, i32 %8)
br label %10
10: ; preds = %2, %4
ret void
}
void memory_barrier(void) { asm volatile("mfence" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @memory_barrier() {
tail call void asm sideeffect "mfence", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int ioctl(int, unsigned int, void *);
int bb_ioctl_or_warn(int fd, unsigned request, void *argp) {
  int ret;
  ret = ioctl(fd, request, argp);
  return ret;
}


x86 assembly (clang, -O0):
<bb_ioctl_or_warn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bb_ioctl_or_warn>:
jmp    1030 <ioctl@plt>

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

LLVM IR (-O2):
define i32 @bb_ioctl_or_warn(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @ioctl(i32 %0, i32 %1, i8* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int fread_int(FILE *f) {
  int i = 0;
  i += fgetc(f);
  i += fgetc(f) << 8;
  i += fgetc(f) << 16;
  i += fgetc(f) << 24;
  return i;
}


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

x86 assembly (clang, -O2):
<fread_int>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <fgetc@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
add    %r14d,%ebp
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
add    %ebp,%ebx
mov    %r15,%rdi
call   1030 <fgetc@plt>
shl    $0x18,%eax
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fread_int(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%4 = load i32*, i32** %2
%5 = call i32 @fgetc(i32* %4)
%6 = load i32, i32* %3
%7 = add nsw i32 %6, %5
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = call i32 @fgetc(i32* %8)
%10 = shl i32 %9, 8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, %10
store i32 %12, i32* %3
%13 = load i32*, i32** %2
%14 = call i32 @fgetc(i32* %13)
%15 = shl i32 %14, 16
%16 = load i32, i32* %3
%17 = add nsw i32 %16, %15
store i32 %17, i32* %3
%18 = load i32*, i32** %2
%19 = call i32 @fgetc(i32* %18)
%20 = shl i32 %19, 24
%21 = load i32, i32* %3
%22 = add nsw i32 %21, %20
store i32 %22, i32* %3
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @fread_int(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = shl i32 %3, 8
%5 = add nsw i32 %4, %2
%6 = tail call i32 @fgetc(i32* %0)
%7 = shl i32 %6, 16
%8 = add nsw i32 %5, %7
%9 = tail call i32 @fgetc(i32* %0)
%10 = shl i32 %9, 24
%11 = add nsw i32 %8, %10
ret i32 %11
}
/* Variables and functions */
double monotime();
double monotime_since(double t) { return monotime() - t; }


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

x86 assembly (clang, -O2):
<monotime_since>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <monotime@plt>
subsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @monotime_since(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @monotime()
%4 = load double, double* %2
%5 = fsub double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @monotime_since(double %0) {
%2 = tail call double (...) @monotime()
%3 = fsub double %2, %0
ret double %3
}
/* Type definitions */
struct net_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __netif_rx_schedule(struct net_device *);
scalar_t__ netif_rx_schedule_prep(struct net_device *);
void netif_rx_schedule(struct net_device *dev) {
  if (netif_rx_schedule_prep(dev))
    __netif_rx_schedule(dev);
}


x86 assembly (clang, -O0):
<netif_rx_schedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <netif_rx_schedule_prep@plt>
cmp    $0x0,%rax
je     1148 <netif_rx_schedule+0x28>
mov    -0x8(%rbp),%rdi
call   1040 <__netif_rx_schedule@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<netif_rx_schedule>:
push   %rbx
mov    %rdi,%rbx
call   1030 <netif_rx_schedule_prep@plt>
test   %rax,%rax
je     1137 <netif_rx_schedule+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <__netif_rx_schedule@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.net_device = type { i32 }
define void @netif_rx_schedule(%struct.net_device* %0) {
%2 = alloca %struct.net_device*
store %struct.net_device* %0, %struct.net_device** %2
%3 = load %struct.net_device*, %struct.net_device** %2
%4 = call i64 @netif_rx_schedule_prep(%struct.net_device* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.net_device*, %struct.net_device** %2
%8 = call i32 @__netif_rx_schedule(%struct.net_device* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.net_device = type { i32 }
define void @netif_rx_schedule(%struct.net_device* %0) {
%2 = tail call i64 @netif_rx_schedule_prep(%struct.net_device* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @__netif_rx_schedule(%struct.net_device* %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LPSPI2_DriverIRQHandler();
__attribute__((weak)) void LPSPI2_IRQHandler(void) {
  LPSPI2_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @LPSPI2_IRQHandler() {
%1 = tail call i32 (...) @LPSPI2_DriverIRQHandler()
ret void
}
/* Variables and functions */
scalar_t__ floor(double);
double pow(double, int);
int lon2tile(double lon, int z) {
  return (int)(floor((lon + 180.0) / 360.0 * pow(2.0, z)));
}


x86 assembly (clang, -O0):
<lon2tile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xed8(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xec3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
movsd  0xea7(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <floor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lon2tile>:
push   %rax
addsd  0xed7(%rip),%xmm0
divsd  0xed7(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xed2(%rip),%xmm0
call   1030 <pow@plt>
mulsd  (%rsp),%xmm0
pop    %rax
jmp    1040 <floor@plt>

LLVM IR (-O0):
define i32 @lon2tile(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = fadd double %5, 1.800000e+02
%7 = fdiv double %6, 3.600000e+02
%8 = load i32, i32* %4
%9 = call double @pow(double 2.000000e+00, i32 %8)
%10 = fmul double %7, %9
%11 = call i64 @floor(double %10)
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @lon2tile(double %0, i32 %1) {
%3 = fadd double %0, 1.800000e+02
%4 = fdiv double %3, 3.600000e+02
%5 = tail call double @pow(double 2.000000e+00, i32 %1)
%6 = fmul double %4, %5
%7 = tail call i64 @floor(double %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main() {
  int x, y;
  x = 0;
  y = 0;
  while (y >= 0) {
    y = y + x;
  }
  __VERIFIER_assert(0 == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1145 <main+0x35>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
xor    %edi,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O2):
/* Variables and functions */
double pow(double, int);
double max_err(int p) { return .5 * pow(10.0, -p); }


x86 assembly (clang, -O0):
<max_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
sub    -0x4(%rbp),%edi
movsd  0xee0(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xec8(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_err>:
push   %rax
neg    %edi
movsd  0xee5(%rip),%xmm0
call   1030 <pow@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @max_err(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 0, %3
%5 = call double @pow(double 1.000000e+01, i32 %4)
%6 = fmul double 5.000000e-01, %5
ret double %6
}

LLVM IR (-O2):
define double @max_err(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = tail call double @pow(double 1.000000e+01, i32 %2)
%4 = fmul double %3, 5.000000e-01
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ term(long *);
int yyselect();
expression() {
  long n;
  switch (yyselect()) {
  case 4: {
    term(&n);
    printf("%ld\n", n);
  } break;
  }
}


x86 assembly (clang, -O0):
<expression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <yyselect@plt>
sub    $0x4,%eax
jne    1166 <expression+0x36>
jmp    114d <expression+0x1d>
lea    -0x10(%rbp),%rdi
call   1050 <term@plt>
mov    -0x10(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expression>:
push   %rax
xor    %eax,%eax
call   1040 <yyselect@plt>
cmp    $0x4,%eax
jne    1155 <expression+0x25>
mov    %rsp,%rdi
call   1050 <term@plt>
mov    (%rsp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @expression() {
%1 = alloca i32
%2 = alloca i64
%3 = call i32 (...) @yyselect()
switch i32 %3, label %8 [
i32 4, label %4
]
4: ; preds = %0
%5 = call i32 @term(i64* %2)
%6 = load i64, i64* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %6)
br label %8
8: ; preds = %0, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @expression() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 (...) @yyselect()
%4 = icmp eq i32 %3, 4
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @term(i64* %1)
%7 = load i64, i64* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %7)
br label %9
9: ; preds = %0, %5
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool u_char_isnewline(uint32_t c) {
  switch (c) {
  case '\n':
  case '\f':
  case '\r':
  case ((uint32_t)0x0085):
  case ((uint32_t)0x2028):
  case ((uint32_t)0x2029):
    return true;
  default:
    return false;
  }
}


x86 assembly (clang, -O0):
<u_char_isnewline>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xa,%eax
je     1158 <u_char_isnewline+0x58>
jmp    111b <u_char_isnewline+0x1b>
mov    -0xc(%rbp),%eax
add    $0xfffffff4,%eax
sub    $0x2,%eax
jb     1158 <u_char_isnewline+0x58>
jmp    112f <u_char_isnewline+0x2f>
mov    -0xc(%rbp),%eax
sub    $0x85,%eax
je     1158 <u_char_isnewline+0x58>
jmp    1142 <u_char_isnewline+0x42>
mov    -0xc(%rbp),%eax
add    $0xffffdfd8,%eax
sub    $0x1,%eax
ja     1164 <u_char_isnewline+0x64>
jmp    1158 <u_char_isnewline+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116b <u_char_isnewline+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_char_isnewline>:
mov    $0x1,%eax
cmp    $0xd,%edi
jbe    1120 <u_char_isnewline+0x20>
lea    -0x2028(%rdi),%ecx
cmp    $0x2,%ecx
jb     112a <u_char_isnewline+0x2a>
cmp    $0x85,%edi
je     112a <u_char_isnewline+0x2a>
xor    %eax,%eax
ret
mov    $0x3400,%ecx
bt     %edi,%ecx
jae    110a <u_char_isnewline+0xa>
ret

LLVM IR (-O0):
define i32 @u_char_isnewline(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 10, label %5
i32 12, label %5
i32 13, label %5
i32 133, label %5
i32 8232, label %5
i32 8233, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @u_char_isnewline(i32 %0) {
switch i32 %0, label %2 [
i32 10, label %3
i32 12, label %3
i32 13, label %3
i32 133, label %3
i32 8232, label %3
i32 8233, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int board_ti_is(char *);
int board_is_bone(void) { return board_ti_is("A335BONE"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"A335BONE\00"
define i32 @board_is_bone() {
%1 = call i32 @board_ti_is(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [9 x i8] c"A335BONE\00"
define i32 @board_is_bone() {
%1 = tail call i32 @board_ti_is(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int isspace(int c) {
  return (c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' ||
          c == '\r');
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xb,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
cmpl   $0xd,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x4,%ecx
jae    110e <isspace+0xe>
ret
cmp    $0x20,%edi
je     110d <isspace+0xd>
xor    %eax,%eax
cmp    $0xd,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 11
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 12
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 13
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 12, label %5
i32 11, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *stack_check(char *);
char *stack_check_star(char *);
int main() {
  char str[] = "hujun";
  printf("%s\n", stack_check(str));
  printf("%s\n", stack_check_star(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xa(%rbp),%rdi
call   1040 <stack_check@plt>
mov    %rax,%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
lea    -0xa(%rbp),%rdi
call   1050 <stack_check_star@plt>
mov    %rax,%rsi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movw   $0x6e,0x4(%rsp)
movl   $0x756a7568,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <stack_check@plt>
lea    0xeb2(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
call   1050 <stack_check_star@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.str = [6 x i8] c"hujun\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
store i32 0, i32* %1
%3 = bitcast [6 x i8]* %2 to i8*
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i8* @stack_check(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%8 = call i8* @stack_check_star(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [6 x i8] c"hujun\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i8* @stack_check(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i8* @stack_check_star(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}