xunge/DecIR huggingface dataset:
/* Variables and functions */
double __dsind(double);
double intr_wrap_066(double p1) { return __dsind(p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_066>:
jmp    1030 <__dsind@plt>

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

LLVM IR (-O2):
define double @intr_wrap_066(double %0) {
%2 = tail call double @__dsind(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
void rte_mov64(uint8_t *dst, const uint8_t *src) { memcpy(dst, src, 64); }


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

x86 assembly (clang, -O2):
<rte_mov64>:
mov    $0x40,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @rte_mov64(i32* %0, i32* %1) {
%3 = tail call i32 @memcpy(i32* %0, i32* %1, i32 64)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int const, int const, int);
uint16_t ReadUint16LE(const uint8_t *data) {
  assert(data != NULL);
  uint16_t le = data[0] << 0 | data[1] << 8;
  printf("R 16 LE: \"0x%02x%02x\" -> 0x%04x\n", data[0], data[1], le);
  return le;
}


x86 assembly (clang, -O0):
<ReadUint16LE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x0,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0xc(%rbp),%ecx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadUint16LE>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    (%rbx),%esi
mov    0x4(%rbx),%edx
mov    %edx,%ebx
shl    $0x8,%ebx
or     %esi,%ebx
lea    0xebb(%rip),%rdi
mov    %ebx,%ecx
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"R 16 LE: \220x%02x%02x\22 -> 0x%04x\0A\00"
define i32 @ReadUint16LE(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = shl i32 %10, 0
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
store i32 %16, i32* %3
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 0
%19 = load i32, i32* %18
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i64 1
%22 = load i32, i32* %21
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %22, i32 %23)
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [33 x i8] c"R 16 LE: \220x%02x%02x\22 -> 0x%04x\0A\00"
define i32 @ReadUint16LE(i32* %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i32, i32* %0
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = shl i32 %7, 8
%9 = or i32 %8, %5
%10 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7, i32 %9)
ret i32 %9
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int runtime_gettimeofday(struct timeval *tv) { return gettimeofday(tv, NULL); }


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

x86 assembly (clang, -O2):
<runtime_gettimeofday>:
xor    %esi,%esi
jmp    1030 <gettimeofday@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @runtime_gettimeofday(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
ret i32 %4
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @runtime_gettimeofday(%struct.timeval* nocapture %0) {
%2 = tail call i32 @gettimeofday(%struct.timeval* %0, i32* null)
ret i32 %2
}
/* Type definitions */
struct world_allocator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ assert(struct world_allocator *);
void *calloc(size_t, size_t);
int /*<<< orphan*/ perror(char *);
void *world_allocator_calloc(struct world_allocator *a, size_t count,
                             size_t size) {
  assert(a);
  void *p = calloc(count, size);
  if (p == NULL) {
    perror("calloc");
    abort();
  }
  return p;
}


x86 assembly (clang, -O0):
<world_allocator_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    118c <world_allocator_calloc+0x4c>
lea    0xe80(%rip),%rdi
call   1060 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<world_allocator_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <calloc@plt>
test   %rax,%rax
je     1167 <world_allocator_calloc+0x27>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe92(%rip),%rdi
call   1060 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.world_allocator = type { i32 }
@.str = [7 x i8] c"calloc\00"
define i8* @world_allocator_calloc(%struct.world_allocator* %0, i64 %1, i64 %2) {
%4 = alloca %struct.world_allocator*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store %struct.world_allocator* %0, %struct.world_allocator** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load %struct.world_allocator*, %struct.world_allocator** %4
%9 = call i32 @assert(%struct.world_allocator* %8)
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = call i8* @calloc(i64 %10, i64 %11)
store i8* %12, i8** %7
%13 = load i8*, i8** %7
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %18
15: ; preds = %3
%16 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %3
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
%struct.world_allocator = type { i32 }
@.str = [7 x i8] c"calloc\00"
define noalias i8* @world_allocator_calloc(%struct.world_allocator* %0, i64 %1, i64 %2) {
%4 = tail call i32 @assert(%struct.world_allocator* %0)
%5 = tail call i8* @calloc(i64 %1, i64 %2)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %3
ret i8* %5
}
long double(cimagl)(long double _Complex x) { return __builtin_cimagl(x); }


x86 assembly (clang, -O0):
<cimagl>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cimagl>:
fldt   0x18(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @cimagl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @cimagl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%3 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %3
}
int s_StateCmp(const void *s1, const void *s2) {
  int *np1, *np2;
  np1 = (int *)s1;
  np2 = (int *)s2;
  return (*np2 - *np1);
}


x86 assembly (clang, -O0):
<s_StateCmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @s_StateCmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @s_StateCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ toupper(char);
void alltoupper(char *s) {
  while (*s != 0)
    *s++ = toupper(*s);
}


x86 assembly (clang, -O0):
<alltoupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <alltoupper+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    111c <alltoupper+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alltoupper>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <alltoupper+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <alltoupper+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @alltoupper(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @toupper(i8 signext %10)
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
store i8 %12, i8* %13
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @alltoupper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = tail call i32 @toupper(i8 signext %5)
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %8, i8* %6
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int sigsegv_fn(void) { return *(int *)NULL; }


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

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

LLVM IR (-O0):
define i32 @sigsegv_fn() {
%1 = load i32, i32* null
ret i32 %1
}

LLVM IR (-O2):
define i32 @sigsegv_fn() {
ret i32 undef
}
const char *str_expr_sizeof() { return "sizeof/typeof/alignof"; }


x86 assembly (clang, -O0):
<str_expr_sizeof>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_expr_sizeof>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"sizeof/typeof/alignof\00"
define i8* @str_expr_sizeof() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"sizeof/typeof/alignof\00"
define i8* @str_expr_sizeof() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  char *private_data;
};
typedef TYPE_1__ XExtData;

/* Variables and functions */
void set_XExtData_private_data(void *_p, void *_v) {
  ((XExtData *)_p)->private_data = (char *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i8* }
define void @set_XExtData_private_data(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i8* %5, i8** %8
ret void
}

LLVM IR (-O2):
define void @set_XExtData_private_data(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ReadNumber(int /*<<< orphan*/ *, int *);
char ReadWhiteSpace(int /*<<< orphan*/ *);
int /*<<< orphan*/ nc_error(char *);
void ReadCoordinates(FILE *file, int *x, int *y) {
  ReadNumber(file, x);
  if (ReadWhiteSpace(file) != '@')
    nc_error("ReadCoordinates: '@' expected");
  ReadNumber(file, y);
}


x86 assembly (clang, -O0):
<ReadCoordinates>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ReadNumber@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ReadWhiteSpace@plt>
movsbl %al,%eax
cmp    $0x40,%eax
je     1172 <ReadCoordinates+0x42>
lea    0xe93(%rip),%rdi
call   1050 <nc_error@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <ReadNumber@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadCoordinates>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1040 <ReadNumber@plt>
mov    %rbx,%rdi
call   1030 <ReadWhiteSpace@plt>
cmp    $0x40,%al
je     1157 <ReadCoordinates+0x27>
lea    0xeae(%rip),%rdi
call   1050 <nc_error@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <ReadNumber@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"ReadCoordinates: '@' expected\00"
define void @ReadCoordinates(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 = call i32 @ReadNumber(i32* %7, i32* %8)
%10 = load i32*, i32** %4
%11 = call signext i8 @ReadWhiteSpace(i32* %10)
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 64
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 @nc_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %3
%17 = load i32*, i32** %4
%18 = load i32*, i32** %6
%19 = call i32 @ReadNumber(i32* %17, i32* %18)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"ReadCoordinates: '@' expected\00"
define void @ReadCoordinates(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @ReadNumber(i32* %0, i32* %1)
%5 = tail call signext i8 @ReadWhiteSpace(i32* %0)
%6 = icmp eq i8 %5, 64
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @nc_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %3
%10 = tail call i32 @ReadNumber(i32* %0, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ THError(char *);
void checkerr(int status) {
  if (status)
    THError("cudnn call failed");
}


x86 assembly (clang, -O0):
<checkerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1131 <checkerr+0x21>
lea    0xed4(%rip),%rdi
call   1030 <THError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkerr>:
test   %edi,%edi
je     1120 <checkerr+0x10>
lea    0xee5(%rip),%rdi
jmp    1030 <THError@plt>
ret

LLVM IR (-O0):
@.str = [18 x i8] c"cudnn call failed\00"
define void @checkerr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @THError(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"cudnn call failed\00"
define void @checkerr(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @THError(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
struct uwsgi_lock_item {
  int dummy;
};

/* Variables and functions */
struct uwsgi_lock_item *uwsgi_lock_ipcsem_init(char *);
struct uwsgi_lock_item *uwsgi_rwlock_ipcsem_init(char *id) {
  return uwsgi_lock_ipcsem_init(id);
}


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

x86 assembly (clang, -O2):
<uwsgi_rwlock_ipcsem_init>:
jmp    1030 <uwsgi_lock_ipcsem_init@plt>

LLVM IR (-O0):
%struct.uwsgi_lock_item = type { i32 }
define %struct.uwsgi_lock_item* @uwsgi_rwlock_ipcsem_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.uwsgi_lock_item* @uwsgi_lock_ipcsem_init(i8* %3)
ret %struct.uwsgi_lock_item* %4
}

LLVM IR (-O2):
%struct.uwsgi_lock_item = type { i32 }
define %struct.uwsgi_lock_item* @uwsgi_rwlock_ipcsem_init(i8* %0) {
%2 = tail call %struct.uwsgi_lock_item* @uwsgi_lock_ipcsem_init(i8* %0)
ret %struct.uwsgi_lock_item* %2
}
/* Type definitions */
struct core_instr_params {
  int dummy;
};
struct core_cpu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ core_cpu_i__call(struct core_cpu *,
                                    struct core_instr_params *, int);
void core_cpu_i_op_cn(struct core_cpu *cpu, struct core_instr_params *p) {
  core_cpu_i__call(cpu, p, 0x08);
}


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

x86 assembly (clang, -O2):
<core_cpu_i_op_cn>:
mov    $0x8,%edx
jmp    1030 <core_cpu_i__call@plt>

LLVM IR (-O0):
%struct.core_cpu = type { i32 }
%struct.core_instr_params = type { i32 }
define void @core_cpu_i_op_cn(%struct.core_cpu* %0, %struct.core_instr_params* %1) {
%3 = alloca %struct.core_cpu*
%4 = alloca %struct.core_instr_params*
store %struct.core_cpu* %0, %struct.core_cpu** %3
store %struct.core_instr_params* %1, %struct.core_instr_params** %4
%5 = load %struct.core_cpu*, %struct.core_cpu** %3
%6 = load %struct.core_instr_params*, %struct.core_instr_params** %4
%7 = call i32 @core_cpu_i__call(%struct.core_cpu* %5, %struct.core_instr_params* %6, i32 8)
ret void
}

LLVM IR (-O2):
%struct.core_cpu = type { i32 }
%struct.core_instr_params = type { i32 }
define void @core_cpu_i_op_cn(%struct.core_cpu* %0, %struct.core_instr_params* %1) {
%3 = tail call i32 @core_cpu_i__call(%struct.core_cpu* %0, %struct.core_instr_params* %1, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add(size_t, int /*<<< orphan*/);
int /*<<< orphan*/ mul(size_t, size_t);
void *xrealloc(void *, int /*<<< orphan*/);
void *xreallocs(void *ptr, size_t mainsize, size_t count, size_t elemsize) {
  return xrealloc(ptr, add(mainsize, mul(count, elemsize)));
}


x86 assembly (clang, -O0):
<xreallocs>:
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    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <mul@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
call   1030 <add@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1040 <xrealloc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xreallocs>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rdx,%rdi
mov    %rcx,%rsi
call   1050 <mul@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <add@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <xrealloc@plt>

LLVM IR (-O0):
define i8* @xreallocs(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @mul(i64 %11, i64 %12)
%14 = call i32 @add(i64 %10, i32 %13)
%15 = call i8* @xrealloc(i8* %9, i32 %14)
ret i8* %15
}

LLVM IR (-O2):
define i8* @xreallocs(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @mul(i64 %2, i64 %3)
%6 = tail call i32 @add(i64 %1, i32 %5)
%7 = tail call i8* @xrealloc(i8* %0, i32 %6)
ret i8* %7
}
char *getErrorStr(int err) {
  static char *errMsgs[] = {"No error", "Internal Error"};
  return errMsgs[err];
}


x86 assembly (clang, -O0):
<getErrorStr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
lea    0x2f1e(%rip),%rax
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getErrorStr>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@getErrorStr.errMsgs = internal global [2 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0)]
@.str = [9 x i8] c"No error\00"
@.str.1 = [15 x i8] c"Internal Error\00"
define i8* @getErrorStr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* @getErrorStr.errMsgs, i64 0, i64 %4
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
@reltable.getErrorStr = internal unnamed_addr constant [2 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str to i64), i64 ptrtoint ([2 x i32]* @reltable.getErrorStr to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.1 to i64), i64 ptrtoint ([2 x i32]* @reltable.getErrorStr to i64)) to i32)]
@.str = [9 x i8] c"No error\00"
@.str.1 = [15 x i8] c"Internal Error\00"
define i8* @getErrorStr(i32 %0) {
%2 = sext i32 %0 to i64
%3 = shl i64 %2, 2
%4 = call i8* @llvm.load.relative.i64(i8* bitcast ([2 x i32]* @reltable.getErrorStr to i8*), i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_rows(char *rows) {
  int row;
  for (row = 0; row < 5; row++) {
    printf("%s\n", &(rows[6 * (9 + 3) + 1 * row]));
  }
}


x86 assembly (clang, -O0):
<print_rows>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1159 <print_rows+0x49>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
shl    $0x0,%eax
add    $0x48,%eax
cltq
add    %rax,%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_rows+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_rows>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x48(%rdi),%rsi
lea    0xede(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0x49(%rbx),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0x4a(%rbx),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0x4b(%rbx),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x4c,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @print_rows(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 72
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds i8, i8* %0, i64 73
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds i8, i8* %0, i64 74
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds i8, i8* %0, i64 75
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds i8, i8* %0, i64 76
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a_barrier();
int a_ll(int volatile *);
int /*<<< orphan*/ a_sc(int volatile *, int);
int a_cas(volatile int *p, int t, int s) {
  int old;
  do {
    old = a_ll(p);
    if (old != t) {
      a_barrier();
      break;
    }
  } while (!a_sc(p, s));
  return old;
}


x86 assembly (clang, -O0):
<a_cas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <a_ll@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1166 <a_cas+0x36>
mov    $0x0,%al
call   1030 <a_barrier@plt>
jmp    1187 <a_cas+0x57>
jmp    116b <a_cas+0x3b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <a_sc@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1142 <a_cas+0x12>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_cas>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r15d
mov    %rdi,%rbp
mov    %rbp,%rdi
call   1050 <a_ll@plt>
cmp    %r15d,%eax
jne    115e <a_cas+0x2e>
mov    %rbp,%rdi
mov    %r14d,%esi
call   1040 <a_sc@plt>
test   %eax,%eax
je     1140 <a_cas+0x10>
jmp    116a <a_cas+0x3a>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <a_barrier@plt>
mov    %ebx,%r15d
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @a_cas(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
br label %8
8: ; preds = %17, %3
%9 = load i32*, i32** %4
%10 = call i32 @a_ll(i32* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i32, i32* %5
%13 = icmp ne i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = call i32 (...) @a_barrier()
br label %23
16: ; preds = %8
br label %17
17: ; preds = %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = call i32 @a_sc(i32* %18, i32 %19)
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
br i1 %22, label %8, label %23
23: ; preds = %17, %14
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @a_cas(i32* %0, i32 %1, i32 %2) {
br label %4
4: ; preds = %9, %3
%5 = tail call i32 @a_ll(i32* %0)
%6 = icmp eq i32 %5, %1
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 (...) @a_barrier()
br label %12
9: ; preds = %4
%10 = tail call i32 @a_sc(i32* %0, i32 %2)
%11 = icmp eq i32 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %9, %7
%13 = phi i32 [ %5, %7 ], [ %1, %9 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void prt_bas_edge(const void *data) { printf("%s ", (char *)data); }


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

x86 assembly (clang, -O2):
<prt_bas_edge>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
define void @prt_bas_edge(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define void @prt_bas_edge(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
long double pfuncFullWithSym(int *, int, int, int, long double, int, int,
                             long double, long double, int);
long double pfuncFull(int inputSeq[], int complexity, int naType, int dangles,
                      long double temperature, int calcPairs,
                      long double sodiumconc, long double magnesiumconc,
                      int uselongsalt) {
  return pfuncFullWithSym(inputSeq, complexity, naType, dangles, temperature,
                          calcPairs, 1, sodiumconc, magnesiumconc, uselongsalt);
}


x86 assembly (clang, -O0):
<pfuncFull>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
fstpt  -0x30(%rbp)
mov    %r8d,-0x34(%rbp)
fstpt  -0x50(%rbp)
fstpt  -0x60(%rbp)
mov    %r9d,-0x64(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
fldt   -0x30(%rbp)
mov    -0x34(%rbp),%r8d
fldt   -0x50(%rbp)
fldt   -0x60(%rbp)
mov    -0x64(%rbp),%r9d
mov    %rsp,%rax
mov    %r9d,0x30(%rax)
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
mov    $0x1,%r9d
call   1030 <pfuncFullWithSym@plt>
fld    %st(0)
fstp   %st(0)
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pfuncFull>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fldt   0x70(%rsp)
mov    %r9d,0x30(%rsp)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    $0x1,%r9d
call   1030 <pfuncFullWithSym@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @pfuncFull(i32* %0, i32 %1, i32 %2, i32 %3, x86_fp80 %4, i32 %5, x86_fp80 %6, x86_fp80 %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca x86_fp80
%15 = alloca i32
%16 = alloca x86_fp80
%17 = alloca x86_fp80
%18 = alloca i32
store i32* %0, i32** %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store x86_fp80 %4, x86_fp80* %14
store i32 %5, i32* %15
store x86_fp80 %6, x86_fp80* %16
store x86_fp80 %7, x86_fp80* %17
store i32 %8, i32* %18
%19 = load i32*, i32** %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i32, i32* %13
%23 = load x86_fp80, x86_fp80* %14
%24 = load i32, i32* %15
%25 = load x86_fp80, x86_fp80* %16
%26 = load x86_fp80, x86_fp80* %17
%27 = load i32, i32* %18
%28 = call x86_fp80 @pfuncFullWithSym(i32* %19, i32 %20, i32 %21, i32 %22, x86_fp80 %23, i32 %24, i32 1, x86_fp80 %25, x86_fp80 %26, i32 %27)
ret x86_fp80 %28
}

LLVM IR (-O2):
define x86_fp80 @pfuncFull(i32* %0, i32 %1, i32 %2, i32 %3, x86_fp80 %4, i32 %5, x86_fp80 %6, x86_fp80 %7, i32 %8) {
%10 = tail call x86_fp80 @pfuncFullWithSym(i32* %0, i32 %1, i32 %2, i32 %3, x86_fp80 %4, i32 %5, i32 1, x86_fp80 %6, x86_fp80 %7, i32 %8)
ret x86_fp80 %10
}
/* Variables and functions */
int /*<<< orphan*/ commandline(char *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
void line(const char *cln) {
  static char ln[160];
  strncpy(ln, cln, 159);
  ln[159] = 0;
  commandline(ln);
}


x86 assembly (clang, -O0):
<line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f09(%rip),%rdi
mov    $0x9f,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x2f97(%rip)
lea    0x2ef1(%rip),%rdi
call   1040 <commandline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line>:
push   %rbx
mov    %rdi,%rsi
lea    0x2f15(%rip),%rbx
mov    %rbx,%rdi
mov    $0x9f,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x2fa0(%rip)
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <commandline@plt>

LLVM IR (-O0):
@line.ln = internal global [160 x i8] zeroinitializer
define void @line(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strncpy(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @line.ln, i64 0, i64 0), i8* %3, i32 159)
store i8 0, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @line.ln, i64 0, i64 159)
%5 = call i32 @commandline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @line.ln, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@line.ln = internal global [160 x i8] zeroinitializer
define void @line(i8* %0) {
%2 = tail call i32 @strncpy(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @line.ln, i64 0, i64 0), i8* %0, i32 159)
store i8 0, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @line.ln, i64 0, i64 159)
%3 = tail call i32 @commandline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @line.ln, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fwrite(char *, int, int, int /*<<< orphan*/ *);
size_t writeFLVScriptDataObject(FILE *fp) {
  size_t datasize = 0;
  char type;
  type = 2;
  datasize += fwrite(&type, 1, 1, fp);
  return datasize;
}


x86 assembly (clang, -O0):
<writeFLVScriptDataObject>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movb   $0x2,-0x11(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x11(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeFLVScriptDataObject>:
push   %rax
mov    %rdi,%rcx
movb   $0x2,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @writeFLVScriptDataObject(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i8
store i32* %0, i32** %2
store i64 0, i64* %3
store i8 2, i8* %4
%5 = load i32*, i32** %2
%6 = call i64 @fwrite(i8* %4, i32 1, i32 1, i32* %5)
%7 = load i64, i64* %3
%8 = add i64 %7, %6
store i64 %8, i64* %3
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
define i64 @writeFLVScriptDataObject(i32* nocapture %0) {
%2 = alloca i8
store i8 2, i8* %2
%3 = call i64 @fwrite(i8* %2, i32 1, i32 1, i32* %0)
ret i64 %3
}
int strl(char str[]) {
  int i = 0;
  while (*(str++) != '\0') {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<strl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1138 <strl+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strl+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strl>:
cmpb   $0x0,(%rdi)
je     111c <strl+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strl+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strl(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @strl(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ set_timeout(int);
void answer_interrogation(void) { set_timeout(1); }


x86 assembly (clang, -O0):
<answer_interrogation>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <set_timeout@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @answer_interrogation() {
%1 = call i32 @set_timeout(i32 1)
ret void
}

LLVM IR (-O2):
define void @answer_interrogation() {
%1 = tail call i32 @set_timeout(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ boolean_dispose();
int /*<<< orphan*/ charcache_dispose();
int /*<<< orphan*/ empty_list_dispose();
int /*<<< orphan*/ env_frame_dispose();
int /*<<< orphan*/ eof_dispose();
int /*<<< orphan*/ intcache_dispose();
int /*<<< orphan*/ symbol_dispose();
void dispose_obj(void) {
  symbol_dispose();
  boolean_dispose();
  empty_list_dispose();
  eof_dispose();
  intcache_dispose();
  charcache_dispose();
  env_frame_dispose();
}


x86 assembly (clang, -O0):
<dispose_obj>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <symbol_dispose@plt>
mov    $0x0,%al
call   1080 <boolean_dispose@plt>
mov    $0x0,%al
call   1040 <empty_list_dispose@plt>
mov    $0x0,%al
call   1060 <eof_dispose@plt>
mov    $0x0,%al
call   1050 <intcache_dispose@plt>
mov    $0x0,%al
call   1030 <charcache_dispose@plt>
mov    $0x0,%al
call   1090 <env_frame_dispose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dispose_obj>:
push   %rax
xor    %eax,%eax
call   1070 <symbol_dispose@plt>
xor    %eax,%eax
call   1080 <boolean_dispose@plt>
xor    %eax,%eax
call   1040 <empty_list_dispose@plt>
xor    %eax,%eax
call   1060 <eof_dispose@plt>
xor    %eax,%eax
call   1050 <intcache_dispose@plt>
xor    %eax,%eax
call   1030 <charcache_dispose@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <env_frame_dispose@plt>

LLVM IR (-O0):
define void @dispose_obj() {
%1 = call i32 (...) @symbol_dispose()
%2 = call i32 (...) @boolean_dispose()
%3 = call i32 (...) @empty_list_dispose()
%4 = call i32 (...) @eof_dispose()
%5 = call i32 (...) @intcache_dispose()
%6 = call i32 (...) @charcache_dispose()
%7 = call i32 (...) @env_frame_dispose()
ret void
}

LLVM IR (-O2):
define void @dispose_obj() {
%1 = tail call i32 (...) @symbol_dispose()
%2 = tail call i32 (...) @boolean_dispose()
%3 = tail call i32 (...) @empty_list_dispose()
%4 = tail call i32 (...) @eof_dispose()
%5 = tail call i32 (...) @intcache_dispose()
%6 = tail call i32 (...) @charcache_dispose()
%7 = tail call i32 (...) @env_frame_dispose()
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
void _mn(int64_t *a, int64_t b) { *a = (*a < b) ? (*a) : b; }


x86 assembly (clang, -O0):
<_mn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
jge    112d <_mn+0x2d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1135 <_mn+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @_mn(i64* nocapture %0, i64 %1) {
%3 = load i64, i64* %0
%4 = icmp slt i64 %3, %1
%5 = select i1 %4, i64 %3, i64 %1
store i64 %5, i64* %0
ret void
}
int test_imm_9Aint16_reg(short val) {
  return ((val) & (-0x9A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Aint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff66,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Aint16_reg>:
test   $0xff66,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Aint16_reg(i16 signext %0) {
%2 = and i16 %0, -154
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gmove_G2L_1a2t_bc();
int /*<<< orphan*/ gmove_G2L_2a2t_bc();
int main() {
  gmove_G2L_1a2t_bc();
  gmove_G2L_2a2t_bc();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <gmove_G2L_1a2t_bc@plt>
mov    $0x0,%al
call   1030 <gmove_G2L_2a2t_bc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @gmove_G2L_1a2t_bc()
%3 = call i32 (...) @gmove_G2L_2a2t_bc()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @gmove_G2L_1a2t_bc()
%2 = tail call i32 (...) @gmove_G2L_2a2t_bc()
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *);
char *copyright() {
  char *ret = malloc(sizeof(char) * 1024);
  sprintf(ret,
          "Copyright (C) 2011-2019 Andras Salamon\n\nBased on:\npslr-shoot (C) "
          "2009 Ramiro Barreiro\nPK-Remote (C) 2008 Pontus Lidman \n\n");
  return ret;
}


x86 assembly (clang, -O0):
<copyright>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyright>:
push   %rax
mov    $0x400,%edi
call   1030 <malloc@plt>
movups 0xede(%rip),%xmm0
movups %xmm0,(%rax)
movups 0xee4(%rip),%xmm0
movups %xmm0,0x10(%rax)
movups 0xee9(%rip),%xmm0
movups %xmm0,0x20(%rax)
movups 0xeee(%rip),%xmm0
movups %xmm0,0x30(%rax)
movups 0xef3(%rip),%xmm0
movups %xmm0,0x40(%rax)
movups 0xef8(%rip),%xmm0
movups %xmm0,0x50(%rax)
movups 0xefd(%rip),%xmm0
movups %xmm0,0x60(%rax)
movups 0xefc(%rip),%xmm0
movups %xmm0,0x6a(%rax)
pop    %rcx
ret

LLVM IR (-O0):
@.str = [122 x i8] c"Copyright (C) 2011-2019 Andras Salamon\0A\0ABased on:\0Apslr-shoot (C) 2009 Ramiro Barreiro\0APK-Remote (C) 2008 Pontus Lidman \0A\0A\00"
define i8* @copyright() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 1024)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
@.str = [122 x i8] c"Copyright (C) 2011-2019 Andras Salamon\0A\0ABased on:\0Apslr-shoot (C) 2009 Ramiro Barreiro\0APK-Remote (C) 2008 Pontus Lidman \0A\0A\00"
define noalias i8* @copyright() {
%1 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(122) %1, i8* align 1 dereferenceable(122) getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0), i64 122, i1 false)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ CyEEPROM_Stop();
void Re_EEPROM_Stop(void) { CyEEPROM_Stop(); }


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

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

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

LLVM IR (-O2):
define void @Re_EEPROM_Stop() {
%1 = tail call i32 (...) @CyEEPROM_Stop()
ret void
}
void g_scanner_destroy() {}


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

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

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

LLVM IR (-O2):
define void @g_scanner_destroy() {
ret void
}
double get_percent(int total, int partial) {
  return ((double)partial / (double)total) * 100.0;
}


x86 assembly (clang, -O0):
<get_percent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xee0(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_percent>:
cvtsi2sd %esi,%xmm0
cvtsi2sd %edi,%xmm1
divsd  %xmm1,%xmm0
mulsd  0xeec(%rip),%xmm0
ret

LLVM IR (-O0):
define double @get_percent(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = fdiv double %6, %8
%10 = fmul double %9, 1.000000e+02
ret double %10
}

LLVM IR (-O2):
define double @get_percent(i32 %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = sitofp i32 %0 to double
%5 = fdiv double %3, %4
%6 = fmul double %5, 1.000000e+02
ret double %6
}