LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/staticmap.h
// Function: bool staticmap::wr64<long, int, unsigned long>(unsigned long, long, int, unsigned long)
bool wr64(uint64_t pos, Ts... vals)
	{
		uint8_t buf[sizeof...(vals) * 8];
		size_t n = 0;
		((writeu_le64(buf+(n++)*8, vals)), ...);
		return (f.pwrite(pos, buf) == sizeof(buf));
	}

// Assembly:
subq $0x18, %rsp
movq %rsp, %rax
movq %rdx, (%rax)
movslq %ecx, %rcx
movq %rcx, 0x8(%rax)
movq %r8, 0x10(%rax)
addq $0x4, %rdi
pushq $0x18
popq %rcx
movq %rax, %rdx
callq 0x13f72
cmpq $0x18, %rax
sete %al
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::resize(unsigned long)
void string::resize(size_t newlen)
{
	switch (!inlined()<<1 | (newlen>max_inline()))
	{
	case 0: // small->small
		{
			m_inline[newlen] = '\0';
			m_inline_len_w() = max_inline()-newlen;
		}
		break;
	case 1: // small->big
		{
			uint8_t* newptr = xmalloc(bytes_for(newlen));
			memcpy(newptr, m_inline, max_inline());
			newptr[newlen] = '\0';
			m_data = newptr;
			m_len = newlen;
			m_nul = true;
			
			m_inline_len_w() = -1;
		}
		break;
	case 2: // big->small
		{
			uint8_t* oldptr = m_data;
			memcpy(m_inline, oldptr, newlen);
			free(oldptr);
			m_inline[newlen] = '\0';
			m_inline_len_w() = max_inline()-newlen;
		}
		break;
	case 3: // big->big
		{
			if (bytes_for(newlen) != bytes_for(m_len))
				m_data = xrealloc(m_data, bytes_for(newlen));
			m_data[newlen] = '\0';
			m_len = newlen;
		}
		break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0xf(%rdi), %eax
shrl $0x6, %eax
andl $0x2, %eax
xorl %ecx, %ecx
cmpq $0x10, %rsi
setae %cl
orl %eax, %ecx
leaq 0x1468d(%rip), %rax     # 0x28c80
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
bsrq %r14, %rcx
pushq $0x2
popq %rax
shlq %cl, %rax
leaq -0x1(%r14), %rcx
cmpq $-0x2, %rcx
pushq $0x1
popq %rdi
cmovbq %rax, %rdi
callq 0x11544
movq (%rbx), %rcx
movq 0x7(%rbx), %rdx
movq %rcx, (%rax)
movq %rdx, 0x7(%rax)
movb $0x0, (%rax,%r14)
movq %rax, (%rbx)
movl %r14d, 0x8(%rbx)
movb $0x1, 0xc(%rbx)
movb $-0x1, 0xf(%rbx)
jmp 0x146b3
movq (%rbx), %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3280
movq %r15, %rdi
callq 0x3430
movb $0x0, (%rbx,%r14)
movb $0xf, %al
subb %r14b, %al
movb %al, 0xf(%rbx)
jmp 0x146b3
bsrq %r14, %rcx
pushq $0x2
popq %rdx
movq %rdx, %rsi
shlq %cl, %rsi
leaq -0x1(%r14), %rax
cmpq $-0x2, %rax
pushq $0x1
popq %rax
cmovaeq %rax, %rsi
movl 0x8(%rbx), %edi
bsrq %rdi, %rcx
shlq %cl, %rdx
decq %rdi
cmpq $-0x2, %rdi
cmovaeq %rax, %rdx
movq (%rbx), %rax
cmpq %rdx, %rsi
je 0x146aa
movq %rax, %rdi
callq 0x115b4
movq %rax, (%rbx)
movb $0x0, (%rax,%r14)
movl %r14d, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::init_from_outline(unsigned char const*, unsigned long)
void string::init_from_outline(const uint8_t * str, size_t len)
{
	if (len <= max_inline())
	{
		memcpy(m_inline, str, len);
		m_inline[len] = '\0';
		m_inline_len_w() = max_inline()-len;
	}
	else
	{
		init_from_large(str, len);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
cmpq $0xf, %rdx
jbe 0x146dc
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x146fc
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3280
movb $0x0, (%r14,%rbx)
movb $0xf, %al
subb %bl, %al
movb %al, 0xf(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::init_from_large(unsigned char const*, unsigned long)
void string::init_from_large(const uint8_t * str, size_t len)
{
	m_inline_len_w() = -1;
	
	m_data = xmalloc(bytes_for(len));
	memcpy(m_data, str, len);
	m_data[len]='\0';
	
	m_len = len;
	m_nul = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb $-0x1, 0xf(%rdi)
bsrq %rdx, %rcx
pushq $0x2
popq %rax
shlq %cl, %rax
leaq -0x1(%rdx), %rcx
cmpq $-0x2, %rcx
pushq $0x1
popq %rdi
cmovbq %rax, %rdi
callq 0x11544
movq %rax, (%r15)
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3280
movq (%r15), %rax
movb $0x0, (%rax,%rbx)
movl %ebx, 0x8(%r15)
movb $0x1, 0xc(%r15)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::reinit_from(arrayview<unsigned char>)
void string::reinit_from(arrayview<uint8_t> data)
{
	const uint8_t * str = data.ptr();
	size_t len = data.size();
	
	if (str >= this->ptr() && str <= this->ptr()+this->length())
	{
		if (str == this->ptr() && len == this->length()) return;
		
		memmove(this->ptr(), str, len);
		resize(len);
	}
	else
	{
		deinit();
		init_from(data);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movzbl 0xf(%rdi), %eax
testb %al, %al
jns 0x14789
movq (%r14), %rdi
cmpq %r15, %rdi
ja 0x147a3
movl %eax, %ecx
xorl $0xf, %ecx
testb %al, %al
cmovsl 0x8(%r14), %ecx
leaq (%rdi,%rcx), %rax
cmpq %r15, %rax
jae 0x147be
movq %r14, %rdi
callq 0x56b4
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x146ba
cmpq %r15, %rdi
jne 0x147ce
cmpq %rbx, %rcx
jne 0x147ce
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3600
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x145cc
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::append(arrayview<unsigned char>)
void string::append(arrayview<uint8_t> newdat)
{
	// cache these four, for performance
	uint8_t* p1 = ptr();
	const uint8_t* p2 = newdat.ptr();
	uint32_t l1 = length();
	uint32_t l2 = newdat.size();
	
	if (UNLIKELY(p2 >= p1 && p2 < p1+l1))
	{
		uint32_t offset = p2-p1;
		resize(l1+l2);
		p1 = ptr();
		memcpy(p1+l1, p1+offset, l2);
	}
	else
	{
		resize(l1+l2);
		memcpy(ptr()+l1, p2, l2);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movzbl 0xf(%rdi), %eax
movl %eax, %r12d
xorl $0xf, %r12d
testb %al, %al
movq (%rdi), %rax
cmovnsq %rdi, %rax
cmovsl 0x8(%rdi), %r12d
cmpq %rsi, %rax
ja 0x14822
leaq (%rax,%r12), %rcx
cmpq %rbx, %rcx
ja 0x14854
leal (%r12,%r14), %esi
movq %r15, %rdi
callq 0x145cc
cmpb $0x0, 0xf(%r15)
jns 0x14838
movq (%r15), %r15
addq %r12, %r15
movl %r14d, %edx
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3280
subl %eax, %ebx
leal (%r12,%r14), %esi
movq %r15, %rdi
callq 0x145cc
cmpb $0x0, 0xf(%r15)
jns 0x1486c
movq (%r15), %r15
addq %r15, %r12
addq %r15, %rbx
movl %r14d, %edx
movq %r12, %rdi
jmp 0x14841
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::create_usurp(char*)
string string::create_usurp(char * str)
{
	cstring tmp(str);
	string ret;
	memcpy((void*)&ret, (void*)&tmp, sizeof(string));
	if (tmp.inlined()) free(str);
	else ret.m_data = xrealloc(ret.m_data, bytes_for(ret.m_len));
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x42ce
movups (%r15), %xmm0
movups %xmm0, (%rbx)
cmpb $0x0, 0xf(%r15)
js 0x148ac
movq %r14, %rdi
callq 0x3430
jmp 0x148d2
movq (%rbx), %rdi
movl 0x8(%rbx), %eax
bsrq %rax, %rcx
pushq $0x2
popq %rdx
shlq %cl, %rdx
decq %rax
cmpq $-0x2, %rax
pushq $0x1
popq %rsi
cmovbq %rdx, %rsi
callq 0x115b4
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::string(array<unsigned char>&&)
string::string(array<uint8_t>&& bytes) : cstrnul(noinit())
{
	cstring tmp(bytes);
	memcpy((void*)this, (void*)&tmp, sizeof(string));
	
	uint8_t* ptr = bytes.release().ptr();
	if (tmp.inlined()) free(ptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
movq 0x8(%rbx), %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x1045e
movups (%r15), %xmm0
movups %xmm0, (%r14)
movq (%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
cmpb $0x0, 0xf(%r15)
js 0x1491e
callq 0x3430
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::lastindexof(cstring) const
size_t cstring::lastindexof(cstring other) const
{
	size_t ret = -1;
	const uint8_t* start = this->ptr();
	const uint8_t* find = start;
	const uint8_t* find_end = find + this->length();
	if (!other) return this->length();
	
	while (true)
	{
		find = (uint8_t*)memmem(find, find_end-find, other.ptr(), other.length());
		if (!find) return ret;
		ret = find-start;
		find += 1;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, (%rsp)
movq %rdx, 0x8(%rsp)
movzbl 0xf(%rdi), %eax
movq %rdx, %r14
shrq $0x38, %r14
xorl $0xf, %r14d
testq %rdx, %rdx
movl %r14d, %ecx
cmovsl %edx, %ecx
testl %ecx, %ecx
je 0x14a1e
movq %rsi, %rbx
movl %eax, %r12d
xorl $0xf, %r12d
testb %al, %al
movq (%rdi), %r13
cmovnsq %rdi, %r13
cmovsl 0x8(%rdi), %r12d
addq %r13, %r12
testq %rdx, %rdx
movq %rsp, %rax
cmovnsq %rax, %rbx
cmovsl %edx, %r14d
pushq $-0x1
popq %r15
movq %r13, %rax
movq %r12, %rsi
subq %rax, %rsi
movq %rax, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x113c4
testq %rax, %rax
je 0x14a2c
movq %rax, %r15
subq %r13, %r15
incq %rax
jmp 0x149fa
movl %eax, %r15d
xorl $0xf, %r15d
testb %al, %al
cmovsl 0x8(%rdi), %r15d
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::iindexof(cstring, unsigned long) const
size_t cstring::iindexof(cstring other, size_t start) const
{
	if (start+other.length() > this->length()) return -1;
	const char* a = (char*)this->ptr();
	const char* b = (char*)other.ptr();
	while (start <= this->length()-other.length())
	{
		size_t i;
		for (i=0;i<other.length();i++)
		{
			if (tolower(a[start+i]) != tolower(b[i])) break;
		}
		if (i==other.length()) return start;
		start++;
	}
	return -1;
}

// Assembly:
pushq %rbp
pushq %rbx
movq %rsi, -0x10(%rsp)
movq %rdx, %r8
shrq $0x38, %r8
xorl $0xf, %r8d
testq %rdx, %rdx
cmovsl %edx, %r8d
movq %rdx, -0x8(%rsp)
movzbl 0xf(%rdi), %eax
movl %eax, %r9d
xorl $0xf, %r9d
testb %al, %al
cmovsl 0x8(%rdi), %r9d
leaq (%r8,%rcx), %r11
movabsq $-0x1, %r10
cmpq %r9, %r11
jbe 0x14b59
movq %r10, %rax
popq %rbx
popq %rbp
retq
testb %al, %al
jns 0x14b60
movq (%rdi), %rdi
testq %rdx, %rdx
leaq -0x10(%rsp), %rax
cmovnsq %rax, %rsi
subl %r8d, %r9d
addq %rcx, %rdi
leaq 0x14117(%rip), %rdx     # 0x28c90
cmpq %r9, %rcx
ja 0x14b53
movq %rcx, %rax
xorl %r11d, %r11d
cmpq %r11, %r8
je 0x14b56
movzbl (%rdi,%r11), %ecx
movb (%rcx,%rdx), %bl
andb $0x20, %bl
orb %cl, %bl
movzbl (%rsi,%r11), %ecx
movb (%rcx,%rdx), %bpl
andb $0x20, %bpl
orb %cl, %bpl
cmpb %bpl, %bl
jne 0x14bb0
incq %r11
jmp 0x14b84
leaq 0x1(%rax), %rcx
incq %rdi
cmpq %r11, %r8
jne 0x14b79
jmp 0x14b56
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::ilastindexof(cstring) const
size_t cstring::ilastindexof(cstring other) const
{
	if (other.length() > this->length()) return -1;
	const char* a = (char*)this->ptr();
	const char* b = (char*)other.ptr();
	
	size_t start=this->length()-other.length();
	while (true)
	{
		size_t i;
		for (i=0;i<other.length();i++)
		{
			if (tolower(a[start+i]) != tolower(b[i])) break;
		}
		if (i==other.length()) return start;
		
		if (start == 0) return -1;
		start--;
	}
}

// Assembly:
pushq %rbx
movq %rsi, -0x10(%rsp)
movq %rdx, -0x8(%rsp)
movq %rdx, %r8
shrq $0x38, %r8
xorl $0xf, %r8d
testq %rdx, %rdx
cmovsl %edx, %r8d
movzbl 0xf(%rdi), %r9d
testb %r9b, %r9b
jns 0x14bea
movl 0x8(%rdi), %ecx
jmp 0x14bf0
movl %r9d, %ecx
xorl $0xf, %ecx
movabsq $-0x1, %rax
subl %r8d, %ecx
jb 0x14c64
testb %r9b, %r9b
jns 0x14c07
movq (%rdi), %rdi
testq %rdx, %rdx
leaq -0x10(%rsp), %rdx
cmovnsq %rdx, %rsi
movl %r8d, %edx
addq %rcx, %rdi
leaq 0x14070(%rip), %r8      # 0x28c90
xorl %r9d, %r9d
cmpq %r9, %rdx
je 0x14c61
movzbl (%rdi,%r9), %r10d
movb (%r10,%r8), %r11b
andb $0x20, %r11b
orb %r10b, %r11b
movzbl (%rsi,%r9), %r10d
movb (%r10,%r8), %bl
andb $0x20, %bl
orb %r10b, %bl
cmpb %bl, %r11b
jne 0x14c51
incq %r9
jmp 0x14c23
cmpq %r9, %rdx
je 0x14c61
subq $0x1, %rcx
jb 0x14c64
decq %rdi
jmp 0x14c20
movq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::istartswith(cstring) const
bool cstring::istartswith(cstring other) const
{
	if (other.length() > this->length()) return false;
	const char* a = (char*)this->ptr();
	const char* b = (char*)other.ptr();
	for (size_t i=0;i<other.length();i++)
	{
		if (tolower(a[i]) != tolower(b[i])) return false;
	}
	return true;
}

// Assembly:
movq %rsi, -0x10(%rsp)
movq %rdx, -0x8(%rsp)
movq %rdx, %rax
shrq $0x38, %rax
xorl $0xf, %eax
testq %rdx, %rdx
cmovsl %edx, %eax
movzbl 0xf(%rdi), %ecx
testb %cl, %cl
jns 0x14ca0
movl 0x8(%rdi), %r8d
jmp 0x14ca7
movl %ecx, %r8d
xorl $0xf, %r8d
cmpl %r8d, %eax
jbe 0x14caf
xorl %eax, %eax
retq
testb %cl, %cl
jns 0x14cb6
movq (%rdi), %rdi
testq %rdx, %rdx
leaq -0x10(%rsp), %rcx
cmovnsq %rcx, %rsi
movl %eax, %ecx
xorl %edx, %edx
leaq 0x13fc3(%rip), %r8      # 0x28c90
cmpq %rdx, %rcx
sete %al
je 0x14cfd
movzbl (%rdi,%rdx), %r9d
movb (%r9,%r8), %r10b
andb $0x20, %r10b
orb %r9b, %r10b
movzbl (%rsi,%rdx), %r9d
movb (%r9,%r8), %r11b
andb $0x20, %r11b
orb %r9b, %r11b
incq %rdx
cmpb %r11b, %r10b
je 0x14ccd
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::iendswith(cstring) const
bool cstring::iendswith(cstring other) const
{
	if (other.length() > this->length()) return false;
	const char* a = (char*)this->ptr()+this->length()-other.length();
	const char* b = (char*)other.ptr();
	for (size_t i=0;i<other.length();i++)
	{
		if (tolower(a[i]) != tolower(b[i])) return false;
	}
	return true;
}

// Assembly:
movq %rsi, -0x10(%rsp)
movq %rdx, -0x8(%rsp)
movq %rdx, %rax
shrq $0x38, %rax
xorl $0xf, %eax
testq %rdx, %rdx
cmovsl %edx, %eax
movzbl 0xf(%rdi), %ecx
testb %cl, %cl
js 0x14d29
xorl $0xf, %ecx
cmpl %ecx, %eax
ja 0x14d30
jmp 0x14d36
movl 0x8(%rdi), %ecx
cmpl %ecx, %eax
jbe 0x14d33
xorl %eax, %eax
retq
movq (%rdi), %rdi
movl %ecx, %ecx
addq %rdi, %rcx
movl %eax, %edi
subq %rdi, %rcx
testq %rdx, %rdx
leaq -0x10(%rsp), %rax
cmovnsq %rax, %rsi
xorl %edx, %edx
leaq 0x13f3b(%rip), %r8      # 0x28c90
cmpq %rdx, %rdi
sete %al
je 0x14d85
movzbl (%rcx,%rdx), %r9d
movb (%r9,%r8), %r10b
andb $0x20, %r10b
orb %r9b, %r10b
movzbl (%rsi,%rdx), %r9d
movb (%r9,%r8), %r11b
andb $0x20, %r11b
orb %r9b, %r11b
incq %rdx
cmpb %r11b, %r10b
je 0x14d55
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::csplit(cstring, unsigned long) const
array<cstring> cstring::csplit(cstring sep, size_t limit) const
{
	array<cstring> ret;
	const uint8_t * data = ptr();
	const uint8_t * dataend = ptr()+length();
	
	while (ret.size() < limit)
	{
		const uint8_t * next = (uint8_t*)memmem(data, dataend-data, sep.ptr(), sep.length());
		if (!next) break;
		ret.append(arrayview<uint8_t>(data, next-data));
		data = next+sep.length();
	}
	ret.append(arrayview<uint8_t>(data, dataend-data));
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x10(%rsp)
movq %rdi, %rbx
movq %rsp, %rax
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movzbl 0xf(%rsi), %eax
movl %eax, %r14d
xorl $0xf, %r14d
testb %al, %al
movq (%rsi), %r15
cmovnsq %rsi, %r15
cmovsl 0x8(%rsi), %r14d
addq %r15, %r14
movq %rcx, %rax
shrq $0x38, %rax
xorl %edx, %edx
leaq 0x18(%rsp), %r12
movq %r14, %r13
subq %r15, %r13
cmpq 0x10(%rsp), %rdx
jae 0x15043
movl %eax, %esi
xorb $0xf, %sil
testb %al, %al
movq (%rsp), %rdx
movq %rsp, %rax
cmovnsq %rax, %rdx
movzbl %sil, %eax
cmovnsl %eax, %ecx
movq %r15, %rdi
movq %r13, %rsi
callq 0x113c4
testq %rax, %rax
je 0x15043
movq %rax, %rbp
movq %rax, %rdx
subq %r15, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1045e
movq %rbx, %rdi
movq %r12, %rsi
callq 0xecde
movzbl 0xf(%rsp), %eax
movl %eax, %r15d
xorl $0xf, %r15d
movl 0x8(%rsp), %ecx
testb %al, %al
cmovsl %ecx, %r15d
addq %rbp, %r15
movq 0x8(%rbx), %rdx
jmp 0x14fce
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1045e
movq %rbx, %rdi
movq %r14, %rsi
callq 0xecde
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::crsplit(cstring, unsigned long) const
array<cstring> cstring::crsplit(cstring sep, size_t limit) const
{
	array<cstring> ret;
	const uint8_t * datastart = ptr();
	const uint8_t * data = ptr()+length();
	
	const uint8_t * sepp = sep.ptr();
	size_t sepl = sep.length();
	
	while (ret.size() < limit)
	{
		if (datastart+sepl > data) break;
		const uint8_t * next = data-sepl;
		while (memcmp(next, sepp, sepl) != 0)
		{
			if (datastart==next) goto done;
			next--;
		}
		ret.insert(0, arrayview<uint8_t>(next+sepl, data-(next+sepl)));
		data = next;
	}
done:
	ret.insert(0, arrayview<uint8_t>(datastart, data-datastart));
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
leaq 0x38(%rsp), %rax
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movq %rdi, 0x8(%rsp)
movups %xmm0, (%rdi)
movzbl 0xf(%rsi), %edx
movl %edx, %r13d
xorl $0xf, %r13d
testb %dl, %dl
movq (%rsi), %r15
cmovnsq %rsi, %r15
cmovsl 0x8(%rsi), %r13d
addq %r15, %r13
movq %rcx, %rdx
shrq $0x38, %rdx
xorl $0xf, %edx
testq %rcx, %rcx
cmovnsq %rax, %r14
cmovsq %rcx, %rdx
movl %edx, %ebp
leaq (%r15,%rbp), %rax
movq %rax, 0x20(%rsp)
movq %rbp, %rax
negq %rax
movq %rax, 0x18(%rsp)
xorl %eax, %eax
movq %r8, 0x10(%rsp)
cmpq %r8, %rax
jae 0x15155
cmpq %r13, 0x20(%rsp)
ja 0x15155
movq 0x18(%rsp), %rax
leaq (%rax,%r13), %r12
xorl %ebx, %ebx
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x3380
testl %eax, %eax
je 0x15120
cmpq %r15, %r12
je 0x15155
decq %r12
incq %rbx
jmp 0x15101
subq %rbx, %r13
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1045e
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x28(%rsp), %rdx
callq 0xebb8
movq 0x8(%rbx), %rax
movq %r12, %r13
movq 0x10(%rsp), %r8
jmp 0x150ea
subq %r15, %r13
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1045e
movq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xebb8
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::cspliti(cstring, unsigned long) const
array<cstring> cstring::cspliti(cstring sep, size_t limit) const
{
	array<cstring> ret;
	const uint8_t * data = ptr();
	const uint8_t * dataend = ptr()+length();
	
	while (ret.size() < limit)
	{
		const uint8_t * next = (uint8_t*)memmem(data, dataend-data, sep.ptr(), sep.length());
		if (!next) break;
		ret.append(arrayview<uint8_t>(data, next-data+sep.length()));
		data = next+sep.length();
	}
	if (dataend != data)
		ret.append(arrayview<uint8_t>(data, dataend-data));
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, %r12
movq %rdi, %rbx
movq %rsp, %rax
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movzbl 0xf(%rsi), %eax
movl %eax, %r15d
xorl $0xf, %r15d
testb %al, %al
movq (%rsi), %r13
cmovnsq %rsi, %r13
cmovsl 0x8(%rsi), %r15d
addq %r13, %r15
movq %rcx, %rax
shrq $0x38, %rax
xorl %ecx, %ecx
leaq 0x18(%rsp), %rbp
cmpq 0x10(%rsp), %rcx
jae 0x1525b
movq %r15, %rsi
subq %r13, %rsi
movl %eax, %ecx
xorb $0xf, %cl
testb %al, %al
movq (%rsp), %rdx
movq %rsp, %rax
cmovnsq %rax, %rdx
movzbl %cl, %eax
cmovnsl %eax, %r12d
movq %r13, %rdi
movq %r12, %rcx
callq 0x113c4
testq %rax, %rax
je 0x1525b
movq %rax, %r14
movq %rax, %rdx
subq %r13, %rdx
addq %r12, %rdx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1045e
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xecde
movzbl 0xf(%rsp), %eax
movl %eax, %r13d
xorl $0xf, %r13d
movl 0x8(%rsp), %r12d
testb %al, %al
cmovsl %r12d, %r13d
addq %r14, %r13
movq 0x8(%rbx), %rcx
jmp 0x151e3
subq %r13, %r15
je 0x1527e
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1045e
movq %rbx, %rdi
movq %r14, %rsi
callq 0xecde
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::crspliti(cstring, unsigned long) const
array<cstring> cstring::crspliti(cstring sep, size_t limit) const
{
	array<cstring> ret;
	const uint8_t * datastart = ptr();
	const uint8_t * data = ptr()+length();
	
	const uint8_t * sepp = sep.ptr();
	size_t sepl = sep.length();
	
	size_t outlen = 0;
	while (outlen < limit)
	{
		if (datastart+sepl > data) break;
		const uint8_t * next = data-sepl;
		while (memcmp(next, sepp, sepl) != 0)
		{
			if (datastart==next) goto done;
			next--;
		}
		size_t len = data - (next+sepl) + (data == ptr()+length() ? 0 : sepl);
		if (len)
			ret.insert(0, arrayview<uint8_t>(next+sepl, len));
		outlen++;
		data = next;
	}
done:
	size_t len = data - datastart + (data == ptr()+length() ? 0 : sepl);
	if (len)
		ret.insert(0, arrayview<uint8_t>(datastart, len));
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
leaq 0x48(%rsp), %rax
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movq %rdi, 0x8(%rsp)
movups %xmm0, (%rdi)
movzbl 0xf(%rsi), %edx
movl %edx, %edi
xorl $0xf, %edi
testb %dl, %dl
movq (%rsi), %r14
cmovnsq %rsi, %r14
movq %rsi, 0x10(%rsp)
cmovsl 0x8(%rsi), %edi
addq %r14, %rdi
movq %rdi, (%rsp)
movq %rcx, %rdx
shrq $0x38, %rdx
xorl $0xf, %edx
testq %rcx, %rcx
cmovnsq %rax, %r12
cmovsq %rcx, %rdx
movl %edx, %r13d
leaq (%r14,%r13), %rax
movq %rax, 0x30(%rsp)
movq %r13, %rax
negq %rax
movq %rax, 0x20(%rsp)
xorl %eax, %eax
movq %r8, 0x18(%rsp)
movq %rax, 0x28(%rsp)
cmpq %r8, %rax
jae 0x153c5
movq 0x30(%rsp), %rax
cmpq (%rsp), %rax
ja 0x153c5
movq (%rsp), %rax
movq 0x20(%rsp), %rcx
leaq (%rax,%rcx), %rbx
xorl %r15d, %r15d
leaq (%rbx,%r15), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3380
testl %eax, %eax
je 0x1535a
cmpq %r14, %rbp
je 0x153c5
decq %r15
jmp 0x1533a
movq 0x10(%rsp), %rdx
movzbl 0xf(%rdx), %eax
movl %eax, %ecx
xorl $0xf, %ecx
testb %al, %al
movq (%rdx), %rax
cmovsl 0x8(%rdx), %ecx
cmovnsq %rdx, %rax
addq %rax, %rcx
movq (%rsp), %rsi
cmpq %rcx, %rsi
movq %r13, %rdx
movl $0x0, %eax
cmoveq %rax, %rdx
subq %r15, %rdx
je 0x153af
addq %r15, %rsi
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x1045e
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xebb8
movq 0x28(%rsp), %rax
incq %rax
movq %rbp, (%rsp)
movq 0x18(%rsp), %r8
jmp 0x1530d
movq (%rsp), %rdi
movq %rdi, %rax
subq %r14, %rax
movq 0x10(%rsp), %rsi
movzbl 0xf(%rsi), %ecx
movl %ecx, %edx
xorl $0xf, %edx
testb %cl, %cl
movq (%rsi), %rcx
cmovsl 0x8(%rsi), %edx
cmovnsq %rsi, %rcx
addq %rcx, %rdx
xorl %ecx, %ecx
cmpq %rdx, %rdi
cmoveq %rcx, %r13
addq %rax, %r13
movq 0x8(%rsp), %r15
je 0x15420
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1045e
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xebb8
movq %r15, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::csplit(bool (*)(unsigned char const*, unsigned char const*&, unsigned char const*&), unsigned long) const
array<cstring> cstring::csplit(bool(*find)(const uint8_t * start, const uint8_t * & at, const uint8_t * & end), size_t limit) const
{
	array<cstring> ret;
	
	const uint8_t * data = ptr();
	const uint8_t * dataend = ptr()+length();
	
	const uint8_t * gstart = data;
	const uint8_t * at = gstart;
	
	while (ret.size() < limit && at < dataend)
	{
		const uint8_t * mat = at;
		const uint8_t * mend = dataend;
		if (!find(data, mat, mend) || (gstart == mat && mat == mend))
		{
			at++;
			continue;
		}
		
		ret.append(arrayview<uint8_t>(gstart, mat-gstart));
		gstart = mend;
		at = gstart;
	}
	ret.append(arrayview<uint8_t>(gstart, dataend-gstart));
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movzbl 0xf(%rsi), %eax
movl %eax, %r14d
xorl $0xf, %r14d
testb %al, %al
movq (%rsi), %r13
cmovnsq %rsi, %r13
movq %rcx, %r12
cmovsl 0x8(%rsi), %r14d
movq %rdx, 0x10(%rsp)
addq %r13, %r14
xorl %eax, %eax
movq %r13, %rbp
movq %r13, %r15
cmpq %r12, %rax
jae 0x154db
cmpq %r14, %r15
jae 0x154db
movq %r15, 0x8(%rsp)
movq %r14, (%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
movq %rsp, %rdx
callq *0x10(%rsp)
testb %al, %al
je 0x154ab
movq 0x8(%rsp), %rdx
cmpq %rdx, %rbp
jne 0x154b0
cmpq (%rsp), %rdx
jne 0x154b0
incq %r15
jmp 0x154d5
subq %rbp, %rdx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x1045e
movq %rbx, %rdi
movq %r15, %rsi
callq 0xecde
movq (%rsp), %rbp
movq %rbp, %r15
movq 0x8(%rbx), %rax
jmp 0x15475
subq %rbp, %r14
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1045e
movq %rbx, %rdi
movq %r12, %rsi
callq 0xecde
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::compare3(cstring, cstring)
int string::compare3(cstring a, cstring b)
{
	size_t cmplen = min(a.length(), b.length());
	int ret = memcmp(a.bytes().ptr(), b.bytes().ptr(), cmplen);
	
	if (ret) return ret;
	else return a.length() - b.length();
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rax
movq %rsi, %r8
leaq 0x10(%rsp), %r9
movq %rsp, %rsi
movq %rdx, (%rsi)
movq %rcx, 0x8(%rsi)
movq %r8, %rdx
shrq $0x38, %rdx
xorl $0xf, %edx
movq %rcx, %r10
shrq $0x38, %r10
xorl $0xf, %r10d
testq %rcx, %rcx
cmovsl %ecx, %r10d
cmovsq %rax, %rsi
movq %rdi, (%r9)
testq %r8, %r8
cmovsl %r8d, %edx
movq %r8, 0x8(%r9)
cmovnsq %r9, %rdi
movl %r10d, %ebx
subl %edx, %ebx
cmovbl %r10d, %edx
negl %ebx
callq 0x3100
testl %eax, %eax
cmovel %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::icompare3(cstring, cstring)
int string::icompare3(cstring a, cstring b)
{
	int ret_i = a.length() - b.length();
	
	size_t cmplen = min(a.length(), b.length());
	const uint8_t* ab = a.bytes().ptr();
	const uint8_t* bb = b.bytes().ptr();
	for (size_t n=0; n<cmplen; n++)
	{
		if (ab[n] != bb[n])
		{
			if (ret_i == 0) ret_i = ab[n] - bb[n];
			
			uint8_t ac = toupper(ab[n]);
			uint8_t bc = toupper(bb[n]);
			if (ac != bc) return ac - bc;
		}
	}
	
	return ret_i;
}

// Assembly:
pushq %rbx
leaq -0x10(%rsp), %rax
movq %rdi, (%rax)
leaq -0x20(%rsp), %r8
movq %rdx, (%r8)
movq %rcx, 0x8(%r8)
movq %rsi, %r9
shrq $0x38, %r9
xorl $0xf, %r9d
movq %rcx, %r10
shrq $0x38, %r10
xorl $0xf, %r10d
testq %rcx, %rcx
cmovnsl %r10d, %ecx
movq %rsi, 0x8(%rax)
cmovnsq %r8, %rdx
testq %rsi, %rsi
cmovnsl %r9d, %esi
cmovnsq %rax, %rdi
movl %ecx, %eax
subl %esi, %eax
cmovbl %ecx, %esi
negl %eax
xorl %ecx, %ecx
leaq 0x13643(%rip), %r8      # 0x28c90
cmpq %rcx, %rsi
je 0x156a2
movzbl (%rdi,%rcx), %r10d
movzbl (%rdx,%rcx), %r9d
cmpb %r9b, %r10b
je 0x15693
movl %r10d, %r11d
movl %r10d, %ebx
subl %r9d, %ebx
testl %eax, %eax
cmovel %ebx, %eax
movb (%r11,%r8), %r11b
notb %r11b
orb $-0x21, %r11b
andb %r10b, %r11b
movl %r9d, %r10d
movb (%r10,%r8), %r10b
notb %r10b
orb $-0x21, %r10b
andb %r9b, %r10b
cmpb %r10b, %r11b
jne 0x15698
incq %rcx
jmp 0x1564d
movzbl %r10b, %ecx
movzbl %r11b, %eax
subl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::upper() const
string cstring::upper() const
{
	string ret = *this;
	bytesw by = ret.bytes();
	for (size_t i=0;i<by.size();i++) by[i] = toupper(by[i]);
	return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movups (%rsi), %xmm0
movq %rsp, %rsi
movups %xmm0, (%rsi)
callq 0x14754
movzbl 0xf(%rbx), %eax
testb %al, %al
jns 0x158b6
movl 0x8(%rbx), %eax
movq (%rbx), %rcx
jmp 0x158bd
xorq $0xf, %rax
movq %rbx, %rcx
xorl %edx, %edx
leaq 0x133ca(%rip), %rsi     # 0x28c90
cmpq %rdx, %rax
je 0x158e6
movzbl (%rcx,%rdx), %edi
movb (%rdi,%rsi), %r8b
notb %r8b
orb $-0x21, %r8b
andb %dil, %r8b
movb %r8b, (%rcx,%rdx)
incq %rdx
jmp 0x158c6
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::lower() const
string cstring::lower() const
{
	string ret = *this;
	bytesw by = ret.bytes();
	for (size_t i=0;i<by.size();i++) by[i] = tolower(by[i]);
	return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movups (%rsi), %xmm0
movq %rsp, %rsi
movups %xmm0, (%rsi)
callq 0x14754
movzbl 0xf(%rbx), %eax
testb %al, %al
jns 0x15916
movl 0x8(%rbx), %eax
movq (%rbx), %rcx
jmp 0x1591d
xorq $0xf, %rax
movq %rbx, %rcx
xorl %edx, %edx
leaq 0x1336a(%rip), %rsi     # 0x28c90
cmpq %rdx, %rax
je 0x15943
movzbl (%rcx,%rdx), %edi
movb (%rdi,%rsi), %r8b
andb $0x20, %r8b
orb %dil, %r8b
movb %r8b, (%rcx,%rdx)
incq %rdx
jmp 0x15926
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: string::codepoint(unsigned char*, unsigned int)
size_t string::codepoint(uint8_t* out, uint32_t cp)
{
	if (LIKELY(cp <= 0x7F))
	{
		out[0] = cp;
		return 1;
	}
	
	if (cp >= 0xD800 && cp <= 0xDFFF) cp = 0xFFFD; // curse utf16 forever
	if (cp > 0x10FFFF) cp = 0xFFFD;
	
	// some bit magic on the codepoint / utf8 representation, smaller and faster than more obvious approaches
	uint32_t bits = cp;
	bits = (bits&0x00fff000)<<4 | (bits&0x00000fff);
	bits = (bits&0x0fc00fc0)<<2 | (bits&0x003f003f);
	
	// check how many bytes that'd need, fill in the mandatory 1 bits, and write it out
	if (bits <= 0x00001fff) // cp <= 0x7ff
	{
		writeu_be32(out, (bits|0xC080)<<16);
		return 2;
	}
	else if (bits <= 0x000fffff) // cp <= 0xffff
	{
		writeu_be32(out, (bits|0xE08080)<<8);
		return 3;
	}
	else
	{
		writeu_be32(out, bits|0xF0808080);
		return 4;
	}
}

// Assembly:
cmpl $0x7f, %esi
ja 0x15a26
movb %sil, (%rdi)
pushq $0x1
popq %rax
retq
movl %esi, %eax
andl $0xfffff800, %eax       # imm = 0xFFFFF800
cmpl $0xd800, %eax           # imm = 0xD800
movl $0xfffd, %eax           # imm = 0xFFFD
cmovel %eax, %esi
cmpl $0x110000, %esi         # imm = 0x110000
cmovael %eax, %esi
movl %esi, %eax
shll $0x4, %eax
andl $0x1ff0000, %eax        # imm = 0x1FF0000
andl $0xfff, %esi            # imm = 0xFFF
orl %eax, %esi
movl %esi, %eax
andl $0x1c00fc0, %eax        # imm = 0x1C00FC0
andl $0x3f003f, %esi         # imm = 0x3F003F
leal (%rsi,%rax,4), %eax
cmpl $0x1fff, %eax           # imm = 0x1FFF
ja 0x15a7c
shll $0x10, %eax
orl $0xc0800000, %eax       # imm = 0xC0800000
bswapl %eax
movl %eax, (%rdi)
pushq $0x2
jmp 0x15a24
cmpl $0xfffff, %eax          # imm = 0xFFFFF
ja 0x15a93
shll $0x8, %eax
orl $0xe0808000, %eax       # imm = 0xE0808000
bswapl %eax
movl %eax, (%rdi)
pushq $0x3
jmp 0x15a24
orl $0xf0808080, %eax       # imm = 0xF0808080
bswapl %eax
movl %eax, (%rdi)
pushq $0x4
jmp 0x15a24
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::matches_glob(cstring, bool) const
bool cstring::matches_glob(cstring pat, bool case_insensitive) const
{
	const uint8_t * s = ptr();
	const uint8_t * p = pat.ptr();
	const uint8_t * se = s + length();
	const uint8_t * pe = p + pat.length();
	
	const uint8_t * sp = se; // weirdo trick to not need a special case for the part before first asterisk
	const uint8_t * pp = p;
	if (p == pe)
		return (s == se);
	while (s < se)
	{
		if (p < pe && *p == '*')
		{
			p++;
			if (p == pe) return true;
			pp = p;
			sp = s+1;
		}
		else if (p < pe && s < se && (*p == *s || *p == '?' || (case_insensitive && tolower(*p) == tolower(*s))))
		{
			p++;
			s++;
		}
		else
		{
			p = pp;
			s = sp;
			sp++;
		}
	}
	while (p < pe && *p == '*') p++;
	return (p == pe);
}

// Assembly:
pushq %rbp
pushq %rbx
leaq -0x10(%rsp), %r9
movq %rsi, (%r9)
movq %rdx, 0x8(%r9)
movzbl 0xf(%rdi), %r8d
movq %rdx, %r10
shrq $0x38, %r10
movl %r8d, %eax
xorl $0xf, %eax
testb %r8b, %r8b
movq (%rdi), %r8
cmovnsq %rdi, %r8
cmovsl 0x8(%rdi), %eax
xorl $0xf, %r10d
testq %rdx, %rdx
cmovnsq %r9, %rsi
cmovnsl %r10d, %edx
testl %edx, %edx
je 0x15d62
addq %r8, %rax
addq %rsi, %rdx
leaq 0x12fb0(%rip), %rdi     # 0x28c90
movq %rax, %r9
movq %rsi, %r10
leaq 0x1(%r8), %r11
cmpq %rax, %r8
jae 0x15d58
cmpq %rdx, %rsi
jae 0x15d45
movzbl (%rsi), %ebx
cmpq $0x2a, %rbx
jne 0x15d0d
incq %rsi
movq %r11, %r9
movq %rsi, %r10
cmpq %rdx, %rsi
jne 0x15cea
jmp 0x15d69
cmpq $0x3f, %rbx
je 0x15d3d
movb (%r8), %r11b
cmpb %r11b, %bl
je 0x15d3d
testb %cl, %cl
je 0x15d45
movzbl %r11b, %r11d
movb (%rbx,%rdi), %bpl
andb $0x20, %bpl
orb %bl, %bpl
movb (%r11,%rdi), %bl
andb $0x20, %bl
orb %r11b, %bl
cmpb %bl, %bpl
jne 0x15d45
incq %rsi
incq %r8
jmp 0x15ce6
movq %r9, %r8
incq %r9
movq %r10, %rsi
jmp 0x15ce6
cmpb $0x2a, (%rsi)
jne 0x15d5d
incq %rsi
cmpq %rdx, %rsi
jb 0x15d50
cmpq %rdx, %rsi
jmp 0x15d64
testl %eax, %eax
sete %al
jmp 0x15d6b
movb $0x1, %al
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::leftPad(unsigned long, unsigned char) const
string cstring::leftPad (size_t len, uint8_t ch) const {
	if (len >= length()) return *this;
	len -= length();
	
	array<uint8_t> pad;
	pad.resize(len);
	memset(pad.ptr(), ch, len);
	return cstring(pad) + *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0xf(%rsi), %eax
testb %al, %al
js 0x15d9b
xorq $0xf, %rax
cmpq %r15, %rax
jbe 0x15e04
movzbl %al, %eax
jmp 0x15da4
movl 0x8(%r14), %eax
cmpq %r15, %rax
jbe 0x15e04
subq %rax, %r15
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, (%r12)
movq %r12, %rdi
movq %r15, %rsi
callq 0xbaee
movq (%r12), %rdi
movzbl %bpl, %esi
movq %r15, %rdx
callq 0x3170
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x1045e
movq (%r14), %rcx
movq 0x8(%r14), %r8
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5f1a
movq (%r12), %rdi
callq 0x3430
jmp 0x15e16
movups (%r14), %xmm0
movq %rsp, %rsi
movups %xmm0, (%rsi)
movq %rbx, %rdi
callq 0x14754
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv-float.cpp
// Function: string tostring_float<double>(double)
string tostring_float(T f)
{
	// to_chars is quite close to my desired output format
	static_assert(std::numeric_limits<T>::is_iec559);
	
	// can be replaced with if (isnan(f)) f = fabs(f); under libstdc++,
	// but it's implementation defined if the weird ones are nan or nan(123), or inf or infinity, so let's just hardcode them
	if (UNLIKELY(isnan(f))) return "nan";
	if (UNLIKELY(isinf(f))) return signbit(f) ? "-inf" : "inf";
	
	bool fixed = ((fabs(f) >= (T)0.0001 && fabs(f) < (T)10000000000000000.0) || f == 0);
	
	char buf[32]; // longest possible is 24, give it a little extra
	char* end;
	if (fixed)
	{
		auto ret = std::to_chars(buf, buf+sizeof(buf), f, std::chars_format::fixed);
		end = ret.ptr;
	}
	else
	{
		auto ret = std::to_chars(buf, buf+sizeof(buf), f, std::chars_format::scientific);
		end = ret.ptr;
		if (end[-2] == '0' && end[-4] == 'e') // can't underflow, shortest possible output in scientific is 1e+01
		{
			end[-2] = end[-1];
			end--;
		}
	}
	return bytesr((uint8_t*)buf, end-buf);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
ucomisd %xmm0, %xmm0
jp 0x16651
movq %xmm0, %rax
movq %rax, %rcx
btrq $0x3f, %rcx
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
cmpq %rdx, %rcx
je 0x1665a
movapd 0x12828(%rip), %xmm1    # 0x28e00
andpd %xmm0, %xmm1
ucomisd 0x127d4(%rip), %xmm1    # 0x28db8
jb 0x165f4
movsd 0x127c2(%rip), %xmm2    # 0x28db0
ucomisd %xmm1, %xmm2
ja 0x16600
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1662a
jp 0x1662a
leaq 0x20(%rsp), %rsi
movq %rsp, %rdi
pushq $0x2
popq %rdx
callq 0x31b0
movq %rsp, %rsi
subq %rsi, %rax
movq %rbx, %rdi
movq %rax, %rdx
callq 0x146ba
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x20(%rsp), %rsi
movq %rsp, %rdi
pushq $0x1
popq %rdx
callq 0x31b0
cmpb $0x30, -0x2(%rax)
jne 0x16610
cmpb $0x65, -0x4(%rax)
jne 0x16610
movb -0x1(%rax), %cl
movb %cl, -0x2(%rax)
decq %rax
jmp 0x16610
leaq 0x127f5(%rip), %rsi     # 0x28e4d
jmp 0x1666f
testq %rax, %rax
leaq 0x127e4(%rip), %rax     # 0x28e48
leaq 0x127de(%rip), %rsi     # 0x28e49
cmovsq %rax, %rsi
movq %rbx, %rdi
callq 0x4242
jmp 0x16621
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: tostring_ptr(char*, unsigned long long, unsigned long)
size_t tostring_ptr(char* buf, unsigned long long val, size_t len)
{
	char* iter = buf+len;
	while (iter > buf)
	{
		*--iter = '0'+val%10;
		val /= 10;
	}
	return len;
}

// Assembly:
movq %rdx, %rcx
movq %rsi, %rax
leaq (%rdi,%rdx), %rsi
pushq $0xa
popq %r8
cmpq %rdi, %rsi
jbe 0x167c1
xorl %edx, %edx
divq %r8
orb $0x30, %dl
movb %dl, -0x1(%rsi)
decq %rsi
jmp 0x167ac
movq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: tostringhex(arrayview<unsigned char>)
string tostringhex(arrayview<uint8_t> val)
{
	string ret;
	arrayvieww<uint8_t> retb = ret.construct(val.size()*2);
	for (size_t i=0;i<val.size();i++)
	{
		retb[i*2+0] = hexdigits[val[i]>>4];
		retb[i*2+1] = hexdigits[val[i]&15];
	}
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movb $0xf, 0xf(%rdi)
movb $0x0, (%rdi)
addq %rdx, %rdx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x4af2
xorl %eax, %eax
leaq 0x12608(%rip), %rcx     # 0x28e60
cmpq %rax, %rbx
je 0x16887
movzbl (%r15,%rax), %edx
shrl $0x4, %edx
movb (%rdx,%rcx), %dl
movq (%rsp), %rsi
movb %dl, (%rsi,%rax,2)
movzbl (%r15,%rax), %edx
andl $0xf, %edx
movb (%rdx,%rcx), %dl
movq (%rsp), %rsi
movb %dl, 0x1(%rsi,%rax,2)
incq %rax
jmp 0x16858
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: tostringhex_ptr(char*, unsigned long long, unsigned long)
size_t tostringhex_ptr(char* buf, unsigned long long val, size_t len)
{
	char* iter = buf+len;
	while (iter > buf)
	{
		*--iter = hexdigits[val%16];
		val /= 16;
	}
	return len;
}

// Assembly:
movq %rdx, %rax
leaq (%rdi,%rdx), %rcx
leaq 0x125be(%rip), %rdx     # 0x28e60
cmpq %rdi, %rcx
jbe 0x168bf
movl %esi, %r8d
andl $0xf, %r8d
movb (%r8,%rdx), %r8b
movb %r8b, -0x1(%rcx)
decq %rcx
shrq $0x4, %rsi
jmp 0x168a2
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: fromstring(cstring, bool&)
bool fromstring(cstring s, bool& out)
{
	if (s == "false" || s == "0")
	{
		out = false;
		return true;
	}
	
	if (s == "true" || s == "1")
	{
		out = true;
		return true;
	}
	
	out = false;
	return false;
}

// Assembly:
shrq $0x38, %rsi
cmpq $0xa, %rsi
jne 0x1694e
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq %rdi, %rax
movabsq $0x65736c6166, %rcx     # imm = 0x65736C6166
cmpq %rcx, %rax
je 0x1695f
xorl %eax, %eax
jmp 0x16965
cmpl $0xe, %esi
sete %al
cmpb $0x30, %dil
sete %cl
testb %cl, %al
je 0x16965
movb $0x1, %al
xorl %ecx, %ecx
jmp 0x16987
xorq $0xb, %rsi
movl %edi, %ecx
xorq $0x65757274, %rcx       # imm = 0x65757274
orq %rsi, %rcx
sete %sil
cmpb $0x31, %dil
sete %cl
andb %al, %cl
orb %sil, %cl
movl %ecx, %eax
movb %cl, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: fromstringhex(cstring, arrayvieww<unsigned char>)
bool fromstringhex(cstring s, arrayvieww<uint8_t> val)
{
	if (val.size()*2 != s.length()) return false;
	bool ok = true;
	for (size_t i=0;i<val.size();i++)
	{
		ok &= fromstringhex(s.substr(i*2, i*2+2), val[i]);
	}
	return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, (%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rdx), %rax
leaq (%rax,%rax), %rcx
movq %rsi, %rdx
shrq $0x38, %rdx
xorl $0xf, %edx
testq %rsi, %rsi
cmovsq %rsi, %rdx
movl %edx, %edx
xorl %esi, %esi
movl $0x0, %r14d
cmpq %rdx, %rcx
jne 0x16a07
movb $0x1, %r14b
movq %rsp, %r15
xorl %r12d, %r12d
cmpq %rax, %r12
jae 0x16a07
leal 0x2(%rsi), %ebp
movq %r15, %rdi
movl %ebp, %edx
callq 0x55aa
movq (%rbx), %rcx
addq %r12, %rcx
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x16be0
andb %al, %r14b
incq %r12
movq 0x8(%rbx), %rax
movl %ebp, %esi
jmp 0x169d3
andb $0x1, %r14b
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: string tostring_inner<long long>(long long)
string tostring_inner(T val)
{
	size_t len = tostring_len(val);
	string ret;
	char* ptr = (char*)ret.construct(len).ptr();
	tostring_ptr(ptr, val, len);
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x16744
movq %rax, %r15
movb $0xf, 0xf(%r14)
movb $0x0, (%r14)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4af2
movq (%r12), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x167c5
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: string tostringhex_inner<unsigned long long>(unsigned long long, unsigned long)
string tostringhex_inner(T val, size_t mindigits)
{
	uint8_t buf[16];
	uint8_t* bufend = buf+sizeof(buf);
	uint8_t* iter = bufend;
	do {
		*--iter = hexdigits[val%16];
		val /= 16;
	} while (val);
	while ((size_t)(bufend-iter) < mindigits) *--iter = '0';
	return string(bytesr(iter, bufend-iter));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
leaq 0x1232e(%rip), %rdi     # 0x28e60
movq %rcx, %r8
movl %ecx, %r9d
andl $0xf, %r9d
movb (%r9,%rdi), %r9b
movb %r9b, 0xf(%rsp,%rax)
shrq $0x4, %r8
decq %rax
cmpq $0xf, %rcx
movq %r8, %rcx
ja 0x16b35
addq %rax, %rsi
negq %rax
movq %rax, %rcx
cmpq %rdx, %rcx
jae 0x16b6f
movb $0x30, -0x1(%rsi)
decq %rsi
incq %rcx
jmp 0x16b5e
cmpq %rax, %rdx
cmovaq %rdx, %rax
movq %rbx, %rdi
movq %rax, %rdx
callq 0x146ba
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: bool fromstring_hex<unsigned char>(cstring, unsigned char&)
inline bool fromstring_hex(cstring s, Tu& out)
{
	const char * ptr = (char*)s.bytes().ptr();
	size_t len = s.length();
	
	if constexpr (sizeof(Tu) > sizeof(uintptr_t)) return fromstring_hex_real<Tu>(ptr, len, out);
	if constexpr (sizeof(Tu) == sizeof(uintptr_t)) return fromstring_hex_real<uintptr_t>(ptr, len, (uintptr_t&)out);
	uintptr_t tmp;
	bool ret = fromstring_hex_real<uintptr_t>(ptr, len, tmp);
	out = (Tu)tmp;
	return (ret && tmp == (uintptr_t)out);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
movq %rsi, %rcx
shrq $0x38, %rcx
xorl $0xf, %ecx
testq %rsi, %rsi
cmovnsq %rax, %rdi
movq %rsi, 0x8(%rax)
cmovsq %rsi, %rcx
movl %ecx, %esi
movq %rsp, %r14
movq %r14, %rdx
callq 0x16f74
movq (%r14), %rcx
movb %cl, (%rbx)
cmpq $0x100, %rcx            # imm = 0x100
setb %cl
andb %cl, %al
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: bool fromstring_int_inner<unsigned long>(char const*, char const*, unsigned long&)
bool fromstring_int_inner(const char * in, const char * end, Tu& out)
{
	out = 0;
	if (UNLIKELY(in == end)) return false;
	Tu t_max = (Tu)-1;
	while (in != end)
	{
		if (LIKELY(*in >= '0' && *in <= '9'))
		{
			if (UNLIKELY(out >= t_max/10))
			{
				if (out > t_max/10) return false;
				if (*in > (char)(t_max%10+'0')) return false;
			}
			out = out*10 + *in-'0';
		}
		else return false;
		in++;
	}
	return true;
}

// Assembly:
andq $0x0, (%rdx)
cmpq %rsi, %rdi
je 0x16eeb
movabsq $0x1999999999999998, %rcx # imm = 0x1999999999999998
xorl %r8d, %r8d
leaq 0x1(%rcx), %r9
cmpq %rsi, %rdi
sete %al
je 0x16eed
movzbl (%rdi), %r10d
leal -0x30(%r10), %r11d
cmpb $0x9, %r11b
ja 0x16eed
cmpq %rcx, %r8
ja 0x16ede
imulq $0xa, %r8, %rax
leaq (%r10,%rax), %r8
addq $-0x30, %r8
movq %r8, (%rdx)
incq %rdi
jmp 0x16eaf
cmpb $0x35, %r10b
ja 0x16eed
cmpq %r9, %r8
je 0x16eca
jmp 0x16eed
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: bool fromstring_int_real<unsigned long, long>(cstring, long&)
bool fromstring_int_real(cstring s, Ts& out)
{
	out = 0;
	const char * start = (char*)s.bytes().ptr();
	const char * end = start + s.length();
	
	if (UNLIKELY(start == end)) return false;
	bool neg = (*start == '-');
	start += neg;
	Tu tmp;
	
	if (UNLIKELY(!fromstring_int_inner<Tu>(start, end, tmp))) return false;
	
	if (neg)
	{
		out = (Ts)-tmp;
		return (out <= 0);
	}
	else
	{
		out = (Ts)tmp;
		return (out >= 0);
	}
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
andq $0x0, (%rdx)
movq %rsi, %rax
shrq $0x38, %rax
xorl $0xf, %eax
testq %rsi, %rsi
cmovsl %esi, %eax
testl %eax, %eax
je 0x16f70
movq %rdx, %rbx
testq %rsi, %rsi
leaq 0x8(%rsp), %rcx
cmovnsq %rcx, %rdi
movl %eax, %esi
addq %rdi, %rsi
movb (%rdi), %bpl
xorl %eax, %eax
cmpb $0x2d, %bpl
sete %al
addq %rdi, %rax
movq %rsp, %rdx
movq %rax, %rdi
callq 0x16e95
testb %al, %al
je 0x16f70
movq (%rsp), %rax
cmpb $0x2d, %bpl
jne 0x16f60
negq %rax
movq %rax, (%rbx)
testq %rax, %rax
setle %al
jmp 0x16f69
movq %rax, (%rbx)
testq %rax, %rax
setns %al
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
jmp 0x16f69
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/stringconv.cpp
// Function: bool fromstring_hex_real<unsigned long>(char const*, unsigned long, unsigned long&)
bool fromstring_hex_real(const char * s, size_t len, Tu& out)
{
	const char * start = s;
	const char * end = s + len;
	
	out = 0;
	if (UNLIKELY(start == end)) return false;
	while (start < end && *start == '0') start++;
	if (UNLIKELY(end-start > (ptrdiff_t)sizeof(Tu)*2)) return false;
	
	while (start != end)
	{
		out <<= 4;
		char upper = *start & ~0x20;
		if (*start >= '0' && *start <= '9') out += *start-'0';
		else if (upper >= 'A' && upper <= 'F') out += upper-'A'+10;
		else return false;
		start++;
	}
	return true;
}

// Assembly:
andq $0x0, (%rdx)
testq %rsi, %rsi
je 0x16ff4
leaq (%rdi,%rsi), %rax
xorl %ecx, %ecx
leaq (%rdi,%rcx), %r8
cmpq %rax, %r8
jae 0x16f97
cmpb $0x30, (%r8)
jne 0x16f97
incq %rcx
jmp 0x16f83
movq %rsi, %rax
subq %rcx, %rax
cmpq $0x10, %rax
jg 0x16ff4
xorl %r8d, %r8d
cmpq %rcx, %rsi
sete %al
je 0x16ff6
shlq $0x4, %r8
movq %r8, (%rdx)
movb (%rdi,%rcx), %r9b
leal -0x30(%r9), %r10d
cmpb $0x9, %r10b
ja 0x16fcc
movzbl %r10b, %eax
orq %rax, %r8
jmp 0x16fec
movl %r9d, %r10d
andb $-0x21, %r10b
addb $-0x41, %r10b
cmpb $0x5, %r10b
ja 0x16ff6
addb $0x9, %r9b
andb $0x1f, %r9b
movzbl %r9b, %eax
addq %rax, %r8
movq %r8, (%rdx)
incq %rcx
jmp 0x16fa6
xorl %eax, %eax
retq
nop