xunge/DecIR huggingface dataset:
int fib(int n) {
  if ((n == 0) || (n == 1)) {
    return 1;
  }
  return (fib(n - 1) + fib(n - 2));
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <fib+0x1f>
cmpl   $0x1,-0x8(%rbp)
jne    113b <fib+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    115e <fib+0x4e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jb     1145 <fib+0x35>
mov    %edi,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
add    $0xfffffffe,%ebx
add    %eax,%ebp
cmp    $0x1,%ebx
ja     1130 <fib+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %8, 2
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void nofiledie(char *filename) {
  printf("Error: Can't find specified file: %s.\n", filename);
  exit(1);
}


x86 assembly (clang, -O0):
<nofiledie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [39 x i8] c"Error: Can't find specified file: %s.\0A\00"
define void @nofiledie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [39 x i8] c"Error: Can't find specified file: %s.\0A\00"
define void @nofiledie(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void score_setup() {}


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

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

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

LLVM IR (-O2):
define void @score_setup() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int streq(char const *p, char const *q) {
  return p == q || (p && q && strcmp(p, q) == 0);
}


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmp    -0x10(%rbp),%rcx
mov    %al,-0x11(%rbp)
je     1170 <streq+0x60>
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x12(%rbp)
je     116a <streq+0x5a>
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x12(%rbp)
je     116a <streq+0x5a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
cmp    %rsi,%rdi
je     1137 <streq+0x27>
xor    %eax,%eax
test   %rdi,%rdi
je     1136 <streq+0x26>
test   %rsi,%rsi
je     1136 <streq+0x26>
push   %rax
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = icmp ne i8* %0, null
%6 = icmp ne i8* %1, null
%7 = and i1 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = tail call i64 @strcmp(i8* %0, i8* %1)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %8, %2
%13 = phi i32 [ 1, %2 ], [ 0, %4 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ ungetch(char);
void ungets(char s[]) {
  size_t slen = strlen(s);
  while (slen > 0)
    ungetch(s[--slen]);
  s[0] = '\0';
}


x86 assembly (clang, -O0):
<ungets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    1166 <ungets+0x46>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
movsbl -0x1(%rax,%rcx,1),%edi
call   1040 <ungetch@plt>
jmp    1139 <ungets+0x19>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungets>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %rax,%rax
je     1151 <ungets+0x31>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl -0x1(%r14,%rbx,1),%edi
call   1040 <ungetch@plt>
add    $0xffffffffffffffff,%rbx
jne    1140 <ungets+0x20>
movb   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ungets(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
br label %6
6: ; preds = %9, %1
%7 = load i64, i64* %3
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i8*, i8** %2
%11 = load i64, i64* %3
%12 = add i64 %11, -1
store i64 %12, i64* %3
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = call i32 @ungetch(i8 signext %14)
br label %6
16: ; preds = %6
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 0
store i8 0, i8* %18
ret void
}

LLVM IR (-O2):
define void @ungets(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %6, %4 ], [ %2, %1 ]
%6 = add i64 %5, -1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @ungetch(i8 signext %8)
%10 = icmp eq i64 %6, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
store i8 0, i8* %0
ret void
}
unsigned xrop3_13_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~S;
  stk2 = D & stk3;
  stk1 = T | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

x86 assembly (clang, -O2):
<xrop3_13_1_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
or     %edi,%esi
xor    $0xff,%edi
or     %edi,%eax
or     %ecx,%eax
not    %eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_13_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %3, 255
%8 = or i32 %4, %7
%9 = or i32 %8, %6
%10 = xor i32 %9, -1
%11 = or i8 %1, %0
%12 = zext i8 %11 to i32
%13 = or i32 %12, %10
ret i32 %13
}
long long func4(long a, long b) { return (long long)a * (long long)b; }


x86 assembly (clang, -O0):
<func4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func4>:
mov    %rdi,%rax
imul   %rsi,%rax
ret

LLVM IR (-O0):
define i64 @func4(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* %4
%7 = mul nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @func4(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ WebRtcIsac_AllPoleFilter(double *, double *, size_t, int);
int /*<<< orphan*/ WebRtcIsac_AllZeroFilter(double *, double *, size_t, int,
                                            double *);
void WebRtcIsac_ZeroPoleFilter(double *In, double *ZeroCoef, double *PoleCoef,
                               size_t lengthInOut, int orderCoef, double *Out) {
  WebRtcIsac_AllZeroFilter(In, ZeroCoef, lengthInOut, orderCoef, Out);
  WebRtcIsac_AllPoleFilter(Out, PoleCoef, lengthInOut, orderCoef);
}


x86 assembly (clang, -O0):
<WebRtcIsac_ZeroPoleFilter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x30(%rbp),%r8
call   1030 <WebRtcIsac_AllZeroFilter@plt>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
call   1040 <WebRtcIsac_AllPoleFilter@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WebRtcIsac_ZeroPoleFilter>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9,%rbx
mov    %r8d,%r14d
mov    %rcx,%rbp
mov    %rdx,%r15
mov    %rcx,%rdx
mov    %r8d,%ecx
mov    %r9,%r8
call   1030 <WebRtcIsac_AllZeroFilter@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <WebRtcIsac_AllPoleFilter@plt>

LLVM IR (-O0):
define void @WebRtcIsac_ZeroPoleFilter(double* %0, double* %1, double* %2, i64 %3, i32 %4, double* %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i64
%11 = alloca i32
%12 = alloca double*
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store i64 %3, i64* %10
store i32 %4, i32* %11
store double* %5, double** %12
%13 = load double*, double** %7
%14 = load double*, double** %8
%15 = load i64, i64* %10
%16 = load i32, i32* %11
%17 = load double*, double** %12
%18 = call i32 @WebRtcIsac_AllZeroFilter(double* %13, double* %14, i64 %15, i32 %16, double* %17)
%19 = load double*, double** %12
%20 = load double*, double** %9
%21 = load i64, i64* %10
%22 = load i32, i32* %11
%23 = call i32 @WebRtcIsac_AllPoleFilter(double* %19, double* %20, i64 %21, i32 %22)
ret void
}

LLVM IR (-O2):
define void @WebRtcIsac_ZeroPoleFilter(double* %0, double* %1, double* %2, i64 %3, i32 %4, double* %5) {
%7 = tail call i32 @WebRtcIsac_AllZeroFilter(double* %0, double* %1, i64 %3, i32 %4, double* %5)
%8 = tail call i32 @WebRtcIsac_AllPoleFilter(double* %5, double* %2, i64 %3, i32 %4)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void WatchdogIntEnable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000008))) |= 0x00000001;
}


x86 assembly (clang, -O0):
<WatchdogIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%ecx
or     $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntEnable>:
movslq %edi,%rax
orl    $0x1,0x8(%rax)
ret

LLVM IR (-O0):
define void @WatchdogIntEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 8
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 1
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @WatchdogIntEnable(i32 %0) {
%2 = add nsw i32 %0, 8
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = or i32 %5, 1
store volatile i32 %6, i32* %4
ret void
}
/* Type definitions */
typedef double uint64_t;

/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
uint64_t randomC() { return ((double)rand()) / RAND_MAX * 0x100000000000000; }


x86 assembly (clang, -O0):
<randomC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
movsd  0xecd(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomC>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
mulsd  0xed0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @randomC() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
%5 = fmul double %4, 0x4370000000000000
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @randomC() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
%5 = fmul double %4, 0x4370000000000000
ret double %5
}
/* Variables and functions */
unsigned char msg_send(int, unsigned char *, int);
unsigned char ANT_UnAssignChannel(unsigned char chan) {
  return msg_send(0x41, &chan, 1);
}


x86 assembly (clang, -O0):
<ANT_UnAssignChannel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x41,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <msg_send@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANT_UnAssignChannel>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x41,%edi
mov    $0x1,%edx
call   1030 <msg_send@plt>
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @ANT_UnAssignChannel(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call zeroext i8 @msg_send(i32 65, i8* %2, i32 1)
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @ANT_UnAssignChannel(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call zeroext i8 @msg_send(i32 65, i8* %2, i32 1)
ret i8 %3
}
/* Variables and functions */
unsigned int A(int);
unsigned B(int k, int j) {
  unsigned low_j_0 = A(j);
  unsigned low_k_plus_j_0 = A(k + j);
  return low_j_0 & ~low_k_plus_j_0;
}


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

x86 assembly (clang, -O2):
<B>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
call   1030 <A@plt>
mov    %eax,%r14d
add    %ebx,%ebp
mov    %ebp,%edi
call   1030 <A@plt>
not    %eax
and    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @B(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @A(i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
%12 = call i32 @A(i32 %11)
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = xor i32 %14, -1
%16 = and i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @B(i32 %0, i32 %1) {
%3 = tail call i32 @A(i32 %1)
%4 = add nsw i32 %1, %0
%5 = tail call i32 @A(i32 %4)
%6 = xor i32 %5, -1
%7 = and i32 %3, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
uint16_t dns_response_get16(const uint8_t *pr) {
  uint16_t nval;
  memcpy(&nval, pr, 2);
  return ntohs(nval);
}


x86 assembly (clang, -O0):
<dns_response_get16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%edi
call   1040 <ntohs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_response_get16>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%edi
call   1040 <ntohs@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dns_response_get16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @memcpy(i32* %3, i32* %4, i32 2)
%6 = load i32, i32* %3
%7 = call i32 @ntohs(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @dns_response_get16(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i32* %0, i32 2)
%5 = load i32, i32* %2
%6 = call i32 @ntohs(i32 %5)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ *check_dir();
int /*<<< orphan*/ parse_args(int, char **);
int /*<<< orphan*/ readd(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  DIR *dir;
  parse_args(argc, argv);
  dir = check_dir();
  readd(dir);
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <parse_args@plt>
mov    $0x0,%al
call   1050 <check_dir@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <readd@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <parse_args@plt>
xor    %eax,%eax
call   1050 <check_dir@plt>
mov    %rax,%rdi
call   1030 <readd@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @parse_args(i32 %7, i8** %8)
%10 = call i32* (...) @check_dir()
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = call i32 @readd(i32* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_args(i32 %0, i8** %1)
%4 = tail call i32* (...) @check_dir()
%5 = tail call i32 @readd(i32* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void callback(int p, int n, void *arg) {
  char c = 'B';
  if (p == 0)
    c = '.';
  if (p == 1)
    c = '+';
  if (p == 2)
    c = '*';
  if (p == 3)
    c = '\n';
  fputc(c, stderr);
}


x86 assembly (clang, -O0):
<callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movb   $0x42,-0x11(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1134 <callback+0x24>
movb   $0x2e,-0x11(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1142 <callback+0x32>
movb   $0x2b,-0x11(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1150 <callback+0x40>
movb   $0x2a,-0x11(%rbp)
cmpl   $0x3,-0x4(%rbp)
jne    115e <callback+0x4e>
movb   $0xa,-0x11(%rbp)
mov    -0x11(%rbp),%al
mov    0x2e78(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <fputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback>:
test   %edi,%edi
mov    $0x2e,%eax
mov    $0x42,%ecx
cmove  %eax,%ecx
cmp    $0x1,%edi
mov    $0x2b,%eax
cmovne %ecx,%eax
cmp    $0x2,%edi
mov    $0x2a,%ecx
cmovne %eax,%ecx
cmp    $0x3,%edi
mov    $0xa,%edi
cmovne %ecx,%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @callback(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i8 66, i8* %7
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3
store i8 46, i8* %7
br label %11
11: ; preds = %10, %3
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %15
14: ; preds = %11
store i8 43, i8* %7
br label %15
15: ; preds = %14, %11
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %19
18: ; preds = %15
store i8 42, i8* %7
br label %19
19: ; preds = %18, %15
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 3
br i1 %21, label %22, label %23
22: ; preds = %19
store i8 10, i8* %7
br label %23
23: ; preds = %22, %19
%24 = load i8, i8* %7
%25 = load i32, i32* @stderr
%26 = call i32 @fputc(i8 signext %24, i32 %25)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @callback(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8 46, i8 66
%6 = icmp eq i32 %0, 1
%7 = select i1 %6, i8 43, i8 %5
%8 = icmp eq i32 %0, 2
%9 = select i1 %8, i8 42, i8 %7
%10 = icmp eq i32 %0, 3
%11 = select i1 %10, i8 10, i8 %9
%12 = load i32, i32* @stderr
%13 = tail call i32 @fputc(i8 signext %11, i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
__attribute__((unused)) void UTIL_freeFileList(const char **filenameTable,
                                               char *allocatedBuffer) {
  if (allocatedBuffer)
    free(allocatedBuffer);
  if (filenameTable)
    free((void *)filenameTable);
}


x86 assembly (clang, -O0):
<UTIL_freeFileList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1134 <UTIL_freeFileList+0x24>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x8(%rbp)
je     1148 <UTIL_freeFileList+0x38>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UTIL_freeFileList>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
je     1121 <UTIL_freeFileList+0x11>
mov    %rsi,%rdi
call   1030 <free@plt>
test   %rbx,%rbx
je     112f <UTIL_freeFileList+0x1f>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @UTIL_freeFileList(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @free(i8* %8)
br label %10
10: ; preds = %7, %2
%11 = load i8**, i8*** %3
%12 = icmp ne i8** %11, null
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i8**, i8*** %3
%15 = bitcast i8** %14 to i8*
%16 = call i32 @free(i8* %15)
br label %17
17: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
define void @UTIL_freeFileList(i8** %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %4, %2
%7 = icmp eq i8** %0, null
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = bitcast i8** %0 to i8*
%10 = tail call i32 @free(i8* %9)
br label %11
11: ; preds = %8, %6
ret void
}
float mul_float(float a, float b) { return a * b; }


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

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

LLVM IR (-O0):
define float @mul_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @mul_float(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
int f(int x) { return 42; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 42
}
void av_utf8_decode() {}


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

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

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

LLVM IR (-O2):
define void @av_utf8_decode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_log_levelv_meta() {
  printf("NOT IMPLEMENTED:"
         "pa_log_levelv_meta"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_log_levelv_meta\00"
define i32 @pa_log_levelv_meta() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void XSyncChangeCounter() {}


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

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

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

LLVM IR (-O2):
define void @XSyncChangeCounter() {
ret void
}
/* Variables and functions */
void pgtrace_add_probe(void) {}


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

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

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

LLVM IR (-O2):
define void @pgtrace_add_probe() {
ret void
}
int _offset_of(const unsigned int val, const unsigned int *buf, int len) {
  while (len-- > 0)
    if (buf[len] == val)
      break;
  return len;
}


x86 assembly (clang, -O0):
<_offset_of>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jle    1140 <_offset_of+0x40>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x4(%rbp),%eax
jne    113b <_offset_of+0x3b>
jmp    1140 <_offset_of+0x40>
jmp    110e <_offset_of+0xe>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_offset_of>:
mov    %edx,%ecx
xor    %eax,%eax
test   %edx,%edx
cmovs  %edx,%eax
add    $0xffffffff,%eax
nopl   0x0(%rax)
test   %ecx,%ecx
jle    1121 <_offset_of+0x21>
add    $0xffffffffffffffff,%rcx
mov    %ecx,%edx
cmp    %edi,(%rsi,%rdx,4)
jne    1110 <_offset_of+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @_offset_of(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
br label %7
7: ; preds = %20, %3
%8 = load i32, i32* %6
%9 = add nsw i32 %8, -1
store i32 %9, i32* %6
%10 = icmp sgt i32 %8, 0
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32*, i32** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %4
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %11
br label %21
20: ; preds = %11
br label %7
21: ; preds = %19, %7
%22 = load i32, i32* %6
ret i32 %22
}

LLVM IR (-O2):
define i32 @_offset_of(i32 %0, i32* nocapture %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = call i32 @llvm.smin.i32(i32 %2, i32 0)
%6 = add i32 %5, -1
br label %7
7: ; preds = %12, %3
%8 = phi i64 [ %9, %12 ], [ %4, %3 ]
%9 = add nsw i64 %8, -1
%10 = trunc i64 %8 to i32
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %7
%13 = and i64 %9, 4294967295
%14 = getelementptr inbounds i32, i32* %1, i64 %13
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, %0
br i1 %16, label %17, label %7
17: ; preds = %12
%18 = trunc i64 %9 to i32
br label %19
19: ; preds = %7, %17
%20 = phi i32 [ %18, %17 ], [ %6, %7 ]
ret i32 %20
}
/* Type definitions */
struct udpsrvsession_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int const);
int /*<<< orphan*/ stderr;
int protocol_sendpacket(struct udpsrvsession_s *session, const int type) {
  {
    fprintf(stderr, "Sending packet type %d... (not implemented)", type);
    fflush(stderr);
  };
}


x86 assembly (clang, -O0):
<protocol_sendpacket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<protocol_sendpacket>:
push   %rbx
mov    %esi,%edx
mov    0x2eb6(%rip),%rbx
mov    (%rbx),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
%struct.udpsrvsession_s = type { i32 }
@stderr = global i32 0
@.str = [44 x i8] c"Sending packet type %d... (not implemented)\00"
define i32 @protocol_sendpacket(%struct.udpsrvsession_s* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.udpsrvsession_s*
%5 = alloca i32
store %struct.udpsrvsession_s* %0, %struct.udpsrvsession_s** %4
store i32 %1, i32* %5
%6 = load i32, i32* @stderr
%7 = load i32, i32* %5
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stderr
%10 = call i32 @fflush(i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
%struct.udpsrvsession_s = type { i32 }
@stderr = global i32 0
@.str = [44 x i8] c"Sending packet type %d... (not implemented)\00"
define i32 @protocol_sendpacket(%struct.udpsrvsession_s* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %1)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fflush(i32 %5)
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t __attribute__((const)) lw6sys_imax(int32_t a, int32_t b) {
  return (a > b) ? a : b;
}


x86 assembly (clang, -O0):
<lw6sys_imax>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <lw6sys_imax+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <lw6sys_imax+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw6sys_imax>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @lw6sys_imax(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* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @lw6sys_imax(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ functionPointer();
int /*<<< orphan*/ functionPointerParameter();
int /*<<< orphan*/ returnPointerFunction();
int main() {
  functionPointer();
  functionPointerParameter();
  returnPointerFunction();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <functionPointer@plt>
mov    $0x0,%al
call   1040 <functionPointerParameter@plt>
mov    $0x0,%al
call   1030 <returnPointerFunction@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <functionPointer@plt>
xor    %eax,%eax
call   1040 <functionPointerParameter@plt>
xor    %eax,%eax
call   1030 <returnPointerFunction@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @functionPointer()
%2 = call i32 (...) @functionPointerParameter()
%3 = call i32 (...) @returnPointerFunction()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @functionPointer()
%2 = tail call i32 (...) @functionPointerParameter()
%3 = tail call i32 (...) @returnPointerFunction()
ret i32 0
}
/* Variables and functions */
float floorf(float);
float libm_floorf(float x) { return floorf(x); }


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

x86 assembly (clang, -O2):
<libm_floorf>:
jmp    1030 <floorf@plt>

LLVM IR (-O0):
define float @libm_floorf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.floor.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @libm_floorf(float %0) {
%2 = tail call float @llvm.floor.f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int sub1(int, int);
int main() {
  if (sub1(20, 3) != 66 * sizeof(int))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x14,%edi
mov    $0x3,%esi
call   1040 <sub1@plt>
cltq
cmp    $0x108,%rax
je     1153 <main+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x14,%edi
mov    $0x3,%esi
call   1040 <sub1@plt>
cmp    $0x108,%eax
jne    113b <main+0x1b>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sub1(i32 20, i32 3)
%3 = sext i32 %2 to i64
%4 = icmp ne i64 %3, 264
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sub1(i32 20, i32 3)
%2 = icmp eq i32 %1, 264
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
void *of_malloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<of_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @of_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
double ucastd(uint64_t t) { return *(double *)&t; }


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

x86 assembly (clang, -O2):
<ucastd>:
mov    %edi,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @ucastd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to double*
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
define double @ucastd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to double*
%4 = load double, double* %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ chamber();
void doit() { chamber(); }


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

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

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

LLVM IR (-O2):
define void @doit() {
%1 = tail call i32 (...) @chamber()
ret void
}
/* Variables and functions */
int get_file_size(char const *);
int File_GetNumberOfRecords(const char *FileName, int Record_Len) {
  int size;
  size = get_file_size(FileName);
  if (size == 0)
    return 0;
  if (Record_Len <= 0)
    return 0;
  return (size / Record_Len);
}


x86 assembly (clang, -O0):
<File_GetNumberOfRecords>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <get_file_size@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1141 <File_GetNumberOfRecords+0x31>
movl   $0x0,-0x4(%rbp)
jmp    1161 <File_GetNumberOfRecords+0x51>
cmpl   $0x0,-0x14(%rbp)
jg     1157 <File_GetNumberOfRecords+0x47>
movl   $0x0,-0x4(%rbp)
jmp    1161 <File_GetNumberOfRecords+0x51>
mov    -0x18(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<File_GetNumberOfRecords>:
push   %rbx
mov    %esi,%ebx
call   1030 <get_file_size@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ebx,%ebx
jle    1129 <File_GetNumberOfRecords+0x19>
test   %ecx,%ecx
je     1129 <File_GetNumberOfRecords+0x19>
mov    %ecx,%eax
cltd
idiv   %ebx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @File_GetNumberOfRecords(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = call i32 @get_file_size(i8* %7)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %20
12: ; preds = %2
%13 = load i32, i32* %5
%14 = icmp sle i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 0, i32* %3
br label %20
16: ; preds = %12
%17 = load i32, i32* %6
%18 = load i32, i32* %5
%19 = sdiv i32 %17, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %16, %15, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @File_GetNumberOfRecords(i8* %0, i32 %1) {
%3 = tail call i32 @get_file_size(i8* %0)
%4 = icmp eq i32 %3, 0
%5 = icmp slt i32 %1, 1
%6 = or i1 %5, %4
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = sdiv i32 %3, %1
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ 0, %2 ]
ret i32 %10
}
int execute_tkill() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_tkill() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ record_linux_param_description(char *, char *, char *);
void module_param_desc_low_window(void) {
  record_linux_param_description(
      "tcp_bic.c", "low_window",
      "lower bound on congestion window (for TCP friendliness)");
}


x86 assembly (clang, -O0):
<module_param_desc_low_window>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
lea    0xeec(%rip),%rdx
call   1030 <record_linux_param_description@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_param_desc_low_window>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
lea    0xef0(%rip),%rdx
jmp    1030 <record_linux_param_description@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"tcp_bic.c\00"
@.str.1 = [11 x i8] c"low_window\00"
@.str.2 = [56 x i8] c"lower bound on congestion window (for TCP friendliness)\00"
define void @module_param_desc_low_window() {
%1 = call i32 @record_linux_param_description(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"tcp_bic.c\00"
@.str.1 = [11 x i8] c"low_window\00"
@.str.2 = [56 x i8] c"lower bound on congestion window (for TCP friendliness)\00"
define void @module_param_desc_low_window() {
%1 = tail call i32 @record_linux_param_description(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0))
ret void
}
double EDDfabs(double x) { return (0.); }


x86 assembly (clang, -O0):
<EDDfabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @EDDfabs(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @EDDfabs(double %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int file_exists(char *file) { return (access(file, F_OK) == 0); }


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

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @file_exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @F_OK
%5 = call i64 @access(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @file_exists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ waitForInterrupt(int, int);
void *interrupt(void *param) {
  while (1) {
    if (waitForInterrupt(1, 1000) > 0) {
      printf("interrupt\n");
    } else {
      printf("timeout\n");
    }
  }
}


x86 assembly (clang, -O0):
<interrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x3e8,%esi
call   1040 <waitForInterrupt@plt>
cmp    $0x0,%rax
jle    1156 <interrupt+0x36>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    1162 <interrupt+0x42>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    112c <interrupt+0xc>

x86 assembly (clang, -O2):
<interrupt>:
push   %r14
push   %rbx
push   %rax
lea    0xedd(%rip),%r14
lea    0xece(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%edi
mov    $0x3e8,%esi
call   1040 <waitForInterrupt@plt>
test   %rax,%rax
mov    %rbx,%rdi
cmovg  %r14,%rdi
call   1030 <puts@plt>
jmp    1140 <interrupt+0x20>

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

LLVM IR (-O2):
@str = [8 x i8] c"timeout\00"
@str.2 = [10 x i8] c"interrupt\00"
define noalias i8* @interrupt(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i64 @waitForInterrupt(i32 1, i32 1000)
%4 = icmp sgt i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
br label %2
}
/* Variables and functions */
int mkdir(char const *, int);
__attribute__((visibility("default"))) int httplib_mkdir(const char *path,
                                                         int mode) {
  return mkdir(path, mode);
}


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

x86 assembly (clang, -O2):
<httplib_mkdir>:
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @httplib_mkdir(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @mkdir(i8* %0, i32 %1)
ret i32 %3
}