xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned long CountLeadingZeroes(unsigned long);
unsigned long CountTrailingZeroes(unsigned long x) {
  return 32 - CountLeadingZeroes(~x & (x - 1));
}


x86 assembly (clang, -O0):
<CountTrailingZeroes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    $0xffffffffffffffff,%rdi
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
and    %rax,%rdi
call   1030 <CountLeadingZeroes@plt>
mov    %rax,%rcx
mov    $0x20,%eax
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountTrailingZeroes>:
push   %rax
mov    %rdi,%rax
not    %rax
add    $0xffffffffffffffff,%rdi
and    %rax,%rdi
call   1030 <CountLeadingZeroes@plt>
mov    $0x20,%ecx
sub    %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @CountTrailingZeroes(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
%5 = load i64, i64* %2
%6 = sub i64 %5, 1
%7 = and i64 %4, %6
%8 = call i64 @CountLeadingZeroes(i64 %7)
%9 = sub i64 32, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @CountTrailingZeroes(i64 %0) {
%2 = xor i64 %0, -1
%3 = add i64 %0, -1
%4 = and i64 %3, %2
%5 = tail call i64 @CountLeadingZeroes(i64 %4)
%6 = sub i64 32, %5
ret i64 %6
}
unsigned long ROL64c(unsigned long word, const int i) {
  asm("rolq %%cl,%0" : "=r"(word) : "0"(word), "c"(i));
  return word;
}


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

x86 assembly (clang, -O2):
<ROL64c>:
mov    %esi,%ecx
mov    %rdi,%rax
rol    %cl,%rax
ret

LLVM IR (-O0):
define i64 @ROL64c(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = call i64 asm "rolq %cl,$0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i64 %5, i32 %6)
store i64 %7, i64* %3
%8 = load i64, i64* %3
ret i64 %8
}

LLVM IR (-O2):
define i64 @ROL64c(i64 %0, i32 %1) {
%3 = tail call i64 asm "rolq %cl,$0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i32 %1)
ret i64 %3
}
void reset_array(int *a, int len) {
  int i;
  for (i = 0; i < len; i++)
    a[i] = -1;
}


x86 assembly (clang, -O0):
<reset_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <reset_array+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <reset_array+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_array>:
test   %esi,%esi
jle    1129 <reset_array+0x19>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
mov    $0xff,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @reset_array(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
void __attribute__((constructor)) setup_heapshrink_helper(void) {
  (void)malloc(1);
}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @setup_heapshrink_helper, i8* null }]
define void @setup_heapshrink_helper() {
%1 = call i32 @malloc(i32 1)
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @setup_heapshrink_helper, i8* null }]
define void @setup_heapshrink_helper() {
%1 = tail call i32 @malloc(i32 1)
ret void
}
void avcodec_find_best_pix_fmt_of_2() {}


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

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

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

LLVM IR (-O2):
define void @avcodec_find_best_pix_fmt_of_2() {
ret void
}
void sizeadd(int *size) { (*size) += 1; }


x86 assembly (clang, -O0):
<sizeadd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizeadd>:
addl   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @sizeadd(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FTFA_DriverIRQHandler();
__attribute__((weak, section(".after_vectors"))) void FTFA_IRQHandler(void) {
  FTFA_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @FTFA_IRQHandler() section ".after_vectors" {
%1 = call i32 (...) @FTFA_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @FTFA_IRQHandler() section ".after_vectors" {
%1 = tail call i32 (...) @FTFA_DriverIRQHandler()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;
typedef enum __ptrace_request {
  ____Placeholder___ptrace_request
} __ptrace_request;

/* Variables and functions */
int real_ptrace(int, int /*<<< orphan*/, void *, void *);
int evil_ptrace(enum __ptrace_request request, pid_t pid, void *addr,
                void *data) {
  int ret = 0;
  ret = real_ptrace(request, pid, addr, data);
  return ret;
}


x86 assembly (clang, -O0):
<evil_ptrace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <real_ptrace@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evil_ptrace>:
jmp    1030 <real_ptrace@plt>

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

LLVM IR (-O2):
define i32 @evil_ptrace(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @real_ptrace(i32 %0, i32 %1, i8* %2, i8* %3)
ret i32 %5
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_insert(struct list *, struct list *);
void list_push_back(struct list *list, struct list *elem) {
  list_insert(list, elem);
}


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

x86 assembly (clang, -O2):
<list_push_back>:
jmp    1030 <list_insert@plt>

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

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_push_back(%struct.list* %0, %struct.list* %1) {
%3 = tail call i32 @list_insert(%struct.list* %0, %struct.list* %1)
ret void
}
void nfs_fscache_get_client_cookie(struct nfs_client *clp) {}


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

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

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

LLVM IR (-O2):
%struct.nfs_client = type opaque
define void @nfs_fscache_get_client_cookie(%struct.nfs_client* nocapture %0) {
ret void
}
void gtk_label_set_justify() {}


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

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

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

LLVM IR (-O2):
define void @gtk_label_set_justify() {
ret void
}
/* Variables and functions */
char getchar();
char get_choice(void) {
  char ch;
  ch = getchar();
  while (getchar() != '\n')
    continue;
  return ch;
}


x86 assembly (clang, -O0):
<get_choice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     113a <get_choice+0x2a>
jmp    1122 <get_choice+0x12>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_choice>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <get_choice+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @get_choice() {
%1 = tail call signext i8 (...) @getchar()
br label %2
2: ; preds = %2, %0
%3 = tail call signext i8 (...) @getchar()
%4 = icmp eq i8 %3, 10
br i1 %4, label %5, label %2
5: ; preds = %2
ret i8 %1
}
/* Variables and functions */
int random();
unsigned int randomInt(int currentIndex) {
  return random() % (currentIndex + 1);
}


x86 assembly (clang, -O0):
<randomInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomInt>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <random@plt>
add    $0x1,%ebx
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @randomInt(i32 %0) {
%2 = tail call i32 (...) @random()
%3 = add nsw i32 %0, 1
%4 = srem i32 %2, %3
ret i32 %4
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/unify.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/unify.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/unify.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __u16;

/* Variables and functions */
void *nla_reserve(void **, int, int);
void nla_put_u16(void **ctx, int t, __u16 var) {
  void *data = nla_reserve(ctx, t, sizeof(__u16));
  *(__u16 *)data = var;
}


x86 assembly (clang, -O0):
<nla_put_u16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x4,%edx
call   1030 <nla_reserve@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_put_u16>:
push   %rbx
mov    %edx,%ebx
mov    $0x4,%edx
call   1030 <nla_reserve@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @nla_put_u16(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8**, i8*** %4
%9 = load i32, i32* %5
%10 = call i8* @nla_reserve(i8** %8, i32 %9, i32 4)
store i8* %10, i8** %7
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = bitcast i8* %12 to i32*
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
define void @nla_put_u16(i8** %0, i32 %1, i32 %2) {
%4 = tail call i8* @nla_reserve(i8** %0, i32 %1, i32 4)
%5 = bitcast i8* %4 to i32*
store i32 %2, i32* %5
ret void
}
long double test_acoshl(long double x) { return __builtin_acoshl(x); }


x86 assembly (clang, -O0):
<test_acoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <acoshl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_acoshl>:
jmp    1030 <acoshl@plt>

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

LLVM IR (-O2):
define x86_fp80 @test_acoshl(x86_fp80 %0) {
%2 = tail call x86_fp80 @acoshl(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ stdout;
int log_console_callback_log(const char *log, int len, void *args) {
  fprintf(stdout, log);
  return 0;
}


x86 assembly (clang, -O0):
<log_console_callback_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_console_callback_log>:
push   %rax
mov    %rdi,%rsi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stdout = global i32 0
define i32 @log_console_callback_log(i8* %0, i32 %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* %0)
ret i32 0
}
int test_imm_F9int16_mem(short *val) {
  return ((*val) & (0xF9 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_F9int16_mem>:
testb  $0xf9,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F9int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 249
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
float withdraw_money(float fncAmount, float fncMoney) {
  fncMoney = fncMoney + fncAmount;
  return (fncMoney);
}


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

x86 assembly (clang, -O2):
<withdraw_money>:
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @withdraw_money(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
void XcmsStoreColors() {}


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

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

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

LLVM IR (-O2):
define void @XcmsStoreColors() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Libcoap compiled!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Libcoap compiled!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Libcoap compiled!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ mt_rand(int /*<<< orphan*/, int);
int non_charlock_chest() {
  int chest;
  chest = (int)mt_rand(0, 22);
  if (chest >= 6)
    chest += 1;
  if (chest >= 11)
    chest += 6;
  if (chest >= 24)
    chest += 1;
  return chest;
}


x86 assembly (clang, -O0):
<non_charlock_chest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0x16,%esi
call   1030 <mt_rand@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x6,-0x4(%rbp)
jl     113a <non_charlock_chest+0x2a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xb,-0x4(%rbp)
jl     114d <non_charlock_chest+0x3d>
mov    -0x4(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x18,-0x4(%rbp)
jl     1160 <non_charlock_chest+0x50>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<non_charlock_chest>:
push   %rax
xor    %edi,%edi
mov    $0x16,%esi
call   1030 <mt_rand@plt>
xor    %ecx,%ecx
cmp    $0x6,%eax
setge  %cl
lea    (%rcx,%rax,1),%edx
cmp    $0xb,%edx
lea    0x6(%rcx,%rax,1),%ecx
cmovl  %edx,%ecx
xor    %eax,%eax
cmp    $0x18,%ecx
setge  %al
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @non_charlock_chest() {
%1 = alloca i32
%2 = call i64 @mt_rand(i32 0, i32 22)
%3 = trunc i64 %2 to i32
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp sge i32 %4, 6
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %9
9: ; preds = %6, %0
%10 = load i32, i32* %1
%11 = icmp sge i32 %10, 11
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 6
store i32 %14, i32* %1
br label %15
15: ; preds = %12, %9
%16 = load i32, i32* %1
%17 = icmp sge i32 %16, 24
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %21
21: ; preds = %18, %15
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
define i32 @non_charlock_chest() {
%1 = tail call i64 @mt_rand(i32 0, i32 22)
%2 = trunc i64 %1 to i32
%3 = icmp sgt i32 %2, 5
%4 = zext i1 %3 to i32
%5 = add nsw i32 %4, %2
%6 = icmp sgt i32 %5, 10
%7 = add nsw i32 %5, 6
%8 = select i1 %6, i32 %7, i32 %5
%9 = icmp sgt i32 %8, 23
%10 = zext i1 %9 to i32
%11 = add nsw i32 %8, %10
ret i32 %11
}
int mi_strcmp(char *String1, char *String2) {
  while (*String1 == *String2 && *String1) {
    String1++;
    String2++;
  }
  return *String1 - *String2;
}


x86 assembly (clang, -O0):
<mi_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jne    1137 <mi_strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <mi_strcmp+0x47>
jmp    1164 <mi_strcmp+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <mi_strcmp+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mi_strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
test   %al,%al
je     1134 <mi_strcmp+0x34>
cmp    %cl,%al
jne    1134 <mi_strcmp+0x34>
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
test   %al,%al
je     1134 <mi_strcmp+0x34>
add    $0x1,%rdx
cmp    %cl,%al
je     1120 <mi_strcmp+0x20>
movsbl %al,%eax
movsbl %cl,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mi_strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %20, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %8, %11
br i1 %12, label %13, label %18
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %5
%19 = phi i1 [ false, %5 ], [ %17, %13 ]
br i1 %19, label %20, label %25
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %4
br label %5
25: ; preds = %18
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = load i8*, i8** %4
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = sub nsw i32 %28, %31
ret i32 %32
}

LLVM IR (-O2):
define i32 @mi_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = icmp eq i8 %3, 0
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %12, %8 ], [ %1, %2 ]
%10 = phi i8* [ %11, %8 ], [ %0, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp ne i8 %13, %14
%16 = icmp eq i8 %13, 0
%17 = or i1 %16, %15
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8 [ %3, %2 ], [ %13, %8 ]
%20 = phi i8 [ %4, %2 ], [ %14, %8 ]
%21 = sext i8 %19 to i32
%22 = sext i8 %20 to i32
%23 = sub nsw i32 %21, %22
ret i32 %23
}
void ff_hevc_put_hevc_bi_w_qpel_h48_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h48_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OutChar(unsigned char);
unsigned char *TokenText(unsigned char);
void PrintToken(unsigned char n) {
  unsigned char *p = TokenText(n);
  unsigned char c;
  do {
    c = *p++;
    OutChar(c & 0x7F);
  } while (!(c & 0x80));
}


x86 assembly (clang, -O0):
<PrintToken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1040 <TokenText@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
and    $0x7f,%eax
movzbl %al,%edi
call   1030 <OutChar@plt>
movzbl -0x11(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113b <PrintToken+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintToken>:
push   %rbp
push   %rbx
push   %rax
call   1040 <TokenText@plt>
mov    %rax,%rbx
nopl   0x0(%rax,%rax,1)
movzbl (%rbx),%ebp
add    $0x1,%rbx
mov    %ebp,%eax
and    $0x7f,%al
movzbl %al,%edi
call   1030 <OutChar@plt>
test   %bpl,%bpl
jns    1130 <PrintToken+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @PrintToken(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = call i8* @TokenText(i8 zeroext %5)
store i8* %6, i8** %3
br label %7
7: ; preds = %16, %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
store i8 %10, i8* %4
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = and i32 %12, 127
%14 = trunc i32 %13 to i8
%15 = call i32 @OutChar(i8 zeroext %14)
br label %16
16: ; preds = %7
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = and i32 %18, 128
%20 = icmp ne i32 %19, 0
%21 = xor i1 %20, true
br i1 %21, label %7, label %22
22: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @PrintToken(i8 zeroext %0) {
%2 = tail call i8* @TokenText(i8 zeroext %0)
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ %2, %1 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = and i8 %6, 127
%8 = tail call i32 @OutChar(i8 zeroext %7)
%9 = icmp sgt i8 %6, -1
br i1 %9, label %3, label %10
10: ; preds = %3
ret void
}
/* Type definitions */
typedef int uint_fast64_t;
typedef int uint_fast32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint_fast32_t mod_mul(uint_fast32_t a, uint_fast32_t b) {
  assert(a <= 0x7FFFFFFE);
  assert(b <= 0x7FFFFFFE);
  return (uint_fast32_t)((uint_fast64_t)a * b % 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<mod_mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x7ffffffe,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x7ffffffe,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    $0x7fffffff,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_mul>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x7fffffff,%ebp
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%ebx
setne  %dil
call   1030 <assert@plt>
imul   %ebp,%ebx
movslq %ebx,%rax
mov    %rax,%rcx
shl    $0x1e,%rcx
add    %rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x3d,%rcx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x1f,%edx
sub    %edx,%ecx
add    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mod_mul(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 = icmp sle i32 %5, 2147483646
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %4
%10 = icmp sle i32 %9, 2147483646
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = mul nsw i32 %13, %14
%16 = srem i32 %15, 2147483647
ret i32 %16
}

LLVM IR (-O2):
define i32 @mod_mul(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 2147483647
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i32 %1, 2147483647
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = mul nsw i32 %1, %0
%10 = srem i32 %9, 2147483647
ret i32 %10
}
/* Type definitions */
typedef size_t int64_t;
typedef size_t int32_t;

/* Variables and functions */
int64_t
aeron_logbuffer_compute_term_begin_position(int32_t active_term_id,
                                            size_t position_bits_to_shift,
                                            int32_t initial_term_id) {
  int64_t term_count = active_term_id - initial_term_id;
  return (term_count << position_bits_to_shift);
}


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

x86 assembly (clang, -O2):
<aeron_logbuffer_compute_term_begin_position>:
mov    %rsi,%rcx
mov    %rdi,%rax
sub    %rdx,%rax
shl    %cl,%rax
ret

LLVM IR (-O0):
define i64 @aeron_logbuffer_compute_term_begin_position(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %6
%10 = sub i64 %8, %9
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = load i64, i64* %5
%13 = shl i64 %11, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @aeron_logbuffer_compute_term_begin_position(i64 %0, i64 %1, i64 %2) {
%4 = sub i64 %0, %2
%5 = shl i64 %4, %1
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ xmlError(int);
void xmlResponse2(int err, int status, char *extra) {
  xmlError(err);
  printf("    <status>%d</status>\n", status);
  if (extra != NULL) {
    printf("    <extra>%s</extra>\n", extra);
  }
}


x86 assembly (clang, -O0):
<xmlResponse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <xmlError@plt>
mov    -0x8(%rbp),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     1168 <xmlResponse2+0x48>
mov    -0x10(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlResponse2>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
call   1030 <xmlError@plt>
lea    0xecc(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %rbx,%rbx
je     1159 <xmlResponse2+0x39>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c" <status>%d</status>\0A\00"
@.str.1 = [23 x i8] c" <extra>%s</extra>\0A\00"
define void @xmlResponse2(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = call i32 @xmlError(i32 %7)
%9 = load i32, i32* %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %6
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c" <status>%d</status>\0A\00"
@.str.1 = [23 x i8] c" <extra>%s</extra>\0A\00"
define void @xmlResponse2(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @xmlError(i32 %0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = icmp eq i8* %2, null
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %2)
br label %9
9: ; preds = %7, %3
ret void
}
const char *bdCompileTime(void) {
  return "Mar 18 2022"
         " "
         "06:27:52";
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"Mar 18 2022 06:27:52\00"
define i8* @bdCompileTime() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"Mar 18 2022 06:27:52\00"
define i8* @bdCompileTime() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
dlclose() {}


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

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

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

LLVM IR (-O2):
define i32 @dlclose() {
ret i32 undef
}
/* Variables and functions */
int util_file_read_line(char *, int, char *);
int dinfo_read_dasd_uid(char *uidfile, char *readbuf) {
  return util_file_read_line(readbuf, 80, uidfile);
}


x86 assembly (clang, -O0):
<dinfo_read_dasd_uid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x50,%esi
call   1030 <util_file_read_line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dinfo_read_dasd_uid>:
mov    %rdi,%rdx
mov    %rsi,%rdi
mov    $0x50,%esi
jmp    1030 <util_file_read_line@plt>

LLVM IR (-O0):
define i32 @dinfo_read_dasd_uid(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 = call i32 @util_file_read_line(i8* %5, i32 80, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @dinfo_read_dasd_uid(i8* %0, i8* %1) {
%3 = tail call i32 @util_file_read_line(i8* %1, i32 80, i8* %0)
ret i32 %3
}
/* Type definitions */
struct timeval {
  long tv_sec;
  scalar_t__ tv_usec;
};
typedef scalar_t__ int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int64_t microseconds() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000000L + tv.tv_usec;
}


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

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

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

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @microseconds() {
%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 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}
rsfopen(name, direction) char *name, direction;
{ dies("remote access to %s not supported", name); }


x86 assembly (clang, -O0):
<rsfopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <dies@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsfopen>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <dies@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"remote access to %s not supported\00"
define i32 @rsfopen(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8
%6 = trunc i32 %1 to i8
store i8* %0, i8** %4
store i8 %6, i8* %5
%7 = load i8*, i8** %4
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @dies to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@.str = [34 x i8] c"remote access to %s not supported\00"
define i32 @rsfopen(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @dies to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
int fn4(int a, int b) { return a - (unsigned)((a / b) * b); }


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn4>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @fn4(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* %3
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
%9 = load i32, i32* %4
%10 = mul nsw i32 %8, %9
%11 = sub i32 %5, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
long double floor(long double);
long double roundToNearestInteger(long double x) { return floor(x + 0.5); }


x86 assembly (clang, -O0):
<roundToNearestInteger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xed9(%rip)
faddp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <floor@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundToNearestInteger>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fadds  0xee2(%rip)
fstpt  (%rsp)
call   1030 <floorl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @roundToNearestInteger(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fadd x86_fp80 %3, 0xK3FFE8000000000000000
%5 = call x86_fp80 @floor(x86_fp80 %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @roundToNearestInteger(x86_fp80 %0) {
%2 = fadd x86_fp80 %0, 0xK3FFE8000000000000000
%3 = tail call x86_fp80 @llvm.floor.f80(x86_fp80 %2)
ret x86_fp80 %3
}
int test_sihi(short x) { return (int)x; }


x86 assembly (clang, -O0):
<test_sihi>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_sihi(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @test_sihi(i16 signext %0) {
%2 = sext i16 %0 to i32
ret i32 %2
}
int main() {
  int x;
  switch (x) {
  case 1: {
    x;
  } break;
  case 2:
    x = 3;
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1130 <main+0x30>
jmp    111f <main+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1135 <main+0x35>
jmp    113c <main+0x3c>
jmp    113c <main+0x3c>
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *griddoor_malloc(scalar_t__);
char *strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *gd_strdup(const char *s1) {
  char *valtoret = griddoor_malloc(strlen(s1) + 1);
  if (!valtoret)
    return NULL;
  return strcpy(valtoret, s1);
}


x86 assembly (clang, -O0):
<gd_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <griddoor_malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116d <gd_strdup+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    117e <gd_strdup+0x4e>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gd_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <griddoor_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <gd_strdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @gd_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i8* @griddoor_malloc(i64 %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %1
store i8* null, i8** %2
br label %16
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = load i8*, i8** %3
%15 = call i8* @strcpy(i8* %13, i8* %14)
store i8* %15, i8** %2
br label %16
16: ; preds = %12, %11
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define i8* @gd_strdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @griddoor_malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i8* @strcpy(i8* %4, i8* dereferenceable(1) %0)
br label %8
8: ; preds = %1, %6
ret i8* %4
}
int large(int x, int y) {
  int flag;
  if (x > y)
    flag = 1;
  else if (x == y)
    flag = 0;
  else
    flag = -1;
  return flag;
}


x86 assembly (clang, -O0):
<large>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1122 <large+0x22>
movl   $0x1,-0xc(%rbp)
jmp    1146 <large+0x46>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    113a <large+0x3a>
movl   $0x0,-0xc(%rbp)
jmp    1141 <large+0x41>
movl   $0xffffffff,-0xc(%rbp)
jmp    1146 <large+0x46>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<large>:
xor    %ecx,%ecx
cmp    %esi,%edi
setne  %cl
neg    %ecx
cmp    %esi,%edi
mov    $0x1,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @large(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* %3
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %5
br label %17
10: ; preds = %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %5
br label %16
15: ; preds = %10
store i32 -1, i32* %5
br label %16
16: ; preds = %15, %14
br label %17
17: ; preds = %16, %9
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @large(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = icmp ne i32 %0, %1
%5 = sext i1 %4 to i32
%6 = select i1 %3, i32 1, i32 %5
ret i32 %6
}