LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Alcaro[P]bridges/arlib/bmlparse.cpp
// Function: bmlparser::getline(bool)
inline bool bmlparser::getline(bool allow_empty)
{
nextline:
	if (!m_data)
	{
null:
		m_thisline = "";
		m_indent = "";
		return true;
	}
	
	m_thisline = cutline(m_data);
	size_t indentlen = bml_size_white(m_thisline);
	if (indentlen == m_thisline.length())
	{
		if (allow_empty) goto nextline;
		else goto null;
	}
	
	size_t sharedindent = min(indentlen, m_indent.length());
	bool badwhite = (memcmp(m_thisline.bytes().ptr(), m_indent.bytes().ptr(), sharedindent) != 0);
	
	m_indent = cut(m_thisline, 0, indentlen, 0);
	
	return !badwhite;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, 0x14(%rsp)
movq %rdi, %r14
leaq 0x10(%rdi), %r15
leaq 0x20(%rdi), %rax
movq %rax, 0x8(%rsp)
movabsq $0x100000000, %rbp      # imm = 0x100000000
movzbl 0x1f(%r14), %edx
testb %dl, %dl
jns 0x69c5
movl 0x18(%r14), %eax
jmp 0x69ca
movl %edx, %eax
xorl $0xf, %eax
testl %eax, %eax
je 0x6a6c
movq %r15, %rcx
testb %dl, %dl
jns 0x69dc
movq (%r15), %rcx
movl %eax, %edx
xorl %esi, %esi
xorl %eax, %eax
movq %rsi, %rdi
sarq $0x20, %rdi
movzbl (%rcx,%rdi), %edi
cmpl $0xa, %edi
je 0x6a04
cmpl $0xd, %edi
je 0x6a04
incq %rax
addq %rbp, %rsi
cmpq %rax, %rdx
jne 0x69e2
jmp 0x6a09
cmpq %rax, %rdx
jne 0x6a0d
xorl %ecx, %ecx
jmp 0x6a24
movl $0x2, %ecx
cmpb $0xd, %dil
je 0x6a21
xorl %ecx, %ecx
cmpb $0xa, %dil
sete %cl
movq %rax, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x6906
movq %rax, %r13
movq %rdx, %rbx
movq %rax, 0x20(%r14)
movq %rdx, 0x28(%r14)
movq 0x8(%rsp), %rdi
callq 0x686e
movq %rax, %r12
movq %rbx, %rax
shrq $0x38, %rax
xorl $0xf, %eax
testq %rbx, %rbx
cmovsq %rbx, %rax
movl %eax, %eax
cmpq %rax, %r12
jne 0x6a9c
cmpb $0x0, 0x14(%rsp)
jne 0x69b6
leaq 0x2b9f9(%rip), %rbx     # 0x3246c
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x5990
addq $0x40, %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x195fc
movb $0x1, %bl
jmp 0x6b17
movzbl 0x4f(%r14), %eax
movl %eax, %ecx
xorl $0xf, %ecx
testb %al, %al
cmovsl 0x48(%r14), %ecx
leaq 0x40(%r14), %r15
movq 0x40(%r14), %rsi
cmovnsq %r15, %rsi
cmpq %r12, %rcx
movq %r12, %rdx
cmovbq %rcx, %rdx
testq %rbx, %rbx
movq 0x8(%rsp), %r14
cmovnsq %r14, %r13
movq %r13, %rdi
callq 0x3380
testl %eax, %eax
sete %bl
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x6906
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rdx, %rcx
shrq $0x38, %rcx
xorq $0xf, %rcx
testq %rdx, %rdx
movl %edx, %edx
cmovnsq %rcx, %rdx
cmovsq %rax, %rsi
movq %r15, %rdi
callq 0x195fc
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Alcaro[P]bridges/arlib/bmlwrite.cpp
// Function: bmlwriter::type_core(cstring)
bmlwriter::mode bmlwriter::type_core(cstring val)
{
	if (val == "") return anon;
	
	char first = val[0];
	char last = val[val.length()-1];
	
	if (val.contains("\n") || first==' ' || first=='\t' || last==' ' || last=='\t') return multiline;
	if (val.contains("\"")) return col;
	if (val.contains(" ") || val.contains("\t")) return quote;
	return eq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rsi, %rcx
shrq $0x38, %rcx
movl $0x4, %eax
cmpq $0xf, %rcx
je 0x76c9
xorl $0xf, %ecx
testq %rsi, %rsi
leaq 0x8(%rsp), %rbx
cmovnsq %rbx, %rdi
cmovnsl %ecx, %esi
movb (%rdi), %bpl
decl %esi
movslq %esi, %rax
movb (%rdi,%rax), %r15b
leaq 0x2b2e9(%rip), %rsi     # 0x328ac
leaq 0x48(%rsp), %r14
movl $0x1, %edx
movq %r14, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x7a54
movl %eax, %ecx
movl $0x8, %eax
cmpb $0x9, %r15b
je 0x76c9
cmpb $0x20, %r15b
je 0x76c9
cmpb $0x9, %bpl
je 0x76c9
cmpb $0x20, %bpl
je 0x76c9
testb %cl, %cl
jne 0x76c9
leaq 0x27d28(%rip), %rsi     # 0x2f34f
leaq 0x38(%rsp), %rbx
movl $0x1, %edx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x8(%rsp), %rdi
callq 0x7a54
movl %eax, %ecx
movl $0x7, %eax
testb %cl, %cl
jne 0x76c9
leaq 0x284b8(%rip), %rsi     # 0x2fb19
leaq 0x28(%rsp), %rbx
movl $0x1, %edx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x8(%rsp), %rdi
callq 0x7a54
movl %eax, %ecx
movl $0x6, %eax
testb %cl, %cl
jne 0x76c9
leaq 0x27d84(%rip), %rsi     # 0x2f41f
leaq 0x18(%rsp), %rbx
movl $0x1, %edx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x8(%rsp), %rdi
callq 0x7a54
movzbl %al, %eax
addl $0x5, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x30(%rsp)
leaq 0x58(%rsp), %r14
movq %rsi, (%r14)
movq %rdx, 0x8(%r14)
movw $0x2d, 0x10(%rsp)
movb $0xe, 0x1f(%rsp)
leaq 0x279da(%rip), %rsi     # 0x2f0e0
leaq 0x68(%rsp), %rbx
movl $0x1, %edx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x198f2
movb %al, 0xf(%rsp)
movzbl 0xf(%r14), %r13d
testb %r13b, %r13b
jns 0x7746
movl 0x60(%rsp), %r13d
movq 0x58(%rsp), %r14
jmp 0x774a
xorq $0xf, %r13
testq %r13, %r13
je 0x7882
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
movzbl (%r14,%rbp), %r12d
cmpq $0x2e, %r12
je 0x7793
leaq 0x285e4(%rip), %rax     # 0x2fd50
movb (%rax,%r12), %al
andb $0x60, %al
jne 0x7793
movl $0x2, %edx
cmpb $0x2d, %r12b
jne 0x77c7
movq %r15, %rdi
leaq 0x2791f(%rip), %rsi     # 0x2f0a8
callq 0x1967e
jmp 0x7876
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 0x193c4
cmpb $0x0, 0x1f(%rsp)
movq %r15, %rax
jns 0x77be
movq 0x10(%rsp), %rax
movb %r12b, (%rax,%rbx)
jmp 0x7876
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0x1b137
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rax
movw $0x2d, 0x20(%rsp)
movb $0xe, 0x2f(%rsp)
movq %rsi, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, %rcx
shrq $0x38, %rcx
xorq $0xf, %rcx
testq %rax, %rax
movl %eax, %edx
cmovnsq %rcx, %rdx
leaq 0x38(%rsp), %rbx
cmovnsq %rbx, %rsi
leaq 0x20(%rsp), %rdi
callq 0x1967e
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
movq %rsi, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, %rcx
shrq $0x38, %rcx
xorq $0xf, %rcx
testq %rax, %rax
movl %eax, %edx
cmovnsq %rcx, %rdx
cmovnsq %rbx, %rsi
movq %r15, %rdi
callq 0x1967e
cmpb $0x0, 0x2f(%rsp)
jns 0x7860
movq 0x20(%rsp), %rdi
callq 0x3430
cmpb $0x0, 0x57(%rsp)
jns 0x7871
movq 0x48(%rsp), %rdi
callq 0x3430
movb $0x1, 0xf(%rsp)
incq %rbp
cmpq %rbp, %r13
jne 0x775a
testb $0x1, 0xf(%rsp)
je 0x7898
movups 0x10(%rsp), %xmm0
movq 0x30(%rsp), %rbx
movups %xmm0, (%rbx)
jmp 0x78c3
movups 0x58(%rsp), %xmm0
leaq 0x38(%rsp), %rsi
movups %xmm0, (%rsi)
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x19592
cmpb $0x0, 0x1f(%rsp)
jns 0x78c3
movq 0x10(%rsp), %rdi
callq 0x3430
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x277e6(%rip), %rsi     # 0x2f0e0
leaq 0x28(%rsp), %r15
movl $0x1, %edx
movq %r15, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x198f2
testb %al, %al
je 0x793a
movb $0xf, 0xf(%rbx)
movb $0x0, (%rbx)
movzbl 0x17(%rsp), %eax
testb %al, %al
jns 0x7954
movl 0x10(%rsp), %ecx
jmp 0x7959
movups 0x8(%rsp), %xmm0
leaq 0x18(%rsp), %rsi
movups %xmm0, (%rsi)
movq %rbx, %rdi
callq 0x19592
jmp 0x7a42
movl %eax, %ecx
xorl $0xe, %ecx
cmpl $0x2, %ecx
jb 0x7a42
movl $0x1, %r13d
leaq 0x18(%rsp), %r15
movq %r14, %rcx
testb %al, %al
jns 0x7979
movq 0x8(%rsp), %rcx
movslq %r13d, %rax
movb (%rcx,%rax), %bpl
cmpb $0x2d, %bpl
jne 0x79f6
leaq 0x1(%r13), %r12
movslq %r12d, %rax
movb $0x2d, %bpl
cmpb $0x2d, (%rcx,%rax)
je 0x79c3
leal 0x3(%r13), %edx
movq %r14, %rdi
movl %r12d, %esi
callq 0x6b28
movq %rax, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x1b20a
testb %al, %al
je 0x7a25
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 0x193c4
cmpb $0x0, 0xf(%rbx)
movq %rbx, %rax
jns 0x79ed
movq (%rbx), %rax
movb %bpl, (%rax,%r13)
movq %r12, %r13
jmp 0x7a25
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 0x193c4
cmpb $0x0, 0xf(%rbx)
movq %rbx, %rax
jns 0x7a21
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 0x796d
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_O3/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 0x7ae4
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x7ae4
movq 0x20(%rdi), %rcx
movups (%rdi), %xmm0
movups 0x28(%rdi), %xmm1
movups %xmm0, 0x20(%rdi)
movq %rcx, (%rdi)
movups %xmm1, 0x8(%rdi)
movq %rax, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rdx
movq 0x38(%rsi), %rax
movq %rdx, %rcx
subq %rax, %rcx
cmpq %r15, %rcx
jae 0x7b64
movq %r14, %rdi
callq 0x7ab0
movq 0x28(%r14), %rdx
movq 0x38(%r14), %rax
movq %rdx, %rcx
subq %rax, %rcx
leaq 0x20(%r14), %r12
cmpq %r15, %rcx
jae 0x7b91
movq %rdx, %rsi
movq %rdx, %rcx
subq %rax, %rcx
addq %rdx, %rdx
cmpq %r15, %rcx
jb 0x7b6d
movq %r12, %rdi
callq 0xdea4
movq 0x28(%r14), %rcx
movq 0x38(%r14), %rax
subq %rax, %rcx
addq (%r12), %rax
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7be0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x7d17
movq %rdx, %r12
movq %rsi, %r14
movq %rsi, %rdi
callq 0x7ab0
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rax
movq %rax, %r15
subq %rsi, %r15
movq %r12, %r13
subq %r15, %r13
jbe 0x7cc8
cmpq %r12, 0x8(%r14)
jae 0x7cd4
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 0xdea4
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
movq %rax, (%rbx)
movq %r12, 0x8(%rbx)
movq (%r13), %rdi
callq 0x3430
jmp 0x7d17
addq (%r14), %rsi
movq %rsi, (%rbx)
movq %r15, 0x8(%rbx)
jmp 0x7d17
testq %rsi, %rsi
je 0x7ce7
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
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
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %r13
movq 0x18(%rdi), %rax
subq %r13, %rax
movq %rax, %r12
subq %rsi, %r12
jae 0x7d5e
movq %r15, %r13
subq %rax, %r13
xorl %r15d, %r15d
movq %rax, %r12
jmp 0x7d8a
addq (%rbx), %r13
addq %r15, %r13
movq %r13, %rdi
movl $0xa, %esi
movq %r12, %rdx
callq 0x33b0
testq %rax, %rax
je 0x7d87
movq %rax, %r14
addq %r15, %r14
subq %r13, %r14
incq %r14
jmp 0x7dbe
xorl %r13d, %r13d
movq 0x38(%rbx), %rdx
movq 0x30(%rbx), %r14
addq %r13, %r14
subq %r14, %rdx
addq 0x20(%rbx), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x33b0
testq %rax, %rax
je 0x7de5
addq %r15, %rax
addq %r13, %rax
subq %r14, %rax
leaq (%rax,%r12), %r14
incq %r14
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x7bac
cmpq $0x0, 0x8(%r15)
je 0x7ddc
addq %r14, 0x10(%rbx)
jmp 0x7ddf
xorl %r14d, %r14d
movq (%rsp), %rax
jmp 0x7dea
xorl %r14d, %r14d
xorl %eax, %eax
movq %r14, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xdea4
leaq 0x20(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %rbx, %rsi
callq 0xdea4
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7f2c
leaq 0x3e3af(%rip), %rax     # 0x462d4
testb $0x2, (%rax)
je 0x7f31
jmp 0x7f6f
testq %rsi, %rsi
je 0x7f6c
xorl %ecx, %ecx
leaq 0x27486(%rip), %r8      # 0x2f3c0
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 0x7f3a
retq
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8449
movq %rdi, %rsi
xorl %eax, %eax
callq 0x84ba
movb $0x1, %al
jmp 0x84a3
leaq 0x26fb3(%rip), %rdi     # 0x2f403
xorl %esi, %esi
xorl %eax, %eax
callq 0x3230
testl %eax, %eax
js 0x84a1
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 0x84a1
movb $0x0, 0x10(%rsp,%r14)
leaq 0x26f89(%rip), %rsi     # 0x2f415
leaq 0x10(%rsp), %rdi
callq 0x30b0
testq %rax, %rax
je 0x84a1
cmpb $0x30, 0xb(%rax)
jne 0x84ae
xorl %eax, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r14
retq
movl $0x5, %edi
callq 0x3360
jmp 0x8445
// File: /workspace/github_cpp_makefile_star2_O3/Alcaro[P]bridges/arlib/debug.cpp
// Function: debug_log(char const*)
void debug_log(const char * text)
{
	synchronized(log_mut) { 
		if (log_count > 20) return;
		log_count++;
		
		debug_log_raw(text);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x3dcd6(%rip), %rdi     # 0x462e0
callq 0x3520
movl 0x3dcf3(%rip), %eax     # 0x46308
cmpl $0x14, %eax
jle 0x8627
leaq 0x3dcbf(%rip), %rdi     # 0x462e0
popq %rbx
jmp 0x3250
incl %eax
movl %eax, 0x3dcd9(%rip)     # 0x46308
movq %rbx, %rdi
callq 0x39d1
jmp 0x861a
// File: /workspace/github_cpp_makefile_star2_O3/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 0x86d8
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rdx
subq %rax, %rdx
cmpq $0x4, %rdx
jl 0x86da
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_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x12e0, %rsp           # imm = 0x12E0
movq %rdi, %rbx
movb $0x0, 0x18(%rsp)
xorl %r15d, %r15d
movq %r15, 0x1c(%rsp)
movl $0x0, 0x24(%rsp)
movq %rsi, 0x28(%rsp)
addq %rdx, %rsi
movq %rsi, 0x30(%rsp)
movb $0x1, 0x1a(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leal (,%rdx,8), %eax
cmpl $0x1001, %eax           # imm = 0x1001
movl $0x1000, %esi           # imm = 0x1000
cmovgel %eax, %esi
callq 0xdea4
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x9243
movq (%rbx), %rcx
jmp 0x924a
leaq 0x29222(%rip), %rcx     # 0x3246c
leaq 0x18(%rsp), %r14
movq %r15, 0x20(%r14)
movq %rcx, 0x28(%r14)
movq %rcx, 0x30(%r14)
addq %rcx, %rax
movq %rax, 0x38(%r14)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x8788
cmpl $0x3, %eax
jne 0x92a1
movq 0x8(%rbx), %rsi
addq %rsi, %rsi
movq %rbx, %rdi
callq 0xdea4
movq (%rbx), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x93a4
jmp 0x9267
testl %eax, %eax
jne 0x92cf
movq 0x30(%rsp), %rax
subq 0x28(%rsp), %rax
movl 0x1c(%rsp), %ecx
shrl $0x3, %ecx
addq %rax, %rcx
jne 0x92cf
movq 0x48(%rsp), %rsi
subq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0xdea4
jmp 0x92f6
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x92f6
cmpq $0x9, %rax
jb 0x92ee
movq (%rbx), %rdi
movl $0x8, %esi
callq 0x159f7
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movq %rbx, %rax
addq $0x12e0, %rsp           # imm = 0x12E0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x12c8, %rsp           # imm = 0x12C8
movq %rdi, %r14
movb $0x0, (%rsp)
xorl %ebx, %ebx
movq %rbx, 0x4(%rsp)
movl $0x0, 0xc(%rsp)
movq %rsi, 0x10(%rsp)
addq %rsi, %rdx
movq %rdx, 0x18(%rsp)
movb $0x1, 0x2(%rsp)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x9346
movq (%r14), %rcx
jmp 0x934d
leaq 0x2911f(%rip), %rcx     # 0x3246c
movq %rsp, %rdi
movq %rbx, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
addq %rcx, %rax
movq %rax, 0x38(%rdi)
callq 0x8788
testl %eax, %eax
jne 0x9397
movq 0x30(%rsp), %rax
subq 0x28(%rsp), %rax
cmpq 0x8(%r14), %rax
jne 0x9395
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movl 0x4(%rsp), %ecx
shrl $0x3, %ecx
addq %rax, %rcx
sete %bl
jmp 0x9397
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x12c8, %rsp           # imm = 0x12C8
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x93d8
cmpq 0x38(%rdi), %rax
jne 0x93d8
movq 0x8(%rsi), %rcx
subq 0x28(%rdi), %rax
cmpq %rax, %rcx
jb 0x93d8
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
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9402
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_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdx)
je 0x9483
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb $0x1, %bpl
movq (%r15), %rdi
testq %rdi, %rdi
je 0x945c
movq %rbx, %rsi
callq 0x3330
jmp 0x945e
xorl %eax, %eax
movq %rax, (%r14)
testq %rax, %rax
setne %al
andb %al, %bpl
addq $0x8, %r14
movq %rbx, %rdi
callq 0x30f0
addq %rax, %rbx
incq %rbx
cmpb $0x0, (%rbx)
jne 0x944a
jmp 0x9486
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %edx, %ebp
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
testq %rsi, %rsi
js 0x9559
leaq 0x8(%rsp), %rbx
jmp 0x958d
movq %rdi, %rbx
btq $0x20, %rsi
jb 0x958d
movl %esi, %r14d
leaq 0x1(%r14), %rdi
callq 0x1597c
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3280
movb $0x0, (%r15,%r14)
movb $0x1, %r14b
movq %r15, %rbx
jmp 0x9590
xorl %r14d, %r14d
movl %ebp, %eax
leaq 0x25f77(%rip), %rcx     # 0x2f510
movl $0x80000, %esi          # imm = 0x80000
orl (%rcx,%rax,4), %esi
movq %rbx, %rdi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x3230
movl %eax, %ebp
testb %r14b, %r14b
je 0x95bf
movq %rbx, %rdi
callq 0x3430
testl %ebp, %ebp
js 0x9601
leaq 0x18(%rsp), %rbx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x3640
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rbx), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x95fa
movl $0x10, %edi
callq 0x3340
leaq 0x3c0ae(%rip), %rcx     # 0x456a0
movq %rcx, (%rax)
movl %ebp, 0x8(%rax)
jmp 0x9603
movl %ebp, %edi
callq 0x3700
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rsi, %r13
shrq $0x20, %r13
testq %rsi, %rsi
js 0x9646
leaq 0x8(%rsp), %rdi
jmp 0x964f
movq %rbx, %rdi
testb $0x1, %r13b
je 0x9682
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x3110
movl %eax, %ebp
testl %ebp, %ebp
je 0x967e
cmpl $-0x1, %ebp
jne 0x967a
callq 0x3040
cmpl $0x11, (%rax)
jne 0x967a
testq %r14, %r14
js 0x96bd
leaq 0x8(%rsp), %rbx
jmp 0x96c3
xorl %eax, %eax
jmp 0x96ea
movb $0x1, %al
jmp 0x96ea
movl %r14d, %r15d
leaq 0x1(%r15), %rdi
callq 0x1597c
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3280
movb $0x0, (%r12,%r15)
movq %r12, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x3110
movl %eax, %ebp
movq %r12, %rdi
callq 0x3430
jmp 0x965b
testb $0x1, %r13b
je 0x96fc
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x36f0
movl %eax, %ebx
testl %ebx, %ebx
setns %cl
movl 0x30(%rsp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
sete %al
andb %cl, %al
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, %r14d
leaq 0x1(%r14), %rdi
callq 0x1597c
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3280
movb $0x0, (%r15,%r14)
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x36f0
movl %eax, %ebx
movq %r15, %rdi
callq 0x3430
jmp 0x96d2
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
testq %rdx, %rdx
js 0x97f4
leaq 0x18(%rsp), %rdi
jmp 0x9837
btq $0x20, %r14
movq %r15, %rdi
jb 0x9837
movl %r14d, %r12d
leaq 0x1(%r12), %rdi
callq 0x1597c
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3280
movb $0x0, (%r13,%r12)
movq %r13, %rdi
callq 0x3570
movq %rax, %r12
movq %r13, %rdi
callq 0x3430
jmp 0x983f
callq 0x3570
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
testq %r12, %r12
je 0x9952
movq %r14, 0x10(%rsp)
movq %r15, %r14
movq %r12, %rdi
callq 0x3580
testq %rax, %rax
je 0x994a
movq %rax, %rbp
movq %rsp, %r13
cmpb $0x2e, 0x13(%rbp)
je 0x992d
leaq 0x13(%rbp), %r15
movq %r14, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
callq 0x19592
movq %r15, %rdi
callq 0x30f0
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1967e
movzbl 0x12(%rbp), %eax
cmpl $0x4, %eax
je 0x98e4
testl %eax, %eax
jne 0x98f8
cmpb $0x0, 0xf(%rsp)
movq %r13, %rdi
jns 0x98c8
movq (%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x32f0
movl 0x40(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x98f8
movl $0x1, %edx
movq %r13, %rdi
leaq 0x2672d(%rip), %rsi     # 0x30020
callq 0x1967e
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x13192
cmpb $0x0, 0xf(%rsp)
jns 0x9917
movq (%rsp), %rdi
callq 0x3430
movq %r12, %rdi
callq 0x3580
movq %rax, %rbp
testq %rax, %rax
jne 0x986d
jmp 0x994a
movzbl 0x14(%rbp), %eax
testl %eax, %eax
je 0x9917
cmpl $0x2e, %eax
jne 0x9877
cmpb $0x0, 0x15(%rbp)
jne 0x9877
jmp 0x9917
movq %r12, %rdi
callq 0x35f0
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movl (%rdi), %edi
cmpl $-0x1, %edi
je 0x9993
callq 0x3700
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
testq %r15, %r15
leaq 0x8(%rsp), %rdi
cmovsq %r14, %rdi
movl %ebp, %r14d
andl $0x7, %r14d
leaq 0x25b7d(%rip), %rax     # 0x2f530
movl (%rax,%r14,4), %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x3230
movl %eax, (%rbx)
testb $0x8, %bpl
je 0x99fd
cmpl $0x1, %r14d
movl $0x6, %esi
sbbl $0x0, %esi
movl %eax, %edi
callq 0x36d0
movl %eax, %ecx
movl (%rbx), %eax
testl %ecx, %ecx
jns 0x99fd
cmpl $-0x1, %eax
je 0x99f2
movl %eax, %edi
callq 0x3700
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %eax, %eax
setns %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9a6e
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 0x9a6e
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_O3/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 0xdda6
movq (%rbx), %rax
leaq 0x8(%rsp), %rsi
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 0xdea4
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2628d(%rip), %rsi     # 0x30020
leaq 0x18(%rsp), %r15
movl $0x1, %edx
movq %r15, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%r15), %rdx
movq 0x8(%r15), %rcx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq $-0x1, %r8
callq 0x19ebc
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x9f4a
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %rax
movq %r15, %rcx
shlq $0x4, %rcx
leaq (%rax,%rcx), %rdi
movzbl 0xf(%rax,%rcx), %ecx
cmpl $0xd, %ecx
je 0x9e87
cmpl $0xe, %ecx
je 0x9e50
cmpl $0xf, %ecx
jne 0x9f11
testq %r15, %r15
je 0x9f2a
leaq -0x1(%r15), %r12
movq %r12, %rcx
shlq $0x4, %rcx
cmpb $0xf, 0xf(%rax,%rcx)
je 0x9f11
leaq 0x10(%rdi), %rsi
notq %r15
addq %r15, %rdx
shlq $0x4, %rdx
callq 0x3600
movq 0x10(%rsp), %rsi
decq %rsi
movq %r14, %rdi
callq 0x128d4
jmp 0x9f14
cmpb $0x2e, (%rdi)
jne 0x9f11
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 0x128d4
decq %r15
jmp 0x9f11
testq %r15, %r15
sete %cl
cmpw $0x2e2e, (%rdi)         # imm = 0x2E2E
setne %sil
orb %cl, %sil
jne 0x9f11
leaq -0x1(%r15), %r12
shlq $0x4, %r12
cmpb $0xd, 0xf(%rax,%r12)
jne 0x9eb5
addq %r12, %rax
cmpw $0x2e2e, (%rax)         # imm = 0x2E2E
je 0x9f11
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 0x128d4
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 0x128d4
addq $-0x2, %r15
movq %r15, %r12
incq %r12
movq 0x10(%rsp), %rdx
movq %r12, %r15
cmpq %rdx, %r12
jb 0x9ddd
jmp 0x9f2f
xorl %r12d, %r12d
jmp 0x9f14
testq %rdx, %rdx
je 0x9f4a
leaq 0x260e5(%rip), %rdx     # 0x30020
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xa368
jmp 0x9f53
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_O3/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 0x26082(%rip), %rsi     # 0x30020
leaq 0x88(%rsp), %r13
movl $0x1, %edx
movq %r13, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x10(%rsp), %r13
movl $0x1, %r8d
movq %r13, %rdi
movq %r12, %rsi
callq 0x1a248
cmpq $0x1, 0x8(%r13)
jne 0xa074
movq 0x10(%rsp), %r13
leaq 0x28118(%rip), %rsi     # 0x32105
leaq 0x78(%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0x48(%rsp), %r12
movl $0x1, %r8d
movq %r12, %rdi
movq %r13, %rsi
callq 0x19fc2
movq (%r12), %rax
movups (%rax), %xmm0
leaq 0x58(%rsp), %r13
movups %xmm0, (%r13)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x19592
movq %r14, (%r13)
movq %r15, 0x8(%r13)
movq %r15, %rax
shrq $0x38, %rax
xorq $0xf, %rax
testq %r15, %r15
movl %r15d, %edx
cmovnsq %rax, %rdx
cmovnsq %r13, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1967e
movq (%r12), %rdi
jmp 0xa168
movq 0x10(%rsp), %r13
movups (%r13), %xmm0
movaps %xmm0, 0x20(%rsp)
addq $0x10, %r13
leaq 0x28077(%rip), %rsi     # 0x32105
leaq 0x68(%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
movl $0x1, %ecx
callq 0x5990
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0x38(%rsp), %r12
movl $0x1, %r8d
movq %r12, %rdi
movq %r13, %rsi
callq 0x19fc2
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 0x19592
movq %r12, (%rbp)
movq %rbx, 0x8(%rbp)
movq %rbx, %rax
shrq $0x38, %rax
xorq $0xf, %rax
testq %rbx, %rbx
movl %ebx, %edx
movq 0x8(%rsp), %rbx
cmovnsq %rax, %rdx
cmovnsq %rbp, %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x1967e
movq %r14, (%rbp)
movq %r15, 0x8(%rbp)
movq %r15, %rax
shrq $0x38, %rax
xorq $0xf, %rax
testq %r15, %r15
movl %r15d, %edx
cmovnsq %rax, %rdx
cmovnsq %rbp, %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0x1967e
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_O3/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 0x9a7c
movl (%r14), %edi
movq %r15, %rsi
callq 0x34b0
testl %eax, %eax
je 0xa345
xorl %eax, %eax
jmp 0xa35c
movzbl %bpl, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9a0e
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_O3/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 0xa412
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 0x19592
cmpq $0x2, 0x8(%r15)
jb 0xa419
movl $0x1, %r13d
movl $0x18, %ebp
movq %r14, %rdi
callq 0x30f0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1967e
movq (%r15), %rax
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rax
movq %rsi, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %rax, %rcx
shrq $0x38, %rcx
xorq $0xf, %rcx
testq %rax, %rax
movl %eax, %edx
cmovnsq %rcx, %rdx
cmovnsq %r12, %rsi
movq %rbx, %rdi
callq 0x1967e
incq %r13
addq $0x10, %rbp
cmpq 0x8(%r15), %r13
jb 0xa3b7
jmp 0xa419
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_O3/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 0xa7d6
cmpq $0x0, (%rsi)
je 0xa7be
leaq 0x24e5d(%rip), %rdi     # 0x2f602
movq %rsi, %r14
callq 0x866b
movq %r14, %rsi
movq (%r14), %rdi
testq %rdi, %rdi
je 0xa7be
callq *0x8(%rdi)
movq %r14, %rsi
movq (%rbx), %rax
movq %rax, (%rsi)
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)
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movb $0x0, 0x1a(%rdi)
callq 0xa8dc
xorl %edi, %edi
callq 0x16de6
testl %ebp, %ebp
je 0xa88e
cmpb $0x0, 0x1a(%rbx)
jne 0xa88e
movl $0x1, %edi
callq 0x16de6
cmpb $0x1, 0x1a(%rbx)
jne 0xa87e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3ba58(%rip), %rdi     # 0x46348
callq 0x32e0
testl %eax, %eax
je 0xa933
leaq 0x8(%rsp), %r14
movq 0x3ba43(%rip), %rdi     # 0x46348
movq %r14, %rsi
callq 0x34d0
movq 0x28(%rsp), %rax
cmpq 0x10(%rbx), %rax
jne 0xa923
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa982
movq 0x3ba1e(%rip), %rdi     # 0x46348
callq 0x32e0
testl %eax, %eax
jne 0xa8fe
movq 0x3ba0e(%rip), %rax     # 0x46348
movl 0x10(%rax), %esi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x1709a
addq $0x50, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa78a
cmpq $0x0, 0x8(%r14)
je 0xa96a
cmpq $0x0, 0x8(%rsp)
je 0xa976
leaq 0x24cca(%rip), %rdi     # 0x2f63b
callq 0x8683
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xab8b
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 0xaba4
incl %r12d
cmpl $0x8, %r12d
jne 0xab65
incq %r15
addl $0x8, %r14d
cmpq $0x20, %r15
jne 0xab54
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
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 0xb784
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rcx), %rdi
movq %rdi, 0x8(%rsi)
movl (%rcx), %esi
bswapl %esi
movl %esi, 0x1c(%rbx)
testl %esi, %esi
js 0xb77f
subq %rdi, %rax
addq $-0x8, %rax
movl %esi, %r15d
cmpq %r15, %rax
jb 0xb77f
addl $0x4, %esi
xorl %edx, %edx
callq 0x7f18
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 %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 0xb77f
movl $0x0, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop