LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: pt_iter_set
struct pt_iter *pt_iter_set(struct pt_iter *iter, pte_t *pml4, virt_t addr)
{
	memset(iter, 0, sizeof(*iter));

	if (!pml4)
		return iter;

	int level = PT_MAX_LEVEL;
	int idx = pml4_i(addr);
	pte_t pte = pml4[idx];

	iter->pt[level] = pml4;
	iter->idx[level] = idx;

	while (pte_present(pte) && level != 0 && !pte_large(pte)) {
		const phys_t paddr = pte_phys(pte);
		pte_t *pt = va(paddr);

		idx = pt_index(addr, level--);
		pte = pt[idx];

		iter->idx[level] = idx;
		iter->pt[level] = pt;
	}

	iter->addr = pt_iter_addr(iter);
	iter->level = level;

	return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0xffffffff801017e0
cmpq $0x0, -0x18(%rbp)
jne 0xffffffff80105088
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xffffffff8010518f
movl $0x3, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0xffffffff801051a0
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movl -0x28(%rbp), %edx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, 0x28(%rax,%rcx,4)
movq -0x30(%rbp), %rdi
callq 0xffffffff801051c0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x41(%rbp)
jne 0xffffffff801050e2
jmp 0xffffffff801050fb
xorl %eax, %eax
cmpl $0x0, -0x24(%rbp)
movb %al, -0x41(%rbp)
je 0xffffffff801050fb
movq -0x30(%rbp), %rdi
callq 0xffffffff801051e0
xorb $-0x1, %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xffffffff80105104
jmp 0xffffffff8010516a
movq -0x30(%rbp), %rdi
callq 0xffffffff80105200
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0xffffffff80105220
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movl %esi, %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
callq 0xffffffff80105240
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movl -0x28(%rbp), %edx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, 0x28(%rax,%rcx,4)
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
jmp 0xffffffff801050cb
movq -0x10(%rbp), %rdi
callq 0xffffffff801052c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: pt_index
static int pt_index(virt_t vaddr, int level)
{
	switch (level) {
	case 4:
		return pml4_i(vaddr);
	case 3:
		return pml3_i(vaddr);
	case 2:
		return pml2_i(vaddr);
	case 1:
		return pml1_i(vaddr);
	}

	DBG_ASSERT("Unreachable");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0xffffffff801052ab
movq -0x20(%rbp), %rax
leaq 0xcdae(%rip), %rcx      # 0xffffffff80112018
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
callq 0xffffffff801051a0
movl %eax, -0x4(%rbp)
jmp 0xffffffff801052b6
movq -0x10(%rbp), %rdi
callq 0xffffffff80106320
movl %eax, -0x4(%rbp)
jmp 0xffffffff801052b6
movq -0x10(%rbp), %rdi
callq 0xffffffff80106340
movl %eax, -0x4(%rbp)
jmp 0xffffffff801052b6
movq -0x10(%rbp), %rdi
callq 0xffffffff80106360
movl %eax, -0x4(%rbp)
jmp 0xffffffff801052b6
jmp 0xffffffff801052ad
jmp 0xffffffff801052af
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: pt_iter_addr
static virt_t pt_iter_addr(const struct pt_iter *iter)
{
	const virt_t addr = (virt_t)iter->idx[3] << 39 |
			(virt_t)iter->idx[2] << 30 |
			(virt_t)iter->idx[1] << 21 |
			(virt_t)iter->idx[0] << 12;

	return canonical(addr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movslq 0x34(%rax), %rax
shlq $0x27, %rax
movq -0x8(%rbp), %rcx
movslq 0x30(%rcx), %rcx
shlq $0x1e, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq 0x2c(%rcx), %rcx
shlq $0x15, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq 0x28(%rcx), %rcx
shlq $0xc, %rcx
orq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff80106380
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: _pt_populate_range
int __pt_populate_range(pte_t *pml4, virt_t from, virt_t to, pte_t flags)
{
	DBG_ASSERT(linear(from) < linear(to));
	DBG_ASSERT((flags & ~PTE_FLAGS) == 0);
	DBG_ASSERT(pml4 != 0);

	from = ALIGN_DOWN(linear(from), PAGE_SIZE);
	to = ALIGN(linear(to), PAGE_SIZE);

	return pt_populate_pml4(pml4, from, to, flags | PTE_PRESENT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff801056a0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0xffffffff801056a0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jb 0xffffffff801055c9
leaq 0xcbd8(%rip), %rdi      # 0xffffffff80112179
leaq 0xd04f(%rip), %rsi      # 0xffffffff801125f7
movl $0x157, %edx            # imm = 0x157
leaq 0xcbc9(%rip), %rcx      # 0xffffffff8011217d
leaq 0xd045(%rip), %r8       # 0xffffffff80112600
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff801055c7
jmp 0xffffffff801055cb
jmp 0xffffffff801055cd
movq -0x20(%rbp), %rax
andq $-0x288, %rax           # imm = 0xFD78
cmpq $0x0, %rax
je 0xffffffff8010560c
leaq 0xcb95(%rip), %rdi      # 0xffffffff80112179
leaq 0xd00c(%rip), %rsi      # 0xffffffff801125f7
movl $0x158, %edx            # imm = 0x158
leaq 0xcb86(%rip), %rcx      # 0xffffffff8011217d
leaq 0xd01c(%rip), %r8       # 0xffffffff8011261a
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff8010560a
jmp 0xffffffff8010560e
jmp 0xffffffff80105610
cmpq $0x0, -0x8(%rbp)
jne 0xffffffff80105646
leaq 0xcb5b(%rip), %rdi      # 0xffffffff80112179
leaq 0xcfd2(%rip), %rsi      # 0xffffffff801125f7
movl $0x159, %edx            # imm = 0x159
leaq 0xcb4c(%rip), %rcx      # 0xffffffff8011217d
leaq 0xcffc(%rip), %r8       # 0xffffffff80112634
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80105644
jmp 0xffffffff80105648
movq -0x10(%rbp), %rdi
callq 0xffffffff801056a0
movq %rax, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0xffffffff801056c0
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0xffffffff801056a0
movq %rax, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0xffffffff801056f0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
orq $0x1, %rcx
callq 0xffffffff80105720
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: _pt_release_range
void __pt_release_range(pte_t *pml4, virt_t from, virt_t to)
{
	DBG_ASSERT(linear(from) < linear(to));
	DBG_ASSERT(pml4 != 0);

	from = ALIGN_DOWN(linear(from), PAGE_SIZE);
	to = ALIGN(linear(to), PAGE_SIZE);

	pt_release_pml4(pml4, from, to);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff801056a0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xffffffff801056a0
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jb 0xffffffff80105955
leaq 0xc84c(%rip), %rdi      # 0xffffffff80112179
leaq 0xccc3(%rip), %rsi      # 0xffffffff801125f7
movl $0x163, %edx            # imm = 0x163
leaq 0xc83d(%rip), %rcx      # 0xffffffff8011217d
leaq 0xccb9(%rip), %r8       # 0xffffffff80112600
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80105953
jmp 0xffffffff80105957
jmp 0xffffffff80105959
cmpq $0x0, -0x8(%rbp)
jne 0xffffffff8010598f
leaq 0xc812(%rip), %rdi      # 0xffffffff80112179
leaq 0xcc89(%rip), %rsi      # 0xffffffff801125f7
movl $0x164, %edx            # imm = 0x164
leaq 0xc803(%rip), %rcx      # 0xffffffff8011217d
leaq 0xccb3(%rip), %r8       # 0xffffffff80112634
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff8010598d
jmp 0xffffffff80105991
movq -0x10(%rbp), %rdi
callq 0xffffffff801056a0
movq %rax, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0xffffffff801056c0
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0xffffffff801056a0
movq %rax, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0xffffffff801056f0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xffffffff801059e0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: pt_release_pml4
static void pt_release_pml4(pte_t *pml4, virt_t from, virt_t to)
{
	virt_t vaddr = from;

	for (int i = pml4_i(from); vaddr != to; ++i) {
		const pte_t pte = pml4[i];
		const virt_t bytes =
			MINU(PML3_SIZE - (vaddr & PML3_MASK), to - vaddr);
		const pfn_t pages = bytes >> PAGE_BITS;

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

			pt_release_pml3(va(paddr), vaddr, vaddr + bytes);
			pt->u.refcount -= pages;

			if (pt->u.refcount == 0) {
				pml4[i] = 0;
				free_page_table(pt);
			}
		}
		vaddr += bytes;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff801051a0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xffffffff80105b03
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movabsq $0x7fffffffff, %rax # imm = 0x7FFFFFFFFF
andq -0x20(%rbp), %rax
movabsq $0x8000000000, %rdi # imm = 0x8000000000
subq %rax, %rdi
movq -0x18(%rbp), %rsi
subq -0x20(%rbp), %rsi
callq 0xffffffff801063c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0xc, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0xffffffff801051c0
testb $0x1, %al
jne 0xffffffff80105a6d
jmp 0xffffffff80105ae9
movq -0x30(%rbp), %rdi
callq 0xffffffff80105200
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
shrq $0xc, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0xffffffff80103ce0
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rdi
callq 0xffffffff80105220
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq -0x38(%rbp), %rdx
callq 0xffffffff801065d0
movq -0x40(%rbp), %rdx
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x58(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xffffffff80105ae7
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x58(%rbp), %rdi
callq 0xffffffff801065b0
jmp 0xffffffff80105ae9
movq -0x38(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xffffffff80105a08
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: kmap
void *kmap(struct page **pages, size_t count)
{
	struct kmap_range *range = kmap_alloc_range(count);

	if (!range)
		return 0;

	const virt_t from = kmap2virt(range);
	const virt_t to = from + (count << PAGE_BITS);
	pte_t *pt = va(load_pml4());
	struct pt_iter iter;
	size_t i = 0;

	for_each_slot_in_range(pt, from, to, iter) {
		const phys_t paddr = page_paddr(pages[i++]);
		const int level = iter.level;
		const int idx = iter.idx[level];

		iter.pt[level][idx] = paddr | PTE_WRITE | PTE_PRESENT;
		flush_tlb_addr(iter.addr);
	}

	return (void *)from;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xffffffff80105c70
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xffffffff80105b44
movq $0x0, -0x8(%rbp)
jmp 0xffffffff80105c5a
movq -0x20(%rbp), %rdi
callq 0xffffffff80105d40
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
shlq $0xc, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
callq 0xffffffff80105d80
movq %rax, %rdi
callq 0xffffffff80105220
movq %rax, -0x38(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0xffffffff80105050
movq %rax, -0x88(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x88(%rbp)
movb %al, -0x99(%rbp)
je 0xffffffff80105bbf
movq -0x88(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x30(%rbp), %rax
setb %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0xffffffff80105bce
jmp 0xffffffff80105c52
movq -0x10(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x80(%rbp)
movq (%rax,%rcx,8), %rdi
callq 0xffffffff80105da0
movq %rax, -0x90(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x94(%rbp)
movslq -0x94(%rbp), %rax
movl -0x50(%rbp,%rax,4), %eax
movl %eax, -0x98(%rbp)
movq -0x90(%rbp), %rdx
orq $0x2, %rdx
orq $0x1, %rdx
movslq -0x94(%rbp), %rax
movq -0x70(%rbp,%rax,8), %rax
movslq -0x98(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rdi
callq 0xffffffff80105dc0
movq -0x88(%rbp), %rdi
callq 0xffffffff80105320
movq %rax, -0x88(%rbp)
jmp 0xffffffff80105b95
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: kmap_alloc_range
static struct kmap_range *kmap_alloc_range(pfn_t pages)
{
	for (int order = kmap_order(pages); order < KMAP_ORDERS; ++order) {
		struct kmap_range *range = kmap_find_free_range(order, pages);

		if (!range)
			continue;

		const pfn_t range_pages = range->pages;

		list_del(&range->link);
		list_init(&range->link);
		(range + pages - 1)->pages = range->pages = pages;

		if (range_pages > pages)
			kmap_free_range(range + pages, range_pages - pages);

		return range;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff80106980
movl %eax, -0x14(%rbp)
cmpl $0x10, -0x14(%rbp)
jge 0xffffffff80105d20
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0xffffffff801069b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xffffffff80105cab
jmp 0xffffffff80105d12
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xffffffff80101250
movq -0x20(%rbp), %rdi
callq 0xffffffff80101190
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
imulq $0x18, -0x10(%rbp), %rdx
addq %rdx, %rax
movq %rcx, -0x8(%rax)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0xffffffff80105d08
movq -0x20(%rbp), %rdi
imulq $0x18, -0x10(%rbp), %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
subq -0x10(%rbp), %rsi
callq 0xffffffff80105f30
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xffffffff80105d28
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xffffffff80105c88
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: kunmap
void kunmap(void *vaddr)
{
	struct kmap_range *range = virt2kmap((virt_t)vaddr);
	const pfn_t count = range->pages;

	const virt_t from = (virt_t)vaddr;
	const virt_t to = from + (count << PAGE_BITS);
	pte_t *pt = va(load_pml4());
	virt_t virt = from;
	struct pt_iter iter;

	for_each_slot_in_range(pt, from, to, iter) {
		const int level = iter.level;
		const int idx = iter.idx[level];

		iter.pt[level][idx] = 0;
		flush_tlb_addr(virt);
		virt += PAGE_SIZE;
	}
	kmap_free_range(range, range->pages);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xffffffff80105f00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
shlq $0xc, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
callq 0xffffffff80105d80
movq %rax, %rdi
callq 0xffffffff80105220
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0xffffffff80105050
movq %rax, -0x80(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x80(%rbp)
movb %al, -0x89(%rbp)
je 0xffffffff80105e75
movq -0x80(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x28(%rbp), %rax
setb %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0xffffffff80105e81
jmp 0xffffffff80105edf
movl -0x78(%rbp), %eax
movl %eax, -0x84(%rbp)
movslq -0x84(%rbp), %rax
movl -0x50(%rbp,%rax,4), %eax
movl %eax, -0x88(%rbp)
movslq -0x84(%rbp), %rax
movq -0x70(%rbp,%rax,8), %rax
movslq -0x88(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x38(%rbp), %rdi
callq 0xffffffff80105dc0
movq -0x38(%rbp), %rax
addq $0x1000, %rax           # imm = 0x1000
movq %rax, -0x38(%rbp)
movq -0x80(%rbp), %rdi
callq 0xffffffff80105320
movq %rax, -0x80(%rbp)
jmp 0xffffffff80105e51
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xffffffff80105f30
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: kmap_free_range
static void kmap_free_range(struct kmap_range *range, pfn_t pages)
{
	if (range > all_kmap_ranges) {
		struct kmap_range *prev = range - (range - 1)->pages;

		if (!list_empty(&prev->link)) {
			list_del(&prev->link);
			pages += prev->pages;
			range = prev;
		}
	}

	if (range + pages < all_kmap_ranges + KMAP_PAGES) {
		struct kmap_range *next = range + pages;

		if (!list_empty(&next->link)) {
			list_del(&next->link);
			pages += next->pages;
		}
	}

	(range + pages - 1)->pages = range->pages = pages;
	list_add(&range->link, free_kmap_ranges + kmap_order(pages));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x2c2f9(%rip), %rax     # 0xffffffff80132240
cmpq %rax, -0x8(%rbp)
jbe 0xffffffff80105f96
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rdx
xorl %ecx, %ecx
subq -0x8(%rdx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xffffffff801012f0
testb $0x1, %al
jne 0xffffffff80105f94
movq -0x18(%rbp), %rdi
callq 0xffffffff80101250
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xffffffff80105f96
movq -0x8(%rbp), %rax
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
leaq 0x2c297(%rip), %rcx     # 0xffffffff80132240
addq $0x2fffe8, %rcx         # imm = 0x2FFFE8
cmpq %rcx, %rax
jae 0xffffffff80105fed
movq -0x8(%rbp), %rax
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xffffffff801012f0
testb $0x1, %al
jne 0xffffffff80105feb
movq -0x20(%rbp), %rdi
callq 0xffffffff80101250
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xffffffff80105fed
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
imulq $0x18, -0x10(%rbp), %rdx
addq %rdx, %rax
movq %rcx, -0x8(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff80106980
movq -0x28(%rbp), %rdi
cltq
leaq 0x2c119(%rip), %rsi     # 0xffffffff80132140
shlq $0x4, %rax
addq %rax, %rsi
callq 0xffffffff801011b0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: setup_paging
void setup_paging(void)
{
	struct page *page = alloc_page_table(PTE_LOW);

	DBG_ASSERT(page != 0);

	const phys_t paddr = page_paddr(page);
	pte_t *pt = va(paddr);

	DBG_ASSERT(setup_fixed_mapping(pt) == 0);
	DBG_ASSERT(setup_kernel_mapping(pt) == 0);
	DBG_ASSERT(setup_kmap_mapping(pt) == 0);
	store_pml4(paddr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x200, %edi            # imm = 0x200
callq 0xffffffff80106180
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xffffffff8010608c
leaq 0xc115(%rip), %rdi      # 0xffffffff80112179
leaq 0xc58c(%rip), %rsi      # 0xffffffff801125f7
movl $0x233, %edx            # imm = 0x233
leaq 0xc106(%rip), %rcx      # 0xffffffff8011217d
leaq 0xc5c0(%rip), %r8       # 0xffffffff8011263e
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff8010608a
jmp 0xffffffff8010608e
movq -0x8(%rbp), %rdi
callq 0xffffffff80105da0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff80105220
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xffffffff80106200
cmpl $0x0, %eax
je 0xffffffff801060e5
leaq 0xc0bc(%rip), %rdi      # 0xffffffff80112179
leaq 0xc533(%rip), %rsi      # 0xffffffff801125f7
movl $0x238, %edx            # imm = 0x238
leaq 0xc0ad(%rip), %rcx      # 0xffffffff8011217d
leaq 0xc571(%rip), %r8       # 0xffffffff80112648
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff801060e3
jmp 0xffffffff801060e7
jmp 0xffffffff801060e9
movq -0x18(%rbp), %rdi
callq 0xffffffff80106250
cmpl $0x0, %eax
je 0xffffffff80106126
leaq 0xc07b(%rip), %rdi      # 0xffffffff80112179
leaq 0xc4f2(%rip), %rsi      # 0xffffffff801125f7
movl $0x239, %edx            # imm = 0x239
leaq 0xc06c(%rip), %rcx      # 0xffffffff8011217d
leaq 0xc54d(%rip), %r8       # 0xffffffff80112665
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80106124
jmp 0xffffffff80106128
jmp 0xffffffff8010612a
movq -0x18(%rbp), %rdi
callq 0xffffffff80106290
cmpl $0x0, %eax
je 0xffffffff80106167
leaq 0xc03a(%rip), %rdi      # 0xffffffff80112179
leaq 0xc4b1(%rip), %rsi      # 0xffffffff801125f7
movl $0x23a, %edx            # imm = 0x23A
leaq 0xc02b(%rip), %rcx      # 0xffffffff8011217d
leaq 0xc52a(%rip), %r8       # 0xffffffff80112683
movb $0x0, %al
callq 0xffffffff80101e60
callq 0xffffffff80111cd0
jmp 0xffffffff80106165
jmp 0xffffffff80106169
movq -0x10(%rbp), %rdi
callq 0xffffffff80106300
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: alloc_page_table
static struct page *alloc_page_table(pte_t flags)
{
	struct page *page =
		(flags & PTE_LOW) ? __alloc_pages(0, NT_LOW) : alloc_pages(0);

	if (page) {
		memset(va(page_paddr(page)), 0, PAGE_SIZE);
		page->u.refcount = 0;
	}
	return page;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
andq $0x200, %rax            # imm = 0x200
cmpq $0x0, %rax
je 0xffffffff801061ab
xorl %esi, %esi
movl %esi, %edi
callq 0xffffffff80104330
movq %rax, -0x18(%rbp)
jmp 0xffffffff801061b6
xorl %edi, %edi
callq 0xffffffff801043b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xffffffff801061f1
movq -0x10(%rbp), %rdi
callq 0xffffffff80105da0
movq %rax, %rdi
callq 0xffffffff80105220
movq %rax, %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0xffffffff801017e0
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: setup_kmap_mapping
static int setup_kmap_mapping(pte_t *pml4)
{
	for (int i = 0; i != KMAP_ORDERS; ++i)
		list_init(&free_kmap_ranges[i]);

	kmap_free_range(all_kmap_ranges, KMAP_PAGES);

	return __pt_populate_range(pml4, KMAP_BASE, KMAP_BASE + KMAP_SIZE,
				PTE_WRITE | PTE_LOW);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x10, -0xc(%rbp)
je 0xffffffff801062cb
movslq -0xc(%rbp), %rax
leaq 0x2be8c(%rip), %rdi     # 0xffffffff80132140
shlq $0x4, %rax
addq %rax, %rdi
callq 0xffffffff80101190
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xffffffff801062a3
leaq 0x2bf6e(%rip), %rdi     # 0xffffffff80132240
movl $0x1ffff, %esi          # imm = 0x1FFFF
callq 0xffffffff80105f30
movq -0x8(%rbp), %rdi
movq $-0x20000000, %rsi      # imm = 0xE0000000
movq $-0x1000, %rdx          # imm = 0xF000
movl $0x202, %ecx            # imm = 0x202
callq 0xffffffff80105560
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: pt_release_pml3
static void pt_release_pml3(pte_t *pml3, virt_t from, virt_t to)
{
	virt_t vaddr = from;

	for (int i = pml3_i(from); vaddr != to; ++i) {
		const pte_t pte = pml3[i];
		const virt_t bytes = MINU(PML2_SIZE - (vaddr & PML2_MASK),
					to - vaddr);
		const pfn_t pages = bytes >> PAGE_BITS;

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

			pt_release_pml2(va(paddr), vaddr, vaddr + bytes);
			pt->u.refcount -= pages;

			if (pt->u.refcount == 0) {
				pml3[i] = 0;
				free_page_table(pt);
			}
		}
		vaddr += bytes;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff80106320
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xffffffff801066ea
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
movl $0x40000000, %edi       # imm = 0x40000000
subq %rax, %rdi
movq -0x18(%rbp), %rsi
subq -0x20(%rbp), %rsi
callq 0xffffffff801063c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0xc, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0xffffffff801051c0
testb $0x1, %al
jne 0xffffffff80106654
jmp 0xffffffff801066d0
movq -0x30(%rbp), %rdi
callq 0xffffffff80105200
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
shrq $0xc, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0xffffffff80103ce0
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rdi
callq 0xffffffff80105220
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq -0x38(%rbp), %rdx
callq 0xffffffff80106870
movq -0x40(%rbp), %rdx
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x58(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xffffffff801066ce
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x58(%rbp), %rdi
callq 0xffffffff801065b0
jmp 0xffffffff801066d0
movq -0x38(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xffffffff801065f8
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: pt_populate_pml2
static int pt_populate_pml2(pte_t *pml2, virt_t from, virt_t to, pte_t flags)
{
	virt_t vaddr = from;

	for (int i = pml2_i(from); vaddr != to; ++i) {
		const virt_t bytes =
			MINU(PML1_SIZE - (vaddr & PML1_MASK), to - vaddr);
		const pfn_t pages = bytes >> PAGE_BITS;

		if (!pte_present(pml2[i]) && !pte_large(flags)) {
			struct page *pt = alloc_page_table(flags);

			if (!pt) {
				pt_release_pml2(pml2, from, vaddr);
				return -ENOMEM;
			}

			pt->u.refcount += pages;
			pml2[i] = page_paddr(pt) | flags;
		} else if (pte_present(pml2[i]) && !pte_large(pml2[i])) {
			const pfn_t pfn = pte_phys(pml2[i]) >> PAGE_BITS;
			struct page *pt = pfn2page(pfn);

			pt->u.refcount += pages;
		}
		vaddr += bytes;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0xffffffff80106340
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xffffffff80106858
movq -0x30(%rbp), %rax
andq $0x1fffff, %rax         # imm = 0x1FFFFF
movl $0x200000, %edi         # imm = 0x200000
subq %rax, %rdi
movq -0x20(%rbp), %rsi
subq -0x30(%rbp), %rsi
callq 0xffffffff801063c0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
shrq $0xc, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xffffffff801051c0
testb $0x1, %al
jne 0xffffffff801067da
movq -0x28(%rbp), %rdi
callq 0xffffffff801051e0
testb $0x1, %al
jne 0xffffffff801067da
movq -0x28(%rbp), %rdi
callq 0xffffffff80106180
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0xffffffff801067ac
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0xffffffff80106870
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xffffffff8010685f
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movq -0x50(%rbp), %rdi
callq 0xffffffff80105da0
movq %rax, %rdx
orq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0xffffffff8010683e
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xffffffff801051c0
testb $0x1, %al
jne 0xffffffff801067f1
jmp 0xffffffff8010683c
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xffffffff801051e0
testb $0x1, %al
jne 0xffffffff8010683c
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xffffffff80105200
shrq $0xc, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0xffffffff80103ce0
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rcx
movq -0x60(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
jmp 0xffffffff8010683e
movq -0x40(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xffffffff8010671c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: pt_release_pml2
static void pt_release_pml2(pte_t *pml2, virt_t from, virt_t to)
{
	virt_t vaddr = from;

	for (int i = pml2_i(from); vaddr != to; ++i) {
		const pte_t pte = pml2[i];
		const virt_t bytes =
			MINU(PML1_SIZE - (vaddr & PML1_MASK), to - vaddr);	
		const pfn_t pages = bytes >> PAGE_BITS;

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

			pt->u.refcount -= pages;

			if (pt->u.refcount == 0) {
				pml2[i] = 0;
				free_page_table(pt);
			}
		}
		vaddr += bytes;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff80106340
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xffffffff80106972
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
andq $0x1fffff, %rax         # imm = 0x1FFFFF
movl $0x200000, %edi         # imm = 0x200000
subq %rax, %rdi
movq -0x18(%rbp), %rsi
subq -0x20(%rbp), %rsi
callq 0xffffffff801063c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0xc, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0xffffffff801051c0
testb $0x1, %al
jne 0xffffffff801068f4
jmp 0xffffffff80106958
movq -0x30(%rbp), %rdi
callq 0xffffffff801051e0
testb $0x1, %al
jne 0xffffffff80106958
movq -0x30(%rbp), %rdi
callq 0xffffffff80105200
shrq $0xc, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0xffffffff80103ce0
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x50(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xffffffff80106956
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x50(%rbp), %rdi
callq 0xffffffff801065b0
jmp 0xffffffff80106958
movq -0x38(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xffffffff80106898
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/paging.c
// Function: kmap_find_free_range
static struct kmap_range *kmap_find_free_range(int order, pfn_t pages)
{
	struct list_head *head = &free_kmap_ranges[order];
	struct list_head *ptr = head->next;

	for (; ptr != head; ptr = ptr->next) {
		struct kmap_range *range = LIST_ENTRY(ptr, struct kmap_range,
					link);

		if (range->pages >= pages)
			return range;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x2b77a(%rip), %rax     # 0xffffffff80132140
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xffffffff80106a15
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jb 0xffffffff80106a06
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xffffffff80106a1d
jmp 0xffffffff80106a08
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xffffffff801069dc
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/./kernel.h
// Function: ilog2
static inline int ilog2(uintmax_t x)
{
	int order = 0;

	while ((x >>= 1))
		++order;
	return order;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0xffffffff80106a8b
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xffffffff80106a6f
movl -0xc(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/i8259a.c
// Function: pic_remap
static void pic_remap(unsigned offset)
{
	out8(PIC_MASTER_CMD_PORT, PIC_ICW1_EXPECT_ICW4 | PIC_ICW1_INIT);
	out8(PIC_SLAVE_CMD_PORT, PIC_ICW1_EXPECT_ICW4 | PIC_ICW1_INIT);
	out8(PIC_MASTER_DATA_PORT, offset);
	out8(PIC_SLAVE_DATA_PORT, offset + PIC_IRQS_PER_CHIP);
	out8(PIC_MASTER_DATA_PORT, PIC_SLAVE_IRQ_BIT);
	out8(PIC_SLAVE_DATA_PORT, PIC_SLAVE_IRQ);
	out8(PIC_MASTER_DATA_PORT, PIC_ICW4_8086);
	out8(PIC_SLAVE_DATA_PORT, PIC_ICW4_8086);

	out8(PIC_MASTER_DATA_PORT, pic_irq_mask & 0xFFU);
	out8(PIC_SLAVE_DATA_PORT, (pic_irq_mask >> 8) & 0xFFU);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x20, %edi
movl $0x11, %esi
callq 0xffffffff80106ea0
movl $0xa0, %edi
movl $0x11, %esi
callq 0xffffffff80106ea0
movl -0x4(%rbp), %eax
movl $0x21, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
movl -0x4(%rbp), %eax
addl $0x8, %eax
movl $0xa1, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
movl $0x21, %edi
movl $0x4, %esi
callq 0xffffffff80106ea0
movl $0xa1, %edi
movl $0x2, %esi
callq 0xffffffff80106ea0
movl $0x21, %edi
movl $0x1, %esi
callq 0xffffffff80106ea0
movl $0xa1, %edi
movl $0x1, %esi
callq 0xffffffff80106ea0
movl 0x10f4a(%rip), %eax     # 0xffffffff80117c68
andl $0xff, %eax
movl $0x21, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
movl 0x10f32(%rip), %eax     # 0xffffffff80117c68
shrl $0x8, %eax
andl $0xff, %eax
movl $0xa1, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/i8259a.c
// Function: pic_mask
static void pic_mask(unsigned irq)
{
	pic_irq_mask |= 1u << irq;
	if (irq < 8)
		out8(PIC_MASTER_DATA_PORT, pic_irq_mask & 0xFFU);
	else
		out8(PIC_SLAVE_DATA_PORT, (pic_irq_mask >> 8) & 0xFFU);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
orl 0x10eed(%rip), %eax     # 0xffffffff80117c68
movl %eax, 0x10ee7(%rip)     # 0xffffffff80117c68
cmpl $0x8, -0x4(%rbp)
jae 0xffffffff80106da1
movl 0x10edb(%rip), %eax     # 0xffffffff80117c68
andl $0xff, %eax
movl $0x21, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
jmp 0xffffffff80106dbc
movl 0x10ec1(%rip), %eax     # 0xffffffff80117c68
shrl $0x8, %eax
andl $0xff, %eax
movl $0xa1, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/i8259a.c
// Function: pic_unmask
static void pic_unmask(unsigned irq)
{
	pic_irq_mask &= ~(1u << irq);
	if (irq < 8)
		out8(PIC_MASTER_DATA_PORT, pic_irq_mask & 0xFFU);
	else
		out8(PIC_SLAVE_DATA_PORT, (pic_irq_mask >> 8) & 0xFFU);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
xorl $-0x1, %eax
andl 0x10e7a(%rip), %eax     # 0xffffffff80117c68
movl %eax, 0x10e74(%rip)     # 0xffffffff80117c68
cmpl $0x8, -0x4(%rbp)
jae 0xffffffff80106e14
movl 0x10e68(%rip), %eax     # 0xffffffff80117c68
andl $0xff, %eax
movl $0x21, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
jmp 0xffffffff80106e2f
movl 0x10e4e(%rip), %eax     # 0xffffffff80117c68
shrl $0x8, %eax
andl $0xff, %eax
movl $0xa1, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/i8259a.c
// Function: pic_eoi
static void pic_eoi(unsigned irq)
{
	if (irq >= 8) {
		out8(PIC_SLAVE_CMD_PORT, PIC_EOI_CMD + (irq & 7));
		out8(PIC_MASTER_CMD_PORT, PIC_EOI_CMD + PIC_SLAVE_IRQ);
	} else {
		out8(PIC_MASTER_CMD_PORT, PIC_EOI_CMD + irq);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x8, -0x4(%rbp)
jb 0xffffffff80106e78
movl -0x4(%rbp), %eax
andl $0x7, %eax
addl $0x60, %eax
movl $0xa0, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
movl $0x20, %edi
movl $0x62, %esi
callq 0xffffffff80106ea0
jmp 0xffffffff80106e8b
movl -0x4(%rbp), %eax
addl $0x60, %eax
movl $0x20, %edi
movzbl %al, %esi
callq 0xffffffff80106ea0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/kmem_cache.c
// Function: kmem_cache_reap
void kmem_cache_reap(struct kmem_cache *cache)
{
	LIST_HEAD(list);

	const bool enabled = spin_lock_irqsave(&cache->lock);

	list_splice(&cache->free_list, &list);
	spin_unlock_irqrestore(&cache->lock, enabled);

	for (struct list_head *ptr = list.next; ptr != &list;) {
		struct kmem_slab *slab =
			LIST_ENTRY(ptr, struct kmem_slab, link);
		struct page *pages = slab->pages;

		ptr = ptr->next;
		if (cache->ops->destroy)
			cache->ops->destroy(cache, slab);

		free_pages(pages, cache->order);	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0xffffffff80106f80
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
leaq -0x18(%rbp), %rsi
callq 0xffffffff801012b0
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xffffffff80106fa0
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rax
cmpq %rax, -0x28(%rbp)
je 0xffffffff80106f7a
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xffffffff80106f68
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x50(%rax), %esi
callq 0xffffffff801043d0
jmp 0xffffffff80106f1c
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/kmem_cache.c
// Function: kmem_cache_alloc
void *kmem_cache_alloc(struct kmem_cache *cache)
{
	const bool enabled = spin_lock_irqsave(&cache->lock);

	if (!list_empty(&cache->part_list)) {
		struct list_head *node = list_first(&cache->part_list);
		struct kmem_slab *slab =
			LIST_ENTRY(node, struct kmem_slab, link);

		void *ptr = slab->ops->alloc(cache, slab);

		--slab->free;

		if (!slab->free) {
			list_del(&slab->link);
			list_add(&slab->link, &cache->full_list);
		}
		spin_unlock_irqrestore(&cache->lock, enabled);
		return ptr;
	}

	if (list_empty(&cache->free_list) && !kmem_cache_grow(cache)) {
		spin_unlock_irqrestore(&cache->lock, enabled);
		return 0;
	}

	struct list_head *node = list_first(&cache->free_list);
	struct kmem_slab *slab = LIST_ENTRY(node, struct kmem_slab, link);

	void *ptr = slab->ops->alloc(cache, slab); 

	--slab->free;

	list_del(&slab->link);
	list_add(&slab->link, &cache->part_list);

	spin_unlock_irqrestore(&cache->lock, enabled);
	return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0xffffffff80106f80
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0xffffffff801012f0
testb $0x1, %al
jne 0xffffffff8010708c
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0xffffffff80101370
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0xffffffff8010706a
movq -0x28(%rbp), %rdi
callq 0xffffffff80101250
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0xffffffff801011b0
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xffffffff80106fa0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xffffffff80107144
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0xffffffff801012f0
testb $0x1, %al
jne 0xffffffff8010709f
jmp 0xffffffff801070cb
movq -0x10(%rbp), %rdi
callq 0xffffffff80107150
testb $0x1, %al
jne 0xffffffff801070cb
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xffffffff80106fa0
movq $0x0, -0x8(%rbp)
jmp 0xffffffff80107144
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0xffffffff80101370
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq *%rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x40(%rbp), %rdi
callq 0xffffffff80101250
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0xffffffff801011b0
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xffffffff80106fa0
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/kmem_cache.c
// Function: kmem_cache_grow
static bool kmem_cache_grow(struct kmem_cache *cache)
{
	const pfn_t pfs = (pfn_t)1 << cache->order;
	struct page *pages = alloc_pages(cache->order);

	if (!pages)
		return false;

	struct kmem_slab *slab = cache->ops->create(cache, pages);

	if (!slab) {
		free_pages(pages, cache->order);
		return false;
	}

	for (pfn_t i = 0; i != pfs; ++i)
		pages[i].u.slab = slab;

	slab->cache = cache;
	slab->pages = pages;

	const bool enabled = spin_lock_irqsave(&cache->lock);

	list_add(&slab->link, &cache->free_list);
	spin_unlock_irqrestore(&cache->lock, enabled);

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %edi
callq 0xffffffff801043b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xffffffff80107191
movb $0x0, -0x1(%rbp)
jmp 0xffffffff80107254
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xffffffff801071c9
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x50(%rax), %esi
callq 0xffffffff801043d0
movb $0x0, -0x1(%rbp)
jmp 0xffffffff80107254
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xffffffff80107200
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xffffffff801071d1
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0xffffffff80106f80
andb $0x1, %al
movb %al, -0x31(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0xffffffff801011b0
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movb -0x31(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xffffffff80106fa0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/kmem_cache.c
// Function: kmem_cache_free
void kmem_cache_free(struct kmem_cache *cache, void *ptr)
{
	struct kmem_slab *slab = kmem_get_slab(ptr);
	const bool enabled = spin_lock_irqsave(&cache->lock);

	slab->ops->free(cache, slab, ptr);
	++slab->free;

	if (slab->free == slab->total) {
		list_del(&slab->link);
		list_add(&slab->link, &cache->free_list);
		spin_unlock_irqrestore(&cache->lock, enabled);
		return;
	}

	if (slab->free == 1) {
		list_del(&slab->link);
		list_add(&slab->link, &cache->part_list);
	}
	spin_unlock_irqrestore(&cache->lock, enabled);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xffffffff80107340
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0xffffffff80106f80
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq *%rax
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jne 0xffffffff801072fc
movq -0x18(%rbp), %rdi
callq 0xffffffff80101250
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x18, %rsi
callq 0xffffffff801011b0
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xffffffff80106fa0
jmp 0xffffffff80107336
movq -0x18(%rbp), %rax
cmpq $0x1, 0x28(%rax)
jne 0xffffffff80107321
movq -0x18(%rbp), %rdi
callq 0xffffffff80101250
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
callq 0xffffffff801011b0
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xffffffff80106fa0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/kmem_cache.c
// Function: kmem_cache_create
struct kmem_cache *kmem_cache_create(size_t size, size_t align)
{
	struct kmem_cache *cache;

	if (size <= PAGE_SIZE / 8)
		cache = kmem_small_cache_create(size, align);
	else
		cache = kmem_large_cache_create(size, align);

	if (!cache)
		return 0;


	return cache;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x200, -0x10(%rbp) # imm = 0x200
ja 0xffffffff801073ad
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xffffffff801073f0
movq %rax, -0x20(%rbp)
jmp 0xffffffff801073be
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xffffffff80107450
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xffffffff801073cf
movq $0x0, -0x8(%rbp)
jmp 0xffffffff801073d7
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)