// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/disassembler.cpp
// Function: disassembler::space(unsigned int)
void disassembler::space(unsigned size) {
	flush();

	std::string line;

	indent_to(line, kOpcodeTab);
	line += ds();
	indent_to(line, kOperandTab);


	while (size) {
		uint32_t chunk;
		if (_next_label == -1) chunk = size;
		else {
			chunk = _next_label - _pc;
			chunk = std::min(chunk, size);
		}

		line.resize(kOperandTab);
		line += std::to_string(chunk);
		indent_to(line, kCommentTab);
		line += "; ";

		line += to_x(_pc, 4);
		line.push_back(':');
		line.push_back('\n');
		fputs(line.c_str(), stdout);	


		_pc += chunk;
		size -= chunk;
		if (_next_label == _pc) _next_label = next_label(_pc);
	}


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
callq 0x82d4
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x38(%rsp), %rdi
movl $0x14, %esi
movl $0x20, %edx
callq 0x2080
movq (%rbx), %rax
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq *0x30(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x2090
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x83a4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
cmpq $0x1d, 0x40(%rsp)
ja 0x83c0
leaq 0x38(%rsp), %rdi
movl $0x1e, %esi
movl $0x20, %edx
callq 0x2080
movl 0xc(%rsp), %r12d
testl %r12d, %r12d
je 0x8573
leaq 0xc(%rsp), %r13
leaq 0x38(%rsp), %r14
movl $0xd1b71759, %r15d      # imm = 0xD1B71759
movl 0x30(%rbx), %eax
movq %r13, %rcx
cmpl $-0x1, %eax
je 0x83fc
subl 0x20(%rbx), %eax
movl %eax, 0x34(%rsp)
cmpl %eax, %r12d
leaq 0x34(%rsp), %rcx
cmovbq %r13, %rcx
movl (%rcx), %ebp
movl %ebp, 0x34(%rsp)
movl $0x1e, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2080
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x845a
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x8453
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8458
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x845a
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x8422
addl $-0x3, %eax
jmp 0x845a
addl $-0x2, %eax
jmp 0x845a
decl %eax
movl %eax, %esi
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x2200
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
movl %ebp, %edx
callq 0x6a93
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x2090
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x84b0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
cmpq $0x4f, 0x40(%rsp)
ja 0x84ca
movl $0x50, %esi
movq %r14, %rdi
movl $0x20, %edx
callq 0x2080
movq %r14, %rdi
leaq 0x77b5(%rip), %rsi      # 0xfc89
callq 0x2320
movl 0x20(%rbx), %esi
leaq 0x10(%rsp), %rdi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x7538
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x2090
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x851b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %r14, %rdi
movl $0x3a, %esi
callq 0x2180
movq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movq 0x38(%rsp), %rdi
movq 0xca87(%rip), %rax      # 0x14fc8
movq (%rax), %rsi
callq 0x21e0
subl %ebp, %r12d
addl 0x20(%rbx), %ebp
movl %ebp, 0x20(%rbx)
movl %r12d, 0xc(%rsp)
cmpl %ebp, 0x30(%rbx)
jne 0x856a
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x38(%rax)
movl %eax, 0x30(%rbx)
testl %r12d, %r12d
jne 0x83de
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x858f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85f4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x85f4
jmp 0x85c0
movq %rax, %rbx
jmp 0x85f4
jmp 0x85ec
jmp 0x85cb
jmp 0x85ec
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x85ef
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x85ef
movq %rax, %rbx
leaq 0x48(%rsp), %r14
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x860b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x22c0
nop