LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/bmlwrite.cpp
// Function: bmlwriter::escape(cstring)
string bmlwriter::escape(cstring val)
{
	string esc = "-";
	bool needescape = (val.startswith("-"));
	for (uint8_t c : val.bytes())
	{
		if (isalnum(c) || c=='.') esc+=c;
		else if (c=='-') esc+="--";
		else { esc+="-"+tostringhex<2>((uint8_t)c); needescape=true; }
	}
	if (needescape) return esc;
	else return val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r15
leaq 0x58(%rsp), %r14
movq %rsi, (%r14)
movq %rdx, 0x8(%r14)
movw $0x2d, 0x10(%rsp)
movb $0xe, 0x1f(%rsp)
leaq 0x27fb0(%rip), %rsi     # 0x2f0e0
leaq 0x68(%rsp), %rbx
movl $0x1, %edx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x5040
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x196de
movzbl 0xf(%r14), %r13d
testb %r13b, %r13b
jns 0x716c
movl 0x60(%rsp), %r13d
movq 0x58(%rsp), %r14
jmp 0x7170
xorq $0xf, %r13
testq %r13, %r13
je 0x72ba
movb %al, 0xf(%rsp)
movq %r15, 0x50(%rsp)
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
movzbl (%r14,%rbp), %r12d
cmpq $0x2e, %r12
je 0x71c2
leaq 0x28b75(%rip), %rax     # 0x2fd10
movb (%rax,%r12), %al
andb $0x60, %al
jne 0x71c2
movl $0x2, %edx
cmpb $0x2d, %r12b
jne 0x71f6
movq %r15, %rdi
leaq 0x27ef0(%rip), %rsi     # 0x2f0a8
callq 0x19466
jmp 0x72a5
movzbl 0x1f(%rsp), %eax
movl %eax, %ebx
xorl $0xf, %ebx
testb %al, %al
cmovsl 0x18(%rsp), %ebx
leal 0x1(%rbx), %esi
movq %r15, %rdi
callq 0x191a4
cmpb $0x0, 0x1f(%rsp)
movq %r15, %rax
jns 0x71ed
movq 0x10(%rsp), %rax
movb %r12b, (%rax,%rbx)
jmp 0x72a5
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x1b7eb
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rax
movw $0x2d, 0x30(%rsp)
movb $0xe, 0x3f(%rsp)
movq %rsi, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movzbl 0x2f(%rsp), %ecx
movq %rcx, %rdi
xorq $0xf, %rdi
testb %cl, %cl
movl %eax, %edx
leaq 0x20(%rsp), %rbx
cmovnsq %rbx, %rsi
cmovnsq %rdi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x19466
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
movq %rsi, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movzbl 0x2f(%rsp), %ecx
movq %rcx, %rdi
xorq $0xf, %rdi
testb %cl, %cl
movl %eax, %edx
cmovnsq %rbx, %rsi
cmovnsq %rdi, %rdx
movq %r15, %rdi
callq 0x19466
cmpb $0x0, 0x3f(%rsp)
jns 0x728f
movq 0x30(%rsp), %rdi
callq 0x3430
cmpb $0x0, 0x4f(%rsp)
jns 0x72a0
movq 0x40(%rsp), %rdi
callq 0x3430
movb $0x1, 0xf(%rsp)
incq %rbp
cmpq %rbp, %r13
jne 0x7189
movq 0x50(%rsp), %r15
movb 0xf(%rsp), %al
testb $0x1, %al
je 0x72d3
movups 0x10(%rsp), %xmm0
movups %xmm0, (%r15)
movb $0xf, 0x1f(%rsp)
movb $0x0, 0x10(%rsp)
jmp 0x72e8
movups 0x58(%rsp), %xmm0
leaq 0x20(%rsp), %rsi
movups %xmm0, (%rsi)
movq %r15, %rdi
callq 0x19372
cmpb $0x0, 0x1f(%rsp)
jns 0x72f9
movq 0x10(%rsp), %rdi
callq 0x3430
movq %r15, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/bmlwrite.cpp
// Function: bmlwriter::unescape(cstring)
string bmlwriter::unescape(cstring val)
{
	if (!val.startswith("-")) return val;
	
	string out;
	for (size_t i=1;i<val.length();i++)
	{
		if (val[i]=='-')
		{
			uint8_t tmp;
			if (val[i+1]=='-')
			{
				i++;
				out += '-';
			}
			else if (fromstringhex(val.substr(i+1, i+3), tmp))
			{
				i += 2;
				out += tmp;
			}
		}
		else out += val[i];
	}
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %rsi, (%r14)
movq %rdx, 0x8(%r14)
leaq 0x27db0(%rip), %rsi     # 0x2f0e0
leaq 0x28(%rsp), %r15
movl $0x1, %edx
movq %r15, %rdi
movl $0x1, %ecx
callq 0x5040
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x196de
testb %al, %al
je 0x7370
movb $0xf, 0xf(%rbx)
movb $0x0, (%rbx)
movzbl 0x17(%rsp), %eax
testb %al, %al
jns 0x738a
movl 0x10(%rsp), %ecx
jmp 0x738f
movups 0x8(%rsp), %xmm0
leaq 0x18(%rsp), %rsi
movups %xmm0, (%rsi)
movq %rbx, %rdi
callq 0x19372
jmp 0x7478
movl %eax, %ecx
xorl $0xe, %ecx
cmpl $0x2, %ecx
jb 0x7478
movl $0x1, %r13d
leaq 0x18(%rsp), %r15
movq %r14, %rcx
testb %al, %al
jns 0x73af
movq 0x8(%rsp), %rcx
movslq %r13d, %rax
movb (%rcx,%rax), %bpl
cmpb $0x2d, %bpl
jne 0x742c
leaq 0x1(%r13), %r12
movslq %r12d, %rax
movb $0x2d, %bpl
cmpb $0x2d, (%rcx,%rax)
je 0x73f9
leal 0x3(%r13), %edx
movq %r14, %rdi
movl %r12d, %esi
callq 0x658a
movq %rax, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x1b8be
testb %al, %al
je 0x745b
addq $0x2, %r13
movb 0x18(%rsp), %bpl
movq %r13, %r12
movzbl 0xf(%rbx), %eax
movl %eax, %r13d
xorl $0xf, %r13d
testb %al, %al
cmovsl 0x8(%rbx), %r13d
leal 0x1(%r13), %esi
movq %rbx, %rdi
callq 0x191a4
cmpb $0x0, 0xf(%rbx)
movq %rbx, %rax
jns 0x7423
movq (%rbx), %rax
movb %bpl, (%rax,%r13)
movq %r12, %r13
jmp 0x745b
movzbl 0xf(%rbx), %eax
movl %eax, %r12d
xorl $0xf, %r12d
testb %al, %al
cmovsl 0x8(%rbx), %r12d
leal 0x1(%r12), %esi
movq %rbx, %rdi
callq 0x191a4
cmpb $0x0, 0xf(%rbx)
movq %rbx, %rax
jns 0x7457
movq (%rbx), %rax
movb %bpl, (%rax,%r12)
incq %r13
movzbl 0x17(%rsp), %eax
movl %eax, %ecx
xorl $0xf, %ecx
testb %al, %al
cmovsl 0x10(%rsp), %ecx
cmpq %rcx, %r13
jb 0x73a3
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/bytepipe.cpp
// Function: bytepipe::try_swap()
void bytepipe::try_swap()
{
	if (buf1st == buf1end && buf2end != 0)
	{
		buf1.swap(buf2);
		buf1st = buf2st;
		buf1end = buf2end;
		buf2st = 0;
		buf2end = 0;
	}
}

// Assembly:
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jne 0x7514
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x7514
movups (%rdi), %xmm0
movups 0x20(%rdi), %xmm1
movups %xmm0, 0x20(%rdi)
movups %xmm1, (%rdi)
movq 0x30(%rdi), %rcx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/bytepipe.cpp
// Function: bytepipe::push_begin(unsigned long)
bytesw bytepipe::push_begin(size_t nbytes)
{
	if (buf2.size() - buf2end < nbytes)
		try_swap();
	if (buf2.size() - buf2end < nbytes)
	{
		size_t b2s = buf2.size();
		while (b2s-buf2end < nbytes)
			b2s *= 2;
		buf2.resize(b2s);
	}
	return buf2.skip(buf2end);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rax
subq 0x38(%rsi), %rax
cmpq %rdx, %rax
jae 0x757d
movq %r14, %rdi
callq 0x74e0
movq 0x28(%r14), %rcx
movq 0x38(%r14), %rax
movq %rcx, %rdx
subq %rax, %rdx
cmpq %r15, %rdx
jae 0x75aa
leaq 0x20(%r14), %rdi
movq %rcx, %rsi
movq %rcx, %rdx
subq %rax, %rdx
addq %rcx, %rcx
cmpq %r15, %rdx
jb 0x7594
callq 0xda72
movq 0x28(%r14), %rax
movq 0x38(%r14), %rcx
subq %rcx, %rax
addq 0x20(%r14), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/bytepipe.cpp
// Function: bytepipe::pull_begin(unsigned long)
bytesw bytepipe::pull_begin(size_t nbytes)
{
	// - if the requested amount doesn't exist, just say so
	// - if buf1 is empty, swap the buffers
	// - if the requested amount exists in buf1 (after the swap, if applicable), return that
	// - if the requested amount fits in buf1, memmove+memcpy and set buf2st nonzero
	// - else an allocation must be made
	if (size() < nbytes)
	{
		return {};
	}
	try_swap();
	size_t size1 = buf1end - buf1st;
	if (size1 >= nbytes)
	{
		return buf1.slice(buf1st, size1);
	}
	if (nbytes <= buf1.size())
	{
		size_t size2 = nbytes - size1;
		if (buf1st != 0)
			memmove(buf1.ptr(), buf1.ptr()+buf1st, size1);
		memcpy(buf1.ptr()+size1, buf2.ptr()+buf2st, size2);
		buf1st = 0;
		buf1end = nbytes;
		buf2st += size2;
		return buf1.slice(0, nbytes);
	}
	else
	{
		size_t size2 = buf2end-buf2st;
		bytearray newbuf;
		newbuf.resize(bitround(size()));
		memcpy(newbuf.ptr(), buf1.ptr()+buf1st, size1);
		memcpy(newbuf.ptr()+size1, buf2.ptr()+buf2st, size2);
		buf1 = std::move(newbuf);
		buf1st = 0;
		buf1end = size1+size2;
		buf2st = 0;
		buf2end = 0;
		return buf1.slice(0, buf1end);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rcx
addq 0x38(%rsi), %rcx
addq 0x30(%rsi), %rax
subq %rax, %rcx
cmpq %rdx, %rcx
jae 0x7604
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x774a
movq %rdx, %r12
movq %rsi, %r14
movq %rsi, %rdi
callq 0x74e0
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rax
movq %rax, %r15
subq %rsi, %r15
movq %r12, %r13
subq %r15, %r13
jbe 0x76ef
cmpq %r12, 0x8(%r14)
jae 0x7701
leaq 0x30(%r14), %rbp
movq 0x30(%r14), %rcx
movq 0x38(%r14), %r12
xorps %xmm0, %xmm0
movq %rsp, %r13
movaps %xmm0, (%r13)
addq %r12, %rax
subq %rcx, %r12
addq %rcx, %rsi
subq %rsi, %rax
leaq -0x1(%rax), %rcx
bsrq %rcx, %rcx
movl $0x2, %edx
shlq %cl, %rdx
cmpq $0x2, %rax
movl $0x1, %esi
cmovaeq %rdx, %rsi
movq %r13, %rdi
callq 0xda72
movq (%r13), %rdi
movq (%r14), %rsi
addq 0x10(%r14), %rsi
movq %r15, %rdx
callq 0x3280
movq (%r13), %rdi
addq %r15, %rdi
movq 0x20(%r14), %rsi
addq 0x30(%r14), %rsi
movq %r12, %rdx
callq 0x3280
movaps (%r13), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r13)
movq (%r14), %rdi
movups %xmm0, (%r14)
callq 0x3430
movq $0x0, 0x10(%r14)
addq %r15, %r12
movq %r12, 0x18(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbp)
movq (%r14), %rax
movups %xmm0, (%rbx)
movq %rax, (%rbx)
movq %r12, 0x8(%rbx)
movq (%r13), %rdi
callq 0x3430
jmp 0x774a
addq (%r14), %rsi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rsi, (%rbx)
movq %r15, 0x8(%rbx)
jmp 0x774a
testq %rsi, %rsi
je 0x7714
movq (%r14), %rdi
addq %rdi, %rsi
movq %r15, %rdx
callq 0x3600
addq (%r14), %r15
movq 0x20(%r14), %rsi
addq 0x30(%r14), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x3280
movq $0x0, 0x10(%r14)
movq %r12, 0x18(%r14)
addq %r13, 0x30(%r14)
movq (%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rax, (%rbx)
movq %r12, 0x8(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/bytepipe.cpp
// Function: bytepipe::pull_line(unsigned long)
bytesr bytepipe::pull_line(size_t skip)
{
	size_t skipped = 0;
	bytesr chunk1 = buf1.slice(buf1st, buf1end-buf1st);
	if (skip <= chunk1.size())
	{
		chunk1 = chunk1.skip(skip);
		skipped += skip;
		skip = 0;
		const uint8_t * nl1 = (uint8_t*)memchr(chunk1.ptr(), '\n', chunk1.size());
		if (nl1)
			return pull(skipped + nl1+1 - chunk1.ptr());
	}
	else
	{
		skip -= chunk1.size();
	}
	
	bytesr chunk2 = buf2.slice(buf2st, buf2end-buf2st);
	chunk2 = chunk2.skip(skip);
	skipped += skip;
	const uint8_t * nl2 = (uint8_t*)memchr(chunk2.ptr(), '\n', chunk2.size());
	if (nl2)
		return pull(skipped + nl2+1 - chunk2.ptr() + chunk1.size());
	
	return {};
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %r12
movq 0x18(%rdi), %rax
subq %r12, %rax
movq %rax, %r15
subq %rsi, %r15
jae 0x7790
movq %r14, %r13
subq %rax, %r13
xorl %r14d, %r14d
movq %rax, %r15
jmp 0x77c5
addq (%rbx), %r12
addq %r14, %r12
movq %r12, %rdi
movl $0xa, %esi
movq %r15, %rdx
callq 0x33b0
testq %rax, %rax
je 0x77c2
addq %r14, %rax
subq %r12, %rax
incq %rax
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
jmp 0x7802
xorl %r13d, %r13d
movq 0x38(%rbx), %rdx
movq 0x30(%rbx), %r12
addq %r13, %r12
subq %r12, %rdx
addq 0x20(%rbx), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x33b0
testq %rax, %rax
je 0x7810
addq %r14, %rax
addq %r13, %rax
subq %r12, %r15
leaq (%r15,%rax), %rdx
incq %rdx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x78b8
movq (%r14), %rax
movq 0x8(%r14), %rdx
jmp 0x7814
xorl %edx, %edx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/bytepipe.cpp
// Function: bytepipe::reset(unsigned long)
void bytepipe::reset(size_t bufsize)
{
	buf1.resize(bufsize);
	buf1st = 0;
	buf1end = 0;
	buf2.resize(bufsize);
	buf2st = 0;
	buf2end = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0xda72
leaq 0x20(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %rbx, %rsi
callq 0xda72
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/crc32.cpp
// Function: crc32_update(arrayview<unsigned char>, unsigned int)
uint32_t crc32_update(arrayview<uint8_t> data, uint32_t crc)
{
#ifdef runtime__PCLMUL__
	// crc32_small is slow per byte, but pclmul has a pretty high constant factor; small wins for size <= 4
	// (crc32_small needs to exist for machines without pclmul support)
	if (data.size() >= 4 && runtime__PCLMUL__) return crc32_pclmul(data, crc);
#endif
	return crc32_small(data, crc);
}

// Assembly:
cmpq $0x4, %rsi
jb 0x79a2
leaq 0x3e937(%rip), %rax     # 0x462d4
testb $0x2, (%rax)
jne 0x79e5
testq %rsi, %rsi
je 0x79e2
xorl %ecx, %ecx
leaq 0x27a20(%rip), %r8      # 0x2f3d0
movzbl (%rdi,%rcx), %r9d
movl %r9d, %eax
xorl %edx, %eax
shrl $0x4, %edx
andl $0xf, %eax
xorl (%r8,%rax,4), %edx
movl %edx, %eax
shrl $0x4, %eax
andl $0xf, %edx
shrl $0x4, %r9d
xorl %edx, %r9d
xorl (%r8,%r9,4), %eax
incq %rcx
movl %eax, %edx
cmpq %rcx, %rsi
jne 0x79b0
retq
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/debug.cpp
// Function: debug_break(char const*)
bool debug_break(const char * text)
{
	if (RUNNING_ON_VALGRIND) VALGRIND_PRINTF_BACKTRACE("%s", text);
	else if (has_debugger()) raise(SIGTRAP);
	else return false;
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
leaq 0x10(%rsp), %rax
movq $0x1001, (%rax)         # imm = 0x1001
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rcx, 0x28(%rax)
xorl %edx, %edx
rolq $0x3, %rdi
rolq $0xd, %rdi
rolq $0x3d, %rdi
rolq $0x33, %rdi
xchgq %rbx, %rbx
movq %rdx, 0x8(%rsp)
movq 0x8(%rsp), %rax
testl %eax, %eax
je 0x7ec1
movq %rdi, %rsi
xorl %eax, %eax
callq 0x7f32
movb $0x1, %al
jmp 0x7f1b
leaq 0x2754b(%rip), %rdi     # 0x2f413
xorl %esi, %esi
xorl %eax, %eax
callq 0x3230
testl %eax, %eax
js 0x7f19
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
movl $0xfff, %edx            # imm = 0xFFF
movl %eax, %edi
callq 0x3500
movq %rax, %r14
movl %ebx, %edi
callq 0x3700
testq %r14, %r14
js 0x7f19
movb $0x0, 0x10(%rsp,%r14)
leaq 0x27521(%rip), %rsi     # 0x2f425
leaq 0x10(%rsp), %rdi
callq 0x30b0
testq %rax, %rax
je 0x7f19
cmpb $0x30, 0xb(%rax)
jne 0x7f26
xorl %eax, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r14
retq
movl $0x5, %edi
callq 0x3360
jmp 0x7ebd
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deflate-decomp.cpp
// Function: inflator::bits_refill_fast()
void inflator::bits_refill_fast()
{
	if (m_in_nbits&32) return;
	if (LIKELY(m_in_end - m_in_at >= 4))
	{
		m_in_bits_buf |= (uint64_t)readu_le32(m_in_at) << m_in_nbits;
		m_in_nbits += 32;
		m_in_at += 4;
	}
	else bits_refill_all(); // refill to max (after this, m_in is known empty)
}

// Assembly:
movl 0x4(%rdi), %ecx
testb $0x20, %cl
jne 0x8150
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rdx
subq %rax, %rdx
cmpq $0x4, %rdx
jl 0x8152
movl (%rax), %edx
shlq %cl, %rdx
orq %rdx, 0x8(%rdi)
orl $0x20, %ecx
movl %ecx, 0x4(%rdi)
addq $0x4, %rax
movq %rax, 0x10(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deflate-decomp.cpp
// Function: inflator::inflate(arrayview<unsigned char>)
bytearray inflator::inflate(bytesr in)
{
	inflator inf;
	inf.set_input(in, true);
	bytearray ret;
	ret.resize(max(4096, in.size()*8));
	inf.set_output_first(ret);
again:
	inflator::ret_t err = inf.inflate();
	if (err == inflator::ret_more_output)
	{
		ret.resize(ret.size()*2);
		inf.set_output_grow(ret);
		goto again;
	}
	else if (err != inflator::ret_done || inf.unused_input() != 0) ret.reset();
	else ret.resize(inf.output_in_last());
	
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x12e0, %rsp           # imm = 0x12E0
xorl %eax, %eax
movb %al, 0x18(%rsp)
movb %al, 0x1a(%rsp)
movq $0x0, 0x48(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x1c(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
jne 0x8e4b
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
addq %rdx, %rsi
movq %rsi, 0x30(%rsp)
movb $0x1, 0x1a(%rsp)
movups %xmm0, (%rdi)
shll $0x3, %edx
cmpl $0x1001, %edx           # imm = 0x1001
movl $0x1000, %esi           # imm = 0x1000
cmovgel %edx, %esi
callq 0xda72
cmpq $0x0, 0x48(%rsp)
jne 0x8e4b
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x8d5b
movq (%rbx), %rcx
jmp 0x8d62
leaq 0x2966a(%rip), %rcx     # 0x323cc
leaq 0x18(%rsp), %r14
movq $0x0, 0x20(%r14)
movq %rcx, 0x28(%r14)
movq %rcx, 0x30(%r14)
addq %rcx, %rax
movq %rax, 0x38(%r14)
xorl %r12d, %r12d
movq %rsp, %r15
movq %r14, %rdi
callq 0x8200
movl %eax, %ebp
cmpl $0x3, %eax
jne 0x8dc6
movq 0x8(%rbx), %rsi
addq %rsi, %rsi
movq %rbx, %rdi
callq 0xda72
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq (%rbx), %rax
movq %rax, (%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x8f10
jmp 0x8e21
testl %ebp, %ebp
jne 0x8df7
movq 0x30(%rsp), %rax
subq 0x28(%rsp), %rax
movl 0x1c(%rsp), %ecx
shrl $0x3, %ecx
addq %rax, %rcx
jne 0x8df7
movq 0x48(%rsp), %rsi
subq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0xda72
movb $0x1, %r12b
jmp 0x8e21
movq 0x8(%rbx), %rax
movb $0x1, %r12b
testq %rax, %rax
je 0x8e21
cmpq $0x9, %rax
jb 0x8e19
movq (%rbx), %rdi
movl $0x8, %esi
callq 0x157b7
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
cmpl $0x3, %ebp
je 0x8d84
testb $0x1, %r12b
jne 0x8e38
movq (%rbx), %rdi
callq 0x3430
movq %rbx, %rax
addq $0x12e0, %rsp           # imm = 0x12E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deflate-decomp.cpp
// Function: inflator::inflate(arrayvieww<unsigned char>, arrayview<unsigned char>)
bool inflator::inflate(bytesw out, bytesr in)
{
	inflator inf;
	inf.set_input(in, true);
	inf.set_output_first(out);
	return (inf.inflate() == inflator::ret_done && inf.output_in_last() == out.size() && inf.unused_input() == 0);
}

// Assembly:
pushq %rbx
subq $0x12d0, %rsp           # imm = 0x12D0
xorl %eax, %eax
movb %al, 0x8(%rsp)
movb %al, 0xa(%rsp)
movq $0x0, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0xc(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0x8f0b
movq %rdi, %rbx
movq %rsi, 0x18(%rsp)
addq %rsi, %rdx
movq %rdx, 0x20(%rsp)
movb $0x1, 0xa(%rsp)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x8eab
movq (%rbx), %rcx
jmp 0x8eb2
leaq 0x2951a(%rip), %rcx     # 0x323cc
leaq 0x8(%rsp), %rdi
movq $0x0, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
addq %rcx, %rax
movq %rax, 0x38(%rdi)
callq 0x8200
testl %eax, %eax
jne 0x8f00
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
cmpq 0x8(%rbx), %rax
jne 0x8f00
movq 0x20(%rsp), %rax
subq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
shrl $0x3, %ecx
addq %rax, %rcx
sete %al
jmp 0x8f02
xorl %eax, %eax
addq $0x12d0, %rsp           # imm = 0x12D0
popq %rbx
retq
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deflate.h
// Function: inflator::set_output_grow(arrayvieww<unsigned char>)
void set_output_grow(bytesw by)
	{
#ifndef ARLIB_OPT
		if (!m_out_at) abort();
		if (m_out_at != m_out_end) abort();
		if (by.size() < (size_t)(m_out_end-m_out_start)) abort();
#endif
		size_t off = m_out_at-m_out_start;
		m_out_start = by.ptr();
		m_out_at = by.ptr()+off;
		m_out_end = by.ptr()+by.size();
	}

// Assembly:
pushq %rax
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x8f4d
movq 0x38(%rdi), %rdx
cmpq %rdx, %rax
jne 0x8f4d
movq 0x8(%rsi), %rcx
movq 0x28(%rdi), %r8
subq %r8, %rdx
cmpq %rdx, %rcx
jb 0x8f4d
subq %r8, %rax
movq (%rsi), %rdx
movq %rdx, 0x28(%rdi)
addq %rdx, %rax
movq %rax, 0x30(%rdi)
addq %rdx, %rcx
movq %rcx, 0x38(%rdi)
popq %rax
retq
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/dylib.cpp
// Function: dylib::init(char const*)
bool dylib::init(const char * filename)
{
#ifndef ARLIB_OPT
	if (handle) abort();
#endif
	//synchronized(dylib_lock)
	{
		handle = dlopen(filename, RTLD_LAZY);
	}
	return handle;
}

// Assembly:
pushq %rbx
cmpq $0x0, (%rdi)
jne 0x8f76
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x1, %esi
callq 0x34c0
movq %rax, (%rbx)
testq %rax, %rax
setne %al
popq %rbx
retq
callq 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/dylib.cpp
// Function: dylib::sym_multi(void (**)(), char const*)
bool dylib::sym_multi(funcptr* out, const char * names)
{
	bool all = true;
	
	while (*names)
	{
		*out = this->sym_func(names);
		if (!*out) all = false;
		
		out++;
		names += strlen(names)+1;
	}
	
	return all;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpb $0x0, (%rdx)
je 0x8ffe
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movb $0x1, %bl
xorl %r13d, %r13d
movq (%r12), %rdi
testq %rdi, %rdi
je 0x8fd5
movq %r14, %rsi
callq 0x3330
jmp 0x8fd7
xorl %eax, %eax
movq %rax, (%r15)
testq %rax, %rax
movzbl %bl, %ebx
cmovel %r13d, %ebx
addq $0x8, %r15
movq %r14, %rdi
callq 0x30f0
addq %rax, %r14
incq %r14
cmpb $0x0, (%r14)
jne 0x8fc2
jmp 0x9000
movb $0x1, %bl
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file::open_impl_fs(cstring, file::mode)
file::impl* file::open_impl_fs(cstring filename, mode m)
{
	static const int flags[] = { O_RDONLY, O_RDWR|O_CREAT, O_RDWR, O_RDWR|O_CREAT|O_TRUNC, O_RDWR|O_CREAT|O_EXCL };
	int fd = ::open(filename.c_str(), flags[m]|O_CLOEXEC, 0644);
	if (fd<0) return NULL;
	
	struct stat st;
	fstat(fd, &st);
	if (!S_ISREG(st.st_mode)) // no opening directories
	{
		::close(fd);
		return NULL;
	}
	
	return new file_unix(fd);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %edx, %ebx
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
movq %rsi, 0x8(%rax)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x9688
movq (%r14), %rdi
movl %ebx, %eax
leaq 0x2643c(%rip), %rcx     # 0x2f520
movl $0x80000, %esi          # imm = 0x80000
orl (%rcx,%rax,4), %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x3230
movl %eax, %ebx
cmpb $0x1, 0x8(%r14)
jne 0x910b
movq 0x18(%rsp), %rdi
callq 0x3430
testl %ebx, %ebx
js 0x914e
leaq 0x18(%rsp), %r14
movl %ebx, %edi
movq %r14, %rsi
callq 0x3640
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%r14), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x9147
movl $0x10, %edi
callq 0x3340
leaq 0x3c561(%rip), %rcx     # 0x456a0
movq %rcx, (%rax)
movl %ebx, 0x8(%rax)
jmp 0x9150
movl %ebx, %edi
callq 0x3700
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file::mkdir_fs(cstring)
bool file::mkdir_fs(cstring filename)
{
	int ret = ::mkdir(filename.c_str(), 0755);
	if (ret==0) return true;
	if (ret==-1 && errno==EEXIST)
	{
		struct stat st;
		if (lstat(filename.c_str(), &st) < 0) return false;
		return (S_ISDIR(st.st_mode));
	}
	return false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
leaq 0x18(%rsp), %rax
movq %rdi, (%rax)
movq %rsi, 0x8(%rax)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x9688
movq (%r14), %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x3110
movl %eax, %ebx
cmpb $0x1, 0x8(%r14)
jne 0x91a2
movq 0x28(%rsp), %rdi
callq 0x3430
testl %ebx, %ebx
je 0x9205
cmpl $-0x1, %ebx
jne 0x9201
callq 0x3040
cmpl $0x11, (%rax)
jne 0x9201
leaq 0x8(%rsp), %r14
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x9688
movq (%r14), %rdi
leaq 0x28(%rsp), %rsi
callq 0x36f0
movl %eax, %ebx
cmpb $0x1, 0x8(%r14)
jne 0x91e7
movq 0x8(%rsp), %rdi
callq 0x3430
testl %ebx, %ebx
setns %cl
movl 0x40(%rsp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
sete %al
andb %cl, %al
jmp 0x9207
xorl %eax, %eax
jmp 0x9207
movb $0x1, %al
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file::listdir(cstring)
array<string> file::listdir(cstring path)
{
	DIR* dir = opendir(path.c_str());
	if (!dir) return NULL;
	
	array<string> ret;
	dirent* ent;
	while ((ent = readdir(dir)))
	{
		// don't use strcmp, its constant overhead is suboptimal at best
		if (UNLIKELY(ent->d_name[0] == '.'))
		{
			if (ent->d_name[1] == '\0') continue;
			if (ent->d_name[1] == '.' && ent->d_name[2] == '\0') continue;
		}
		
		string childpath = path + ent->d_name;
		if (ent->d_type == DT_UNKNOWN)
		{
			struct stat st;
			stat(childpath, &st);
			if (S_ISDIR(st.st_mode)) childpath += "/";
		}
		else if (ent->d_type == DT_DIR) childpath += "/";
		ret.append(std::move(childpath));
	}
	closedir(dir);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rsi, (%rax)
movq %rdx, 0x8(%rax)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x9688
movq (%r15), %rdi
callq 0x3570
movq %rax, %r14
cmpb $0x1, 0x8(%r15)
jne 0x92c0
movq 0x28(%rsp), %rdi
callq 0x3430
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
testq %r14, %r14
je 0x93cb
movq %r14, %rdi
callq 0x3580
testq %rax, %rax
je 0x93c3
movq %rax, %rbp
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r12
cmpb $0x2e, 0x13(%rbp)
je 0x93a6
leaq 0x13(%rbp), %r13
movups 0x18(%rsp), %xmm0
movups %xmm0, 0x28(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x19372
movq %r13, %rdi
callq 0x30f0
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x19466
movzbl 0x12(%rbp), %eax
cmpl $0x4, %eax
je 0x935c
testl %eax, %eax
jne 0x9370
cmpb $0x0, 0x17(%rsp)
movq %r15, %rdi
jns 0x9342
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x32f0
movl 0x40(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x9370
movl $0x1, %edx
movq %r15, %rdi
leaq 0x26c65(%rip), %rsi     # 0x2ffd0
callq 0x19466
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x12e34
cmpb $0x0, 0x17(%rsp)
jns 0x9390
movq 0x8(%rsp), %rdi
callq 0x3430
movq %r14, %rdi
callq 0x3580
movq %rax, %rbp
testq %rax, %rax
jne 0x92ed
jmp 0x93c3
movzbl 0x14(%rbp), %eax
testl %eax, %eax
je 0x9390
cmpl $0x2e, %eax
jne 0x92f7
cmpb $0x0, 0x15(%rbp)
jne 0x92f7
jmp 0x9390
movq %r14, %rdi
callq 0x35f0
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file2::open(cstrnul, file2::mode)
bool file2::open(cstrnul filename, mode m)
{
	reset();
	static const int flags[] = {
		O_RDONLY              |O_CLOEXEC, // m_read
		O_RDWR|O_CREAT        |O_CLOEXEC, // m_write
		O_RDWR                |O_CLOEXEC, // m_wr_existing
		O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, // m_replace
		O_RDWR|O_CREAT|O_EXCL |O_CLOEXEC  // m_create_excl
	};
	fd = ::open(filename, flags[m&7], 0644);
	if (m & m_exclusive)
	{
		int op;
		if ((m&7) == m_read)
			op = LOCK_SH|LOCK_NB;
		else
			op = LOCK_EX|LOCK_NB;
		if (flock(fd, op) < 0)
			close();
	}
	
	return (fd >= 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movl (%rdi), %edi
cmpl $-0x1, %edi
je 0x9408
callq 0x3700
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
leaq 0x8(%rsp), %rax
cmpb $0x0, 0xf(%rax)
cmovnsq %rax, %r14
movl %ebp, %r15d
andl $0x7, %r15d
leaq 0x26117(%rip), %rax     # 0x2f540
movl (%rax,%r15,4), %esi
movq %r14, %rdi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x3230
movl %eax, (%rbx)
testb $0x8, %bpl
je 0x946d
cmpl $0x1, %r15d
movl $0x6, %esi
sbbl $0x0, %esi
movl %eax, %edi
callq 0x36d0
testl %eax, %eax
jns 0x946d
movl (%rbx), %edi
cmpl $-0x1, %edi
je 0x9467
callq 0x3700
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
cmpl $0x0, (%rbx)
setns %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file2::mmap_t::map(arrayview<unsigned char>&, file2&, bool)
void file2::mmap_t::map(bytesr& by, file2& src, bool writable)
{
	by = nullptr;
	
	size_t size = src.size();
	if (!size) return;
	
	uint8_t * data = (uint8_t*)::mmap(NULL, size, PROT_READ | (writable * PROT_WRITE), MAP_SHARED, src.fd, 0);
	if (data == MAP_FAILED) return;
	
	by = { data, size };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movl (%rsi), %edi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x3640
movq 0x30(%r14), %r14
testq %r14, %r14
je 0x94de
movzbl %bpl, %eax
leal 0x1(,%rax,2), %edx
movl (%r15), %r8d
xorl %edi, %edi
movq %r14, %rsi
movl $0x1, %ecx
xorl %r9d, %r9d
callq 0x3680
cmpq $-0x1, %rax
je 0x94de
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file-unix.cpp
// Function: (anonymous namespace)::file_unix::mmap(bool, unsigned long, unsigned long)
arrayvieww<uint8_t> mmap(bool writable, size_t start, size_t len)
		{
			//TODO: for small things (64KB? 1MB?), use malloc, it's faster
			//http://lkml.iu.edu/hypermail/linux/kernel/0004.0/0728.html
			size_t offset = start % pagesize;
			void* data = ::mmap(NULL, len+offset, writable ? PROT_WRITE|PROT_READ : PROT_READ, MAP_SHARED, this->fd, start-offset);
			if (data == MAP_FAILED) return NULL;
			return arrayvieww<uint8_t>((uint8_t*)data+offset, len);
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %r14
movq %rcx, %r9
movq %rdi, %rbx
movl %r9d, %r15d
andl $0xfff, %r15d           # imm = 0xFFF
leaq (%r15,%r8), %rax
leal 0x1(,%rdx,2), %edx
movl 0x8(%rsi), %r8d
andq $-0x1000, %r9           # imm = 0xF000
xorl %edi, %edi
movq %rax, %rsi
movl $0x1, %ecx
callq 0x3680
cmpq $-0x1, %rax
je 0x9679
addq %r15, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
jmp 0x967f
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file.h
// Function: file::impl::readall()
virtual array<uint8_t> readall()
		{
			array<uint8_t> ret;
			ret.reserve_noinit(this->size());
			size_t actual = this->pread(ret, 0);
			ret.resize(actual);
			return ret;
		}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq (%rsi), %rax
movq %rsi, %rdi
callq *(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xd974
movq %rsp, %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movq (%rbx), %rax
movq %rax, (%rsi)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsi)
movq (%r14), %rax
movq %r14, %rdi
xorl %edx, %edx
callq *0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xda72
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file.cpp
// Function: file::impl::default_mmapw(unsigned long, unsigned long)
arrayvieww<uint8_t> file::impl::default_mmapw(size_t start, size_t len)
{
	uint8_t* ptr = xmalloc(sizeof(size_t) + len);
	*(size_t*)ptr = start;
	
	arrayvieww<uint8_t> ret(ptr+sizeof(size_t), len);
	size_t actual = this->pread(ret, start);
	return ret.slice(0, actual);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rcx), %rdi
callq 0x1573c
movq %rax, %r13
movq %r14, (%rax)
addq $0x8, %r13
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq %r13, (%rsi)
movq %rbx, 0x8(%rsi)
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rdx
callq *0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq %r13, (%r12)
movq %rax, 0x8(%r12)
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file.cpp
// Function: file::resolve(cstring)
string file::resolve(cstring path)
{
	array<cstring> parts = path.csplit("/");
	for (size_t i=0;i<parts.size();i++)
	{
		if (parts[i] == "" && i>0 && parts[i-1] != "")
		{
			parts.remove(i);
			i--;
			continue;
		}
		
		if (parts[i] == ".")
		{
			parts.remove(i);
			i--;
			continue;
		}
		
		if (parts[i] == ".." && i>0 && parts[i-1] != "..")
		{
			parts.remove(i);
			if (i>0) parts.remove(i-1);
			i-=2;
			continue;
		}
	}
	if (!parts) return ".";
	return parts.join("/");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x28(%rsp), %r14
movq %rsi, (%r14)
movq %rdx, 0x8(%r14)
leaq 0x26733(%rip), %rsi     # 0x2ffd0
leaq 0x18(%rsp), %r15
movl $0x1, %edx
movq %r15, %rdi
movl $0x1, %ecx
callq 0x5040
movq (%r15), %rdx
movq 0x8(%r15), %rcx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq $-0x1, %r8
callq 0x19d3a
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x9a3a
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %rax
movq %r15, %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rdi
testq %r15, %r15
je 0x9919
cmpb $0xf, 0xf(%rax,%rcx)
jne 0x9919
leaq -0x1(%r15), %r12
movq %r12, %rcx
shlq $0x4, %rcx
cmpb $0xf, 0xf(%rax,%rcx)
jne 0x99e8
cmpb $0xe, 0xf(%rdi)
jne 0x9952
cmpb $0x2e, (%rdi)
jne 0x9952
leaq 0x10(%rdi), %rsi
movq %r15, %rax
notq %rax
addq %rax, %rdx
shlq $0x4, %rdx
callq 0x3600
movq 0x10(%rsp), %rsi
decq %rsi
movq %r14, %rdi
callq 0x12560
decq %r15
jmp 0x99e3
cmpb $0xd, 0xf(%rdi)
jne 0x9962
cmpw $0x2e2e, (%rdi)         # imm = 0x2E2E
sete %cl
jmp 0x9964
xorl %ecx, %ecx
testq %r15, %r15
je 0x99e3
testb %cl, %cl
je 0x99e3
leaq -0x1(%r15), %r12
shlq $0x4, %r12
cmpb $0xd, 0xf(%rax,%r12)
jne 0x9987
addq %r12, %rax
cmpw $0x2e2e, (%rax)         # imm = 0x2E2E
je 0x99e3
leaq 0x10(%rdi), %rsi
movq %r15, %rax
notq %rax
addq %rax, %rdx
shlq $0x4, %rdx
callq 0x3600
movq 0x10(%rsp), %rsi
decq %rsi
movq %r14, %rdi
callq 0x12560
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdx
leaq (%rax,%r12), %rdi
leaq (%rax,%r12), %rsi
addq $0x10, %rsi
subq %r15, %rdx
shlq $0x4, %rdx
callq 0x3600
movq 0x10(%rsp), %rsi
decq %rsi
movq %r14, %rdi
callq 0x12560
addq $-0x2, %r15
movq %r15, %r12
jmp 0x9a0b
leaq 0x10(%rdi), %rsi
notq %r15
addq %r15, %rdx
shlq $0x4, %rdx
callq 0x3600
movq 0x10(%rsp), %rsi
decq %rsi
movq %r14, %rdi
callq 0x12560
incq %r12
movq 0x10(%rsp), %rdx
movq %r12, %r15
cmpq %rdx, %r12
jb 0x98e7
testq %rdx, %rdx
je 0x9a3a
leaq 0x265a5(%rip), %rdx     # 0x2ffd0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x9e7c
jmp 0x9a43
movw $0x2e, (%rbx)
movb $0xe, 0xf(%rbx)
movq 0x8(%rsp), %rdi
callq 0x3430
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file.cpp
// Function: file::change_ext(cstring, cstring)
string file::change_ext(cstring path, cstring new_ext)
{
	array<cstring> dir_name = path.crspliti<1>("/");
	if (dir_name.size() == 1)
		return dir_name[0].crsplit<1>(".")[0] + new_ext;
	else
		return dir_name[0] + dir_name[1].crsplit<1>(".")[0] + new_ext;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, %r15
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x98(%rsp), %r12
movq %rsi, (%r12)
movq %rdx, 0x8(%r12)
leaq 0x26542(%rip), %rsi     # 0x2ffd0
leaq 0x88(%rsp), %r13
movl $0x1, %edx
movq %r13, %rdi
movl $0x1, %ecx
callq 0x5040
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x10(%rsp), %r13
movl $0x1, %r8d
movq %r13, %rdi
movq %r12, %rsi
callq 0x1a106
cmpq $0x1, 0x8(%r13)
jne 0x9b64
movq 0x10(%rsp), %r13
leaq 0x28588(%rip), %rsi     # 0x32065
leaq 0x78(%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
movl $0x1, %ecx
callq 0x5040
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0x48(%rsp), %r12
movl $0x1, %r8d
movq %r12, %rdi
movq %r13, %rsi
callq 0x19e34
movq (%r12), %rax
movups (%rax), %xmm0
leaq 0x58(%rsp), %r13
movups %xmm0, (%r13)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x19372
movq %r14, (%r13)
movq %r15, 0x8(%r13)
movzbl 0xf(%r13), %eax
movq %rax, %rcx
xorq $0xf, %rcx
testb %al, %al
movl %r15d, %edx
cmovnsq %r13, %r14
cmovnsq %rcx, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19466
movq (%r12), %rdi
jmp 0x9c56
movq 0x10(%rsp), %r13
movups (%r13), %xmm0
movaps %xmm0, 0x20(%rsp)
addq $0x10, %r13
leaq 0x284e7(%rip), %rsi     # 0x32065
leaq 0x68(%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
movl $0x1, %ecx
callq 0x5040
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0x38(%rsp), %r12
movl $0x1, %r8d
movq %r12, %rdi
movq %r13, %rsi
callq 0x19e34
movq (%r12), %rax
movq (%rax), %r12
movq %rbx, 0x8(%rsp)
movq 0x8(%rax), %rbx
leaq 0x58(%rsp), %rbp
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rbp)
leaq 0x48(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x19372
movq %r12, (%rbp)
movq %rbx, 0x8(%rbp)
movzbl 0xf(%rbp), %eax
movq %rax, %rcx
xorq $0xf, %rcx
testb %al, %al
movl %ebx, %edx
movq 0x8(%rsp), %rbx
cmovnsq %rbp, %r12
cmovnsq %rcx, %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x19466
movq %r14, (%rbp)
movq %r15, 0x8(%rbp)
movzbl 0xf(%rbp), %eax
movq %rax, %rcx
xorq $0xf, %rcx
testb %al, %al
movl %r15d, %edx
cmovnsq %rbp, %r14
cmovnsq %rcx, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x19466
movups (%r13), %xmm0
movups %xmm0, (%rbx)
movb $0xf, 0xf(%r13)
movb $0x0, (%r13)
leaq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0x3430
movq 0x10(%rsp), %rdi
callq 0x3430
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/file.cpp
// Function: file2::resize(long, arrayview<unsigned char>&, bool)
bool file2::resize(off_t newsize, bytesr& map, bool writable)
{
	mmap_t::unmap(map);
	if (!resize(newsize)) return false;
	mmap_t::map(map, *this, writable);
	return (map.size() != 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0x94ec
movl (%r14), %edi
movq %r15, %rsi
callq 0x34b0
testl %eax, %eax
je 0x9e59
xorl %eax, %eax
jmp 0x9e70
movzbl %bpl, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x947e
cmpq $0x0, 0x8(%rbx)
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/array.h
// Function: decltype(decltype(__declval<cstring>(0)) std::declval<cstring>()() + std::declval<cstring>()) arrayview<cstring>::join<char const*>(cstring) const
decltype(std::declval<T>() + std::declval<T2>()) join(T2 between) const
	{
		if (!this->count) return decltype(T() + T2())();
		
		decltype(T() + T2()) out = this->items[0];
		for (size_t n=1;n < this->count;n++)
		{
			out += between;
			out += this->items[n];
		}
		return out;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x9f26
movq %rdx, %r14
movq %rsi, %r15
movq (%rsi), %rax
movups (%rax), %xmm0
leaq 0x8(%rsp), %r12
movups %xmm0, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19372
cmpq $0x2, 0x8(%r15)
jb 0x9f2d
movl $0x1, %r13d
movl $0x18, %ebp
movq %r14, %rdi
callq 0x30f0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x19466
movq (%r15), %rax
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rax
movq %rsi, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movzbl 0x17(%rsp), %ecx
movq %rcx, %rdi
xorq $0xf, %rdi
testb %cl, %cl
movl %eax, %edx
cmovnsq %r12, %rsi
cmovnsq %rdi, %rdx
movq %rbx, %rdi
callq 0x19466
incq %r13
addq $0x10, %rbp
cmpq 0x8(%r15), %r13
jb 0x9ecb
jmp 0x9f2d
movb $0xf, 0xf(%rbx)
movb $0x0, (%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/runloop2.h
// Function: async<void>::then(waiter_base<void>*)
void then(waiter_base<T>* next)
	{
		if (is_complete())
		{
			consume_sync();
			if constexpr (std::is_same_v<T, void>)
				next->complete(next);
			else
				next->complete(next, get_value());
		}
		else
		{
#ifndef ARLIB_OPT
			if (next->prod)
			{
				debug_warn_stack("attempted to assign a producer to an already-busy waiter");
				next->cancel();
			}
#endif
			next->prod = this->prod;
			this->prod->wait = next;
			this->prod = nullptr;
		}
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0xa2eb
cmpq $0x0, (%rsi)
je 0xa2d0
leaq 0x2535b(%rip), %rdi     # 0x2f612
movq %rsi, %r14
callq 0x80e3
movq %r14, %rsi
movq (%r14), %rdi
testq %rdi, %rdi
je 0xa2d0
callq *0x8(%rdi)
movq %r14, %rsi
movq (%rbx), %rax
movq %rax, (%rsi)
movq (%rbx), %rax
movq %rsi, (%rax)
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq $0x1, 0x8(%rbx)
movq %rsi, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x8(%rsi)
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::step(bool)
void step(bool wait)
{
	got_event = false;
	process_events(); // in case someone else (for example ctx-x11.cpp) did synchronous X calls behind our back
	runloop2::step(false);
	while (wait && !got_event)
		runloop2::step(true);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movb $0x0, 0x1a(%rdi)
callq 0xa3f0
xorl %edi, %edi
callq 0x16bec
testl %ebx, %ebx
je 0xa3a2
cmpb $0x0, 0x1a(%r14)
jne 0xa3a2
movl $0x1, %edi
callq 0x16bec
testb %bl, %bl
jne 0xa38d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::process_events()
void process_events()
{
	while (XPending(window_x11.display))
	{
		XEvent ev;
		XNextEvent(window_x11.display, &ev);
		if (ev.xany.window == this->window)
			this->process_event(&ev);
	}
	
	runloop2::await_read(ConnectionNumber(window_x11.display)).then(&wait);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movq 0x3bf44(%rip), %rdi     # 0x46348
callq 0x32e0
testl %eax, %eax
je 0xa447
leaq 0x8(%rsp), %r14
movq 0x3bf2f(%rip), %rdi     # 0x46348
movq %r14, %rsi
callq 0x34d0
movq 0x28(%rsp), %rax
cmpq 0x10(%rbx), %rax
jne 0xa437
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa496
movq 0x3bf0a(%rip), %rdi     # 0x46348
callq 0x32e0
testl %eax, %eax
jne 0xa412
movq 0x3befa(%rip), %rax     # 0x46348
movl 0x10(%rax), %esi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x16edc
addq $0x50, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa29c
cmpq $0x0, 0x8(%r14)
je 0xa47e
cmpq $0x0, 0x8(%rsp)
je 0xa48a
leaq 0x251c6(%rip), %rdi     # 0x2f64b
callq 0x80fb
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::set_all_keys()
void set_all_keys()
{
	uint8_t state[32];
	XQueryKeymap(display, (char*)state);
	for (int i=0;i<256/8;i++)
	{
		if (current_scans[i] == state[i]) continue;
		for (int bit=0;bit<8;bit++)
		{
			set_key((i<<3)|bit, state[i] & (1<<bit));
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq %rsp, %rsi
callq 0x3460
xorl %r14d, %r14d
xorl %r15d, %r15d
movb 0x278(%rbx,%r15), %al
cmpb (%rsp,%r15), %al
je 0xa69f
xorl %r12d, %r12d
leal (%r14,%r12), %eax
movzbl (%rsp,%r15), %ecx
xorl %edx, %edx
btl %r12d, %ecx
setb %dl
movzbl %al, %esi
movq %rbx, %rdi
callq 0xa6b8
incl %r12d
cmpl $0x8, %r12d
jne 0xa679
incq %r15
addl $0x8, %r14d
cmpq $0x20, %r15
jne 0xa668
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::set_key(unsigned char, bool)
void set_key(uint8_t scancode, bool state)
{
	int byte = scancode>>3;
	int bit = scancode&7;
	
	bool prevstate = (current_scans[byte] & (1<<bit));
	if (state == prevstate) return;
	
	current_scans[byte] = (current_scans[byte] & ~(1<<bit)) | (state<<bit);
	cb_keys(scancode, (key_t)scan_to_key[scancode], state);
}

// Assembly:
movl %esi, %r8d
shrl $0x3, %r8d
movl %esi, %ecx
andl $0x7, %ecx
movzbl 0x278(%rdi,%r8), %r9d
btl %ecx, %r9d
setb %al
cmpb %dl, %al
je 0xa70d
movzbl %dl, %eax
movl %eax, %edx
shll %cl, %edx
btrl %ecx, %r9d
orl %r9d, %edx
movb %dl, 0x278(%rdi,%r8)
movzbl %sil, %ecx
movzbl 0x78(%rdi,%rcx,2), %edx
movq 0x298(%rdi), %rcx
movq 0x2a0(%rdi), %r8
movq %rcx, %rdi
movl %eax, %ecx
jmpq *%r8
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/image-png-decode.cpp
// Function: oimage::init_decode_png(arrayview<unsigned char>)::pngreader::chunk_raw()
pngchunk chunk_raw()
		{
			pngchunk ret;
			ret.type = 0; // invalid value, looks like an unrecognized critical chunk and will propagate outwards
			
			if (remaining() < 12) return ret;
			ret.len = u32b();
			
			if (ret.len >= 0x80000000 || remaining()-8 < ret.len) return ret;
			
			uint32_t crc32_actual = crc32(peekbytes(4+ret.len));
			
			ret.type = u32b();
			ret.init(bytes(ret.len));
			
			uint32_t crc32_exp = u32b();
			if (crc32_actual != crc32_exp) ret.type = 0;
			
			return ret;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rdi)
movups %xmm0, (%rdi)
movq 0x8(%rsi), %rcx
movq 0x10(%rsi), %rax
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0xc, %rdx
jb 0xb415
movq %rsi, %r14
leaq 0x4(%rcx), %rdi
movq %rdi, 0x8(%rsi)
movl (%rcx), %esi
bswapl %esi
movl %esi, 0x1c(%rbx)
testl %esi, %esi
js 0xb415
subq %rdi, %rax
addq $-0x8, %rax
movl %esi, %r15d
cmpq %r15, %rax
jb 0xb415
addl $0x4, %esi
xorl %edx, %edx
callq 0x7990
movq 0x8(%r14), %rcx
leaq 0x4(%rcx), %rdx
movq %rdx, 0x8(%r14)
movl (%rcx), %esi
bswapl %esi
movl %esi, 0x18(%rbx)
leaq 0x4(%rcx,%r15), %rsi
movq %rsi, 0x8(%r14)
movq %rdx, (%rbx)
movq %rdx, 0x8(%rbx)
movq %rsi, 0x10(%rbx)
leaq 0x8(%rcx,%r15), %rcx
movq %rcx, 0x8(%r14)
movl -0x4(%rcx), %ecx
bswapl %ecx
cmpl %ecx, %eax
je 0xb415
movl $0x0, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/image.cpp
// Function: oimage::init_new(unsigned int, unsigned int, imagefmt)
void oimage::init_new(uint32_t width, uint32_t height, imagefmt fmt)
{
	size_t stride = byteperpix(fmt)*width;
	size_t nbytes = stride*height;
	storage = xmalloc(nbytes);
	init_ptr(storage, width, height, stride, fmt);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
leal (%rbx,%rbx), %ecx
movl $0x157fff8, %r13d       # imm = 0x157FFF8
shrl %cl, %r13d
andl $0x3, %r13d
incl %r13d
imull %esi, %r13d
movl %edx, %edi
imulq %r13, %rdi
callq 0x1573c
movq %rax, %r12
movq 0x18(%r14), %rdi
callq 0x3430
movq %r12, 0x18(%r14)
movq %r12, 0x10(%r14)
movl %r15d, (%r14)
movl %ebp, 0x4(%r14)
movl %r13d, 0xc(%r14)
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop