xunge/DecIR huggingface dataset:
/* Variables and functions */
int _fsetxattr(int, char const *, void const *, size_t, int /*<<< orphan*/);
int errno;
int xattr_set(int fd, const char *name, const void *value, size_t size) {
  if (_fsetxattr(fd, name, value, size, 0) == -1)
    return -errno;
  return 0;
}


x86 assembly (clang, -O0):
<xattr_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <_fsetxattr@plt>
cmp    $0xffffffff,%eax
jne    115a <xattr_set+0x4a>
xor    %eax,%eax
mov    0x2e90(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <xattr_set+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xattr_set>:
push   %rbx
xor    %ebx,%ebx
xor    %r8d,%r8d
call   1030 <_fsetxattr@plt>
mov    0x2ebe(%rip),%rdx
xor    %ecx,%ecx
sub    (%rdx),%ecx
cmp    $0xffffffff,%eax
cmovne %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @xattr_set(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @_fsetxattr(i32 %0, i8* %1, i8* %2, i64 %3, i32 0)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = select i1 %6, i32 %8, i32 0
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ PTRACE_CONT;
int /*<<< orphan*/ perror(char *);
int ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *);
int cont_trace(pid_t child) {
  int ret;
  ret = ptrace(PTRACE_CONT, child, NULL, NULL);
  if (ret) {
    perror("ptrace(PTRACE_CONT) failed");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cont_trace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <ptrace@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1168 <cont_trace+0x48>
lea    0xea9(%rip),%rdi
call   1040 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    116f <cont_trace+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cont_trace>:
push   %rbx
mov    %edi,%esi
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
xor    %ebx,%ebx
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <ptrace@plt>
test   %eax,%eax
jne    113f <cont_trace+0x1f>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeba(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%ebx
jmp    113b <cont_trace+0x1b>

LLVM IR (-O0):
@PTRACE_CONT = global i32 0
@.str = [27 x i8] c"ptrace(PTRACE_CONT) failed\00"
define i32 @cont_trace(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* @PTRACE_CONT
%6 = load i32, i32* %3
%7 = call i32 @ptrace(i32 %5, i32 %6, i32* null, i32* null)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@PTRACE_CONT = global i32 0
@.str = [27 x i8] c"ptrace(PTRACE_CONT) failed\00"
define i32 @cont_trace(i32 %0) {
%2 = load i32, i32* @PTRACE_CONT
%3 = tail call i32 @ptrace(i32 %2, i32 %0, i32* null, i32* null)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ 1, %5 ], [ 0, %1 ]
ret i32 %8
}
void tegra_cl_dvfs_disable(struct tegra_cl_dvfs *cld) {}


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

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

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

LLVM IR (-O2):
%struct.tegra_cl_dvfs = type opaque
define void @tegra_cl_dvfs_disable(%struct.tegra_cl_dvfs* nocapture %0) {
ret void
}
unrecognized_instruction(i) int i;
{ PI_printf("Unrecognized instruction: %#x", i); }


x86 assembly (clang, -O0):
<unrecognized_instruction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <PI_printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unrecognized_instruction>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
xor    %eax,%eax
jmp    1030 <PI_printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Unrecognized instruction: %#x\00"
define i32 @unrecognized_instruction(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @PI_printf to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [30 x i8] c"Unrecognized instruction: %#x\00"
define i32 @unrecognized_instruction(i32 %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @PI_printf to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx) {}


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

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

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

LLVM IR (-O2):
%struct.blk_mq_hw_ctx = type opaque
define void @blk_mq_debugfs_unregister_sched_hctx(%struct.blk_mq_hw_ctx* nocapture %0) {
ret void
}
/* Variables and functions */
int ExaToAscii(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("\n\nUSAGE: exaconv exafile.txt\n");
    return -1;
  }
  return ExaToAscii(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <main+0x48>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <ExaToAscii@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1139 <main+0x19>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
pop    %rax
jmp    1040 <ExaToAscii@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"\0A\0AUSAGE: exaconv exafile.txt\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @ExaToAscii(i8* %13)
store i32 %14, i32* %3
br label %15
15: ; preds = %10, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@str = [29 x i8] c"\0A\0AUSAGE: exaconv exafile.txt\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @ExaToAscii(i8* %8)
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ -1, %4 ], [ %9, %6 ]
ret i32 %11
}
/* Type definitions */
struct PosTagger {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FreePosTagger(struct PosTagger *);
void free_tag(struct PosTagger *handle) { FreePosTagger(handle); }


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

x86 assembly (clang, -O2):
<free_tag>:
jmp    1030 <FreePosTagger@plt>

LLVM IR (-O0):
%struct.PosTagger = type { i32 }
define void @free_tag(%struct.PosTagger* %0) {
%2 = alloca %struct.PosTagger*
store %struct.PosTagger* %0, %struct.PosTagger** %2
%3 = load %struct.PosTagger*, %struct.PosTagger** %2
%4 = call i32 @FreePosTagger(%struct.PosTagger* %3)
ret void
}

LLVM IR (-O2):
%struct.PosTagger = type { i32 }
define void @free_tag(%struct.PosTagger* %0) {
%2 = tail call i32 @FreePosTagger(%struct.PosTagger* %0)
ret void
}
void av_hash_final_hex() {}


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

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

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

LLVM IR (-O2):
define void @av_hash_final_hex() {
ret void
}
/* Type definitions */
struct xattr_list {
  int dummy;
};

/* Variables and functions */
struct xattr_list *get_xattr(int i, unsigned int *count, int j) {
  return NULL;
}


x86 assembly (clang, -O0):
<get_xattr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.xattr_list = type { i32 }
define %struct.xattr_list* @get_xattr(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
ret %struct.xattr_list* null
}

LLVM IR (-O2):
%struct.xattr_list = type { i32 }
define noalias %struct.xattr_list* @get_xattr(i32 %0, i32* nocapture readnone %1, i32 %2) {
ret %struct.xattr_list* null
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
int mysleep(unsigned int s) {
  unsigned int i;
  for (i = 0; i < s; i++) {
    usleep(1);
  }
}


x86 assembly (clang, -O0):
<mysleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1146 <mysleep+0x36>
mov    $0x1,%edi
call   1030 <usleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <mysleep+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysleep>:
push   %rbx
test   %edi,%edi
je     112f <mysleep+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <usleep@plt>
add    $0xffffffff,%ebx
jne    1120 <mysleep+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @mysleep(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @usleep(i32 1)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret i32 undef
}
void ff_hevc_put_hevc_bi_w_qpel_v48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_v48_10_sse4() {
ret void
}
/* Variables and functions */
unsigned long nibble_sort_word_payer(unsigned long);
void nibble_sort_payer(unsigned long *buf) {
  unsigned long *b = buf;
  for (int i = 0; i < 1024; i++) {
    buf[i] = nibble_sort_word_payer(b[i]);
  }
}


x86 assembly (clang, -O0):
<nibble_sort_payer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x400,-0x14(%rbp)
jge    1166 <nibble_sort_payer+0x56>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <nibble_sort_word_payer@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <nibble_sort_payer+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble_sort_payer>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <nibble_sort_word_payer@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    $0x400,%rbx
jne    1120 <nibble_sort_payer+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @nibble_sort_payer(i64* nocapture %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %8, %3 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = load i64, i64* %5
%7 = tail call i64 @nibble_sort_word_payer(i64 %6)
store i64 %7, i64* %5
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 1024
br i1 %9, label %2, label %3
}
/* Type definitions */
struct zfcp_reqlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BUG_ON(int);
int /*<<< orphan*/ kfree(struct zfcp_reqlist *);
int /*<<< orphan*/ zfcp_reqlist_isempty(struct zfcp_reqlist *);
void zfcp_reqlist_free(struct zfcp_reqlist *rl) {
  BUG_ON(!zfcp_reqlist_isempty(rl));
  kfree(rl);
}


x86 assembly (clang, -O0):
<zfcp_reqlist_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <zfcp_reqlist_isempty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <BUG_ON@plt>
mov    -0x8(%rbp),%rdi
call   1050 <kfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zfcp_reqlist_free>:
push   %rbx
mov    %rdi,%rbx
call   1030 <zfcp_reqlist_isempty@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <BUG_ON@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <kfree@plt>

LLVM IR (-O0):
%struct.zfcp_reqlist = type { i32 }
define void @zfcp_reqlist_free(%struct.zfcp_reqlist* %0) {
%2 = alloca %struct.zfcp_reqlist*
store %struct.zfcp_reqlist* %0, %struct.zfcp_reqlist** %2
%3 = load %struct.zfcp_reqlist*, %struct.zfcp_reqlist** %2
%4 = call i32 @zfcp_reqlist_isempty(%struct.zfcp_reqlist* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 @BUG_ON(i32 %7)
%9 = load %struct.zfcp_reqlist*, %struct.zfcp_reqlist** %2
%10 = call i32 @kfree(%struct.zfcp_reqlist* %9)
ret void
}

LLVM IR (-O2):
%struct.zfcp_reqlist = type { i32 }
define void @zfcp_reqlist_free(%struct.zfcp_reqlist* %0) {
%2 = tail call i32 @zfcp_reqlist_isempty(%struct.zfcp_reqlist* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @BUG_ON(i32 %4)
%6 = tail call i32 @kfree(%struct.zfcp_reqlist* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ load_blacklist();
void *internal_load_blacklist(void *useless) {
  load_blacklist();
  return NULL;
}


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

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

LLVM IR (-O0):
define i8* @internal_load_blacklist(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @load_blacklist()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @internal_load_blacklist(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @load_blacklist()
ret i8* null
}
void Init_video(char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @Init_video(i8** nocapture %0) {
ret void
}
/* Type definitions */
struct firewireDevice {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeDevice(struct device *);
void firewireFreeDevice(struct firewireDevice *dev) {
  freeDevice((struct device *)dev);
}


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

x86 assembly (clang, -O2):
<firewireFreeDevice>:
jmp    1030 <freeDevice@plt>

LLVM IR (-O0):
%struct.firewireDevice = type { i32 }
%struct.device = type { i32 }
define void @firewireFreeDevice(%struct.firewireDevice* %0) {
%2 = alloca %struct.firewireDevice*
store %struct.firewireDevice* %0, %struct.firewireDevice** %2
%3 = load %struct.firewireDevice*, %struct.firewireDevice** %2
%4 = bitcast %struct.firewireDevice* %3 to %struct.device*
%5 = call i32 @freeDevice(%struct.device* %4)
ret void
}

LLVM IR (-O2):
%struct.firewireDevice = type { i32 }
%struct.device = type { i32 }
define void @firewireFreeDevice(%struct.firewireDevice* %0) {
%2 = bitcast %struct.firewireDevice* %0 to %struct.device*
%3 = tail call i32 @freeDevice(%struct.device* %2)
ret void
}
/* Variables and functions */
void *CreateEnvironmentDriver(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *);
void *CreateEnvironment() {
  return CreateEnvironmentDriver(NULL, NULL, NULL, NULL, NULL);
}


x86 assembly (clang, -O0):
<CreateEnvironment>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdi
mov    %r8,%rsi
mov    %r8,%rdx
mov    %r8,%rcx
call   1030 <CreateEnvironmentDriver@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateEnvironment>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <CreateEnvironmentDriver@plt>

LLVM IR (-O0):
define i8* @CreateEnvironment() {
%1 = call i8* @CreateEnvironmentDriver(i32* null, i32* null, i32* null, i32* null, i32* null)
ret i8* %1
}

LLVM IR (-O2):
define i8* @CreateEnvironment() {
%1 = tail call i8* @CreateEnvironmentDriver(i32* null, i32* null, i32* null, i32* null, i32* null)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ test_vectors();
int main() {
  if (test_vectors())
    printf("test vectors ok\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_vectors@plt>
cmp    $0x0,%rax
je     114c <main+0x2c>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_vectors@plt>
test   %rax,%rax
je     1139 <main+0x19>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"test vectors ok\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_vectors()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"test vectors ok\00"
define i32 @main() {
%1 = tail call i64 (...) @test_vectors()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ibar(int *);
foo(int n) {
  int ia[16];
  int ib[16];
  int ic[16];
  int i;
  for (i = 0; i < 16; i++) {
    ia[i] = ib[i];
  }
  ibar(ia);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xd4(%rbp)
cmpl   $0x10,-0xd4(%rbp)
jge    1162 <foo+0x52>
movslq -0xd4(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%ecx
movslq -0xd4(%rbp),%rax
mov    %ecx,-0x50(%rbp,%rax,4)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1128 <foo+0x18>
lea    -0x50(%rbp),%rdi
call   1030 <ibar@plt>
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sub    $0x48,%rsp
mov    %rsp,%rdi
call   1030 <ibar@plt>
add    $0x48,%rsp
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = alloca [16 x i32]
%3 = bitcast [16 x i32]* %2 to i8*
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%5 = call i32 @ibar(i32* %4)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
scalar_t__ EBUSY;
scalar_t__ pthread_mutex_trylock(int /*<<< orphan*/ *);
int hts_mutex_trylock(pthread_mutex_t *m) {
  return pthread_mutex_trylock(m) == EBUSY;
}


x86 assembly (clang, -O0):
<hts_mutex_trylock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_mutex_trylock@plt>
mov    0x2eb4(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hts_mutex_trylock>:
push   %rax
call   1030 <pthread_mutex_trylock@plt>
mov    0x2ec3(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EBUSY = global i64 0
define i32 @hts_mutex_trylock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @pthread_mutex_trylock(i32* %3)
%5 = load i64, i64* @EBUSY
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@EBUSY = global i64 0
define i32 @hts_mutex_trylock(i32* %0) {
%2 = tail call i64 @pthread_mutex_trylock(i32* %0)
%3 = load i64, i64* @EBUSY
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
float flt_mul_add(float a, float c) { return (a * a) + c; }


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

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

LLVM IR (-O0):
define float @flt_mul_add(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 = load float, float* %4
%8 = call float @llvm.fmuladd.f32(float %5, float %6, float %7)
ret float %8
}

LLVM IR (-O2):
define float @flt_mul_add(float %0, float %1) {
%3 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %1)
ret float %3
}
/* Variables and functions */
int syscall_link(char *, char *);
int link(char *old, char *new) { return syscall_link(old, new); }


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

x86 assembly (clang, -O2):
<link>:
jmp    1030 <syscall_link@plt>

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

LLVM IR (-O2):
define i32 @link(i8* %0, i8* %1) {
%3 = tail call i32 @syscall_link(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int sum(int *, int);
int main() {
  int n;
  scanf("%d", &n);
  int arr[n];
  printf("%d", sum(arr, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <sum@plt>
mov    %eax,%esi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xebe(%rip),%r14
lea    -0x14(%rbp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    %rsp,%rbx
mov    -0x14(%rbp),%eax
mov    %rsp,%rdi
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
mov    -0x14(%rbp),%esi
call   1040 <sum@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rsp
xor    %eax,%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i32, i64 %7
store i64 %7, i64* %4
%10 = load i32, i32* %2
%11 = call i32 @sum(i32* %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
store i32 0, i32* %1
%13 = load i8*, i8** %3
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
%7 = alloca i32, i64 %5
%8 = load i32, i32* %1
%9 = call i32 @sum(i32* %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xc9() {
  Assert_real((isdigit(201) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              1010, ("isdigit should be 0 for 0xc9"));
}


x86 assembly (clang, -O0):
<t_isdigit_0xc9>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc9,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3f2,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0xc9>:
push   %rax
mov    $0xc9,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3f2,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xc9\00"
define void @t_isdigit_0xc9() {
%1 = call i64 @isdigit(i32 201)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1010, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xc9\00"
define void @t_isdigit_0xc9() {
%1 = tail call i64 @isdigit(i32 201)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1010, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void bpf_jit_free(struct bpf_prog *fp) {}


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

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

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

LLVM IR (-O2):
%struct.bpf_prog = type opaque
define void @bpf_jit_free(%struct.bpf_prog* nocapture %0) {
ret void
}
char decimal(unsigned char *d, unsigned char v, unsigned char step) {
  unsigned char c;
  c = '0';
  while (v >= step) {
    v -= step;
    c++;
  }
  *d = c;
  return v;
}


x86 assembly (clang, -O0):
<decimal>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movb   $0x30,-0xb(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jl     1141 <decimal+0x41>
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%eax
sub    %ecx,%eax
mov    %al,-0x9(%rbp)
mov    -0xb(%rbp),%al
add    $0x1,%al
mov    %al,-0xb(%rbp)
jmp    1117 <decimal+0x17>
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movsbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decimal>:
mov    %esi,%eax
mov    $0x30,%cl
cmp    %dl,%al
jb     1119 <decimal+0x19>
mov    $0x30,%cl
nopw   0x0(%rax,%rax,1)
sub    %dl,%al
add    $0x1,%cl
cmp    %dl,%al
jae    1110 <decimal+0x10>
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define signext i8 @decimal(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
store i8 48, i8* %7
br label %8
8: ; preds = %14, %3
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = icmp sge i32 %10, %12
br i1 %13, label %14, label %23
14: ; preds = %8
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = sub nsw i32 %18, %16
%20 = trunc i32 %19 to i8
store i8 %20, i8* %5
%21 = load i8, i8* %7
%22 = add i8 %21, 1
store i8 %22, i8* %7
br label %8
23: ; preds = %8
%24 = load i8, i8* %7
%25 = load i8*, i8** %4
store i8 %24, i8* %25
%26 = load i8, i8* %5
ret i8 %26
}

LLVM IR (-O2):
define signext i8 @decimal(i8* nocapture writeonly %0, i8 zeroext %1, i8 zeroext %2) {
%4 = icmp ult i8 %1, %2
br i1 %4, label %11, label %5
5: ; preds = %3, %5
%6 = phi i8 [ %9, %5 ], [ 48, %3 ]
%7 = phi i8 [ %8, %5 ], [ %1, %3 ]
%8 = sub i8 %7, %2
%9 = add i8 %6, 1
%10 = icmp ult i8 %8, %2
br i1 %10, label %11, label %5
11: ; preds = %5, %3
%12 = phi i8 [ %1, %3 ], [ %8, %5 ]
%13 = phi i8 [ 48, %3 ], [ %9, %5 ]
store i8 %13, i8* %0
ret i8 %12
}
void write8(unsigned int reg1, signed char val) {
  unsigned char *reg;
  reg = (unsigned char *)reg1;
  *(reg) = (char)val;
}


x86 assembly (clang, -O0):
<write8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @write8(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %5
%9 = load i8, i8* %4
%10 = load i8*, i8** %5
store i8 %9, i8* %10
ret void
}

LLVM IR (-O2):
define void @write8(i32 %0, i8 signext %1) {
%3 = zext i32 %0 to i64
%4 = inttoptr i64 %3 to i8*
store i8 %1, i8* %4
ret void
}
/* Type definitions */
struct llib_stat_t {
  int dummy;
};

/* Variables and functions */
scalar_t__ llib_sys_lstat(char const *, struct llib_stat_t *);
__attribute__((unused)) int lstat(const char *path, struct llib_stat_t *st) {
  return llib_sys_lstat(path, st) ? 0 : -1;
}


x86 assembly (clang, -O0):
<lstat>:
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 <llib_sys_lstat@plt>
mov    %rax,%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lstat>:
push   %rax
call   1030 <llib_sys_lstat@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.llib_stat_t = type { i32 }
define i32 @lstat(i8* %0, %struct.llib_stat_t* %1) {
%3 = alloca i8*
%4 = alloca %struct.llib_stat_t*
store i8* %0, i8** %3
store %struct.llib_stat_t* %1, %struct.llib_stat_t** %4
%5 = load i8*, i8** %3
%6 = load %struct.llib_stat_t*, %struct.llib_stat_t** %4
%7 = call i64 @llib_sys_lstat(i8* %5, %struct.llib_stat_t* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 -1
ret i32 %10
}

LLVM IR (-O2):
%struct.llib_stat_t = type { i32 }
define i32 @lstat(i8* %0, %struct.llib_stat_t* %1) {
%3 = tail call i64 @llib_sys_lstat(i8* %0, %struct.llib_stat_t* %1)
%4 = icmp eq i64 %3, 0
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fputc(int, int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) int softboundcets_fputc(int c,
                                                               FILE *stream) {
  return fputc(c, stream);
}


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

x86 assembly (clang, -O2):
<softboundcets_fputc>:
jmp    1030 <fputc@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_fputc(i32 %0, i32* %1) {
%3 = tail call i32 @fputc(i32 %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int LZ4_freeHC(void *LZ4HC_Data) {
  if (!LZ4HC_Data)
    return 0;
  free(LZ4HC_Data);
  return 0;
}


x86 assembly (clang, -O0):
<LZ4_freeHC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <LZ4_freeHC+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1143 <LZ4_freeHC+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_freeHC>:
test   %rdi,%rdi
je     111f <LZ4_freeHC+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @LZ4_freeHC(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret i32 0
}
void f82(void) {
  ({
    ({ 0; });
    ({ 0; });
    goto a;
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
a:
  0;
}


x86 assembly (clang, -O0):
<f82>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f82() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %1
store i32 0, i32* %2
%5 = load i32, i32* %2
br label %6
6: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @f82() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
void nil_imat(int nx, int ny, int **p) { memset(*p, 0, sizeof(int) * nx * ny); }


x86 assembly (clang, -O0):
<nil_imat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nil_imat>:
mov    (%rdx),%rax
imul   %esi,%edi
lea    0x0(,%rdi,4),%edx
mov    %rax,%rdi
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @nil_imat(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*** %6
%8 = load i32*, i32** %7
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = mul i64 4, %10
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = mul i64 %11, %13
%15 = trunc i64 %14 to i32
%16 = call i32 @memset(i32* %8, i32 0, i32 %15)
ret void
}

LLVM IR (-O2):
define void @nil_imat(i32 %0, i32 %1, i32** nocapture %2) {
%4 = load i32*, i32** %2
%5 = shl i32 %0, 2
%6 = mul i32 %5, %1
%7 = tail call i32 @memset(i32* %4, i32 0, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mat_vec() { printf("inside mat_vec\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"inside mat_vec\0A\00"
define void @mat_vec() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"inside mat_vec\00"
define void @mat_vec() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
const char *unqlite_lib_version(void) { return "1.1.2"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"1.1.2\00"
define i8* @unqlite_lib_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void CtpForwardingEngineP$0$CtpInfo$triggerImmediateRouteUpdate(void) {
  CtpRoutingEngineP$0$CtpInfo$triggerImmediateRouteUpdate();
}


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

x86 assembly (clang, -O2):
<CtpForwardingEngineP$0$CtpInfo$triggerImmediateRouteUpdate>:
xor    %eax,%eax
jmp    1030 <CtpRoutingEngineP$0$CtpInfo$triggerImmediateRouteUpdate@plt>

LLVM IR (-O0):
define void @"CtpForwardingEngineP$0$CtpInfo$triggerImmediateRouteUpdate"() {
%1 = call i32 (...) @"CtpRoutingEngineP$0$CtpInfo$triggerImmediateRouteUpdate"()
ret void
}

LLVM IR (-O2):
define void @"CtpForwardingEngineP$0$CtpInfo$triggerImmediateRouteUpdate"() {
%1 = tail call i32 (...) @"CtpRoutingEngineP$0$CtpInfo$triggerImmediateRouteUpdate"()
ret void
}
/* Variables and functions */
double parsedimen(char **, void (*)());
void stub1();
double singledimen(char *str, void (*errorfn)(void), void (*usagefn)(void)) {
  double num = parsedimen(&str, errorfn);
  if (*str)
    (*usagefn)();
  return (num);
}


x86 assembly (clang, -O0):
<singledimen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdi
call   1030 <parsedimen@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <singledimen+0x36>
call   *-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<singledimen>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <parsedimen@plt>
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
je     113b <singledimen+0x2b>
movsd  %xmm0,0x8(%rsp)
call   *%rbx
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @singledimen(i8* %0, void ()* %1, void ()* %2) {
%4 = alloca i8*
%5 = alloca void ()*
%6 = alloca void ()*
%7 = alloca double
store i8* %0, i8** %4
store void ()* %1, void ()** %5
store void ()* %2, void ()** %6
%8 = load void ()*, void ()** %5
%9 = bitcast void ()* %8 to void (...)*
%10 = call double @parsedimen(i8** %4, void (...)* %9)
store double %10, double* %7
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load void ()*, void ()** %6
br label %16
16: ; preds = %14, %3
%17 = load double, double* %7
ret double %17
}

LLVM IR (-O2):
define double @singledimen(i8* %0, void ()* %1, void ()* nocapture %2) {
%4 = alloca i8*
store i8* %0, i8** %4
%5 = bitcast void ()* %1 to void (...)*
%6 = call double @parsedimen(i8** %4, void (...)* %5)
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %3
br label %11
11: ; preds = %10, %3
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ output_eth_tx(unsigned int);
void put_eth(unsigned i) { output_eth_tx(i); }


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

x86 assembly (clang, -O2):
<put_eth>:
jmp    1030 <output_eth_tx@plt>

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

LLVM IR (-O2):
define void @put_eth(i32 %0) {
%2 = tail call i32 @output_eth_tx(i32 %0)
ret void
}
void chrRmblk(char *string) {
  const char *pr;
  char *pw;
  if (!string)
    return;
  pr = string - 1;
  pw = string;
  while (*(++pr)) {
    if (*pr != ' ')
      *(pw++) = *pr;
  }
  *pw = 0;
}


x86 assembly (clang, -O0):
<chrRmblk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1118 <chrRmblk+0x18>
jmp    1178 <chrRmblk+0x78>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,0x1(%rax)
je     1171 <chrRmblk+0x71>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     116c <chrRmblk+0x6c>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    112c <chrRmblk+0x2c>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<chrRmblk>:
test   %rdi,%rdi
je     112c <chrRmblk+0x2c>
lea    -0x1(%rdi),%rax
nopl   0x0(%rax)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
cmp    $0x20,%cl
je     1110 <chrRmblk+0x10>
test   %cl,%cl
je     1129 <chrRmblk+0x29>
mov    %cl,(%rdi)
add    $0x1,%rdi
jmp    1110 <chrRmblk+0x10>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @chrRmblk(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -1
br label %5
5: ; preds = %12, %3
%6 = phi i8* [ %10, %12 ], [ %4, %3 ]
%7 = phi i8* [ %13, %12 ], [ %0, %3 ]
br label %8
8: ; preds = %5, %8
%9 = phi i8* [ %10, %8 ], [ %6, %5 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
switch i8 %11, label %12 [
i8 0, label %14
i8 32, label %8
]
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %11, i8* %7
br label %5
14: ; preds = %8
store i8 0, i8* %7
br label %15
15: ; preds = %1, %14
ret void
}