LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0xf0(%rbp)
movb %cl, %al
movq %rdi, %rcx
movq %rcx, -0xe8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movq %rdx, -0x70(%rbp)
movb %al, -0x71(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x70(%rbp), %rcx
movq %rcx, -0xd8(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x3da89
movq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x34(%rbp)
jmp 0x3da96
movq -0xd0(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0xd8(%rbp), %rax
movl -0x34(%rbp), %ecx
cmpq %rcx, %rax
jb 0x3db01
movq -0xf0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, -0x88(%rbp)
movq 0x8(%rcx), %rcx
movq %rcx, -0x80(%rbp)
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rcx
movq %rdx, -0x20(%rbp)
movq %rcx, -0x18(%rbp)
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x5c00
movq -0xf8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x37020
jmp 0x3dc2c
movq -0xe0(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x100(%rbp)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x3db4e
movq -0x100(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3db5b
movq -0x100(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, %ecx
movq -0x70(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x70(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x74b0
movq -0x70(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x1ce60
leaq -0x98(%rbp), %rdi
callq 0x7490
movq %rax, %rdi
movzbl -0x71(%rbp), %eax
movq -0x70(%rbp), %rdx
movzbl %al, %esi
callq 0x4170
movq -0x98(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x2ac10
movq -0xe0(%rbp), %rax
movq -0xf0(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %r8
callq 0xb860
leaq -0x98(%rbp), %rdi
callq 0x1d720
movq -0xe8(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x3ff00
movq -0x10(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
addq $0x30, %rdx
movb %dl, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, -0x1(%rax)
movq -0x10(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
jmp 0x3febc
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x7800
leaq -0x18(%rbp), %rdi
callq 0x6290
movq -0x40(%rbp), %rsi
movq %rax, %rdx
shlq %rdx
leaq -0x30(%rbp), %rdi
callq 0x7850
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x6290
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jae 0x40106
movq -0x38(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x62e0
movzbl (%rax), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x23ed6(%rip), %rax     # 0x63f70
movb (%rax,%rcx), %al
movb %al, -0x52(%rbp)
movq -0x38(%rbp), %rsi
shlq %rsi
addq $0x0, %rsi
leaq -0x30(%rbp), %rdi
callq 0x3dcc0
movb -0x52(%rbp), %cl
movb %cl, (%rax)
movq -0x38(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x62e0
movzbl (%rax), %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x23e9a(%rip), %rax     # 0x63f70
movb (%rax,%rcx), %al
movb %al, -0x51(%rbp)
movq -0x38(%rbp), %rsi
shlq %rsi
addq $0x1, %rsi
leaq -0x30(%rbp), %rdi
callq 0x3dcc0
movb -0x51(%rbp), %cl
movb %cl, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4005c
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x40119
movq -0x40(%rbp), %rdi
callq 0x5870
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x40188
movq -0x10(%rbp), %rcx
andq $0xf, %rcx
leaq 0x23e0b(%rip), %rax     # 0x63f70
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, -0x1(%rax)
movq -0x10(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x4014c
movq -0x18(%rbp), %rax
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdx, -0x80(%rbp)
movq %rdi, %rax
movq -0x80(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movq %rax, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, -0x40(%rbp)
callq 0x6290
shlq %rax
movq %rax, -0x70(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x40c06
movq -0x68(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x14(%rbp)
jmp 0x40c10
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x70(%rbp), %rax
movl -0x14(%rbp), %ecx
cmpq %rcx, %rax
je 0x40c25
movb $0x0, -0x21(%rbp)
jmp 0x40ccb
movb $0x1, -0x41(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x78(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
callq 0x6290
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jae 0x40cc3
movq -0x50(%rbp), %rax
shlq %rax
movl %eax, %esi
movq -0x50(%rbp), %rax
shlq %rax
addq $0x2, %rax
movl %eax, %edx
leaq -0x38(%rbp), %rdi
callq 0x9f90
movq -0x78(%rbp), %rdi
movq %rax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq -0x50(%rbp), %rsi
callq 0x3dcc0
movq %rax, %rdx
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x40210
andb $0x1, %al
movzbl %al, %ecx
movb -0x41(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x41(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x40c31
movb -0x41(%rbp), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3fd70
movq -0x40(%rbp), %rdi
movq %rax, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x7800
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x7850
leaq -0x38(%rbp), %rdi
callq 0x7490
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3ff10
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x40e77
movq -0x40(%rbp), %rdi
callq 0x5870
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movq %rdx, -0x70(%rbp)
leaq -0x80(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x68(%rbp), %rcx
andq $0xf, %rcx
leaq 0x22ffc(%rip), %rax     # 0x63f70
movb (%rax,%rcx), %cl
movq -0x90(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x90(%rbp)
movb %cl, -0x1(%rax)
movq -0x68(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x40f65
jmp 0x40fa4
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rcx
subq %rcx, %rax
cmpq -0x70(%rbp), %rax
jae 0x40fd6
movq -0x90(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x90(%rbp)
movb $0x30, -0x1(%rax)
jmp 0x40fa4
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq -0x90(%rbp), %rax
subq %rax, %rdx
leaq -0xa0(%rbp), %rdi
callq 0x5d70
movq -0xb0(%rbp), %rax
movq -0xa0(%rbp), %rdx
movq -0x98(%rbp), %rcx
movq %rdx, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x5c00
movq -0xd0(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, -0x58(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq %rdx, -0x28(%rbp)
movq %rcx, -0x20(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x62c0
movq %rax, -0xc0(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x6290
movq -0xc8(%rbp), %rdx
movq -0xc0(%rbp), %rcx
movq %rdx, -0x8(%rbp)
movq %rcx, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x36f10
movq -0xa8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Alcaro[P]bridges/arlib/stringconv.cpp
// Function: bool fromstring_uint<unsigned char>(cstring, unsigned char&)
inline bool fromstring_uint(cstring s, Tu& out)
{
	// funny wrappers to minimize number of fromstring_(u)int_real instantiations, for size reasons
	if constexpr (sizeof(Tu) > sizeof(uintptr_t)) return fromstring_uint_real<Tu>(s, out);
	if constexpr (sizeof(Tu) == sizeof(uintptr_t)) return fromstring_uint_real<uintptr_t>(s, (uintptr_t&)out);
	uintptr_t tmp;
	bool ret = fromstring_uint_real<uintptr_t>(s, tmp);
	out = (Tu)tmp;
	return (ret && tmp == (uintptr_t)out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x41db0
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
xorl %eax, %eax
testb $0x1, -0x21(%rbp)
movb %al, -0x39(%rbp)
je 0x41135
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
cmpq %rcx, %rax
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
// File: Alcaro[P]bridges/arlib/stringconv.cpp
// Function: bool fromstring_int<unsigned char, signed char>(cstring, signed char&)
inline bool fromstring_int(cstring s, Ts& out)
{
	if constexpr (sizeof(Ts) > sizeof(intptr_t)) return fromstring_int_real<Tu, Ts>(s, out);
	if constexpr (sizeof(Ts) == sizeof(intptr_t)) return fromstring_int_real<uintptr_t, intptr_t>(s, (intptr_t&)out);
	intptr_t tmp;
	bool ret = fromstring_int_real<uintptr_t, intptr_t>(s, tmp);
	out = (Ts)tmp;
	return (ret && tmp == (intptr_t)out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x42070
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
xorl %eax, %eax
testb $0x1, -0x21(%rbp)
movb %al, -0x39(%rbp)
je 0x411a6
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbq (%rcx), %rcx
cmpq %rcx, %rax
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x78(%rbp)
movq %rsi, -0x70(%rbp)
movq %rdx, -0x80(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq -0x48(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x41240
movq -0xb8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5cc0
movq -0xb8(%rbp), %rsi
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, %edx
leaq -0x48(%rbp), %rdi
callq 0x5ed0
jmp 0x41258
movq -0xb8(%rbp), %rax
movq (%rax), %rsi
movl 0x8(%rax), %eax
movl %eax, %edx
leaq -0x48(%rbp), %rdi
callq 0x5ed0
movups -0x48(%rbp), %xmm0
movaps %xmm0, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x98(%rbp)
movq %rax, -0x90(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x62c0
movq %rax, -0x88(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x412d3
movq -0xc0(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x5c(%rbp)
jmp 0x412e0
movq -0xc0(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq %rax, -0xa0(%rbp)
movq -0x88(%rbp), %rdi
movq -0xa0(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x422b0
andb $0x1, %al
movb %al, -0xa9(%rbp)
movq -0xa8(%rbp), %rax
movb %al, %cl
movq -0x80(%rbp), %rax
movb %cl, (%rax)
xorl %eax, %eax
testb $0x1, -0xa9(%rbp)
movb %al, -0xc1(%rbp)
je 0x41346
movq -0xa8(%rbp), %rax
movq -0x80(%rbp), %rcx
movzbl (%rcx), %ecx
cmpq %rcx, %rax
sete %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Alcaro[P]bridges/arlib/stringconv.cpp
// Function: bool fromstring_hex<unsigned char>(char const*, unsigned long, unsigned char&)
inline bool fromstring_hex(const char * s, size_t len, Tu& out)
{
	if constexpr (sizeof(Tu) > sizeof(uintptr_t)) return fromstring_hex_real<Tu>(s, len, out);
	if constexpr (sizeof(Tu) == sizeof(uintptr_t)) return fromstring_hex_real<uintptr_t>(s, len, (uintptr_t&)out);
	uintptr_t tmp;
	bool ret = fromstring_hex_real<uintptr_t>(s, len, tmp);
	out = (Tu)tmp;
	return (ret && tmp == (uintptr_t)out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x422b0
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
xorl %eax, %eax
testb $0x1, -0x21(%rbp)
movb %al, -0x22(%rbp)
je 0x413b5
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
cmpq %rcx, %rax
sete %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x41f50
jmp 0x41f59
movb $0x0, -0x1(%rbp)
jmp 0x42066
movq $-0x1, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x42062
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x29(%rbp)
jl 0x41f90
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x41fa0
jmp 0x4204b
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
setae %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x41fd0
jmp 0x4202b
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jbe 0x41ffb
movb $0x0, -0x1(%rbp)
jmp 0x42066
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movl -0x44(%rbp), %eax
addq $0x30, %rdx
movb %dl, %cl
movsbl %cl, %ecx
cmpl %ecx, %eax
jle 0x42029
movb $0x0, -0x1(%rbp)
jmp 0x42066
jmp 0x4202b
movq -0x20(%rbp), %rax
imulq $0xa, (%rax), %rcx
movq -0x10(%rbp), %rax
movsbq (%rax), %rax
addq %rax, %rcx
subq $0x30, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x42051
movb $0x0, -0x1(%rbp)
jmp 0x42066
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x41f61
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x80(%rbp)
movq %rsi, -0x78(%rbp)
movq %rdx, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq $0x0, (%rax)
leaq -0x80(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq -0x48(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x42101
movq -0xc0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5cc0
movq -0xc0(%rbp), %rsi
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, %edx
leaq -0x48(%rbp), %rdi
callq 0x5ed0
jmp 0x42119
movq -0xc0(%rbp), %rax
movq (%rax), %rsi
movl 0x8(%rax), %eax
movl %eax, %edx
leaq -0x48(%rbp), %rdi
callq 0x5ed0
movups -0x48(%rbp), %xmm0
movaps %xmm0, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0xa0(%rbp)
movq %rax, -0x98(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x62c0
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x421a2
movq -0xc8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x5c(%rbp)
jmp 0x421af
movq -0xc8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0xd0(%rbp), %rax
movl -0x5c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0x90(%rbp), %rax
cmpq -0xa8(%rbp), %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x421de
jmp 0x421e7
movb $0x0, -0x69(%rbp)
jmp 0x422a1
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
andb $0x1, %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x90(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x41f20
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x42244
jmp 0x4224a
movb $0x0, -0x69(%rbp)
jmp 0x422a1
testb $0x1, -0xa9(%rbp)
je 0x4227d
xorl %eax, %eax
movl %eax, %ecx
subq -0xb8(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, (%rax)
movq -0x88(%rbp), %rax
cmpq $0x0, (%rax)
setle %al
andb $0x1, %al
movb %al, -0x69(%rbp)
jmp 0x422a1
movq -0xb8(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, (%rax)
movq -0x88(%rbp), %rax
cmpq $0x0, (%rax)
setge %al
andb $0x1, %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x422f4
jmp 0x422fd
movb $0x0, -0x1(%rbp)
jmp 0x423fe
jmp 0x422ff
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x32(%rbp)
jae 0x4231e
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0x42327
jmp 0x42335
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x422ff
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
cmpq $0x10, %rax
setg %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x42351
jmp 0x4235a
movb $0x0, -0x1(%rbp)
jmp 0x423fe
jmp 0x4235c
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x423fa
movq -0x20(%rbp), %rax
movq (%rax), %rcx
shlq $0x4, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
andl $-0x21, %eax
movb %al, -0x31(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x423b6
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x423b6
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movslq %eax, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x423e9
movsbl -0x31(%rbp), %eax
cmpl $0x41, %eax
jl 0x423e1
movsbl -0x31(%rbp), %eax
cmpl $0x46, %eax
jg 0x423e1
movsbl -0x31(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movslq %eax, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x423e7
movb $0x0, -0x1(%rbp)
jmp 0x423fe
jmp 0x423e9
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4235c
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: Alcaro[P]bridges/arlib/strtoken.cpp
// Function: strtoken(char const*, char const*, char)
bool strtoken(const char * haystack, const char * needle, char separator)
{
	//token lists are annoyingly complex to parse
	//I suspect 'people using fixed-size buffers, then extension list grows and app explodes'
	// isn't the only reason GL_EXTENSIONS string was deprecated from OpenGL
	size_t nlen = strlen(needle);
	
	while (true)
	{
		const char * found = strstr(haystack, needle);
		if (!found) break;
		
		if ((found==haystack || found[-1]==separator) && // ensure the match is the start of a word
				(found[nlen]==separator || found[nlen]=='\0')) // ensure the match is the end of a word
		{
			return true;
		}
		
		haystack = strchr(found, separator); // try again, could've found GL_foobar_limited when looking for GL_foobar
		if (!haystack) return false;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rdi
callq 0x40f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x40b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x4244c
jmp 0x424b1
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x42466
movq -0x30(%rbp), %rax
movsbl -0x1(%rax), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0x42491
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
je 0x4248b
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x42491
movb $0x1, -0x1(%rbp)
jmp 0x424b5
movq -0x30(%rbp), %rdi
movsbl -0x19(%rbp), %esi
callq 0x40e0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x424af
movb $0x0, -0x1(%rbp)
jmp 0x424b5
jmp 0x42432
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
// File: Alcaro[P]bridges/arlib/thread/linux-thr.cpp
// Function: runonce::run(function<void ()>)
void runonce::run(function<void()> fn)
{
	int st = lock_read<lock_acq>(&futex);
	if (LIKELY(st == st_done)) return;
	if (st == st_uninit)
	{
		st = lock_cmpxchg<lock_loose, lock_loose>(&futex, st_uninit, st_busy);
		if (st == st_uninit)
		{
			fn();
			st = lock_xchg<lock_rel>(&futex, st_done); // generic is acqrel, to read the linked list, but that's not needed here
			if (st != st_busy)
				futex_wake_all(&futex);
			return;
		}
		else if (st == st_done) return;
	}
	
	// don't bother spinning, just sleep immediately
	
	lock_cmpxchg<lock_loose, lock_loose>(&futex, st_busy, st_busy_waiters); // ignore whether this succeeds
	do { futex_sleep_if_eq(&futex, st_busy_waiters); }
	while (lock_read<lock_acq>(&futex) == st_busy_waiters);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x42900
movl %eax, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x427f5
jmp 0x427fa
jmp 0x42883
cmpl $0x0, -0x14(%rbp)
jne 0x42850
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x42920
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x42844
movq -0x28(%rbp), %rdi
callq 0x13cb0
movq -0x20(%rbp), %rdi
movl $0x3, %esi
callq 0x42970
movl %eax, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
je 0x42842
movq -0x20(%rbp), %rdi
callq 0x42890
jmp 0x42883
cmpl $0x3, -0x14(%rbp)
jne 0x4284c
jmp 0x42883
jmp 0x4284e
jmp 0x42850
movq -0x20(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x42920
movq -0x20(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x428c0
movq -0x20(%rbp), %rdi
callq 0x42900
cmpl $0x2, %eax
je 0x42863
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/thread/pthread-thr.cpp
// Function: thread_create(function<void ()>&&, priority_t)
void thread_create(function<void()>&& start, priority_t pri)
{
	pthread_attr_t attr;
	if (pthread_attr_init(&attr) < 0) abort();
	
	sched_param sched;
	if (pthread_attr_getschedparam(&attr, &sched) >= 0)
	{
		static const int8_t prios[] = { 0, -10, 10, 19 };
		sched.sched_priority = prios[pri];
		pthread_attr_setschedparam(&attr, &sched);
	}
	
	thread_create_inner(std::move(start), &attr);
	pthread_attr_destroy(&attr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4440
cmpl $0x0, %eax
jge 0x429c2
callq 0x4180
leaq -0x48(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
callq 0x4700
cmpl $0x0, %eax
jl 0x429f4
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x215a2(%rip), %rax     # 0x63f82
movsbl (%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
callq 0x4160
movq -0x8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x42a10
leaq -0x48(%rbp), %rdi
callq 0x4620
addq $0x50, %rsp
popq %rbp
retq
// File: Alcaro[P]bridges/arlib/thread/pthread-thr.cpp
// Function: thread_create_inner(function<void ()>&&, pthread_attr_t*)
static void thread_create_inner(function<void()>&& start, pthread_attr_t* attr)
{
	threaddata_pthread* thdat = xmalloc(sizeof(threaddata_pthread));
	new(&thdat->func) function<void()>(std::move(start));
	
	pthread_t thread;
	if (pthread_create(&thread, attr, threadproc, thdat) != 0) abort();
	pthread_detach(thread);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x18, %edi
callq 0x2d5e0
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x42b60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x42b80
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq -0x28(%rbp), %rdi
leaq 0xa5(%rip), %rdx        # 0x42b00
callq 0x46a0
cmpl $0x0, %eax
je 0x42a6a
callq 0x4180
movq -0x28(%rbp), %rdi
callq 0x4220
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/thread/pthread-thr.cpp
// Function: mutex_rec::mutex_rec()
mutex_rec::mutex_rec() : mutex(noinit())
{
	pthread_mutexattr_t attr;
	pthread_mutexattr_init(&attr);
	pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
	pthread_mutex_init(&mut, &attr);
	pthread_mutexattr_destroy(&attr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x42b50
leaq -0x10(%rbp), %rdi
callq 0x4060
leaq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x4530
movq -0x18(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x4550
leaq -0x10(%rbp), %rdi
callq 0x4540
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/thread/pthread-thr.cpp
// Function: threadproc(void*)
static void * threadproc(void * userdata)
{
	threaddata_pthread* thdat = (threaddata_pthread*)userdata;
	function<void()> func = std::move(thdat->func);
	free(thdat);
	func();
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x42b80
movq -0x10(%rbp), %rdi
callq 0x4420
leaq -0x28(%rbp), %rdi
callq 0x13cb0
leaq -0x28(%rbp), %rdi
callq 0x141d0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: zip::getendofcdr(arrayview<unsigned char>)
zip::endofcdr* zip::getendofcdr(arrayview<uint8_t> data)
{
	//must be somewhere in zip::, they're private
	static_assert(sizeof(zip::locfhead)==30);
	static_assert(sizeof(zip::centdirrec)==46);
	static_assert(sizeof(zip::endofcdr)==22);
	
	for (size_t commentlen=0;commentlen<65536;commentlen++)
	{
		if (data.size() < sizeof(endofcdr)+commentlen) return nullptr;
		
		size_t trystart = data.size()-sizeof(endofcdr)-commentlen;
		endofcdr* ret = (endofcdr*)data.slice(trystart, sizeof(endofcdr)).ptr();
		if (ret->signature == ret->signature_expected)
		{
			if (ret->diskid_this != 0) return nullptr;
			return ret;
		}
	}
	
	return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x10000, -0x28(%rbp)   # imm = 0x10000
jae 0x42dd5
leaq -0x18(%rbp), %rdi
callq 0x6290
movq -0x28(%rbp), %rcx
addq $0x16, %rcx
cmpq %rcx, %rax
jae 0x42d4d
movq $0x0, -0x8(%rbp)
jmp 0x42ddd
leaq -0x18(%rbp), %rdi
callq 0x6290
subq $0x16, %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x18(%rbp), %rdi
movl $0x16, %edx
callq 0xc5c0
movq %rax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x62c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x45940
cmpl $0x6054b50, %eax        # imm = 0x6054B50
jne 0x42dc2
movq -0x38(%rbp), %rdi
addq $0x4, %rdi
callq 0x45950
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x42db8
movq $0x0, -0x8(%rbp)
jmp 0x42ddd
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x42ddd
jmp 0x42dc4
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x42d1c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: zip::getcdr(arrayview<unsigned char>, zip::endofcdr*)
zip::centdirrec* zip::getcdr(arrayview<uint8_t> data, endofcdr* end)
{
	if (end->cdrstart_fromdisk+sizeof(centdirrec) > data.size()) return nullptr;
	centdirrec* ret = (centdirrec*)data.slice(end->cdrstart_fromdisk, sizeof(centdirrec)).ptr();
	if (ret->signature != ret->signature_expected) return nullptr;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
callq 0x45940
movl %eax, %eax
addq $0x2e, %rax
movq %rax, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x6290
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jbe 0x42e3e
movq $0x0, -0x8(%rbp)
jmp 0x42e94
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
callq 0x45940
movl %eax, %eax
movl %eax, %esi
leaq -0x18(%rbp), %rdi
movl $0x2e, %edx
callq 0xc5c0
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x62c0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x45940
cmpl $0x2014b50, %eax        # imm = 0x2014B50
je 0x42e8c
movq $0x0, -0x8(%rbp)
jmp 0x42e94
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: zip::nextcdr(arrayview<unsigned char>, zip::centdirrec*)
zip::centdirrec* zip::nextcdr(arrayview<uint8_t> data, centdirrec* cdr)
{
	size_t start = (uint8_t*)cdr - data.ptr();
	size_t len = sizeof(centdirrec) + cdr->len_fname + cdr->len_exfield + cdr->len_fcomment;
	if (start+len+sizeof(centdirrec) > data.size()) return nullptr;
	
	centdirrec* next = (centdirrec*)data.slice(start+len, sizeof(centdirrec)).ptr();
	if (next->signature != next->signature_expected) return nullptr;
	return next;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x62c0
movq %rax, %rcx
movq -0x70(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
addq $0x1c, %rdi
callq 0x45950
movzwl %ax, %eax
addq $0x2e, %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
addq $0x1e, %rdi
callq 0x45950
movw %ax, %cx
movq -0x68(%rbp), %rax
movzwl %cx, %ecx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x45950
movw %ax, %cx
movq -0x60(%rbp), %rax
movzwl %cx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
addq $0x2e, %rax
movq %rax, -0x58(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x6290
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
jbe 0x42f5a
movq $0x0, -0x8(%rbp)
jmp 0x42fa7
movq -0x30(%rbp), %rsi
addq -0x38(%rbp), %rsi
leaq -0x18(%rbp), %rdi
movl $0x2e, %edx
callq 0xc5c0
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x62c0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x45940
cmpl $0x2014b50, %eax        # imm = 0x2014B50
je 0x42f9f
movq $0x0, -0x8(%rbp)
jmp 0x42fa7
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: zip::geth(arrayview<unsigned char>, zip::centdirrec*)
zip::locfhead* zip::geth(arrayview<uint8_t> data, centdirrec* cdr)
{
	if (cdr->header_start+sizeof(locfhead) > data.size()) return nullptr;
	locfhead* ret = (locfhead*)data.slice(cdr->header_start, sizeof(locfhead)).ptr();
	if (ret->signature != ret->signature_expected) return nullptr;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x2a, %rdi
callq 0x45940
movl %eax, %eax
addq $0x1e, %rax
movq %rax, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x6290
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jbe 0x4300e
movq $0x0, -0x8(%rbp)
jmp 0x43064
movq -0x28(%rbp), %rdi
addq $0x2a, %rdi
callq 0x45940
movl %eax, %eax
movl %eax, %esi
leaq -0x18(%rbp), %rdi
movl $0x1e, %edx
callq 0xc5c0
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x62c0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x45940
cmpl $0x4034b50, %eax        # imm = 0x4034B50
je 0x4305c
movq $0x0, -0x8(%rbp)
jmp 0x43064
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: zip::fh_data(arrayview<unsigned char>, zip::locfhead*, zip::centdirrec*)
arrayview<uint8_t> zip::fh_data(arrayview<uint8_t> data, locfhead* fh, centdirrec* cdr)
{
	size_t start = (uint8_t*)fh - data.ptr();
	size_t headlen = sizeof(locfhead) + fh->len_fname + fh->len_exfield;
	if (start+headlen > data.size()) return nullptr;
	return data.slice(start+headlen, cdr->size_comp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x62c0
movq %rax, %rcx
movq -0x60(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1a, %rdi
callq 0x45950
movzwl %ax, %eax
addq $0x1e, %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1c, %rdi
callq 0x45950
movw %ax, %cx
movq -0x58(%rbp), %rax
movzwl %cx, %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x6290
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jbe 0x43e21
leaq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x115f0
jmp 0x43e53
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rdi
addq $0x14, %rdi
callq 0x45940
movq -0x68(%rbp), %rsi
movl %eax, %eax
movl %eax, %edx
leaq -0x20(%rbp), %rdi
callq 0xc5c0
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: fromdosdate(unsigned int)
static time_t fromdosdate(uint32_t date)
{
	if (!date) return 0;
	
	struct tm tp = {
		/*tm_sec*/  (int)((date>>0)&31)<<1,
		/*tm_min*/  (int)(date>>5)&63,
		/*tm_hour*/ (int)(date>>11)&31,
		/*tm_mday*/ (int)(date>>16>>0)&31,
		/*tm_mon*/  (int)((date>>16>>5)&15) - 1,
		/*tm_year*/ (int)(date>>16>>9) + 1980 - 1900,
		/*tm_wday*/ 0,
		/*tm_yday*/ 0,
		/*tm_is_dst*/ false,
	};
	return timegm(&tp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x4451e
movq $0x0, -0x8(%rbp)
jmp 0x445ad
movl -0xc(%rbp), %eax
shrl $0x0, %eax
andl $0x1f, %eax
shll %eax
movl %eax, -0x48(%rbp)
movl -0xc(%rbp), %eax
shrl $0x5, %eax
andl $0x3f, %eax
movl %eax, -0x44(%rbp)
movl -0xc(%rbp), %eax
shrl $0xb, %eax
andl $0x1f, %eax
movl %eax, -0x40(%rbp)
movl -0xc(%rbp), %eax
shrl $0x10, %eax
shrl $0x0, %eax
andl $0x1f, %eax
movl %eax, -0x3c(%rbp)
movl -0xc(%rbp), %eax
shrl $0x10, %eax
shrl $0x5, %eax
andl $0xf, %eax
subl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0xc(%rbp), %eax
shrl $0x10, %eax
shrl $0x9, %eax
addl $0x7bc, %eax            # imm = 0x7BC
subl $0x76c, %eax            # imm = 0x76C
movl %eax, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4650
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: zip::replace_idx(unsigned long, arrayview<unsigned char>, long)
void zip::replace_idx(size_t id, arrayview<uint8_t> data, time_t date)
{
	if (!data)
	{
		filenames.remove(id);
		filedat.remove(id);
		return;
	}
	
	file& f = filedat[id];
	f.decomplen = data.size();
	f.crc32 = crc32(data);
	if (date) f.dosdate = todosdate(date); // else leave unchanged, or leave as 0
	
	array<uint8_t> comp;
	comp.resize(data.size());
	size_t complen = tdefl_compress_mem_to_mem(comp.ptr(), comp.size(), data.ptr(), data.size(), TDEFL_DEFAULT_MAX_PROBES);
	if (complen != 0 && complen < data.size())
	{
		comp.resize(complen);
		f.method = 8;
		f.data = std::move(comp);
	}
	else
	{
		f.method = 0;
		f.data = data;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x10(%rbp), %rdi
callq 0xc600
testb $0x1, %al
jne 0x44617
movq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x27a40
movq -0x80(%rbp), %rdi
addq $0x10, %rdi
movq -0x20(%rbp), %rsi
callq 0x45a00
jmp 0x4479c
movq -0x80(%rbp), %rdi
addq $0x10, %rdi
movq -0x20(%rbp), %rsi
callq 0x45a80
movq %rax, -0x30(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x6290
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x43a40
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x18(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x4467c
movq -0x28(%rbp), %rdi
callq 0x447b0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x1c(%rax)
leaq -0x50(%rbp), %rdi
callq 0x74b0
leaq -0x10(%rbp), %rdi
callq 0x6290
movq %rax, %rsi
leaq -0x50(%rbp), %rdi
callq 0x1ce60
leaq -0x50(%rbp), %rdi
callq 0x7490
movq %rax, -0x98(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x6290
movq %rax, -0x90(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x62c0
movq %rax, -0x88(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x6290
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %rax, %rcx
movl $0x80, %r8d
callq 0x60260
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x44764
movq -0x58(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x6290
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x44764
movq -0x58(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x1ce60
movq -0x30(%rbp), %rax
movw $0x8, 0x4(%rax)
leaq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1d320
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
leaq -0x68(%rbp), %rsi
callq 0x1d440
leaq -0x68(%rbp), %rdi
callq 0x1d720
jmp 0x44793
movq -0x30(%rbp), %rax
movw $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x1d470
leaq -0x50(%rbp), %rdi
callq 0x1d720
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: todosdate(long)
static uint32_t todosdate(time_t date)
{
	if (!date) return 0;
	
	struct tm tp;
	gmtime_r(&date, &tp);
	
	return (tp.tm_year-1980+1900)<<9<<16 |
	       (tp.tm_mon+1)<<5<<16 |
	       tp.tm_mday<<0<<16 |
	       tp.tm_hour<<11 |
	       tp.tm_min<<5 |
	       tp.tm_sec>>1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x447cc
movl $0x0, -0x4(%rbp)
jmp 0x4481f
leaq -0x10(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4710
movl -0x34(%rbp), %eax
subl $0x7bc, %eax            # imm = 0x7BC
addl $0x76c, %eax            # imm = 0x76C
shll $0x9, %eax
shll $0x10, %eax
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
shll $0x5, %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl -0x3c(%rbp), %ecx
shll $0x0, %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl -0x40(%rbp), %ecx
shll $0xb, %ecx
orl %ecx, %eax
movl -0x44(%rbp), %ecx
shll $0x5, %ecx
orl %ecx, %eax
movl -0x48(%rbp), %ecx
sarl %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Alcaro[P]bridges/arlib/zip.cpp
// Function: zip::write(cstring, arrayview<unsigned char>, long)
void zip::write(cstring name, arrayview<uint8_t> data, time_t date)
{
	size_t id = find_file(name);
	
	if (id == (size_t)-1)
	{
		if (!data) return;
		
		id = filenames.size();
		filenames.append(name);
		filedat.append();
		if (!date) date = time(NULL);
	}
	
	replace_idx(id, data, date);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rsi, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x38(%rbp)
movq %r8, -0x30(%rbp)
movq %rdi, -0x40(%rbp)
movq %r9, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq %rdi, -0x98(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x44130
movq %rax, -0x50(%rbp)
cmpq $-0x1, -0x50(%rbp)
jne 0x44933
leaq -0x38(%rbp), %rdi
callq 0xc600
testb $0x1, %al
jne 0x4489c
jmp 0x4496b
movq -0x98(%rbp), %rdi
callq 0x27270
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq %rax, -0x8(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x5c00
movq -0xa0(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x37020
movq -0x98(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x279c0
leaq -0x70(%rbp), %rdi
callq 0x5870
movq -0x98(%rbp), %rdi
addq $0x10, %rdi
callq 0x45aa0
cmpq $0x0, -0x48(%rbp)
jne 0x44931
xorl %eax, %eax
movl %eax, %edi
callq 0x4310
movq %rax, -0x48(%rbp)
jmp 0x44933
movq -0x98(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %r8
movq -0x90(%rbp), %rdx
movq -0x88(%rbp), %rcx
callq 0x445c0
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)