xunge/DecIR huggingface dataset:
double t3(double x) {
  register long double result;
  __asm __volatile("frndint" : "=t"(result) : "0"(x));
  return result;
}


x86 assembly (clang, -O0):
<t3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
fldl   -0x8(%rbp)
frndint
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<t3>:
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
frndint
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @t3(double %0) {
%2 = alloca double
%3 = alloca x86_fp80
store double %0, double* %2
%4 = load double, double* %2
%5 = fpext double %4 to x86_fp80
%6 = call x86_fp80 asm sideeffect "frndint", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %5)
store x86_fp80 %6, x86_fp80* %3
%7 = load x86_fp80, x86_fp80* %3
%8 = fptrunc x86_fp80 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @t3(double %0) {
%2 = fpext double %0 to x86_fp80
%3 = tail call x86_fp80 asm sideeffect "frndint", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %2)
%4 = fptrunc x86_fp80 %3 to double
ret double %4
}
/* Type definitions */
struct btf_type {
  int dummy;
};

/* Variables and functions */
scalar_t__ BTF_KIND_PTR;
scalar_t__ btf_kind(struct btf_type const *);
bool btf_is_ptr(const struct btf_type *t) {
  return btf_kind(t) == BTF_KIND_PTR;
}


x86 assembly (clang, -O0):
<btf_is_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <btf_kind@plt>
mov    0x2ebc(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btf_is_ptr>:
push   %rax
call   1030 <btf_kind@plt>
mov    0x2ecb(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.btf_type = type { i32 }
@BTF_KIND_PTR = global i64 0
define i32 @btf_is_ptr(%struct.btf_type* %0) {
%2 = alloca %struct.btf_type*
store %struct.btf_type* %0, %struct.btf_type** %2
%3 = load %struct.btf_type*, %struct.btf_type** %2
%4 = call i64 @btf_kind(%struct.btf_type* %3)
%5 = load i64, i64* @BTF_KIND_PTR
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.btf_type = type { i32 }
@BTF_KIND_PTR = global i64 0
define i32 @btf_is_ptr(%struct.btf_type* %0) {
%2 = tail call i64 @btf_kind(%struct.btf_type* %0)
%3 = load i64, i64* @BTF_KIND_PTR
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void fadeout(int seconds) {}


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

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

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

LLVM IR (-O2):
define void @fadeout(i32 %0) {
ret void
}
void rop3_18_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ T;
  stk2 = ~stk2;
  stk1 = S | stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_18_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_18_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8, i8* %6
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8*, i8** %4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = load i8, i8* %5
%44 = zext i8 %43 to i32
%45 = and i32 %42, %44
%46 = or i32 %39, %45
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = load i8, i8* %6
%51 = zext i8 %50 to i32
%52 = and i32 %49, %51
%53 = or i32 %46, %52
%54 = trunc i32 %53 to i8
%55 = load i8*, i8** %4
store i8 %54, i8* %55
ret void
}

LLVM IR (-O2):
define void @rop3_18_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
int valid_digit(char *ip_str) {
  while (*ip_str) {
    if (*ip_str >= '0' && *ip_str <= '9')
      ++ip_str;
    else
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<valid_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1157 <valid_digit+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1146 <valid_digit+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jg     1146 <valid_digit+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <valid_digit+0x52>
movl   $0x0,-0x4(%rbp)
jmp    115e <valid_digit+0x5e>
jmp    1108 <valid_digit+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_digit>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <valid_digit+0x23>
add    $0x1,%rdi
nop
add    $0xd0,%cl
cmp    $0xa,%cl
jae    1124 <valid_digit+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <valid_digit+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @valid_digit(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %22, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %23
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sge i32 %11, 48
br i1 %12, label %13, label %21
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 57
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %22
21: ; preds = %13, %8
store i32 0, i32* %2
br label %24
22: ; preds = %18
br label %4
23: ; preds = %4
store i32 1, i32* %2
br label %24
24: ; preds = %23, %21
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @valid_digit(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -48
%11 = icmp ult i8 %10, 10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %4, label %13
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ p;

/* Variables and functions */
int *malloc(int);
int *create_p() {
  int *p = malloc(sizeof(p));
  return p;
}


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

x86 assembly (clang, -O2):
<create_p>:
mov    $0x8,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @create_p() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 8)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
ret i32* %3
}

LLVM IR (-O2):
define noalias i32* @create_p() {
%1 = tail call i32* @malloc(i32 8)
ret i32* %1
}
int __access_ok(unsigned long addr, unsigned long size) {
  extern unsigned long memory_start, memory_end;
  return ((addr >= memory_start) && ((addr + size) < memory_end));
}


x86 assembly (clang, -O0):
<__access_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
mov    0x2ec7(%rip),%rdx
cmp    (%rdx),%rcx
mov    %al,-0x11(%rbp)
jb     113d <__access_ok+0x3d>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    0x2ea4(%rip),%rcx
cmp    (%rcx),%rax
setb   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__access_ok>:
mov    0x2ed9(%rip),%rax
cmp    %rdi,(%rax)
setbe  %al
add    %rdi,%rsi
mov    0x2ec1(%rip),%rcx
cmp    (%rcx),%rsi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
@memory_start = external global i64
@memory_end = external global i64
define i32 @__access_ok(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* @memory_start
%7 = icmp uge i64 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = add i64 %9, %10
%12 = load i64, i64* @memory_end
%13 = icmp ult i64 %11, %12
br label %14
14: ; preds = %8, %2
%15 = phi i1 [ false, %2 ], [ %13, %8 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@memory_start = external global i64
@memory_end = external global i64
define i32 @__access_ok(i64 %0, i64 %1) {
%3 = load i64, i64* @memory_start
%4 = icmp ule i64 %3, %0
%5 = add i64 %1, %0
%6 = load i64, i64* @memory_end
%7 = icmp ult i64 %5, %6
%8 = select i1 %4, i1 %7, i1 false
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_write_symbols(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(294, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_write_symbols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x126,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_write_symbols>:
mov    $0x126,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @syscon_write_symbols() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 294, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_write_symbols() {
%1 = tail call i32 @_ada_use_c2phc(i32 294, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int strcasecmp(char *, char *);
int strListCompareAlphaReverse(const void *arg1, const void *arg2) {
  return strcasecmp(*(char **)arg2, *(char **)arg1);
}


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

x86 assembly (clang, -O2):
<strListCompareAlphaReverse>:
mov    (%rsi),%rax
mov    (%rdi),%rsi
mov    %rax,%rdi
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @strListCompareAlphaReverse(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcasecmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @strListCompareAlphaReverse(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %0 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcasecmp(i8* %4, i8* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ check(char *);
int main(int ac, char **av) {
  if (ac < 2)
    return 0;
  check(av[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    113c <main+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1149 <main+0x39>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <check@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1123 <main+0x13>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <check@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @check(i8* %12)
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @check(i8* %6)
br label %8
8: ; preds = %2, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
void enter_data(char *str) {
  printf("Enter string: ");
  fgets(str, 20, stdin);
}


x86 assembly (clang, -O0):
<enter_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
mov    $0x14,%esi
call   1040 <fgets@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enter_data>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x14,%esi
pop    %rbx
jmp    1040 <fgets@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Enter string: \00"
@stdin = global i32 0
define void @enter_data(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 20, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter string: \00"
@stdin = global i32 0
define void @enter_data(i8* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgets(i8* %0, i32 20, i32 %3)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int int32_t;

/* Variables and functions */
void *tag_i32(int32_t x) {
  return (void *)((uintptr_t)((uint32_t)((x << 1) | 1)));
}


x86 assembly (clang, -O0):
<tag_i32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
or     $0x1,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag_i32>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
cltq
ret

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

LLVM IR (-O2):
define i8* @tag_i32(i32 %0) {
%2 = shl i32 %0, 1
%3 = or i32 %2, 1
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int ffsll(int /*<<< orphan*/);
int /*<<< orphan*/ htonll(long long);
int fi_flsll(long long int i) { return i ? 65 - ffsll(htonll(i)) : 0; }


x86 assembly (clang, -O0):
<fi_flsll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <fi_flsll+0x38>
mov    -0x8(%rbp),%rdi
call   1040 <htonll@plt>
mov    %eax,%edi
call   1030 <ffsll@plt>
mov    %eax,%ecx
mov    $0x41,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1162 <fi_flsll+0x42>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1162 <fi_flsll+0x42>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fi_flsll>:
test   %rdi,%rdi
je     1134 <fi_flsll+0x24>
push   %rax
call   1030 <htonll@plt>
bsf    %eax,%ecx
mov    $0x40,%edx
sub    %ecx,%edx
test   %eax,%eax
mov    $0x41,%eax
cmovne %edx,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fi_flsll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i32 @htonll(i64 %6)
%8 = call i32 @ffsll(i32 %7)
%9 = sub nsw i32 65, %8
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %5
%12 = phi i32 [ %9, %5 ], [ 0, %10 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @fi_flsll(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @htonll(i64 %0)
%5 = tail call i32 @llvm.cttz.i32(i32 %4, i1 true)
%6 = icmp eq i32 %4, 0
%7 = sub nuw nsw i32 64, %5
%8 = select i1 %6, i32 65, i32 %7
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 0, %1 ]
ret i32 %10
}
long DUP(fd)
long *fd;
{ return ((long)dup(*fd)); }


x86 assembly (clang, -O0):
<DUP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <dup@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DUP>:
push   %rax
mov    (%rdi),%rdi
xor    %eax,%eax
call   1030 <dup@plt>
cltq
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @DUP(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 (i64, ...) bitcast (i32 (...)* @dup to i32 (i64, ...)*)(i64 %2)
%4 = sext i32 %3 to i64
ret i64 %4
}
/* Variables and functions */
double log(double);
double dewPointFast(double celsius, double humidity) {
  double a = 17.271;
  double b = 237.7;
  double temp = (a * celsius) / (b + celsius) + log(humidity * 0.01);
  double dP = (b * temp) / (a - temp);
  return dP;
}


x86 assembly (clang, -O0):
<dewPointFast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xee6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
addsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe9f(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dewPointFast>:
push   %rax
movapd %xmm0,%xmm2
mulsd  0xee3(%rip),%xmm2
addsd  0xee3(%rip),%xmm0
divsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
mulsd  0xeda(%rip),%xmm1
movapd %xmm1,%xmm0
call   1030 <log@plt>
addsd  (%rsp),%xmm0
movsd  0xebc(%rip),%xmm2
mulsd  %xmm0,%xmm2
movsd  0xea8(%rip),%xmm1
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dewPointFast(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 1.727100e+01, double* %5
store double 2.377000e+02, double* %6
%9 = load double, double* %5
%10 = load double, double* %3
%11 = fmul double %9, %10
%12 = load double, double* %6
%13 = load double, double* %3
%14 = fadd double %12, %13
%15 = fdiv double %11, %14
%16 = load double, double* %4
%17 = fmul double %16, 1.000000e-02
%18 = call double @log(double %17)
%19 = fadd double %15, %18
store double %19, double* %7
%20 = load double, double* %6
%21 = load double, double* %7
%22 = fmul double %20, %21
%23 = load double, double* %5
%24 = load double, double* %7
%25 = fsub double %23, %24
%26 = fdiv double %22, %25
store double %26, double* %8
%27 = load double, double* %8
ret double %27
}

LLVM IR (-O2):
define double @dewPointFast(double %0, double %1) {
%3 = fmul double %0, 1.727100e+01
%4 = fadd double %0, 2.377000e+02
%5 = fdiv double %3, %4
%6 = fmul double %1, 1.000000e-02
%7 = tail call double @log(double %6)
%8 = fadd double %5, %7
%9 = fmul double %8, 2.377000e+02
%10 = fsub double 1.727100e+01, %8
%11 = fdiv double %9, %10
ret double %11
}
void *emptyfunc(void *dummy) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @emptyfunc(i8* nocapture readnone %0) {
ret i8* null
}
int mod_exec_exit(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mod_exec_exit() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[], char *envp[]) {
  if (argc >= 2) {
  }
  printf("Other!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1139 <main+0x29>
jmp    1139 <main+0x29>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [7 x i8] c"Other!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned char *lib_malloc(int);
int /*<<< orphan*/ memcpy(unsigned char *, char const *, size_t);
int /*<<< orphan*/ memset(unsigned char *, int, int);
unsigned char *cbmdos_dir_slot_create(const char *name, unsigned int len) {
  unsigned char *slot;
  if (len > 16) {
    len = 16;
  }
  slot = lib_malloc(16);
  memset(slot, 0xa0, 16);
  memcpy(slot, name, (size_t)len);
  return slot;
}


x86 assembly (clang, -O0):
<cbmdos_dir_slot_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jbe    1150 <cbmdos_dir_slot_create+0x20>
movl   $0x10,-0xc(%rbp)
mov    $0x10,%edi
call   1030 <lib_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0xa0,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
mov    %eax,%edx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbmdos_dir_slot_create>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
cmp    $0x10,%esi
mov    $0x10,%eax
cmovae %eax,%ebx
mov    $0x10,%edi
call   1030 <lib_malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    $0xa0,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @cbmdos_dir_slot_create(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp ugt i32 %6, 16
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 16, i32* %4
br label %9
9: ; preds = %8, %2
%10 = call i8* @lib_malloc(i32 16)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = call i32 @memset(i8* %11, i32 160, i32 16)
%13 = load i8*, i8** %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = zext i32 %15 to i64
%17 = call i32 @memcpy(i8* %13, i8* %14, i64 %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @cbmdos_dir_slot_create(i8* %0, i32 %1) {
%3 = icmp ult i32 %1, 16
%4 = select i1 %3, i32 %1, i32 16
%5 = tail call i8* @lib_malloc(i32 16)
%6 = tail call i32 @memset(i8* %5, i32 160, i32 16)
%7 = zext i32 %4 to i64
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %7)
ret i8* %5
}
double Ezero(double l, double m, double n) { return 0.0; }


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

x86 assembly (clang, -O2):
<Ezero>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @Ezero(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
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @Ezero(double %0, double %1, double %2) {
ret double 0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int __int8_t_encode_array(void *, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/ const *, int /*<<< orphan*/);
int __int8_t_encode_little_endian_array(void *_buf, uint32_t offset,
                                        uint32_t maxlen, const int8_t *p,
                                        uint32_t elements) {
  return __int8_t_encode_array(_buf, offset, maxlen, p, elements);
}


x86 assembly (clang, -O0):
<__int8_t_encode_little_endian_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <__int8_t_encode_array@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__int8_t_encode_little_endian_array>:
jmp    1030 <__int8_t_encode_array@plt>

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

LLVM IR (-O2):
define i32 @__int8_t_encode_little_endian_array(i8* %0, i32 %1, i32 %2, i32* %3, i32 %4) {
%6 = tail call i32 @__int8_t_encode_array(i8* %0, i32 %1, i32 %2, i32* %3, i32 %4)
ret i32 %6
}
unsigned nozero(unsigned h) { return h ? h : (unsigned)-1; }


x86 assembly (clang, -O0):
<nozero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111c <nozero+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <nozero+0x29>
mov    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <nozero+0x29>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nozero>:
cmp    $0x1,%edi
sbb    %eax,%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @nozero(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 -1, i32 %0
ret i32 %3
}
void caller_2_1_2_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_1_2_1_2_1_1() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t dtls_uint32_to_int(const unsigned char *field) {
  return ((uint32_t)field[0] << 24) | ((uint32_t)field[1] << 16) |
         ((uint32_t)field[2] << 8) | (uint32_t)field[3];
}


x86 assembly (clang, -O0):
<dtls_uint32_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dtls_uint32_to_int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 24
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = or i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @dtls_uint32_to_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ CG_MWheel_f(int /*<<< orphan*/);
void CG_MWhellup_f(void) { CG_MWheel_f(0); }


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

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

LLVM IR (-O0):
define void @CG_MWhellup_f() {
%1 = call i32 @CG_MWheel_f(i32 0)
ret void
}

LLVM IR (-O2):
define void @CG_MWhellup_f() {
%1 = tail call i32 @CG_MWheel_f(i32 0)
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ stat(char const *const, struct stat *);
off_t FileSys_GetFileSize(char const *const inPath) {
  struct stat s;
  assert(inPath != NULL);
  if (stat(inPath, &s) == 0) {
    return s.st_size;
  }
  return -1;
}


x86 assembly (clang, -O0):
<FileSys_GetFileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    1160 <FileSys_GetFileSize+0x40>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <FileSys_GetFileSize+0x47>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileSys_GetFileSize>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <stat@plt>
neg    %rax
sbb    %eax,%eax
or     0x8(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @FileSys_GetFileSize(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %3
%10 = call i64 @stat(i8* %9, %struct.stat* %4)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%14 = load i32, i32* %13
store i32 %14, i32* %2
br label %16
15: ; preds = %1
store i32 -1, i32* %2
br label %16
16: ; preds = %15, %12
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @FileSys_GetFileSize(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = icmp ne i8* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = call i64 @stat(i8* %0, %struct.stat* %2)
%8 = icmp eq i64 %7, 0
%9 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%10 = load i32, i32* %9
%11 = select i1 %8, i32 %10, i32 -1
ret i32 %11
}
/* Variables and functions */
scalar_t__ MacroFind(char *);
int CheckMacro(char *name) {
  if (MacroFind(name))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<CheckMacro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <MacroFind@plt>
cmp    $0x0,%rax
je     113b <CheckMacro+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <CheckMacro+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckMacro>:
push   %rax
call   1030 <MacroFind@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CheckMacro(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @MacroFind(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @CheckMacro(i8* %0) {
%2 = tail call i64 @MacroFind(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void INT_Excep_RIIC3_EEI3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RIIC3_EEI3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
void printErr(char *msg) {
  fprintf(stderr, "%s\n", msg);
  printf("Pro ziskani napovedy pouzijte: ./proj3 --help\n");
}


x86 assembly (clang, -O0):
<printErr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printErr>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xec4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [47 x i8] c"Pro ziskani napovedy pouzijte: ./proj3 --help\0A\00"
define void @printErr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@str = [46 x i8] c"Pro ziskani napovedy pouzijte: ./proj3 --help\00"
define void @printErr(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret void
}
void PBISTAlgoSelect(unsigned long ulALGO) {
  (*((volatile unsigned long *)(0x400FB000 + 0x000001C4))) = ulALGO;
}


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

x86 assembly (clang, -O2):
<PBISTAlgoSelect>:
mov    %rdi,0x400fb1c4
40
ret

LLVM IR (-O0):
define void @PBISTAlgoSelect(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074770372 to i64*)
ret void
}

LLVM IR (-O2):
define void @PBISTAlgoSelect(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074770372 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
char *strsub(char *Result, char *input, short start_pos, short len) {
  char STR1[256];
  char *tmp;
  int i;
  for (i = 1; i <= start_pos; i++)
    input++;
  tmp = input;
  strcpy(Result, tmp);
  return Result;
}


x86 assembly (clang, -O0):
<strsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
movl   $0x1,-0x12c(%rbp)
mov    -0x12c(%rbp),%eax
movswl -0x12(%rbp),%ecx
cmp    %ecx,%eax
jg     116d <strsub+0x5d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x12c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x12c(%rbp)
jmp    113b <strsub+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x128(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsub>:
push   %rbx
mov    %rdi,%rbx
movzwl %dx,%eax
lea    -0x1(%rax),%ecx
add    $0x1,%rcx
xor    %edx,%edx
test   %ax,%ax
cmovg  %rcx,%rdx
add    %rdx,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strsub(i8* returned %0, i8* %1, i16 signext %2, i16 signext %3) {
%5 = icmp slt i16 %2, 1
%6 = zext i16 %2 to i64
%7 = add nuw nsw i64 %6, 4294967295
%8 = and i64 %7, 4294967295
%9 = add nuw nsw i64 %8, 1
%10 = select i1 %5, i64 0, i64 %9
%11 = getelementptr i8, i8* %1, i64 %10
%12 = tail call i32 @strcpy(i8* %0, i8* %11)
ret i8* %0
}
/* Type definitions */
struct sockaddr_storage {
  int ss_family;
};

/* Variables and functions */
#define AF_INET 129
#define AF_INET6 128
size_t addr_len(struct sockaddr_storage *addr) {
  switch (addr->ss_family) {
  case AF_INET:
    return 4;
  case AF_INET6:
    return 16;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<addr_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x80,%eax
je     1141 <addr_len+0x41>
jmp    1121 <addr_len+0x21>
mov    -0x14(%rbp),%eax
sub    $0x81,%eax
jne    114e <addr_len+0x4e>
jmp    1134 <addr_len+0x34>
movq   $0x4,-0x8(%rbp)
jmp    1156 <addr_len+0x56>
movq   $0x10,-0x8(%rbp)
jmp    1156 <addr_len+0x56>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr_len>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    $0x80,%eax
sete   %cl
shl    $0x4,%rcx
cmp    $0x81,%eax
mov    $0x4,%eax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
%struct.sockaddr_storage = type { i32 }
define i64 @addr_len(%struct.sockaddr_storage* %0) {
%2 = alloca i64
%3 = alloca %struct.sockaddr_storage*
store %struct.sockaddr_storage* %0, %struct.sockaddr_storage** %3
%4 = load %struct.sockaddr_storage*, %struct.sockaddr_storage** %3
%5 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %4, i32 0, i32 0
%6 = load i32, i32* %5
switch i32 %6, label %9 [
i32 129, label %7
i32 128, label %8
]
7: ; preds = %1
store i64 4, i64* %2
br label %10
8: ; preds = %1
store i64 16, i64* %2
br label %10
9: ; preds = %1
store i64 0, i64* %2
br label %10
10: ; preds = %9, %8, %7
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i32 }
define i64 @addr_len(%struct.sockaddr_storage* nocapture %0) {
%2 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 128
%5 = select i1 %4, i64 16, i64 0
%6 = icmp eq i32 %3, 129
%7 = select i1 %6, i64 4, i64 %5
ret i64 %7
}
/* Variables and functions */
double sin(double);
double ECsin(double x) { return (sin(x)); }


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

x86 assembly (clang, -O2):
<ECsin>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @ECsin(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
/* Variables and functions */
int GetLChildIDX(int);
int GetRChildIDX(int idx) { return GetLChildIDX(idx) + 1; }


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

x86 assembly (clang, -O2):
<GetRChildIDX>:
push   %rax
call   1030 <GetLChildIDX@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @GetRChildIDX(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @GetLChildIDX(i32 %3)
%5 = add nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @GetRChildIDX(i32 %0) {
%2 = tail call i32 @GetLChildIDX(i32 %0)
%3 = add nsw i32 %2, 1
ret i32 %3
}
void teredo_deinit_HMAC(void) {}


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

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

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

LLVM IR (-O2):
define void @teredo_deinit_HMAC() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main() {
  int i, j;
  i = 1;
  j = 10;
  while (j >= i) {
    i = i + 2;
    j = -1 + j;
  }
  __VERIFIER_assert(j == 6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1152 <main+0x42>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x6,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xb,%eax
mov    $0x3,%ecx
nopw   0x0(%rax,%rax,1)
add    $0xffffffff,%eax
lea    0x2(%rcx),%edx
cmp    %ecx,%eax
mov    %edx,%ecx
jg     1120 <main+0x10>
push   %rax
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 10, %0 ], [ %5, %1 ]
%3 = phi i32 [ 1, %0 ], [ %4, %1 ]
%4 = add nuw nsw i32 %3, 2
%5 = add nsw i32 %2, -1
%6 = icmp sgt i32 %2, %4
br i1 %6, label %1, label %7
7: ; preds = %1
%8 = icmp eq i32 %5, 6
%9 = zext i1 %8 to i32
%10 = tail call i32 @__VERIFIER_assert(i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, float *);
float lire_reel() {
  float f;
  printf("Entrez  un reel:");
  scanf("%f", &f);
  return f;
}


x86 assembly (clang, -O0):
<lire_reel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lire_reel>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Entrez un reel:\00"
@.str.1 = [3 x i8] c"%f\00"
define float @lire_reel() {
%1 = alloca float
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%4 = load float, float* %1
ret float %4
}

LLVM IR (-O2):
@.str = [17 x i8] c"Entrez un reel:\00"
@.str.1 = [3 x i8] c"%f\00"
define float @lire_reel() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
ret float %5
}