xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ int8_t;

/* Variables and functions */
int /*<<< orphan*/ mpack_store_u8(char *, int /*<<< orphan*/);
void mpack_store_i8(char *p, int8_t val) { mpack_store_u8(p, (uint8_t)val); }


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

x86 assembly (clang, -O2):
<mpack_store_i8>:
jmp    1030 <mpack_store_u8@plt>

LLVM IR (-O0):
define void @mpack_store_i8(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = call i32 @mpack_store_u8(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @mpack_store_i8(i8* %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = tail call i32 @mpack_store_u8(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core5_swap(char *, int);
void U_EMRABORTPATH_swap(char *record, int torev) { core5_swap(record, torev); }


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

x86 assembly (clang, -O2):
<U_EMRABORTPATH_swap>:
jmp    1030 <core5_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRABORTPATH_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core5_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void segfault(const char *msg, const char *msg2) {
  fprintf(stderr,
          "%s:%s\nself destruct demanded. inducing segmentation fault\n", msg,
          msg2);
  *((char *)NULL) = 0;
}


x86 assembly (clang, -O0):
<segfault>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<segfault>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [59 x i8] c"%s:%s\0Aself destruct demanded. inducing segmentation fault\0A\00"
define void @segfault(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
store i8 0, i8* null
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [59 x i8] c"%s:%s\0Aself destruct demanded. inducing segmentation fault\0A\00"
define void @segfault(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
unreachable
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t get_date_ms() {
  uint64_t date = ((uint64_t)0x43 << 32) | 0x42;
  return date;
}


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

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

LLVM IR (-O0):
define i32 @get_date_ms() {
%1 = alloca i32
store i32 poison, i32* %1
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_date_ms() {
ret i32 poison
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int FixedToInt(int32_t val) { return val >> 16; }


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

x86 assembly (clang, -O2):
<FixedToInt>:
mov    %edi,%eax
sar    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @FixedToInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 16
ret i32 %4
}

LLVM IR (-O2):
define i32 @FixedToInt(i32 %0) {
%2 = ashr i32 %0, 16
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ wcslen(int /*<<< orphan*/ const *);
int /*<<< orphan*/ *wmempcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                             scalar_t__);
wchar_t *wcpcpy(wchar_t *restrict whither, const wchar_t *restrict whence) {
  return wmempcpy(whither, whence, wcslen(whence) + 1) - 1;
}


x86 assembly (clang, -O0):
<wcpcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <wcslen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <wmempcpy@plt>
add    $0xfffffffffffffffc,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcpcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <wcslen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <wmempcpy@plt>
add    $0xfffffffffffffffc,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @wcpcpy(i32* noalias %0, i32* noalias %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 = load i32*, i32** %4
%8 = call i64 @wcslen(i32* %7)
%9 = add nsw i64 %8, 1
%10 = call i32* @wmempcpy(i32* %5, i32* %6, i64 %9)
%11 = getelementptr inbounds i32, i32* %10, i64 -1
ret i32* %11
}

LLVM IR (-O2):
define i32* @wcpcpy(i32* noalias %0, i32* noalias %1) {
%3 = tail call i64 @wcslen(i32* %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32* @wmempcpy(i32* %0, i32* %1, i64 %4)
%6 = getelementptr inbounds i32, i32* %5, i64 -1
ret i32* %6
}
void EVP_PKEY2PKCS8(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY2PKCS8() {
ret void
}
int linearSearch(int vector[], int vectorSize, int value) {
  for (int i = 0; i < vectorSize; i++) {
    if (value == vector[i]) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<linearSearch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <linearSearch+0x54>
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1141 <linearSearch+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <linearSearch+0x5b>
jmp    1146 <linearSearch+0x46>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <linearSearch+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linearSearch>:
test   %esi,%esi
jle    113a <linearSearch+0x3a>
mov    $0x1,%eax
cmp    %edx,(%rdi)
je     1139 <linearSearch+0x39>
mov    %esi,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,%rsi
cmp    %rax,%rcx
je     1131 <linearSearch+0x31>
lea    0x1(%rsi),%rax
cmp    %edx,(%rdi,%rsi,4)
jne    1120 <linearSearch+0x20>
xor    %eax,%eax
cmp    %rcx,%rsi
setb   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @linearSearch(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = zext i32 %1 to i64
%8 = load i32, i32* %0
%9 = icmp eq i32 %8, %2
br i1 %9, label %21, label %10
10: ; preds = %5, %13
%11 = phi i64 [ %17, %13 ], [ 1, %5 ]
%12 = icmp eq i64 %11, %7
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = getelementptr inbounds i32, i32* %0, i64 %11
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, %2
%17 = add nuw nsw i64 %11, 1
br i1 %16, label %18, label %10
18: ; preds = %10, %13
%19 = icmp ult i64 %11, %6
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %18, %5, %3
%22 = phi i32 [ 0, %3 ], [ 1, %5 ], [ %20, %18 ]
ret i32 %22
}
AX0AX1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((((int *)10000000)[x0]) <= (((int *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AX0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
mov    (%rax,%rcx,4),%eax
movslq -0x14(%rbp),%rdx
mov    $0xa98ac7,%ecx
cmp    (%rcx,%rdx,4),%eax
jg     1142 <AX0AX1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <AX0AX1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0AX1>:
movslq %edx,%rax
mov    0x989680(,%rax,4),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(,%rcx,4),%edx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AX0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %10
%12 = load i32, i32* %11
%13 = icmp sle i32 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int key_event(int key, void *arg) {
  (void)arg;
  if (key == 65307)
    exit(EXIT_SUCCESS);
  return (0);
}


x86 assembly (clang, -O0):
<key_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xff1b,-0x4(%rbp)
jne    113a <key_event+0x2a>
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_event>:
cmp    $0xff1b,%edi
je     111b <key_event+0xb>
xor    %eax,%eax
ret
push   %rax
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @key_event(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 65307
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @EXIT_SUCCESS
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @key_event(i32 %0, i8* nocapture readnone %1) {
%3 = icmp eq i32 %0, 65307
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @EXIT_SUCCESS
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %2
ret i32 0
}
/* Variables and functions */
int strcmp(void const *, void const *);
int string_compare_func(const void *a, const void *b) { return strcmp(a, b); }


x86 assembly (clang, -O0):
<string_compare_func>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_compare_func>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @string_compare_func(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
double ceil(double);
double ml_ceil(double x) { return ceil(x); }


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

x86 assembly (clang, -O2):
<ml_ceil>:
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define double @ml_ceil(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.ceil.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @ml_ceil(double %0) {
%2 = tail call double @llvm.ceil.f64(double %0)
ret double %2
}
__attribute__((always_)) void outb_local(unsigned char value, int port) {
  __asm__ __volatile__("out"
                       "b"
                       " %"
                       "b"
                       "0, %w1"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb_local>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb_local>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb_local(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @outb_local(i8 zeroext %0, i32 %1) {
tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int client_close(int sock) {
  close(sock);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @client_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mem_page_unmap(void *);
void mem_page_unmap_multiple(void *virtual, int count) {
  for (int i = 0; i < count; i++)
    mem_page_unmap(virtual + (i * 4096));
}


x86 assembly (clang, -O0):
<mem_page_unmap_multiple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <mem_page_unmap_multiple+0x44>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%eax
shl    $0xc,%eax
cltq
add    %rax,%rdi
call   1030 <mem_page_unmap@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <mem_page_unmap_multiple+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_page_unmap_multiple>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1135 <mem_page_unmap_multiple+0x25>
mov    %rdi,%rbx
mov    %esi,%r14d
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <mem_page_unmap@plt>
add    $0x1000,%rbx
add    $0xffffffffffffffff,%r14
jne    1120 <mem_page_unmap_multiple+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mem_page_unmap_multiple(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = mul nsw i32 %12, 4096
%14 = sext i32 %13 to i64
%15 = getelementptr i8, i8* %11, i64 %14
%16 = call i32 @mem_page_unmap(i8* %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @mem_page_unmap_multiple(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = shl nsw i64 %8, 12
%10 = getelementptr i8, i8* %0, i64 %9
%11 = tail call i32 @mem_page_unmap(i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long ustime(void) {
  struct timeval tv;
  long long ust;
  gettimeofday(&tv, NULL);
  ust = ((long)tv.tv_sec) * 1000000;
  ust += tv.tv_usec;
  return ust;
}


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

x86 assembly (clang, -O2):
<ustime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @ustime() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
store i64 %6, i64* %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = load i64, i64* %2
%10 = add nsw i64 %9, %8
store i64 %10, i64* %2
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @ustime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}
void f1(int i, ...) {}


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

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

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

LLVM IR (-O2):
define void @f1(i32 %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cng_put_pixel(int, int);
int Affiche8(int x, int y) { cng_put_pixel(x, -y); }


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

x86 assembly (clang, -O2):
<Affiche8>:
neg    %esi
jmp    1030 <cng_put_pixel@plt>

LLVM IR (-O0):
define i32 @Affiche8(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 = load i32, i32* %5
%8 = sub nsw i32 0, %7
%9 = call i32 @cng_put_pixel(i32 %6, i32 %8)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @Affiche8(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = tail call i32 @cng_put_pixel(i32 %0, i32 %3)
ret i32 undef
}
int Comp(void *key1, void *key2) { return *((int *)key1) - *((int *)key2); }


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

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

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

LLVM IR (-O2):
define i32 @Comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ updateInterpreterCallRegisters();
int /*<<< orphan*/ updateInterpreterRegisters();
int /*<<< orphan*/ updateMethodLookupCache();
int /*<<< orphan*/ updateVmRegisters();
void updateRegistersPhase() {
  updateVmRegisters();
  updateInterpreterRegisters();
  updateInterpreterCallRegisters();
  updateMethodLookupCache();
}


x86 assembly (clang, -O0):
<updateRegistersPhase>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <updateVmRegisters@plt>
mov    $0x0,%al
call   1060 <updateInterpreterRegisters@plt>
mov    $0x0,%al
call   1050 <updateInterpreterCallRegisters@plt>
mov    $0x0,%al
call   1040 <updateMethodLookupCache@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<updateRegistersPhase>:
push   %rax
xor    %eax,%eax
call   1030 <updateVmRegisters@plt>
xor    %eax,%eax
call   1060 <updateInterpreterRegisters@plt>
xor    %eax,%eax
call   1050 <updateInterpreterCallRegisters@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <updateMethodLookupCache@plt>

LLVM IR (-O0):
define void @updateRegistersPhase() {
%1 = call i32 (...) @updateVmRegisters()
%2 = call i32 (...) @updateInterpreterRegisters()
%3 = call i32 (...) @updateInterpreterCallRegisters()
%4 = call i32 (...) @updateMethodLookupCache()
ret void
}

LLVM IR (-O2):
define void @updateRegistersPhase() {
%1 = tail call i32 (...) @updateVmRegisters()
%2 = tail call i32 (...) @updateInterpreterRegisters()
%3 = tail call i32 (...) @updateInterpreterCallRegisters()
%4 = tail call i32 (...) @updateMethodLookupCache()
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzConcur_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN(int /*<<< orphan*/);
void BrzConcur_reqdown(struct comp *comp, int port) {
  struct BrzConcur_ *c = (struct BrzConcur_ *)comp;
  SEND_ACKDOWN(0);
}


x86 assembly (clang, -O0):
<BrzConcur_reqdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %edi,%edi
call   1030 <SEND_ACKDOWN@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzConcur_ = type { i32 }
define void @BrzConcur_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzConcur_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzConcur_*
store %struct.BrzConcur_* %7, %struct.BrzConcur_** %5
%8 = call i32 @SEND_ACKDOWN(i32 0)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzConcur_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN(i32 0)
ret void
}
struct s3c24x0_spi *s3c24x0_get_base_spi(void) {
  return (struct s3c24x0_spi *)0x59000000;
}


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

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

LLVM IR (-O0):
%struct.s3c24x0_spi = type opaque
define %struct.s3c24x0_spi* @s3c24x0_get_base_spi() {
ret %struct.s3c24x0_spi* inttoptr (i64 1493172224 to %struct.s3c24x0_spi*)
}

LLVM IR (-O2):
%struct.s3c24x0_spi = type opaque
define %struct.s3c24x0_spi* @s3c24x0_get_base_spi() {
ret %struct.s3c24x0_spi* inttoptr (i64 1493172224 to %struct.s3c24x0_spi*)
}
/* Variables and functions */
int /*<<< orphan*/ step_hash(int);
int *func_13(int *p_14, int p_15) {
  unsigned char l_335 = 0x35L;
  int *l_338 = (void *)0;
  step_hash(236);
  (*p_14) = (*p_14);
  step_hash(237);
  p_14 = &p_15;
  step_hash(238);
  return l_338;
}


x86 assembly (clang, -O0):
<func_13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movb   $0x35,-0xd(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0xec,%edi
call   1030 <step_hash@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0xed,%edi
call   1030 <step_hash@plt>
lea    -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0xee,%edi
call   1030 <step_hash@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_13>:
push   %rax
mov    $0xec,%edi
call   1030 <step_hash@plt>
mov    $0xed,%edi
call   1030 <step_hash@plt>
mov    $0xee,%edi
call   1030 <step_hash@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32* @func_13(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8
%6 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
store i8 53, i8* %5
store i32* null, i32** %6
%7 = call i32 @step_hash(i32 236)
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = call i32 @step_hash(i32 237)
store i32* %4, i32** %3
%12 = call i32 @step_hash(i32 238)
%13 = load i32*, i32** %6
ret i32* %13
}

LLVM IR (-O2):
define noalias i32* @func_13(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @step_hash(i32 236)
%4 = tail call i32 @step_hash(i32 237)
%5 = tail call i32 @step_hash(i32 238)
ret i32* null
}
char *loc_human(struct rr *rrv) { return "meow"; }


x86 assembly (clang, -O0):
<loc_human>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.rr = type opaque
@.str = [5 x i8] c"meow\00"
define i8* @loc_human(%struct.rr* %0) {
%2 = alloca %struct.rr*
store %struct.rr* %0, %struct.rr** %2
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.rr = type opaque
@.str = [5 x i8] c"meow\00"
define i8* @loc_human(%struct.rr* nocapture readnone %0) {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vsnprintf(char *, int, char const *, int /*<<< orphan*/);
void vreportf(const char *prefix, const char *err, va_list params) {
  char msg[512];
  vsnprintf(msg, sizeof(msg), err, params);
  fprintf(stderr, "%s%s\n", prefix, msg);
}


x86 assembly (clang, -O0):
<vreportf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x220(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x200,%esi
call   1030 <vsnprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    -0x220(%rbp),%rcx
lea    0xe97(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vreportf>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x200,%esi
call   1030 <vsnprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <fprintf@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%s%s\0A\00"
define void @vreportf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [512 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @vsnprintf(i8* %8, i32 512, i8* %9, i32 %10)
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %4
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%15 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%s%s\0A\00"
define void @vreportf(i8* %0, i8* nocapture %1, i32 %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i32 @vsnprintf(i8* %5, i32 512, i8* %1, i32 %2)
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %5)
ret void
}
/* Variables and functions */
void *mem_set(void *s, int c, size_t n) {
  unsigned char *p = (unsigned char *)s;
  while (n--)
    *p++ = (unsigned char)c;
  return s;
}


x86 assembly (clang, -O0):
<mem_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     114b <mem_set+0x4b>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
jmp    1117 <mem_set+0x17>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_set>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     1121 <mem_set+0x11>
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @mem_set(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %3
ret i8* %0
}
/* Type definitions */
struct json {
  int dummy;
};

/* Variables and functions */
char *print_value(struct json *, int /*<<< orphan*/, int /*<<< orphan*/);
char *json_sprint_unformatted(struct json *item) {
  return print_value(item, 0, 0);
}


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

x86 assembly (clang, -O2):
<json_sprint_unformatted>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <print_value@plt>

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

LLVM IR (-O2):
%struct.json = type { i32 }
define i8* @json_sprint_unformatted(%struct.json* %0) {
%2 = tail call i8* @print_value(%struct.json* %0, i32 0, i32 0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void OptickAPI_StopCapture(const char *inFileName, uint16_t inFileNameLength) {}


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

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

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

LLVM IR (-O2):
define void @OptickAPI_StopCapture(i8* nocapture %0, i32 %1) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int type;
};
typedef TYPE_1__ XPointerMovedEvent;

/* Variables and functions */
void set_XPointerMovedEvent_type(void *_p, int _v) {
  ((XPointerMovedEvent *)_p)->type = (int)_v;
}


x86 assembly (clang, -O0):
<set_XPointerMovedEvent_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XPointerMovedEvent_type>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XPointerMovedEvent_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void valid_size(x, y) int x[2], y[2];
{
  if (x[0] != x[1] || y[0] != y[1]) {
    error(15);
  }
}


x86 assembly (clang, -O0):
<valid_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jne    1146 <valid_size+0x36>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    0x4(%rcx),%eax
je     1152 <valid_size+0x42>
mov    $0xf,%edi
mov    $0x0,%al
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_size>:
mov    (%rdi),%eax
cmp    0x4(%rdi),%eax
jne    111f <valid_size+0xf>
mov    (%rsi),%eax
cmp    0x4(%rsi),%eax
jne    111f <valid_size+0xf>
ret
mov    $0xf,%edi
xor    %eax,%eax
jmp    1030 <error@plt>

LLVM IR (-O0):
define void @valid_size(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = icmp ne i32 %7, %10
br i1 %11, label %20, label %12
12: ; preds = %2
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i64 1
%18 = load i32, i32* %17
%19 = icmp ne i32 %15, %18
br i1 %19, label %20, label %22
20: ; preds = %12, %2
%21 = call i32 (i32, ...) bitcast (i32 (...)* @error to i32 (i32, ...)*)(i32 15)
br label %22
22: ; preds = %20, %12
ret void
}

LLVM IR (-O2):
define void @valid_size(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = icmp eq i32 %3, %5
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* %1
%9 = getelementptr inbounds i32, i32* %1, i64 1
%10 = load i32, i32* %9
%11 = icmp eq i32 %8, %10
br i1 %11, label %14, label %12
12: ; preds = %7, %2
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @error to i32 (i32, ...)*)(i32 15)
br label %14
14: ; preds = %12, %7
ret void
}
void GDBPutChar(char c) {}


x86 assembly (clang, -O0):
<GDBPutChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @GDBPutChar(i8 signext %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
struct pkt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ *pkt_put(struct pkt *, int);
void pkt_put_u32(struct pkt *p, uint32_t val) {
  uint8_t *data = pkt_put(p, sizeof(val));
  memcpy(data, &val, sizeof(uint32_t));
}


x86 assembly (clang, -O0):
<pkt_put_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <pkt_put@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkt_put_u32>:
push   %rax
mov    %esi,0x4(%rsp)
mov    $0x4,%esi
call   1040 <pkt_put@plt>
lea    0x4(%rsp),%rsi
mov    %rax,%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.pkt = type { i32 }
define void @pkt_put_u32(%struct.pkt* %0, i32 %1) {
%3 = alloca %struct.pkt*
%4 = alloca i32
%5 = alloca i32*
store %struct.pkt* %0, %struct.pkt** %3
store i32 %1, i32* %4
%6 = load %struct.pkt*, %struct.pkt** %3
%7 = call i32* @pkt_put(%struct.pkt* %6, i32 4)
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = call i32 @memcpy(i32* %8, i32* %4, i32 4)
ret void
}

LLVM IR (-O2):
%struct.pkt = type { i32 }
define void @pkt_put_u32(%struct.pkt* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = tail call i32* @pkt_put(%struct.pkt* %0, i32 4)
%5 = call i32 @memcpy(i32* %4, i32* %3, i32 4)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void s337_set_error(uint8_t *p_s337) { p_s337[5] |= 0x80; }


x86 assembly (clang, -O0):
<s337_set_error>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
or     $0x80,%ecx
mov    %ecx,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<s337_set_error>:
orb    $0x80,0x14(%rdi)
ret

LLVM IR (-O0):
define void @s337_set_error(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 5
%5 = load i32, i32* %4
%6 = or i32 %5, 128
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @s337_set_error(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
%4 = or i32 %3, 128
store i32 %4, i32* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void logger(int priority, const char *format, va_list ap) {
  fprintf(stderr, "libcluster<%d>: ", priority);
  vfprintf(stderr, format, ap);
}


x86 assembly (clang, -O0):
<logger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <vfprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%edx
mov    0x2eae(%rip),%r14
mov    (%r14),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <vfprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"libcluster<%d>: \00"
define void @logger(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i32, i32* %4
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @vfprintf(i32 %10, i8* %11, i32 %12)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"libcluster<%d>: \00"
define void @logger(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 @vfprintf(i32 %6, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main() {
  test(-769);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 -769)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ jhash_3words(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t jhash_1word(uint32_t a, uint32_t initval) {
  return jhash_3words(a, 0, 0, initval);
}


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

x86 assembly (clang, -O2):
<jhash_1word>:
mov    %esi,%ecx
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <jhash_3words@plt>

LLVM IR (-O0):
define i32 @jhash_1word(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 @jhash_3words(i32 %5, i32 0, i32 0, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @jhash_1word(i32 %0, i32 %1) {
%3 = tail call i32 @jhash_3words(i32 %0, i32 0, i32 0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int distance = 200;
  printf("You are %d miles away\n", distance);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xc8,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"You are %d miles away\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 200, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"You are %d miles away\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 200)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ abs(int /*<<< orphan*/);
int64_t int_abs(int64_t val) { return abs(val); }


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

x86 assembly (clang, -O2):
<int_abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @int_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void HAL_EEPROM_Init(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/ const);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void encode_uint32(uint8_t *dst, const uint32_t src) {
  uint32_t be = htonl(src);
  memcpy(dst, &be, 4);
}


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

x86 assembly (clang, -O2):
<encode_uint32>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htonl@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @encode_uint32(i32* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @htonl(i32 %1)
store i32 %5, i32* %3
%6 = call i32 @memcpy(i32* %0, i32* %3, i32 4)
ret void
}
void nseel_asm_sign_end(void) {}


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

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

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

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