xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void eloop_wait_for_read_sock(int sock) {
  fd_set rfds;
  if (sock < 0)
    return;
  FD_ZERO(&rfds);
  FD_SET(sock, &rfds);
  select(sock + 1, &rfds, NULL, NULL, NULL);
}


x86 assembly (clang, -O0):
<eloop_wait_for_read_sock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    114a <eloop_wait_for_read_sock+0x1a>
jmp    1179 <eloop_wait_for_read_sock+0x49>
lea    -0x8(%rbp),%rdi
call   1030 <FD_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <FD_SET@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
lea    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
mov    %r8,%rcx
call   1040 <select@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eloop_wait_for_read_sock>:
test   %edi,%edi
js     116c <eloop_wait_for_read_sock+0x3c>
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1030 <FD_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <FD_SET@plt>
add    $0x1,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <select@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @eloop_wait_for_read_sock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %14
7: ; preds = %1
%8 = call i32 @FD_ZERO(i32* %3)
%9 = load i32, i32* %2
%10 = call i32 @FD_SET(i32 %9, i32* %3)
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
%13 = call i32 @select(i32 %12, i32* %3, i32* null, i32* null, i32* null)
br label %14
14: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
define void @eloop_wait_for_read_sock(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = icmp slt i32 %0, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = call i32 @FD_ZERO(i32* %2)
%7 = call i32 @FD_SET(i32 %0, i32* %2)
%8 = add nuw nsw i32 %0, 1
%9 = call i32 @select(i32 %8, i32* %2, i32* null, i32* null, i32* null)
br label %10
10: ; preds = %1, %5
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t __attribute__((always_)) arith_shift_right(int32_t x, int shift) {
  if (x >= 0)
    return x << shift;
  return ~((~x) << shift);
}


x86 assembly (clang, -O0):
<arith_shift_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1124 <arith_shift_right+0x24>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
jmp    1135 <arith_shift_right+0x35>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arith_shift_right>:
mov    %esi,%ecx
mov    %edi,%edx
shl    %cl,%edx
mov    %edi,%eax
not    %eax
shl    %cl,%eax
test   %edi,%edi
not    %eax
cmovns %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @arith_shift_right(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, -1
%4 = shl i32 %0, %1
%5 = xor i32 %0, -1
%6 = shl i32 %5, %1
%7 = xor i32 %6, -1
%8 = select i1 %3, i32 %4, i32 %7
ret i32 %8
}
long calculate_num_patterns(signed char *module_header) {
  long num_patterns, order_entry, pattern;
  num_patterns = 0;
  for (pattern = 0; pattern < 128; pattern++) {
    order_entry = module_header[952 + pattern] & 0x7F;
    if (order_entry >= num_patterns)
      num_patterns = order_entry + 1;
  }
  return num_patterns;
}


x86 assembly (clang, -O0):
<calculate_num_patterns>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x80,-0x20(%rbp)
jge    1172 <calculate_num_patterns+0x72>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
add    $0x3b8,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0x7f,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jl     115c <calculate_num_patterns+0x5c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1161 <calculate_num_patterns+0x61>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1118 <calculate_num_patterns+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_num_patterns>:
xor    %ecx,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x3b8(%rdi,%rcx,1),%edx
and    $0x7f,%edx
lea    0x1(%rdx),%rsi
cmp    %rdx,%rax
cmovg  %rax,%rsi
movzbl 0x3b9(%rdi,%rcx,1),%edx
and    $0x7f,%edx
lea    0x1(%rdx),%rax
cmp    %rdx,%rsi
cmovg  %rsi,%rax
add    $0x2,%rcx
cmp    $0x80,%rcx
jne    1110 <calculate_num_patterns+0x10>
ret

LLVM IR (-O0):
define i64 @calculate_num_patterns(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
store i64 0, i64* %5
br label %6
6: ; preds = %25, %1
%7 = load i64, i64* %5
%8 = icmp slt i64 %7, 128
br i1 %8, label %9, label %28
9: ; preds = %6
%10 = load i8*, i8** %2
%11 = load i64, i64* %5
%12 = add nsw i64 952, %11
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = and i32 %15, 127
%17 = sext i32 %16 to i64
store i64 %17, i64* %4
%18 = load i64, i64* %4
%19 = load i64, i64* %3
%20 = icmp sge i64 %18, %19
br i1 %20, label %21, label %24
21: ; preds = %9
%22 = load i64, i64* %4
%23 = add nsw i64 %22, 1
store i64 %23, i64* %3
br label %24
24: ; preds = %21, %9
br label %25
25: ; preds = %24
%26 = load i64, i64* %5
%27 = add nsw i64 %26, 1
store i64 %27, i64* %5
br label %6
28: ; preds = %6
%29 = load i64, i64* %3
ret i64 %29
}

LLVM IR (-O2):
define i64 @calculate_num_patterns(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %21, %2 ]
%4 = phi i64 [ 0, %1 ], [ %20, %2 ]
%5 = add nuw nsw i64 %3, 952
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = and i8 %7, 127
%9 = zext i8 %8 to i64
%10 = icmp sgt i64 %4, %9
%11 = add nuw nsw i64 %9, 1
%12 = select i1 %10, i64 %4, i64 %11
%13 = add nuw nsw i64 %3, 953
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = and i8 %15, 127
%17 = zext i8 %16 to i64
%18 = icmp sgt i64 %12, %17
%19 = add nuw nsw i64 %17, 1
%20 = select i1 %18, i64 %12, i64 %19
%21 = add nuw nsw i64 %3, 2
%22 = icmp eq i64 %21, 128
br i1 %22, label %23, label %2
23: ; preds = %2
ret i64 %20
}
/* Variables and functions */
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void snail_cnt_reset(void) {
  mbus_remote_register_write(0x3, 0x01,
                             ((0 << 13) | (20 << 5) | (0 << 4) | (9)));
}


x86 assembly (clang, -O0):
<snail_cnt_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x289,%edx
call   1030 <mbus_remote_register_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<snail_cnt_reset>:
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x289,%edx
jmp    1030 <mbus_remote_register_write@plt>

LLVM IR (-O0):
define void @snail_cnt_reset() {
%1 = call i32 @mbus_remote_register_write(i32 3, i32 1, i32 649)
ret void
}

LLVM IR (-O2):
define void @snail_cnt_reset() {
%1 = tail call i32 @mbus_remote_register_write(i32 3, i32 1, i32 649)
ret void
}
/* Variables and functions */
int git_os_error();
int open(char const *, int);
int gitfo_open(const char *path, int flags) {
  int fd = open(path, flags | 0);
  return fd >= 0 ? fd : git_os_error();
}


x86 assembly (clang, -O0):
<gitfo_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
or     $0x0,%esi
call   1040 <open@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1156 <gitfo_open+0x36>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1160 <gitfo_open+0x40>
mov    $0x0,%al
call   1030 <git_os_error@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gitfo_open>:
push   %rax
call   1040 <open@plt>
test   %eax,%eax
js     112c <gitfo_open+0xc>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <git_os_error@plt>

LLVM IR (-O0):
define i32 @gitfo_open(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = or i32 %7, 0
%9 = call i32 @open(i8* %6, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %5
br label %16
14: ; preds = %2
%15 = call i32 (...) @git_os_error()
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @gitfo_open(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp sgt i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @git_os_error()
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ %3, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void echo_progress(unsigned char data) {
  if (data == 0xff) {
    printf(".");
    fflush(stdout);
  }
}


x86 assembly (clang, -O0):
<echo_progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0xff,%eax
jne    1157 <echo_progress+0x37>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_progress>:
cmp    $0xff,%dil
je     1127 <echo_progress+0x7>
ret
push   %rax
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
@stdout = global i32 0
define void @echo_progress(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp eq i32 %4, 255
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @echo_progress(i8 zeroext %0) {
%2 = icmp eq i8 %0, -1
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @putchar(i32 46)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
br label %7
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sockets_initialize();
int /*<<< orphan*/ useSockets();
void test1(int x) {
  if (x > 3) {
    sockets_initialize();
  }
  useSockets();
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    113c <test1+0x1c>
mov    $0x0,%al
call   1030 <sockets_initialize@plt>
mov    $0x0,%al
call   1040 <useSockets@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
cmp    $0x4,%edi
jl     1131 <test1+0x11>
push   %rax
xor    %eax,%eax
call   1030 <sockets_initialize@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1040 <useSockets@plt>

LLVM IR (-O0):
define void @test1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @sockets_initialize()
br label %7
7: ; preds = %5, %1
%8 = call i32 (...) @useSockets()
ret void
}

LLVM IR (-O2):
define void @test1(i32 %0) {
%2 = icmp sgt i32 %0, 3
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @sockets_initialize()
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @useSockets()
ret void
}
/* Variables and functions */
double _lgamma(double);
double lgamma(double x) { return _lgamma(x); }


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

x86 assembly (clang, -O2):
<lgamma>:
jmp    1030 <_lgamma@plt>

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

LLVM IR (-O2):
define double @lgamma(double %0) {
%2 = tail call double @_lgamma(double %0)
ret double %2
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char const *, struct stat *);
int getFileSize(const char *path) {
  struct stat st;
  stat(path, &st);
  return st.st_size;
}


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

x86 assembly (clang, -O2):
<getFileSize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @getFileSize(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @getFileSize(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mysamplefunction(int /*<<< orphan*/ const *, size_t);
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
  (void)mysamplefunction(Data, Size);
  return 0;
}


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

x86 assembly (clang, -O2):
<LLVMFuzzerTestOneInput>:
push   %rax
call   1030 <mysamplefunction@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @LLVMFuzzerTestOneInput(i32* %0, i64 %1) {
%3 = tail call i32 @mysamplefunction(i32* %0, i64 %1)
ret i32 0
}
/* Variables and functions */
double exp(double);
double gaussian(double x, double width) {
  return exp(-x * x / 2 / width / width);
}


x86 assembly (clang, -O0):
<gaussian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xeb5(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x10(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gaussian>:
mulsd  %xmm0,%xmm0
mulsd  0xee4(%rip),%xmm0
divsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @gaussian(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fneg double %5
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = fdiv double %8, 2.000000e+00
%10 = load double, double* %4
%11 = fdiv double %9, %10
%12 = load double, double* %4
%13 = fdiv double %11, %12
%14 = call double @exp(double %13)
ret double %14
}

LLVM IR (-O2):
define double @gaussian(double %0, double %1) {
%3 = fneg double %0
%4 = fmul double %3, %0
%5 = fmul double %4, 5.000000e-01
%6 = fdiv double %5, %1
%7 = fdiv double %6, %1
%8 = tail call double @exp(double %7)
ret double %8
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t dec2bcd(uint8_t decval) { return ((decval / 10) * 16 + (decval % 10)); }


x86 assembly (clang, -O0):
<dec2bcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%eax
add    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec2bcd>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x4,%edx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @dec2bcd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = mul nsw i32 %4, 16
%6 = load i32, i32* %2
%7 = srem i32 %6, 10
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @dec2bcd(i32 %0) {
%2 = sdiv i32 %0, 10
%3 = shl nsw i32 %2, 4
%4 = srem i32 %0, 10
%5 = add nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) {
  double i = 20.0;
  double j = i / 7.0;
  if (j * 7.0 == i)
    printf("equal. \n");
  else
    printf("unequal . \n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xebd(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
jne    116a <main+0x5a>
jp     116a <main+0x5a>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    1176 <main+0x66>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"equal. \0A\00"
@.str.1 = [12 x i8] c"unequal . \0A\00"
define void @main() {
%1 = alloca double
%2 = alloca double
store double 2.000000e+01, double* %1
%3 = load double, double* %1
%4 = fdiv double %3, 7.000000e+00
store double %4, double* %2
%5 = load double, double* %2
%6 = fmul double %5, 7.000000e+00
%7 = load double, double* %1
%8 = fcmp oeq double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"equal. \00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void fatal(const char *s) {
  printf("\n");
  printf("  Error: %s\n", s);
  printf("\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [13 x i8] c" Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c" Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @putchar(i32 10)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int _to_x(char *, int /*<<< orphan*/, int, int);
int _to_udec(char *buf, uint32_t value, int precision) {
  return _to_x(buf, value, 10, precision);
}


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

x86 assembly (clang, -O2):
<_to_udec>:
mov    %edx,%ecx
mov    $0xa,%edx
jmp    1030 <_to_x@plt>

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

LLVM IR (-O2):
define i32 @_to_udec(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @_to_x(i8* %0, i32 %1, i32 10, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(unsigned int);
int main(void) {
  unsigned int x = 10;
  while (x >= 10) {
    x += 2;
  }
  __VERIFIER_assert(x % 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jb     113e <main+0x2e>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%edi
and    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
void rop3_234_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_234_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%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    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_234_1_0(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* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = or i32 %27, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_234_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
/* Variables and functions */
int binsrch_aux(int *, int, int /*<<< orphan*/, int);
int binsrch(int x[], int t, int n) { return binsrch_aux(x, t, 0, n - 1); }


x86 assembly (clang, -O0):
<binsrch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <binsrch_aux@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binsrch>:
lea    -0x1(%rdx),%ecx
xor    %edx,%edx
jmp    1030 <binsrch_aux@plt>

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

LLVM IR (-O2):
define i32 @binsrch(i32* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = tail call i32 @binsrch_aux(i32* %0, i32 %1, i32 0, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ LoadCode();
int /*<<< orphan*/ eword();
int /*<<< orphan*/ program();
int main(int argc, char *argv[]) {
  LoadCode();
  eword();
  program();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <LoadCode@plt>
mov    $0x0,%al
call   1050 <eword@plt>
mov    $0x0,%al
call   1040 <program@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @LoadCode()
%6 = call i32 (...) @eword()
%7 = call i32 (...) @program()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @LoadCode()
%4 = tail call i32 (...) @eword()
%5 = tail call i32 (...) @program()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char const *);
void err(const char *msg) {
  printf(msg);
  printf("------- End Median Maintanence -------\n");
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<err>:
push   %rax
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"------- End Median Maintanence -------\0A\00"
@EXIT_FAILURE = global i32 0
define void @err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [39 x i8] c"------- End Median Maintanence -------\00"
define void @err(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void MAC_LTE_PCAP_Close(FILE *fd) { fclose(fd); }


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

x86 assembly (clang, -O2):
<MAC_LTE_PCAP_Close>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @MAC_LTE_PCAP_Close(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret void
}
void reset_tty(void) {}


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

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

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

LLVM IR (-O2):
define void @reset_tty() {
ret void
}
void gtk_file_selection_complete() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_selection_complete() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void qemu_vfree(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<qemu_vfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @qemu_vfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void blk_mq_debugfs_register_rqos(struct rq_qos *rqos) {}


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

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

LLVM IR (-O0):
%struct.rq_qos = type opaque
define void @blk_mq_debugfs_register_rqos(%struct.rq_qos* %0) {
%2 = alloca %struct.rq_qos*
store %struct.rq_qos* %0, %struct.rq_qos** %2
ret void
}

LLVM IR (-O2):
%struct.rq_qos = type opaque
define void @blk_mq_debugfs_register_rqos(%struct.rq_qos* nocapture %0) {
ret void
}
int test_imm_B1uint16_mem(unsigned short *val) {
  return ((*val) & (-0xB1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B1uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff4f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B1uint16_mem>:
movzwl (%rdi),%eax
test   $0xff4f,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B1uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -177
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
unsigned int IntegrityAndCorrectCheck(char const *);
unsigned int DecodeAntennaChk(const char *pStr, char *AntSts) {
  unsigned int errCode = 0;
  if (errCode = IntegrityAndCorrectCheck(pStr)) {
    return errCode;
  }
  pStr += 7;
  *AntSts = (unsigned char)(*pStr);
  return errCode;
}


x86 assembly (clang, -O0):
<DecodeAntennaChk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <IntegrityAndCorrectCheck@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1147 <DecodeAntennaChk+0x37>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <DecodeAntennaChk+0x55>
mov    -0x10(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DecodeAntennaChk>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <IntegrityAndCorrectCheck@plt>
test   %eax,%eax
jne    1129 <DecodeAntennaChk+0x19>
mov    0x7(%rbx),%cl
mov    %cl,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @DecodeAntennaChk(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @IntegrityAndCorrectCheck(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 7
%7 = load i8, i8* %6
store i8 %7, i8* %1
br label %8
8: ; preds = %2, %5
ret i32 %3
}
int extrait_N_de_PDUcrq(char *pdu) {
  unsigned char high = pdu[1];
  unsigned char low = pdu[2];
  unsigned int p = (high << 8) | low;
  return (p);
}


x86 assembly (clang, -O0):
<extrait_N_de_PDUcrq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
shl    $0x8,%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extrait_N_de_PDUcrq>:
movzwl 0x1(%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

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

LLVM IR (-O2):
define i32 @extrait_N_de_PDUcrq(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = getelementptr inbounds i8, i8* %0, i64 2
%5 = load i8, i8* %4
%6 = zext i8 %3 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = zext i8 %5 to i32
%9 = or i32 %7, %8
ret i32 %9
}
/* Variables and functions */
int cos(double);
int cosh(double const);
int sinh(double const);
double OmegaExp(const double k, const double eta) {
  return -0.5 *
         (1 + sinh(eta) / (cosh(eta) - cos(6.283185307179586476925 * k)));
}


x86 assembly (clang, -O0):
<OmegaExp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sinh@plt>
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cosh@plt>
mov    %eax,-0x18(%rbp)
movsd  0xea4(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1050 <cos@plt>
mov    -0x18(%rbp),%ecx
mov    %eax,%edx
mov    -0x14(%rbp),%eax
sub    %edx,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe76(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OmegaExp>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
movaps %xmm1,%xmm0
call   1030 <sinh@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   1040 <cosh@plt>
mov    %eax,%ebp
movsd  0x10(%rsp),%xmm0
mulsd  0xe99(%rip),%xmm0
call   1050 <cos@plt>
sub    %eax,%ebp
mov    %ebx,%eax
cltd
idiv   %ebp
add    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe83(%rip),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @OmegaExp(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = call i32 @sinh(double %5)
%7 = load double, double* %4
%8 = call i32 @cosh(double %7)
%9 = load double, double* %3
%10 = fmul double 0x401921FB54442D18, %9
%11 = call i32 @cos(double %10)
%12 = sub nsw i32 %8, %11
%13 = sdiv i32 %6, %12
%14 = add nsw i32 1, %13
%15 = sitofp i32 %14 to double
%16 = fmul double -5.000000e-01, %15
ret double %16
}

LLVM IR (-O2):
define double @OmegaExp(double %0, double %1) {
%3 = tail call i32 @sinh(double %1)
%4 = tail call i32 @cosh(double %1)
%5 = fmul double %0, 0x401921FB54442D18
%6 = tail call i32 @cos(double %5)
%7 = sub nsw i32 %4, %6
%8 = sdiv i32 %3, %7
%9 = add nsw i32 %8, 1
%10 = sitofp i32 %9 to double
%11 = fmul double %10, -5.000000e-01
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ strlcpy(char *, char *, int);
void f1() {
  char overlap[] = "123456789";
  strlcpy(overlap, overlap + 1, 3);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xede(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xa(%rbp),%rdi
lea    -0xa(%rbp),%rsi
add    $0x1,%rsi
mov    $0x3,%edx
call   1030 <strlcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
sub    $0x18,%rsp
movabs $0x3837363534333231,%rax
36 37 38
mov    %rax,0x8(%rsp)
movw   $0x39,0x10(%rsp)
lea    0x9(%rsp),%rsi
lea    0x8(%rsp),%rdi
mov    $0x3,%edx
call   1030 <strlcpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f1.overlap = [10 x i8] c"123456789\00"
define void @f1() {
%1 = alloca [10 x i8]
%2 = bitcast [10 x i8]* %1 to i8*
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = call i32 @strlcpy(i8* %3, i8* %5, i32 3)
ret void
}

LLVM IR (-O2):
@__const.f1.overlap = [10 x i8] c"123456789\00"
define void @f1() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 1
%4 = call i32 @strlcpy(i8* %2, i8* %3, i32 3)
ret void
}
double at_perlin_get_2d(struct at_perlin *per, double x, double y) {
  return 0.0;
}


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

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

LLVM IR (-O0):
%struct.at_perlin = type opaque
define double @at_perlin_get_2d(%struct.at_perlin* %0, double %1, double %2) {
%4 = alloca %struct.at_perlin*
%5 = alloca double
%6 = alloca double
store %struct.at_perlin* %0, %struct.at_perlin** %4
store double %1, double* %5
store double %2, double* %6
ret double 0.000000e+00
}

LLVM IR (-O2):
%struct.at_perlin = type opaque
define double @at_perlin_get_2d(%struct.at_perlin* nocapture readnone %0, double %1, double %2) {
ret double 0.000000e+00
}
void skeleton_prepare() {}


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

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

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

LLVM IR (-O2):
define void @skeleton_prepare() {
ret void
}
/* Variables and functions */
unsigned char *loadfile2(char *, unsigned long *);
unsigned char *loadfile1(char *filename) {
  unsigned long unused;
  return loadfile2(filename, &unused);
}


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

x86 assembly (clang, -O2):
<loadfile1>:
push   %rax
mov    %rsp,%rsi
call   1030 <loadfile2@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @loadfile1(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i8* @loadfile2(i8* %0, i64* %2)
ret i8* %4
}
struct fsd *file2fsd(fname)
int fname;
{
  charsin(fname, 0, 0);
  return temp2fsd(fname);
}


x86 assembly (clang, -O0):
<file2fsd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <charsin@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <temp2fsd@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file2fsd>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <charsin@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <temp2fsd@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
%struct.fsd = type opaque
define %struct.fsd* @file2fsd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @charsin to i32 (i32, i32, i32, ...)*)(i32 %3, i32 0, i32 0)
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @temp2fsd to i32 (i32, ...)*)(i32 %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to %struct.fsd*
ret %struct.fsd* %8
}

LLVM IR (-O2):
%struct.fsd = type opaque
define %struct.fsd* @file2fsd(i32 %0) {
%2 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @charsin to i32 (i32, i32, i32, ...)*)(i32 %0, i32 0, i32 0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @temp2fsd to i32 (i32, ...)*)(i32 %0)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.fsd*
ret %struct.fsd* %5
}
/* Variables and functions */
int xor_gen_base(int, int, void **);
int xor_gen(int vects, int len, void **array) {
  return xor_gen_base(vects, len, array);
}


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

x86 assembly (clang, -O2):
<xor_gen>:
jmp    1030 <xor_gen_base@plt>

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

LLVM IR (-O2):
define i32 @xor_gen(i32 %0, i32 %1, i8** %2) {
%4 = tail call i32 @xor_gen_base(i32 %0, i32 %1, i8** %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ TIOCMGET;
int /*<<< orphan*/ TIOCMSET;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
int put_mlines(int fd, int lineset) {
  ioctl(fd, TIOCMSET, &lineset);
  ioctl(fd, TIOCMGET, &lineset);
  return (lineset);
}


x86 assembly (clang, -O0):
<put_mlines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x4(%rbp),%edi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_mlines>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %esi,0x4(%rsp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%r14
mov    %r14,%rdx
call   1030 <ioctl@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    %r14,%rdx
call   1030 <ioctl@plt>
mov    0x4(%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@TIOCMSET = global i32 0
@TIOCMGET = global i32 0
define i32 @put_mlines(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @TIOCMSET
%7 = call i32 @ioctl(i32 %5, i32 %6, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* @TIOCMGET
%10 = call i32 @ioctl(i32 %8, i32 %9, i32* %4)
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
@TIOCMSET = global i32 0
@TIOCMGET = global i32 0
define i32 @put_mlines(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @TIOCMSET
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %3)
%6 = load i32, i32* @TIOCMGET
%7 = call i32 @ioctl(i32 %0, i32 %6, i32* %3)
%8 = load i32, i32* %3
ret i32 %8
}
void DestroyCDistList(Schema, A) struct univStruct *Schema;
struct Teacher **A;
{
}


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

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

LLVM IR (-O0):
%struct.univStruct = type opaque
%struct.Teacher = type opaque
define void @DestroyCDistList(%struct.univStruct* %0, %struct.Teacher** %1) {
%3 = alloca %struct.univStruct*
%4 = alloca %struct.Teacher**
store %struct.univStruct* %0, %struct.univStruct** %3
store %struct.Teacher** %1, %struct.Teacher*** %4
ret void
}

LLVM IR (-O2):
%struct.univStruct = type opaque
%struct.Teacher = type opaque
define void @DestroyCDistList(%struct.univStruct* nocapture %0, %struct.Teacher** nocapture %1) {
ret void
}
/* Variables and functions */
double cos(double);
double test(double f) { return cos(f); }


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @test(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
void swicths(void) {}


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

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

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

LLVM IR (-O2):
define void @swicths() {
ret void
}