LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/mm.c
// Function: copy_mm
int copy_mm(struct mm *dst, struct mm *src)
{
	struct rb_node *ptr = rb_leftmost(src->vma.root);

	while (ptr) {
		struct vma *vma = TREE_ENTRY(ptr, struct vma, link);
		const int rc = copy_vma(dst, vma);

		if (rc)
			return rc;
		ptr = rb_next(ptr);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xffffffff8010b430
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xffffffff8011065c
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xffffffff80110670
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0xffffffff8011064d
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xffffffff80110663
movq -0x20(%rbp), %rdi
callq 0xffffffff8010b470
movq %rax, -0x20(%rbp)
jmp 0xffffffff80110620
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/mm.c
// Function: unmap_all_vma
static void unmap_all_vma(struct mm *mm)
{
	struct rb_node *ptr = rb_leftmost(mm->vma.root);

	while (ptr) {
		struct vma *vma = TREE_ENTRY(ptr, struct vma, link);

		ptr = rb_next(ptr);
		__munmap(mm, vma->begin, vma->end);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xffffffff8010b430
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xffffffff80110bc3
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff8010b470
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
callq 0xffffffff80110040
jmp 0xffffffff80110b8c
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/mm.c
// Function: setup_mm
void setup_mm(void)
{
	DBG_ASSERT((mm_cachep = KMEM_CACHE(struct mm)) != 0);
	DBG_ASSERT((vma_cachep = KMEM_CACHE(struct vma)) != 0);
	DBG_ASSERT((zero_page = alloc_pages(0)) != 0);
	memset(page_addr(zero_page), 0, PAGE_SIZE);
	zero_page->u.refcount = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
jmp 0xffffffff80110bf6
movl $0x30, %edi
movl $0x8, %esi
callq 0xffffffff80107380
movq %rax, 0x335964(%rip)    # 0xffffffff80446570
cmpq $0x0, %rax
jne 0xffffffff80110c41
leaq 0x1560(%rip), %rdi      # 0xffffffff80112179
leaq 0x2320(%rip), %rsi      # 0xffffffff80112f40
movl $0x1c0, %edx            # imm = 0x1C0
leaq 0x1551(%rip), %rcx      # 0xffffffff8011217d
leaq 0x2353(%rip), %r8       # 0xffffffff80112f86
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80110c3f
jmp 0xffffffff80110c43
jmp 0xffffffff80110c45
movl $0x40, %edi
movl $0x8, %esi
callq 0xffffffff80107380
movq %rax, 0x33591d(%rip)    # 0xffffffff80446578
cmpq $0x0, %rax
jne 0xffffffff80110c90
leaq 0x1511(%rip), %rdi      # 0xffffffff80112179
leaq 0x22d1(%rip), %rsi      # 0xffffffff80112f40
movl $0x1c1, %edx            # imm = 0x1C1
leaq 0x1502(%rip), %rcx      # 0xffffffff8011217d
leaq 0x232d(%rip), %r8       # 0xffffffff80112faf
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80110c8e
jmp 0xffffffff80110c92
jmp 0xffffffff80110c94
xorl %edi, %edi
callq 0xffffffff801043b0
movq %rax, 0x3358de(%rip)    # 0xffffffff80446580
cmpq $0x0, %rax
jne 0xffffffff80110cd7
leaq 0x14ca(%rip), %rdi      # 0xffffffff80112179
leaq 0x228a(%rip), %rsi      # 0xffffffff80112f40
movl $0x1c2, %edx            # imm = 0x1C2
leaq 0x14bb(%rip), %rcx      # 0xffffffff8011217d
leaq 0x2311(%rip), %r8       # 0xffffffff80112fda
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80110cd5
jmp 0xffffffff80110cd9
movq 0x3358a0(%rip), %rdi    # 0xffffffff80446580
callq 0xffffffff8010fdc0
movq %rax, %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0xffffffff801017e0
movq 0x335885(%rip), %rax    # 0xffffffff80446580
movq $0x1, 0x18(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/mm.c
// Function: mapped_page
static struct page *mapped_page(struct mm *mm, virt_t addr)
{
	const virt_t from = addr;
	const virt_t to = addr + PAGE_SIZE;
	struct pt_iter iter;

	for_each_slot_in_range(page_addr(mm->pt), from, to, iter) {
		DBG_ASSERT(iter.level == 0);
		DBG_ASSERT(iter.pt[iter.level] != 0);

		if (iter.level != 0)
			return 0;

		const int level = iter.level;
		const int index = iter.idx[level];
		pte_t *pt = iter.pt[level];
		const pte_t pte = pt[index];

		if (pte_present(pte)) {
			const pfn_t pfn = pte_phys(pte) >> PAGE_BITS;
			struct page *page = pfn2page(pfn);

			return page;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1000, %rax           # imm = 0x1000
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xffffffff8010fdc0
movq %rax, %rsi
movq -0x20(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0xffffffff80105050
movq %rax, -0x70(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x70(%rbp)
movb %al, -0x99(%rbp)
je 0xffffffff80110d9e
movq -0x70(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x28(%rbp), %rax
setb %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0xffffffff80110dad
jmp 0xffffffff80110ec6
jmp 0xffffffff80110daf
cmpl $0x0, -0x68(%rbp)
je 0xffffffff80110de4
leaq 0x13bd(%rip), %rdi      # 0xffffffff80112179
leaq 0x217d(%rip), %rsi      # 0xffffffff80112f40
movl $0x51, %edx
leaq 0x13ae(%rip), %rcx      # 0xffffffff8011217d
leaq 0x2187(%rip), %r8       # 0xffffffff80112f5d
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80110de2
jmp 0xffffffff80110de6
jmp 0xffffffff80110de8
movslq -0x68(%rbp), %rax
cmpq $0x0, -0x60(%rbp,%rax,8)
jne 0xffffffff80110e23
leaq 0x137e(%rip), %rdi      # 0xffffffff80112179
leaq 0x213e(%rip), %rsi      # 0xffffffff80112f40
movl $0x52, %edx
leaq 0x136f(%rip), %rcx      # 0xffffffff8011217d
leaq 0x2158(%rip), %r8       # 0xffffffff80112f6d
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80110e21
jmp 0xffffffff80110e25
cmpl $0x0, -0x68(%rbp)
je 0xffffffff80110e38
movq $0x0, -0x8(%rbp)
jmp 0xffffffff80110ece
movl -0x68(%rbp), %eax
movl %eax, -0x74(%rbp)
movslq -0x74(%rbp), %rax
movl -0x40(%rbp,%rax,4), %eax
movl %eax, -0x78(%rbp)
movslq -0x74(%rbp), %rax
movq -0x60(%rbp,%rax,8), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movslq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0xffffffff80110ab0
testb $0x1, %al
jne 0xffffffff80110e7b
jmp 0xffffffff80110eb2
movq -0x88(%rbp), %rdi
callq 0xffffffff80110ad0
shrq $0xc, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0xffffffff80103ce0
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xffffffff80110ece
jmp 0xffffffff80110eb4
movq -0x70(%rbp), %rdi
callq 0xffffffff80105320
movq %rax, -0x70(%rbp)
jmp 0xffffffff80110d7a
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/mm.c
// Function: copy_page
static struct page *copy_page(struct page *page)
{
	if (page->u.refcount == 1)
		return page;

	struct page *new = alloc_pages(0);

	if (!new)
		return 0;

	void *dst = page_addr(new);
	void *src = page_addr(page);

	memcpy(dst, src, PAGE_SIZE);
	return new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x18(%rax)
jne 0xffffffff80110f01
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xffffffff80110f51
xorl %edi, %edi
callq 0xffffffff801043b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xffffffff80110f1d
movq $0x0, -0x8(%rbp)
jmp 0xffffffff80110f51
movq -0x18(%rbp), %rdi
callq 0xffffffff8010fdc0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff8010fdc0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0xffffffff801016a0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/exec.c
// Function: read_elf_hdr
static int read_elf_hdr(struct fs_file *file, struct elf_hdr *hdr)
{
	const int rc = vfs_seek(file, 0, FSS_SET);

	if (rc < 0)
		return rc;

	return read_buf(file, hdr, sizeof(*hdr));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xffffffff80109d10
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0xffffffff8011120e
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xffffffff80111223
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x40, %edx
callq 0xffffffff801117e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/exec.c
// Function: check_elf_hdr
static int check_elf_hdr(const struct elf_hdr *hdr)
{
	if (memcmp(hdr->e_ident, "\x7f""ELF", 4)) // heh...
		return -ENOEXEC;

	if (hdr->e_ident[ELF_CLASS] != ELF_CLASS64)
		return -ENOEXEC;

	if (hdr->e_ident[ELF_DATA] != ELF_DATA2LSB)
		return -ENOEXEC;

	if (hdr->e_type != ELF_EXEC)
		return -ENOEXEC;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
subl $0x464c457f, %eax       # imm = 0x464C457F
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xffffffff80111257
movl $0xfffffff8, -0x4(%rbp) # imm = 0xFFFFFFF8
jmp 0xffffffff801112a0
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x2, %eax
je 0xffffffff8011126d
movl $0xfffffff8, -0x4(%rbp) # imm = 0xFFFFFFF8
jmp 0xffffffff801112a0
movq -0x10(%rbp), %rax
movzbl 0x5(%rax), %eax
cmpl $0x1, %eax
je 0xffffffff80111283
movl $0xfffffff8, -0x4(%rbp) # imm = 0xFFFFFFF8
jmp 0xffffffff801112a0
movq -0x10(%rbp), %rax
movzwl 0x10(%rax), %eax
cmpl $0x2, %eax
je 0xffffffff80111299
movl $0xfffffff8, -0x4(%rbp) # imm = 0xFFFFFFF8
jmp 0xffffffff801112a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/exec.c
// Function: setup_stack
static int setup_stack(struct mm *mm, size_t size)
{
	const virt_t stack_size = ALIGN(size, PAGE_SIZE);
	const virt_t stack_begin = TASK_SIZE - stack_size;
	const virt_t stack_end = TASK_SIZE;

	const int rc = __mmap(mm, stack_begin, stack_end, VMA_PERM_WRITE);

	if (rc)
		return rc;

	mm->stack = lookup_vma(mm, stack_begin);
	DBG_ASSERT(mm->stack != 0);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0xffffffff80111870
movq %rax, -0x20(%rbp)
movabsq $0x800000000000, %rax # imm = 0x800000000000
subq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movabsq $0x800000000000, %rax # imm = 0x800000000000
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movabsq $0x800000000000, %rdx # imm = 0x800000000000
movl $0x1, %ecx
callq 0xffffffff8010fc50
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0xffffffff8011131f
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xffffffff8011137a
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xffffffff8010fa80
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xffffffff80111371
leaq 0xe30(%rip), %rdi       # 0xffffffff80112179
leaq 0x1cb1(%rip), %rsi      # 0xffffffff80113001
movl $0xda, %edx
leaq 0xe21(%rip), %rcx       # 0xffffffff8011217d
leaq 0x1ca5(%rip), %r8       # 0xffffffff80113008
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff8011136f
jmp 0xffffffff80111373
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/exec.c
// Function: load_binary
static int load_binary(struct mm *mm, const struct elf_hdr *hdr,
			struct fs_file *file)
{
	int offset = hdr->e_phoff;

	for (int i = 0; i != (int)hdr->e_phnum; ++i) {
		int rc = vfs_seek(file, offset, FSS_SET);

		if (rc < 0)
			return rc;

		struct elf_phdr phdr;

		rc = read_elf_phdr(file, &phdr);
		if (rc < 0)
			return rc;

		rc = map_elf_phdr(mm, &phdr, file);
		if (rc < 0)
			return rc;

		offset += hdr->e_phentsize;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x38(%rcx), %ecx
cmpl %ecx, %eax
je 0xffffffff80111790
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
xorl %edx, %edx
callq 0xffffffff80109d10
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0xffffffff80111734
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xffffffff80111797
movq -0x20(%rbp), %rdi
leaq -0x64(%rbp), %rsi
callq 0xffffffff801118a0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0xffffffff80111752
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xffffffff80111797
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x64(%rbp), %rsi
callq 0xffffffff801118d0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0xffffffff80111774
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xffffffff80111797
movq -0x18(%rbp), %rax
movzwl 0x36(%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xffffffff80111706
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/exec.c
// Function: read_buf
static int read_buf(struct fs_file *file, void *data, size_t size)
{
	char *buf = data;
	size_t rd = 0;

	while (rd < size) {
		const int rc = vfs_read(file, buf + rd, size - rd);

		if (rc < 0)
			return rc;

		if (rc == 0)
			return -EIO;

		rd += rc;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xffffffff80111855
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
subq -0x30(%rbp), %rdx
callq 0xffffffff80109bb0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0xffffffff80111838
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xffffffff8011185c
cmpl $0x0, -0x34(%rbp)
jne 0xffffffff80111847
movl $0xfffffff9, -0x4(%rbp) # imm = 0xFFFFFFF9
jmp 0xffffffff8011185c
movslq -0x34(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xffffffff80111804
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/backtrace.c
// Function: _backtrace
void __backtrace(uint64_t rbp, uintptr_t stack_begin, uintptr_t stack_end)
{
	int depth = 0;

	while (rbp >= stack_begin && rbp <= stack_end - 2 * sizeof(uint64_t)) {
		uint64_t *stack_ptr = (void *)rbp;

		printf("%d: %p\n", depth++, (void *)stack_ptr[1]);
		rbp = stack_ptr[0];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x29(%rbp)
jb 0xffffffff80111c7f
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x10, %rcx
cmpq %rcx, %rax
setbe %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xffffffff80111c88
jmp 0xffffffff80111cbe
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x136d(%rip), %rdi      # 0xffffffff80113017
movb $0x0, %al
callq 0xffffffff80101bc0
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xffffffff80111c5b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/backtrace.c
// Function: backtrace
void backtrace(void)
{
	struct thread *thread = current();
	uint64_t rbp;

	if (!thread)
		return;

	__asm__("movq %%rbp, %0" : "=r"(rbp));
	__backtrace(rbp, (uintptr_t)thread_stack_begin(thread),
				(uintptr_t)thread_stack_end(thread));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0xffffffff80108940
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xffffffff80111cea
jmp 0xffffffff80111d1f
movq %rbp, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xffffffff80107f40
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xffffffff80107fc0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rax, %rdx
callq 0xffffffff80111c40
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/compiler.c
// Function: init_compiler
static void
init_compiler(void)
{
	compiler.q = new_queue8();
	if (!compiler.q)
		errx(EX_OSERR, "Failed to initialise compiler.");
	compiler.in_num = 0;
	memset(compiler.buf, 0, 6);
	compiler.buf_index = 0;
	compiler.active_ops = 0;
	compiler.active_vals = 0;
	compiler.source = NULL;
	compiler.out = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1540
movq %rax, 0x3768(%rip)      # 0x50b8
cmpq $0x0, 0x3760(%rip)      # 0x50b8
jne 0x196d
movl $0x47, %edi
leaq 0x180e(%rip), %rsi      # 0x3174
movb $0x0, %al
callq 0x1070
movl $0x0, 0x3749(%rip)      # 0x50c0
leaq 0x373a(%rip), %rdi      # 0x50b8
addq $0xc, %rdi
xorl %esi, %esi
movl $0x6, %edx
callq 0x10a0
movl $0x0, 0x3734(%rip)      # 0x50cc
movl $0x0, 0x372e(%rip)      # 0x50d0
movl $0x0, 0x3728(%rip)      # 0x50d4
movq $0x0, 0x3721(%rip) # 0x50d8
movq $0x0, 0x371e(%rip) # 0x50e0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/compiler.c
// Function: parse
static int
parse(void)
{
	uint8_t	cur;

	assert(NULL != compiler.source);

	while (!feof(compiler.source)) {
		fread(&cur, 1, 1, compiler.source);
		if (-1 == parse_next(cur)) {
			return -1;
		}
	}

	if (1 != compiler.active_vals) {
		fprintf(stderr, "Warning: extra values left on the stack.\n");
	}

	if (0 != compiler.active_ops) {
		fprintf(stderr, "Warning: active operations remaining.\n");
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
cmpq 0x36f7(%rip), %rax      # 0x50d8
je 0x19e5
jmp 0x1a04
leaq 0x17a7(%rip), %rdi      # 0x3193
leaq 0x17b8(%rip), %rsi      # 0x31ab
movl $0xea, %edx
leaq 0x17b7(%rip), %rcx      # 0x31b6
callq 0x1090
jmp 0x1a06
movq 0x36cb(%rip), %rdi      # 0x50d8
callq 0x10c0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1a20
jmp 0x1a57
movq 0x36b1(%rip), %rcx      # 0x50d8
leaq -0x5(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1050
movzbl -0x5(%rbp), %edi
callq 0x1d60
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x1a55
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1aa5
jmp 0x1a06
movl $0x1, %eax
cmpl 0x3672(%rip), %eax      # 0x50d4
je 0x1a7c
movq 0x358d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1751(%rip), %rsi      # 0x31c6
movb $0x0, %al
callq 0x10b0
xorl %eax, %eax
cmpl 0x364c(%rip), %eax      # 0x50d0
je 0x1a9e
movq 0x356b(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1759(%rip), %rsi      # 0x31f0
movb $0x0, %al
callq 0x10b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/compiler.c
// Function: backtrace
static void
backtrace(int trace)
{
	int i;
	int wrap = 0;

	if (!trace)
		return;

	printf("in_num: %d\n", compiler.in_num);
	printf("n_buf (%dB): ", compiler.buf_index);
	for (i = 0; i < 6; i++) {
		printf("%02x ", compiler.buf[i]);
	}
	printf("\n");
	printf("active\tvals: %d\tops: %d\n", compiler.active_vals, compiler.active_ops);

	printf("Compiled:\n\t");
	while (!empty_queue8(compiler.q)) {
		printf("%02x ", dequeue8(compiler.q));
		if (8 == (++wrap)) {
			printf("\n\t");
			wrap = 0;
		}
	}
	printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x1acd
jmp 0x1bcf
movl 0x35ed(%rip), %esi      # 0x50c0
leaq 0x17c3(%rip), %rdi      # 0x329d
movb $0x0, %al
callq 0x1080
movl 0x35e5(%rip), %esi      # 0x50cc
leaq 0x17bb(%rip), %rdi      # 0x32a9
movb $0x0, %al
callq 0x1080
movl $0x0, -0x8(%rbp)
cmpl $0x6, -0x8(%rbp)
jge 0x1b2b
movslq -0x8(%rbp), %rcx
leaq 0x35ab(%rip), %rax      # 0x50b8
movzbl 0xc(%rax,%rcx), %esi
leaq 0x179e(%rip), %rdi      # 0x32b7
movb $0x0, %al
callq 0x1080
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1afc
leaq 0x173b(%rip), %rdi      # 0x326d
movb $0x0, %al
callq 0x1080
movl 0x3595(%rip), %esi      # 0x50d4
movl 0x358b(%rip), %edx      # 0x50d0
leaq 0x1771(%rip), %rdi      # 0x32bd
movb $0x0, %al
callq 0x1080
leaq 0x177c(%rip), %rdi      # 0x32d6
movb $0x0, %al
callq 0x1080
movq 0x3550(%rip), %rdi      # 0x50b8
callq 0x16d0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1b7b
jmp 0x1bc1
movq 0x3536(%rip), %rdi      # 0x50b8
callq 0x1650
movzbl %al, %esi
leaq 0x1726(%rip), %rdi      # 0x32b7
movb $0x0, %al
callq 0x1080
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movl $0x8, %eax
cmpl %ecx, %eax
jne 0x1bbf
leaq 0x172e(%rip), %rdi      # 0x32df
movb $0x0, %al
callq 0x1080
movl $0x0, -0xc(%rbp)
jmp 0x1b61
leaq 0x16a5(%rip), %rdi      # 0x326d
movb $0x0, %al
callq 0x1080
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/compiler.c
// Function: write_program
static int
write_program(void)
{
	size_t	 prog_size;
	int	 pc = 0;
	uint8_t	*prog;

	assert(NULL != compiler.out);

	prog_size = compiler.q->nodes;
	if (0 == prog_size) {
		printf("Empty program.\n");
		return -1;
	}
	printf("Compile size: %lu bytes\n", prog_size);

	prog = malloc(prog_size);
	if (NULL == prog)
		errx(EX_OSERR, "Failed to initialise memory.");

	while (!empty_queue8(compiler.q))
		prog[pc++] = dequeue8(compiler.q);

	if (0 == fwrite(prog, 1, prog_size, compiler.out)) {
		free(prog);
		fprintf(stderr, "Failed to write program to file.\n");
		return -1;
	}
	free(prog);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x14(%rbp)
xorl %eax, %eax
cmpq 0x34e8(%rip), %rax      # 0x50e0
je 0x1bfc
jmp 0x1c1b
leaq 0x16df(%rip), %rdi      # 0x32e2
leaq 0x15a1(%rip), %rsi      # 0x31ab
movl $0x108, %edx            # imm = 0x108
leaq 0x16e1(%rip), %rcx      # 0x32f7
callq 0x1090
movq 0x3496(%rip), %rax      # 0x50b8
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x1c4c
leaq 0x16d6(%rip), %rdi      # 0x330f
movb $0x0, %al
callq 0x1080
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1d24
movq -0x10(%rbp), %rsi
leaq 0x16c8(%rip), %rdi      # 0x331f
movb $0x0, %al
callq 0x1080
movq -0x10(%rbp), %rdi
callq 0x10e0
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x1c86
movl $0x47, %edi
leaq 0x16b9(%rip), %rsi      # 0x3338
movb $0x0, %al
callq 0x1070
jmp 0x1c88
movq 0x3429(%rip), %rdi      # 0x50b8
callq 0x16d0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1ca2
jmp 0x1cc7
movq 0x340f(%rip), %rdi      # 0x50b8
callq 0x1650
movb %al, %dl
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x14(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x1c88
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq 0x340a(%rip), %rcx      # 0x50e0
movl $0x1, %esi
callq 0x1130
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1d14
movq -0x20(%rbp), %rdi
callq 0x1030
movq 0x32fe(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1651(%rip), %rsi      # 0x3355
movb $0x0, %al
callq 0x10b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1d24
movq -0x20(%rbp), %rdi
callq 0x1030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/compiler.c
// Function: finalise_number
static int
finalise_number(void)
{
	uint32_t	n32;
	uint16_t	n16;

	n32 = (uint32_t)atoi((char *)compiler.buf);
	if (n32 >= (1 << 17)) {
		fprintf(stderr, "Integer overflow: %lu\n",
		    (long unsigned)n32);
		return -1;
	}

	n16 = (uint16_t)n32;
	enqueue8(compiler.q, INSTR_IMM);
	enqueue8(compiler.q, (uint8_t)(n16<<8>>8));
	enqueue8(compiler.q, (uint8_t)(n16>>8));
	memset(compiler.buf, 0, 6);
	compiler.buf_index = 0;
	compiler.active_vals++;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x30e9(%rip), %rdi      # 0x50b8
addq $0xc, %rdi
callq 0x1110
movl %eax, -0x8(%rbp)
cmpl $0x20000, -0x8(%rbp)    # imm = 0x20000
jb 0x200a
movq 0x300d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movl -0x8(%rbp), %eax
movl %eax, %edx
leaq 0x128c(%rip), %rsi      # 0x3286
movb $0x0, %al
callq 0x10b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2088
movl -0x8(%rbp), %eax
movw %ax, -0xa(%rbp)
movq 0x30a0(%rip), %rdi      # 0x50b8
movl $0x5, %esi
callq 0x1590
movq 0x308f(%rip), %rdi      # 0x50b8
movzwl -0xa(%rbp), %eax
shll $0x8, %eax
sarl $0x8, %eax
movzbl %al, %esi
callq 0x1590
movq 0x3076(%rip), %rdi      # 0x50b8
movzwl -0xa(%rbp), %eax
sarl $0x8, %eax
movzbl %al, %esi
callq 0x1590
leaq 0x3060(%rip), %rdi      # 0x50b8
addq $0xc, %rdi
xorl %esi, %esi
movl $0x6, %edx
callq 0x10a0
movl $0x0, 0x305a(%rip)      # 0x50cc
movl 0x305c(%rip), %eax      # 0x50d4
addl $0x1, %eax
movl %eax, 0x3053(%rip)      # 0x50d4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_09/copy_io.c
// Function: main
int main(void)
{
  int c;
  int last_c = '\0';

  while ((c = getchar()) != EOF)
  {
    if (c != ' ' || last_c != ' ')
    {
      putchar(c);
    }

    last_c = c;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl $0x0, -0xc(%rbp)
callq 0x1040
movl %eax, -0x8(%rbp)
cmpl $-0x1, %eax
je 0x118f
cmpl $0x20, -0x8(%rbp)
jne 0x117f
cmpl $0x20, -0xc(%rbp)
je 0x1187
movl -0x8(%rbp), %edi
callq 0x1030
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x1166
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/zfs-generator.c
// Function: getForce
int getForce(char **forceParam) {
	char *forceval;
	int ret;
	char force = 0;

	ret = cmdline_getParam("zfs_force=", &forceval);
	if (ret < 0) {
		fprintf(stderr, "Could not get zfs_force= parameter. Error %d\n", ret);
		return 1;
	} else if (ret == 1) {
		// No zfs_force parameter specified
	} else if (ret != 0) {
		fprintf(stderr, "Unknown thing happened while reading the zfs_force= paremter\n");
		return 2;
	} else {
		if (strcmp(forceval, "1") == 0) {
			force = 1;
		}
		free(forceval);
	}

	if (force == 0) {
		*forceParam = malloc(sizeof(char));
		strcpy(*forceParam, "");
	} else {
		*forceParam = malloc(4 * sizeof(char));
		strcpy(*forceParam, " -f");
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x1d(%rbp)
leaq 0x9b84f(%rip), %rdi     # 0x49d0a6
leaq -0x18(%rbp), %rsi
callq 0x402760
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x401890
movq $0x4cd6e8, %rax         # imm = 0x4CD6E8
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
leaq 0x9b834(%rip), %rsi     # 0x49d0b1
movb $0x0, %al
callq 0x40c7a0
movl $0x1, -0x4(%rbp)
jmp 0x401948
cmpl $0x1, -0x1c(%rbp)
jne 0x401898
jmp 0x4018e6
cmpl $0x0, -0x1c(%rbp)
je 0x4018c2
movq $0x4cd6e8, %rax         # imm = 0x4CD6E8
movq (%rax), %rdi
leaq 0x9b830(%rip), %rsi     # 0x49d0df
movb $0x0, %al
callq 0x40c7a0
movl $0x2, -0x4(%rbp)
jmp 0x401948
movq -0x18(%rbp), %rdi
leaq 0x9e5cb(%rip), %rsi     # 0x49fe98
callq 0x4010b0
cmpl $0x0, %eax
jne 0x4018db
movb $0x1, -0x1d(%rbp)
movq -0x18(%rbp), %rdi
callq 0x421350
jmp 0x4018e6
jmp 0x4018e8
movsbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0x40191a
movl $0x1, %edi
callq 0x421010
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xb350a(%rip), %rsi     # 0x4b4e1d
callq 0x401020
jmp 0x401941
movl $0x4, %edi
callq 0x421010
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x9b7e1(%rip), %rsi     # 0x49d11d
callq 0x401020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/zfs-generator.c
// Function: getIgnoreCache
int getIgnoreCache(char *ignore) {
	char *ignoreval;
	int ret;

	ret = cmdline_getParam("zfs_ignorecache=", &ignoreval);
	if (ret < 0) {
		fprintf(stderr, "Could not get zfs_ignorecache= parameter. Error %d\n", ret);
		return 1;
	} else if (ret == 1) {
		*ignore = 0;
		return 0;
	} else if (ret != 0) {
		fprintf(stderr, "Unknown thing happened while reading the ignorecache= paremter\n");
		return 2;
	}
	if (strcmp(ignoreval, "1") == 0) {
		*ignore = 1;
		free(ignoreval);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x9b7ae(%rip), %rdi     # 0x49d121
leaq -0x18(%rbp), %rsi
callq 0x402760
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x4019a9
movq $0x4cd6e8, %rax         # imm = 0x4CD6E8
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
leaq 0x9b799(%rip), %rsi     # 0x49d132
movb $0x0, %al
callq 0x40c7a0
movl $0x1, -0x4(%rbp)
jmp 0x401a16
cmpl $0x1, -0x1c(%rbp)
jne 0x4019bf
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x401a16
cmpl $0x0, -0x1c(%rbp)
je 0x4019e6
movq $0x4cd6e8, %rax         # imm = 0x4CD6E8
movq (%rax), %rdi
leaq 0x9b790(%rip), %rsi     # 0x49d166
movb $0x0, %al
callq 0x40c7a0
movl $0x2, -0x4(%rbp)
jmp 0x401a16
jmp 0x4019e8
jmp 0x4019ea
movq -0x18(%rbp), %rdi
leaq 0x9e4a3(%rip), %rsi     # 0x49fe98
callq 0x4010b0
cmpl $0x0, %eax
jne 0x401a0f
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x18(%rbp), %rdi
callq 0x421350
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/cmdline.c
// Function: getCmdline
int getCmdline(char **cmdline) {
	FILE *fd;
	size_t linelen;

	fd = fopen(CMDLINE_FILE, "r");
	if (fd == NULL) {
		perror("Cannot open kernel command line\n");
		return -1;
	}
	if (getline(cmdline, &linelen, fd) < 0) {
		perror("Cannot read kernel command line\n");
		fclose(fd);
		return -2;
	}
	fclose(fd);
	return linelen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x9b17d(%rip), %rdi     # 0x49d860
leaq 0xb267d(%rip), %rsi     # 0x4b4d67
callq 0x413660
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x40270f
leaq 0x9b16d(%rip), %rdi     # 0x49d86e
callq 0x40ca90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x402754
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rsi
callq 0x40cb50
cmpq $0x0, %rax
jge 0x402744
leaq 0x9b162(%rip), %rdi     # 0x49d88f
callq 0x40ca90
movq -0x18(%rbp), %rdi
callq 0x412f30
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x402754
movq -0x18(%rbp), %rdi
callq 0x412f30
movq -0x20(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/cmdline.c
// Function: cmdline_getParam
int cmdline_getParam(char *paramName, char **value) {
	char *cmdline = NULL;
	char *param;

	if (getCmdline(&cmdline) < 0) {
		return -1;
	}
	// Parse tokens of command line
	param = strtok(cmdline, " \t\n");
	do {
		if (strncmp(param, paramName, strlen(paramName)) == 0) {
			*value = malloc((strlen(param) - strlen(paramName) + 1) * sizeof(char));
			strcpy(*value, &(param[strlen(paramName)]));
			free(cmdline);
			return 0;
		}
	} while ((param = strtok(NULL, " \t\n")) != NULL);

	free(cmdline);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4026d0
cmpl $0x0, %eax
jge 0x402792
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x402876
movq -0x20(%rbp), %rdi
leaq 0x9b113(%rip), %rsi     # 0x49d8b0
callq 0x424140
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4010d8
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x401080
cmpl $0x0, %eax
jne 0x402846
movq -0x28(%rbp), %rdi
callq 0x4010d8
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4010d8
movq -0x50(%rbp), %rdi
subq %rax, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x421010
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4010d8
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdi
addq %rax, %rsi
callq 0x401020
movq -0x20(%rbp), %rdi
callq 0x421350
movl $0x0, -0x4(%rbp)
jmp 0x402876
jmp 0x402848
xorl %eax, %eax
movl %eax, %edi
leaq 0x9b05d(%rip), %rsi     # 0x49d8b0
callq 0x424140
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x4027a6
movq -0x20(%rbp), %rdi
callq 0x421350
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/cmdline.c
// Function: cmdline_getSwitch
int cmdline_getSwitch(char *switchName, char *value) {
	char *cmdline = NULL;
	char *param;

	if (getCmdline(&cmdline) < 0) {
		return -1;
	}

	*value = 0;
	// Parse tokens of command line
	param = strtok(cmdline, " \t\n");
	do {
		if (strcmp(param, switchName) == 0) {
			*value = 1;
			break;
		}
	} while ((param = strtok(NULL, " \t\n")) != NULL);

	free(cmdline);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4026d0
cmpl $0x0, %eax
jge 0x4028af
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x402911
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rdi
leaq 0x9afef(%rip), %rsi     # 0x49d8b0
callq 0x424140
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4010b0
cmpl $0x0, %eax
jne 0x4028e5
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0x402901
jmp 0x4028e7
xorl %eax, %eax
movl %eax, %edi
leaq 0x9afbe(%rip), %rsi     # 0x49d8b0
callq 0x424140
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x4028ca
movq -0x20(%rbp), %rdi
callq 0x421350
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/main.c
// Function: main
int main(int argc, char *argv[]) {
  int ret;
  if (argc < 2) return usage();
  if (strcmp(argv[1], "pack") == 0) ret = main_pack(argc-1, argv+1);
  else if (strcmp(argv[1], "view") == 0) ret = main_view(argc-1, argv+1);
  else if (strcmp(argv[1], "header") == 0) ret = main_header(argc-1, argv+1);
  else if (strcmp(argv[1], "bundle") == 0) ret = main_bundle(argc-1, argv+1);
  else {
    fprintf(stderr, "[main] unrecognized command '%s'\n", argv[1]);
    return 1;
  }

  fflush(stdout);             /* not enough for remote file systems */
  fclose(stdout);

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x3a29
callq 0x3b50
movl %eax, -0x4(%rbp)
jmp 0x3b46
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x71678(%rip), %rsi     # 0x750b0
callq 0x3620
cmpl $0x0, %eax
jne 0x3a5d
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x89a0
movl %eax, -0x14(%rbp)
jmp 0x3b22
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x71649(%rip), %rsi     # 0x750b5
callq 0x3620
cmpl $0x0, %eax
jne 0x3a91
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x49b0
movl %eax, -0x14(%rbp)
jmp 0x3b20
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x7161a(%rip), %rsi     # 0x750ba
callq 0x3620
cmpl $0x0, %eax
jne 0x3ac2
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x9fb0
movl %eax, -0x14(%rbp)
jmp 0x3b1e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x715f0(%rip), %rsi     # 0x750c1
callq 0x3620
cmpl $0x0, %eax
jne 0x3af3
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0xab20
movl %eax, -0x14(%rbp)
jmp 0x3b1c
movq 0x814ee(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x715bc(%rip), %rsi     # 0x750c8
movb $0x0, %al
callq 0x37f0
movl $0x1, -0x4(%rbp)
jmp 0x3b46
jmp 0x3b1e
jmp 0x3b20
jmp 0x3b22
movq 0x814cf(%rip), %rax     # 0x84ff8
movq (%rax), %rdi
callq 0x38c0
movq 0x814c0(%rip), %rax     # 0x84ff8
movq (%rax), %rdi
callq 0x36d0
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/main.c
// Function: usage
static int usage()
{
  fprintf(stderr, "\n");
  fprintf(stderr, "Program: tbmate (Tabix Mate)\n");
  fprintf(stderr, "Version: %s\n", PACKAGE_VERSION);
  fprintf(stderr, "Contact: Wanding Zhou<wanding.zhou@pennmedicine.upenn.edu>\n\n");
  fprintf(stderr, "Usage:   tbmate <command> [options]\n\n");
  fprintf(stderr, "Command:\n");
  fprintf(stderr, "     pack         pack data to tbk\n");
  fprintf(stderr, "     view         view data stored in tbk\n");
  fprintf(stderr, "     header       view and set tbk data header\n");
  fprintf(stderr, "     bundle       bundle tbk into a multi-tbk.\n");
  fprintf(stderr, "\n");

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8148d(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x715f8(%rip), %rsi     # 0x7515d
movb $0x0, %al
callq 0x37f0
movq 0x81475(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x7156d(%rip), %rsi     # 0x750ea
movb $0x0, %al
callq 0x37f0
movq 0x8145d(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x71573(%rip), %rsi     # 0x75108
leaq 0x71579(%rip), %rdx     # 0x75115
movb $0x0, %al
callq 0x37f0
movq 0x8143e(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x7156e(%rip), %rsi     # 0x75122
movb $0x0, %al
callq 0x37f0
movq 0x81426(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x71593(%rip), %rsi     # 0x7515f
movb $0x0, %al
callq 0x37f0
movq 0x8140e(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x715a1(%rip), %rsi     # 0x75185
movb $0x0, %al
callq 0x37f0
movq 0x813f6(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x71593(%rip), %rsi     # 0x7518f
movb $0x0, %al
callq 0x37f0
movq 0x813de(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x7159f(%rip), %rsi     # 0x751b3
movb $0x0, %al
callq 0x37f0
movq 0x813c6(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x715b2(%rip), %rsi     # 0x751de
movb $0x0, %al
callq 0x37f0
movq 0x813ae(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x715ca(%rip), %rsi     # 0x7520e
movb $0x0, %al
callq 0x37f0
movq 0x81396(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
leaq 0x71501(%rip), %rsi     # 0x7515d
movb $0x0, %al
callq 0x37f0
movl $0x1, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/./wzmisc.h
// Function: wzfatal
static inline void wzfatal(const char *msg, ...) {
  va_list args;
  va_start(args, msg);
  vfprintf(stderr, msg, args);
  va_end (args);
  fflush(stderr);
  exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x42a5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x80cf1(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x3310
leaq -0x20(%rbp), %rax
movq 0x80cd6(%rip), %rax     # 0x84fe8
movq (%rax), %rdi
callq 0x38c0
movl $0x1, %edi
callq 0x3180
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/./tbmate.h
// Function: tbk_seek_n
static inline void tbk_seek_n(tbk_t *tbk, int64_t n) {
  int64_t offset = tbk->offset_sample_beg + HDR_TOTALBYTES;
  offset += n * unit_size(tbk->dtype);

  tbf_t *tbf = tbk->tbf;
  if (offset == tbf->offset) return;
  
  tbf->offset = offset;
  if (fseek(tbf->fh, tbf->offset, SEEK_SET))
    wzfatal("File %s cannot be seeked.\n", tbk->tbf->fname);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x2000, %rax           # imm = 0x2000
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x2018(%rax), %rdi
callq 0x5cd0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
imulq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x439b
jmp 0x43dc
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x3120
cmpl $0x0, %eax
je 0x43dc
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x7105d(%rip), %rdi     # 0x75432
movb $0x0, %al
callq 0x4270
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/./tbmate.h
// Function: tbk_seek_offset
static inline void tbk_seek_offset(tbk_t *tbk, int64_t offset) {

  offset += tbk->offset_sample_beg + HDR_TOTALBYTES;
  
  tbf_t *tbf = tbk->tbf;
  if (offset == tbf->offset) return;
  
  tbf->offset = offset;
  if (fseek(tbf->fh, tbf->offset, SEEK_SET))
    wzfatal("File %s cannot be seeked.\n", tbk->tbf->fname);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x2000, %rax           # imm = 0x2000
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x4482
jmp 0x44c3
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x3120
cmpl $0x0, %eax
je 0x44c3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x70f76(%rip), %rdi     # 0x75432
movb $0x0, %al
callq 0x4270
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/view.c
// Function: parse_tbk_from_tbf
void parse_tbk_from_tbf(tbf_t *tbf, tbk_t **tbks, int *n_tbks) {
  tbk_t *tbk;
  int n = 0;
  while (1) {
    (*tbks) = realloc((*tbks), (++(*n_tbks))*sizeof(tbk_t));
    tbk = &(*tbks)[(*n_tbks)-1];
    tbf_next(tbf, tbk);
    n++;
    if (tbf->sname_first != NULL) tbk->sname = strdup(tbf->sname_first);
    if (tbk->version < 100) break;
    tbf_skip_data(tbk);
  }

  if (n==1 && tbk->sname == NULL) {
    tbk_set_sname_by_fname(&(*tbks)[(*n_tbks)-1]);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
movl (%rcx), %eax
addl $0x1, %eax
movl %eax, (%rcx)
cltq
imulq $0x2028, %rax, %rsi     # imm = 0x2028
callq 0x37c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x2028, %rcx, %rcx     # imm = 0x2028
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4740
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x46ee
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x35f0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
cmpl $0x64, 0x10(%rax)
jge 0x46fa
jmp 0x4708
movq -0x20(%rbp), %rdi
callq 0x4850
jmp 0x466b
cmpl $0x1, -0x24(%rbp)
jne 0x4739
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x4739
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
imulq $0x2028, %rax, %rax     # imm = 0x2028
addq %rax, %rdi
callq 0x48e0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/./tbmate.h
// Function: tbf_next
static inline void tbf_next(tbf_t *tbf, tbk_t *tbk) {
  memset(tbk, 0, sizeof(tbk_t));
  tbk->offset_sample_beg = tbf->offset;
  tbk->tbf = tbf;
  
  char id[3];
  tbf_read(tbf, id, HDR_ID, 1);

  if (id[0] != 't' || id[1] != 'b' || id[2] != 'k')
    wzfatal("%s is not a valid tbk file.\n", tbf->fname);

  tbf_read(tbf, &tbk->version, HDR_VERSION, 1);
  tbf_read(tbf, &tbk->dtype,   HDR_DATA_TYPE, 1);
  tbf_read(tbf, &tbk->nmax,    HDR_NMAX, 1);
  tbf_read(tbf, &tbk->extra,   HDR_EXTRA, 1);
  tbk_set_sname_by_extra(tbk);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x2028, %edx           # imm = 0x2028
callq 0x3090
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
leaq -0x13(%rbp), %rsi
movl $0x3, %edx
movl $0x1, %ecx
callq 0x43f0
movsbl -0x13(%rbp), %eax
cmpl $0x74, %eax
jne 0x47ae
movsbl -0x12(%rbp), %eax
cmpl $0x62, %eax
jne 0x47ae
movsbl -0x11(%rbp), %eax
cmpl $0x6b, %eax
je 0x47c4
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x70c90(%rip), %rdi     # 0x7544d
movb $0x0, %al
callq 0x4270
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x4, %edx
movl $0x1, %ecx
callq 0x43f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x2018, %rsi           # imm = 0x2018
movl $0x8, %edx
movl $0x1, %ecx
callq 0x43f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x8, %edx
movl $0x1, %ecx
callq 0x43f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movl $0x1fe9, %edx           # imm = 0x1FE9
movl $0x1, %ecx
callq 0x43f0
movq -0x10(%rbp), %rdi
callq 0x5d20
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-lab[P]tbmate/./tbmate.h
// Function: tbk_set_sname_by_fname
static inline void tbk_set_sname_by_fname(tbk_t *tbk) {
  char *tmp = strdup(tbk->tbf->fname);
  char *bname = basename(tmp);
  int k = strlen(bname);
  if (k>4 && bname[k-4]=='.' && bname[k-3]=='t' &&
      bname[k-2]=='b' && bname[k-1]=='k')
    bname[k-4] = '\0';
  tbk->sname = strdup(bname);
  free(tmp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x35f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x33f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3380
movl %eax, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jle 0x4989
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x4, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
jne 0x4989
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x3, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x74, %eax
jne 0x4989
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x62, %eax
jne 0x4989
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x6b, %eax
jne 0x4989
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x4, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rdi
callq 0x35f0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x3370
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)