xunge/DecIR huggingface dataset:
void ff_hevc_put_hevc_uni_w_epel_v24_10_sse4() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_secp256k1_add(uintptr_t, uintptr_t, uintptr_t);
void fiat_secp256k1_add(uint32_t out1[8], const uint32_t arg1[8],
                        const uint32_t arg2[8]) {
  internal_fiat_secp256k1_add((uintptr_t)out1, (uintptr_t)arg1,
                              (uintptr_t)arg2);
}


x86 assembly (clang, -O0):
<fiat_secp256k1_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <internal_fiat_secp256k1_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_secp256k1_add>:
jmp    1030 <internal_fiat_secp256k1_add@plt>

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

LLVM IR (-O2):
define void @fiat_secp256k1_add(i32* %0, i32* %1, i32* %2) {
%4 = ptrtoint i32* %0 to i64
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %2 to i64
%7 = tail call i32 @internal_fiat_secp256k1_add(i64 %4, i64 %5, i64 %6)
ret void
}
const char *b(void) { return __func__; }


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

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

LLVM IR (-O0):
@__func__.b = [2 x i8] c"b\00"
define i8* @b() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.b, i64 0, i64 0)
}

LLVM IR (-O2):
@__func__.b = [2 x i8] c"b\00"
define i8* @b() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.b, i64 0, i64 0)
}
/* Type definitions */
struct ebpt_node {
  int dummy;
};
struct eb_root {
  int dummy;
};

/* Variables and functions */
struct ebpt_node *__ebim_insert(struct eb_root *, struct ebpt_node *,
                                unsigned int);
struct ebpt_node *ebim_insert(struct eb_root *root, struct ebpt_node *new,
                              unsigned int len) {
  return __ebim_insert(root, new, len);
}


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

x86 assembly (clang, -O2):
<ebim_insert>:
jmp    1030 <__ebim_insert@plt>

LLVM IR (-O0):
%struct.eb_root = type { i32 }
%struct.ebpt_node = type { i32 }
define %struct.ebpt_node* @ebim_insert(%struct.eb_root* %0, %struct.ebpt_node* %1, i32 %2) {
%4 = alloca %struct.eb_root*
%5 = alloca %struct.ebpt_node*
%6 = alloca i32
store %struct.eb_root* %0, %struct.eb_root** %4
store %struct.ebpt_node* %1, %struct.ebpt_node** %5
store i32 %2, i32* %6
%7 = load %struct.eb_root*, %struct.eb_root** %4
%8 = load %struct.ebpt_node*, %struct.ebpt_node** %5
%9 = load i32, i32* %6
%10 = call %struct.ebpt_node* @__ebim_insert(%struct.eb_root* %7, %struct.ebpt_node* %8, i32 %9)
ret %struct.ebpt_node* %10
}

LLVM IR (-O2):
%struct.eb_root = type { i32 }
%struct.ebpt_node = type { i32 }
define %struct.ebpt_node* @ebim_insert(%struct.eb_root* %0, %struct.ebpt_node* %1, i32 %2) {
%4 = tail call %struct.ebpt_node* @__ebim_insert(%struct.eb_root* %0, %struct.ebpt_node* %1, i32 %2)
ret %struct.ebpt_node* %4
}
/* Variables and functions */
scalar_t__ gl_pop(void **);
void gl_destroy_until(void *what) {
  void *data;
  while (gl_pop(&data) && data != what)
    ;
}


x86 assembly (clang, -O0):
<gl_destroy_until>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <gl_pop@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1145 <gl_destroy_until+0x35>
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1155 <gl_destroy_until+0x45>
jmp    115a <gl_destroy_until+0x4a>
jmp    111c <gl_destroy_until+0xc>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_destroy_until>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <gl_pop@plt>
test   %rax,%rax
je     1133 <gl_destroy_until+0x23>
cmp    %rbx,(%rsp)
jne    1120 <gl_destroy_until+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @gl_destroy_until(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
br label %4
4: ; preds = %13, %1
%5 = call i64 @gl_pop(i8** %3)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = icmp ne i8* %8, %9
br label %11
11: ; preds = %7, %4
%12 = phi i1 [ false, %4 ], [ %10, %7 ]
br i1 %12, label %13, label %14
13: ; preds = %11
br label %4
14: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @gl_destroy_until(i8* readnone %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = call i64 @gl_pop(i8** %2)
%6 = icmp ne i64 %5, 0
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, %0
%9 = select i1 %6, i1 %8, i1 false
br i1 %9, label %4, label %10
10: ; preds = %4
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_34(uint64_t x) {
  __asm__("rolq $34, %0" : "=r"(x) : "0"(x));
  return x;
}


x86 assembly (clang, -O0):
<ROL64_34>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
rol    $0x22,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL64_34>:
mov    %rdi,%rax
rol    $0x22,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_34(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$34, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_34(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$34, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ handle_error(char *);
void *malloc(size_t);
void *Malloc(size_t size) {
  if (size == 0) {
    handle_error("Cannot malloc a size of 0!");
  }
  void *ptr = malloc(size);
  if (ptr == NULL) {
    handle_error("Error on malloc");
  }
  return ptr;
}


x86 assembly (clang, -O0):
<Malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <Malloc+0x23>
lea    0xec2(%rip),%rdi
call   1040 <handle_error@plt>
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1167 <Malloc+0x47>
lea    0xeb9(%rip),%rdi
call   1040 <handle_error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Malloc>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1135 <Malloc+0x15>
lea    0xed0(%rip),%rdi
call   1040 <handle_error@plt>
mov    %rbx,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <Malloc+0x31>
lea    0xecf(%rip),%rdi
call   1040 <handle_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Cannot malloc a size of 0!\00"
@.str.1 = [16 x i8] c"Error on malloc\00"
define i8* @Malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @handle_error(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i64, i64* %2
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 @handle_error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %8
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [27 x i8] c"Cannot malloc a size of 0!\00"
@.str.1 = [16 x i8] c"Error on malloc\00"
define noalias i8* @Malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @handle_error(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i8* @malloc(i64 %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @handle_error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void Output_Color(uint32_t newColor) {}


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

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

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

LLVM IR (-O2):
define void @Output_Color(i32 %0) {
ret void
}
/* Variables and functions */
int vec_splice(void *, size_t, void const *, int, size_t);
int vec_insert(void *vecp, void const *data, size_t pos, size_t size) {
  return vec_splice(vecp, pos, data, 1, size);
}


x86 assembly (clang, -O0):
<vec_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
mov    $0x1,%ecx
call   1030 <vec_splice@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_insert>:
mov    %rcx,%r8
mov    %rsi,%rax
mov    %rdx,%rsi
mov    %rax,%rdx
mov    $0x1,%ecx
jmp    1030 <vec_splice@plt>

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

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

/* Variables and functions */
int ctxsend(struct ddns3_ctx *, char *);
int recvline(struct ddns3_ctx *);
int ddns3_ctx_logout(struct ddns3_ctx *c) {
  int ret;
  ret = ctxsend(c, "LOGOUT");
  if (ret < 0)
    return -1;
  ret = recvline(c);
  if (ret != 1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<ddns3_ctx_logout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <ctxsend@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1155 <ddns3_ctx_logout+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <ddns3_ctx_logout+0x5e>
mov    -0x10(%rbp),%rdi
call   1040 <recvline@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     1177 <ddns3_ctx_logout+0x57>
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <ddns3_ctx_logout+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ddns3_ctx_logout>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1030 <ctxsend@plt>
test   %eax,%eax
js     114a <ddns3_ctx_logout+0x2a>
mov    %rbx,%rdi
call   1040 <recvline@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
setne  %al
neg    %eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ddns3_ctx = type { i32 }
@.str = [7 x i8] c"LOGOUT\00"
define i32 @ddns3_ctx_logout(%struct.ddns3_ctx* %0) {
%2 = alloca i32
%3 = alloca %struct.ddns3_ctx*
%4 = alloca i32
store %struct.ddns3_ctx* %0, %struct.ddns3_ctx** %3
%5 = load %struct.ddns3_ctx*, %struct.ddns3_ctx** %3
%6 = call i32 @ctxsend(%struct.ddns3_ctx* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %17
10: ; preds = %1
%11 = load %struct.ddns3_ctx*, %struct.ddns3_ctx** %3
%12 = call i32 @recvline(%struct.ddns3_ctx* %11)
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 -1, i32* %2
br label %17
16: ; preds = %10
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.ddns3_ctx = type { i32 }
@.str = [7 x i8] c"LOGOUT\00"
define i32 @ddns3_ctx_logout(%struct.ddns3_ctx* %0) {
%2 = tail call i32 @ctxsend(%struct.ddns3_ctx* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp slt i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @recvline(%struct.ddns3_ctx* %0)
%6 = icmp ne i32 %5, 1
%7 = sext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
void vec3_normalize(const float a[3], float out[3]) {
  vec3_mul(a, 1 / vec3_norm(a), out);
}


x86 assembly (clang, -O0):
<vec3_normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <vec3_norm@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1030 <vec3_mul@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_normalize>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <vec3_norm@plt>
lea    0x1(%rax),%ecx
cmp    $0x3,%ecx
mov    $0x0,%esi
cmovb  %eax,%esi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <vec3_mul@plt>

LLVM IR (-O0):
define void @vec3_normalize(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %3
%7 = call i32 (float*, ...) bitcast (i32 (...)* @vec3_norm to i32 (float*, ...)*)(float* %6)
%8 = sdiv i32 1, %7
%9 = load float*, float** %4
%10 = call i32 (float*, i32, float*, ...) bitcast (i32 (...)* @vec3_mul to i32 (float*, i32, float*, ...)*)(float* %5, i32 %8, float* %9)
ret void
}

LLVM IR (-O2):
define void @vec3_normalize(float* %0, float* %1) {
%3 = tail call i32 (float*, ...) bitcast (i32 (...)* @vec3_norm to i32 (float*, ...)*)(float* %0)
%4 = add i32 %3, 1
%5 = icmp ult i32 %4, 3
%6 = select i1 %5, i32 %3, i32 0
%7 = tail call i32 (float*, i32, float*, ...) bitcast (i32 (...)* @vec3_mul to i32 (float*, i32, float*, ...)*)(float* %0, i32 %6, float* %1)
ret void
}
void sigh(int sig) {}


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

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

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

LLVM IR (-O2):
define void @sigh(i32 %0) {
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *zmalloc(size_t size) {
  void *ptr;
  if (size == 0)
    return NULL;
  ptr = malloc(size);
  if (!ptr)
    return NULL;
  memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<zmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <zmalloc+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1180 <zmalloc+0x60>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1169 <zmalloc+0x49>
movq   $0x0,-0x8(%rbp)
jmp    1180 <zmalloc+0x60>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zmalloc>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1148 <zmalloc+0x28>
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1148 <zmalloc+0x28>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
jmp    114b <zmalloc+0x2b>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @zmalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %0)
br label %8
8: ; preds = %3, %1, %6
%9 = phi i8* [ %4, %6 ], [ null, %1 ], [ null, %3 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ gru_dealloc(void **);
void gru_dealloc_string(char **obj) { gru_dealloc((void **)obj); }


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

x86 assembly (clang, -O2):
<gru_dealloc_string>:
jmp    1030 <gru_dealloc@plt>

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

LLVM IR (-O2):
define void @gru_dealloc_string(i8** %0) {
%2 = tail call i32 @gru_dealloc(i8** %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ alignment;

/* Variables and functions */
void *_memory_reallocate(void *, size_t, size_t, unsigned int);
void *rpaligned_realloc(void *ptr, size_t alignment, size_t size,
                        size_t oldsize, unsigned int flags) {
  (void)sizeof(alignment);
  return _memory_reallocate(ptr, size, oldsize, flags);
}


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

x86 assembly (clang, -O2):
<rpaligned_realloc>:
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8d,%ecx
jmp    1030 <_memory_reallocate@plt>

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

LLVM IR (-O2):
define i8* @rpaligned_realloc(i8* %0, i64 %1, i64 %2, i64 %3, i32 %4) {
%6 = tail call i8* @_memory_reallocate(i8* %0, i64 %2, i64 %3, i32 %4)
ret i8* %6
}
void wx1102(type) int *type;
{}


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

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

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

LLVM IR (-O2):
define void @wx1102(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ slag2d_(int *, int *, float *, int *, double *, int *,
                           int *);
int aa_cla_dlag2d(int M, int N, float *SA, int LDSA, double *A, int LDA) {
  int info = 0;
  slag2d_(&M, &N, SA, &LDSA, A, &LDA, &info);
  return info;
}


x86 assembly (clang, -O0):
<aa_cla_dlag2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rcx
lea    -0x24(%rbp),%r9
lea    -0x28(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <slag2d_@plt>
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_dlag2d>:
sub    $0x28,%rsp
mov    %edi,0x24(%rsp)
mov    %esi,0x20(%rsp)
mov    %ecx,0x1c(%rsp)
mov    %r9d,0x18(%rsp)
movl   $0x0,0x14(%rsp)
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
lea    0x24(%rsp),%rdi
lea    0x20(%rsp),%rsi
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r9
call   1030 <slag2d_@plt>
mov    0x14(%rsp),%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @aa_cla_dlag2d(i32 %0, i32 %1, float* %2, i32 %3, double* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca float*
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store float* %2, float** %9
store i32 %3, i32* %10
store double* %4, double** %11
store i32 %5, i32* %12
store i32 0, i32* %13
%14 = load float*, float** %9
%15 = load double*, double** %11
%16 = call i32 @slag2d_(i32* %7, i32* %8, float* %14, i32* %10, double* %15, i32* %12, i32* %13)
%17 = load i32, i32* %13
ret i32 %17
}

LLVM IR (-O2):
define i32 @aa_cla_dlag2d(i32 %0, i32 %1, float* %2, i32 %3, double* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %3, i32* %9
store i32 %5, i32* %10
%12 = bitcast i32* %11 to i8*
store i32 0, i32* %11
%13 = call i32 @slag2d_(i32* %7, i32* %8, float* %2, i32* %9, double* %4, i32* %10, i32* %11)
%14 = load i32, i32* %11
ret i32 %14
}
void sig_hup(int sig) {}


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

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

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

LLVM IR (-O2):
define void @sig_hup(i32 %0) {
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ gettimeofday(struct timeval *, struct timezone *);
int /*<<< orphan*/ perror(char *);
struct timezone wall_tz() {
  struct timeval tv;
  struct timezone tz;
  if (0 != gettimeofday(&tv, &tz)) {
    perror("gettimeofday");
    exit(1);
  }
  return tz;
}


x86 assembly (clang, -O0):
<wall_tz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <gettimeofday@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1169 <wall_tz+0x39>
lea    0xea6(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wall_tz>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <gettimeofday@plt>
test   %rax,%rax
jne    1151 <wall_tz+0x21>
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret
lea    0xea8(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.timezone = type { i32 }
%struct.timeval = type { i32 }
@.str = [13 x i8] c"gettimeofday\00"
define i32 @wall_tz() {
%1 = alloca %struct.timezone
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, %struct.timezone* %1)
%4 = icmp ne i64 0, %3
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = getelementptr inbounds %struct.timezone, %struct.timezone* %1, i32 0, i32 0
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
%struct.timezone = type { i32 }
%struct.timeval = type { i32 }
@.str = [13 x i8] c"gettimeofday\00"
define i32 @wall_tz() {
%1 = alloca %struct.timezone
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i64 @gettimeofday(%struct.timeval* %2, %struct.timezone* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = getelementptr inbounds %struct.timezone, %struct.timezone* %1, i64 0, i32 0
%11 = load i32, i32* %10
ret i32 %11
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_set_quaddobl_start(int n, double *c) {
  int fail, ptos[2];
  ptos[0] = 2;
  ptos[1] = 0;
  fail = _ada_use_c2phc(618, ptos, &n, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_set_quaddobl_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0x1c(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    $0x26a,%edi
lea    -0x4(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_set_quaddobl_start>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %edi,0xc(%rsp)
movq   $0x2,0x10(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    $0x26a,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @sweep_set_quaddobl_start(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
%6 = alloca [2 x i32]
store i32 %0, i32* %3
store double* %1, double** %4
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 2, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 0, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%10 = load double*, double** %4
%11 = call i32 @_ada_use_c2phc(i32 618, i32* %9, i32* %3, double* %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @sweep_set_quaddobl_start(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca [2 x i32]
store i32 %0, i32* %3
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 2, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 0, i32* %7
%8 = call i32 @_ada_use_c2phc(i32 618, i32* %6, i32* %3, double* %1)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void print_version(void) {
  printf("%s version %s\n", "SpamAssassin Client", "3.3.2");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xefa(%rip),%rdx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
lea    0xef1(%rip),%rsi
lea    0xefe(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s version %s\0A\00"
@.str.1 = [20 x i8] c"SpamAssassin Client\00"
@.str.2 = [6 x i8] c"3.3.2\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s version %s\0A\00"
@.str.1 = [20 x i8] c"SpamAssassin Client\00"
@.str.2 = [6 x i8] c"3.3.2\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
RD(i) int i;
{ return (((i) >> 11) & 0x1f); }


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

x86 assembly (clang, -O2):
<RD>:
mov    %edi,%eax
shr    $0xb,%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @RD(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 11
%5 = and i32 %4, 31
ret i32 %5
}

LLVM IR (-O2):
define i32 @RD(i32 %0) {
%2 = lshr i32 %0, 11
%3 = and i32 %2, 31
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, unsigned int);
void w977_efm_exit(unsigned int efio) { outb(0xAA, efio); }


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

x86 assembly (clang, -O2):
<w977_efm_exit>:
mov    %edi,%esi
mov    $0xaa,%edi
jmp    1030 <outb@plt>

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

LLVM IR (-O2):
define void @w977_efm_exit(i32 %0) {
%2 = tail call i32 @outb(i32 170, i32 %0)
ret void
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 6 * 100 + 0); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10600
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10600
}
int main() {
  unsigned long i = 42;
  do {
    __asm__ volatile("movq %%"
                     "rsp"
                     ", %0"
                     : "=r"(i)
                     :
                     : "%"
                       "rsp",
                       "memory");
    printf("0x%lx\n", i);
  } while (0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %rsp,%rsi
lea    0xee2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"0x%lx\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 42, i64* %2
br label %3
3: ; preds = %0
%4 = call i64 asm sideeffect "movq %rsp, $0", "=r,~{rsp},~{memory},~{dirflag},~{fpsr},~{flags}"()
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %5)
br label %7
7: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"0x%lx\0A\00"
define i32 @main() {
%1 = tail call i64 asm sideeffect "movq %rsp, $0", "=r,~{rsp},~{memory},~{dirflag},~{fpsr},~{flags}"()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
void bz_internal_error(int errcode) { return; }


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

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

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

LLVM IR (-O2):
define void @bz_internal_error(i32 %0) {
ret void
}
void arm_backtrace_eabi(int cpu, int buftype, struct pt_regs *const regs,
                        unsigned int depth) {}


x86 assembly (clang, -O0):
<arm_backtrace_eabi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pt_regs = type opaque
define void @arm_backtrace_eabi(i32 %0, i32 %1, %struct.pt_regs* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.pt_regs*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store %struct.pt_regs* %2, %struct.pt_regs** %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @arm_backtrace_eabi(i32 %0, i32 %1, %struct.pt_regs* nocapture %2, i32 %3) {
ret void
}
void gdGdcGetDrvStat(int *param) { param[1] = 32; }


x86 assembly (clang, -O0):
<gdGdcGetDrvStat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x20,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdGdcGetDrvStat>:
movl   $0x20,0x4(%rdi)
ret

LLVM IR (-O0):
define void @gdGdcGetDrvStat(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
store i32 32, i32* %4
ret void
}

LLVM IR (-O2):
define void @gdGdcGetDrvStat(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
store i32 32, i32* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int smp_sio_seek(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
int smp_sio_seek2end(FILE *fp) { return smp_sio_seek(fp, 0, SEEK_END); }


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

x86 assembly (clang, -O2):
<smp_sio_seek2end>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
jmp    1030 <smp_sio_seek@plt>

LLVM IR (-O0):
@SEEK_END = global i32 0
define i32 @smp_sio_seek2end(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @SEEK_END
%5 = call i32 @smp_sio_seek(i32* %3, i32 0, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i32 @smp_sio_seek2end(i32* %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @smp_sio_seek(i32* %0, i32 0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ SET_CLKOUT_TO(int);
void SET_CLKOUT_HIGH(void) { SET_CLKOUT_TO(1); }


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

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

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

LLVM IR (-O2):
define void @SET_CLKOUT_HIGH() {
%1 = tail call i32 @SET_CLKOUT_TO(i32 1)
ret void
}
int implication(int x, int y) { return (!x) | y; }


x86 assembly (clang, -O0):
<implication>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<implication>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @implication(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 ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = load i32, i32* %4
%10 = or i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @implication(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = zext i1 %3 to i32
%5 = or i32 %4, %1
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int mkdirat(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int mkdir(const char *pathname, mode_t mode) {
  return mkdirat(AT_FDCWD, pathname, mode);
}


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

x86 assembly (clang, -O2):
<mkdir>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
jmp    1030 <mkdirat@plt>

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

LLVM IR (-O2):
@AT_FDCWD = global i32 0
define i32 @mkdir(i8* %0, i32 %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = tail call i32 @mkdirat(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
void prompt() {
  move(22, 0);
  clrtoeol();
}


x86 assembly (clang, -O0):
<prompt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x16,%edi
xor    %esi,%esi
call   1040 <move@plt>
mov    $0x0,%al
call   1030 <clrtoeol@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt>:
push   %rax
mov    $0x16,%edi
xor    %esi,%esi
call   1040 <move@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <clrtoeol@plt>

LLVM IR (-O0):
define void @prompt() {
%1 = call i32 @move(i32 22, i32 0)
%2 = call i32 (...) @clrtoeol()
ret void
}

LLVM IR (-O2):
define void @prompt() {
%1 = tail call i32 @move(i32 22, i32 0)
%2 = tail call i32 (...) @clrtoeol()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_preg64preg64pimm32_reg32(int reg1, int reg2, unsigned int imm32,
                                  int reg3) {
  put8(0x89);
  put8((reg3 << 3) | 0x84);
  put8(reg1 | (reg2 << 3));
  put32(imm32);
}


x86 assembly (clang, -O0):
<mov_preg64preg64pimm32_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    $0x89,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%edi
shl    $0x3,%edi
or     $0x84,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_preg64preg64pimm32_reg32>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%r15d
mov    $0x89,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     $0x84,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
shl    $0x3,%ebp
or     %r15d,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_preg64preg64pimm32_reg32(i32 %0, i32 %1, i32 %2, i32 %3) {
%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 %3, i32* %8
%9 = call i32 @put8(i32 137)
%10 = load i32, i32* %8
%11 = shl i32 %10, 3
%12 = or i32 %11, 132
%13 = call i32 @put8(i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = shl i32 %15, 3
%17 = or i32 %14, %16
%18 = call i32 @put8(i32 %17)
%19 = load i32, i32* %7
%20 = call i32 @put32(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mov_preg64preg64pimm32_reg32(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @put8(i32 137)
%6 = shl i32 %3, 3
%7 = or i32 %6, 132
%8 = tail call i32 @put8(i32 %7)
%9 = shl i32 %1, 3
%10 = or i32 %9, %0
%11 = tail call i32 @put8(i32 %10)
%12 = tail call i32 @put32(i32 %2)
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *XSUM_lastNameFromPath(const char *path) {
  const char *name = path;
  if (strrchr(name, '/'))
    name = strrchr(name, '/') + 1;
  if (strrchr(name, '\\'))
    name = strrchr(name, '\\') + 1;
  return name;
}


x86 assembly (clang, -O0):
<XSUM_lastNameFromPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
cmp    $0x0,%rax
je     1152 <XSUM_lastNameFromPath+0x42>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
cmp    $0x0,%rax
je     1180 <XSUM_lastNameFromPath+0x70>
mov    -0x10(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XSUM_lastNameFromPath>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rbx
test   %rax,%rax
cmove  %r14,%rbx
mov    %rbx,%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @XSUM_lastNameFromPath(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
%6 = tail call i8* @strrchr(i8* dereferenceable(1) %5, i8 signext 92)
%7 = icmp eq i8* %6, null
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = select i1 %7, i8* %5, i8* %8
ret i8* %9
}
void setup_signal(void) {}


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

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

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

LLVM IR (-O2):
define void @setup_signal() {
ret void
}
void out8(unsigned long addr, unsigned char data) {
  *(volatile unsigned char *)addr = data;
}


x86 assembly (clang, -O0):
<out8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<out8>:
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @out8(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i8*
store volatile i8 %5, i8* %7
ret void
}

LLVM IR (-O2):
define void @out8(i64 %0, i8 zeroext %1) {
%3 = inttoptr i64 %0 to i8*
store volatile i8 %1, i8* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ factorial(int);
int __main(void) {
  int i;
  for (i = 0; i < 13; i++)
    factorial(i);
  return 0;
}


x86 assembly (clang, -O0):
<__main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xd,-0x4(%rbp)
jge    113f <__main+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <__main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__main>:
push   %rax
xor    %edi,%edi
call   1030 <factorial@plt>
mov    $0x1,%edi
call   1030 <factorial@plt>
mov    $0x2,%edi
call   1030 <factorial@plt>
mov    $0x3,%edi
call   1030 <factorial@plt>
mov    $0x4,%edi
call   1030 <factorial@plt>
mov    $0x5,%edi
call   1030 <factorial@plt>
mov    $0x6,%edi
call   1030 <factorial@plt>
mov    $0x7,%edi
call   1030 <factorial@plt>
mov    $0x8,%edi
call   1030 <factorial@plt>
mov    $0x9,%edi
call   1030 <factorial@plt>
mov    $0xa,%edi
call   1030 <factorial@plt>
mov    $0xb,%edi
call   1030 <factorial@plt>
mov    $0xc,%edi
call   1030 <factorial@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @__main() {
%1 = tail call i32 @factorial(i32 0)
%2 = tail call i32 @factorial(i32 1)
%3 = tail call i32 @factorial(i32 2)
%4 = tail call i32 @factorial(i32 3)
%5 = tail call i32 @factorial(i32 4)
%6 = tail call i32 @factorial(i32 5)
%7 = tail call i32 @factorial(i32 6)
%8 = tail call i32 @factorial(i32 7)
%9 = tail call i32 @factorial(i32 8)
%10 = tail call i32 @factorial(i32 9)
%11 = tail call i32 @factorial(i32 10)
%12 = tail call i32 @factorial(i32 11)
%13 = tail call i32 @factorial(i32 12)
ret i32 0
}
int test3(int e, int f) { return (e ^ 6) == (f ^ 4); }


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x6,%eax
mov    -0x8(%rbp),%ecx
xor    $0x4,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
xor    $0x2,%esi
xor    %eax,%eax
cmp    %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @test3(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 = xor i32 %5, 6
%7 = load i32, i32* %4
%8 = xor i32 %7, 4
%9 = icmp eq i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @test3(i32 %0, i32 %1) {
%3 = xor i32 %1, 2
%4 = icmp eq i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
void BN_GF2m_mod_sqrt_arr(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_GF2m_mod_sqrt_arr() {
ret void
}
void bug(n) int n;
{
  printf("Please tell jim@rand-unix that fatal bug %d happened.\n", n);
  exit(0);
}


x86 assembly (clang, -O0):
<bug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<bug>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Please tell jim@rand-unix that fatal bug %d happened.\0A\00"
define void @bug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [55 x i8] c"Please tell jim@rand-unix that fatal bug %d happened.\0A\00"
define void @bug(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %0)
tail call void @exit(i32 0)
unreachable
}