LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Alcaro[P]bridges/arlib/dylib.cpp
// Function: dylib::sym_multi(void (**)(), char const*)
bool dylib::sym_multi(funcptr* out, const char * names)
{
	bool all = true;
	
	while (*names)
	{
		*out = this->sym_func(names);
		if (!*out) all = false;
		
		out++;
		names += strlen(names)+1;
	}
	
	return all;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x1, -0x19(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x104c1
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x104d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1049e
movb $0x0, -0x19(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x40f0
addq $0x1, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x10470
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/file-cwd.cpp
// Function: (anonymous namespace)::cwd_finder::cwd_finder()
cwd_finder() // can't oninit() to initialize a string, globals' ctors' order is implementation defined and often wrong
	{
#if defined(_WIN32)
		char chars[PATH_MAX];
		GetCurrentDirectory(sizeof(chars), chars);
		char* iter = chars;
		while (*iter)
		{
			if (*iter == '\\') *iter = '/';
			iter++;
		}
		if (iter[-1] != '/') *iter++ = '/';
		path = cstring(bytesr((uint8_t*)chars, iter-chars));
#elif defined(__linux__)
		path = string::create_usurp(getcwd(NULL, 0));
		if (path[path.length()-1] != '/')
			path += "/";
#else
#error TODO
#endif
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x7800
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x4150
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x37760
movq -0x88(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x10670
leaq -0x78(%rbp), %rdi
callq 0x5870
movq -0x88(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x105a7
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x34(%rbp)
jmp 0x105b1
movq -0x80(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x88(%rbp), %rcx
movl -0x34(%rbp), %eax
subl $0x1, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x90(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x10602
movq -0x90(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x10610
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x10634
movq -0x88(%rbp), %rdi
leaq 0x539ab(%rip), %rsi     # 0x63fda
callq 0x5ce0
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file::open_impl_fs(cstring, file::mode)
file::impl* file::open_impl_fs(cstring filename, mode m)
{
	static const int flags[] = { O_RDONLY, O_RDWR|O_CREAT, O_RDWR, O_RDWR|O_CREAT|O_TRUNC, O_RDWR|O_CREAT|O_EXCL };
	int fd = ::open(filename.c_str(), flags[m]|O_CLOEXEC, 0644);
	if (fd<0) return NULL;
	
	struct stat st;
	fstat(fd, &st);
	if (!S_ISREG(st.st_mode)) // no opening directories
	{
		::close(fd);
		return NULL;
	}
	
	return new file_unix(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x1c(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x113f0
leaq -0x30(%rbp), %rdi
callq 0x11520
movq %rax, %rdi
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x52a25(%rip), %rax     # 0x63450
movl (%rax,%rcx,4), %esi
orl $0x80000, %esi          # imm = 0x80000
movl $0x1a4, %edx            # imm = 0x1A4
movb $0x0, %al
callq 0x4230
movl %eax, -0xc4(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x11540
movl -0xc4(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x10a68
movq $0x0, -0x8(%rbp)
jmp 0x10ac2
movl -0x20(%rbp), %edi
leaq -0xc0(%rbp), %rsi
callq 0x4630
movl -0xa8(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0x10a9b
movl -0x20(%rbp), %edi
callq 0x46f0
movq $0x0, -0x8(%rbp)
jmp 0x10ac2
movl $0x10, %edi
callq 0x4340
movq %rax, %rdi
movq %rdi, -0xd0(%rbp)
movl -0x20(%rbp), %esi
callq 0x10ad0
movq -0xd0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nop
// File: Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file::mkdir_fs(cstring)
bool file::mkdir_fs(cstring filename)
{
	int ret = ::mkdir(filename.c_str(), 0755);
	if (ret==0) return true;
	if (ret==-1 && errno==EEXIST)
	{
		struct stat st;
		if (lstat(filename.c_str(), &st) < 0) return false;
		return (S_ISDIR(st.st_mode));
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x113f0
leaq -0x30(%rbp), %rdi
callq 0x11520
movq %rax, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x4110
movl %eax, -0xd4(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x11540
movl -0xd4(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x10b6a
movb $0x1, -0x1(%rbp)
jmp 0x10be6
cmpl $-0x1, -0x1c(%rbp)
jne 0x10be2
callq 0x4040
cmpl $0x11, (%rax)
jne 0x10be2
leaq -0xd0(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x113f0
leaq -0xd0(%rbp), %rdi
callq 0x11520
movq %rax, %rdi
leaq -0xc0(%rbp), %rsi
callq 0x46e0
movl %eax, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x11540
movl -0xd8(%rbp), %eax
cmpl $0x0, %eax
jge 0x10bc8
movb $0x0, -0x1(%rbp)
jmp 0x10be6
movl -0xa8(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x10be6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file::listdir(cstring)
array<string> file::listdir(cstring path)
{
	DIR* dir = opendir(path.c_str());
	if (!dir) return NULL;
	
	array<string> ret;
	dirent* ent;
	while ((ent = readdir(dir)))
	{
		// don't use strcmp, its constant overhead is suboptimal at best
		if (UNLIKELY(ent->d_name[0] == '.'))
		{
			if (ent->d_name[1] == '\0') continue;
			if (ent->d_name[1] == '.' && ent->d_name[2] == '\0') continue;
		}
		
		string childpath = path + ent->d_name;
		if (ent->d_type == DT_UNKNOWN)
		{
			struct stat st;
			stat(childpath, &st);
			if (S_ISDIR(st.st_mode)) childpath += "/";
		}
		else if (ent->d_type == DT_DIR) childpath += "/";
		ret.append(std::move(childpath));
	}
	closedir(dir);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x108(%rbp)
movq %rdi, %rax
movq %rax, -0x100(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x113f0
leaq -0x30(%rbp), %rdi
callq 0x11520
movq %rax, %rdi
callq 0x4560
movq %rax, -0xf8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x11540
movq -0xf8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x10cfd
movq -0x108(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x27c40
jmp 0x10e39
movq -0x108(%rbp), %rdi
movb $0x0, -0x31(%rbp)
callq 0x11570
movq -0x20(%rbp), %rdi
callq 0x4570
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x10e18
movq -0x40(%rbp), %rax
movsbl 0x13(%rax), %eax
cmpl $0x2e, %eax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x10d3c
jmp 0x10d69
movq -0x40(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
jne 0x10d4b
jmp 0x10d0d
movq -0x40(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x2e, %eax
jne 0x10d67
movq -0x40(%rbp), %rax
movsbl 0x15(%rax), %eax
cmpl $0x0, %eax
jne 0x10d67
jmp 0x10d0d
jmp 0x10d69
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rcx
addq $0x13, %rcx
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0xb7d0
movq -0x40(%rbp), %rax
movzbl 0x12(%rax), %eax
cmpl $0x0, %eax
jne 0x10ddb
leaq -0x50(%rbp), %rdi
callq 0x5660
movq %rax, %rdi
leaq -0xf0(%rbp), %rsi
callq 0x42f0
movl -0xd8(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x10dd9
leaq -0x50(%rbp), %rdi
leaq 0x53206(%rip), %rsi     # 0x63fda
callq 0x5ce0
jmp 0x10dfa
movq -0x40(%rbp), %rax
movzbl 0x12(%rax), %eax
cmpl $0x4, %eax
jne 0x10df8
leaq -0x50(%rbp), %rdi
leaq 0x531e7(%rip), %rsi     # 0x63fda
callq 0x5ce0
jmp 0x10dfa
movq -0x108(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x279c0
leaq -0x50(%rbp), %rdi
callq 0x5870
jmp 0x10d0d
movq -0x20(%rbp), %rdi
callq 0x45e0
movb $0x1, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x10e37
movq -0x108(%rbp), %rdi
callq 0x281e0
jmp 0x10e39
movq -0x100(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file2::open(cstrnul, file2::mode)
bool file2::open(cstrnul filename, mode m)
{
	reset();
	static const int flags[] = {
		O_RDONLY              |O_CLOEXEC, // m_read
		O_RDWR|O_CREAT        |O_CLOEXEC, // m_write
		O_RDWR                |O_CLOEXEC, // m_wr_existing
		O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, // m_replace
		O_RDWR|O_CREAT|O_EXCL |O_CLOEXEC  // m_create_excl
	};
	fd = ::open(filename, flags[m&7], 0644);
	if (m & m_exclusive)
	{
		int op;
		if ((m&7) == m_read)
			op = LOCK_SH|LOCK_NB;
		else
			op = LOCK_EX|LOCK_NB;
		if (flock(fd, op) < 0)
			close();
	}
	
	return (fd >= 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x11590
leaq -0x10(%rbp), %rdi
callq 0x56c0
movq %rax, %rdi
movl -0x1c(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
leaq 0x525e0(%rip), %rax     # 0x63470
movl (%rax,%rcx,4), %esi
movl $0x1a4, %edx            # imm = 0x1A4
movb $0x0, %al
callq 0x4230
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x10eeb
movl -0x1c(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x10ec6
movl $0x5, -0x20(%rbp)
jmp 0x10ecd
movl $0x6, -0x20(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %edi
movl -0x20(%rbp), %esi
callq 0x46c0
cmpl $0x0, %eax
jge 0x10ee9
movq -0x28(%rbp), %rdi
callq 0x115d0
jmp 0x10eeb
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
setge %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/file-unix.cpp
// Function: file2::mmap_t::map(arrayview<unsigned char>&, file2&, bool)
void file2::mmap_t::map(bytesr& by, file2& src, bool writable)
{
	by = nullptr;
	
	size_t size = src.size();
	if (!size) return;
	
	uint8_t * data = (uint8_t*)::mmap(NULL, size, PROT_READ | (writable * PROT_WRITE), MAP_SHARED, src.fd, 0);
	if (data == MAP_FAILED) return;
	
	by = { data, size };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x115f0
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x11620
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x10f4d
jmp 0x10fae
movq -0x30(%rbp), %rsi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
shll %edx
orl $0x1, %edx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %ecx
movq %r9, %rdi
callq 0x4670
movq %rax, -0x38(%rbp)
movq $-0x1, %rax
cmpq %rax, -0x38(%rbp)
jne 0x10f8a
jmp 0x10fae
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x5d70
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/file-unix.cpp
// Function: (anonymous namespace)::file_unix::mmap(bool, unsigned long, unsigned long)
arrayvieww<uint8_t> mmap(bool writable, size_t start, size_t len)
		{
			//TODO: for small things (64KB? 1MB?), use malloc, it's faster
			//http://lkml.iu.edu/hypermail/linux/kernel/0004.0/0728.html
			size_t offset = start % pagesize;
			void* data = ::mmap(NULL, len+offset, writable ? PROT_WRITE|PROT_READ : PROT_READ, MAP_SHARED, this->fd, start-offset);
			if (data == MAP_FAILED) return NULL;
			return arrayvieww<uint8_t>((uint8_t*)data+offset, len);
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movb %dl, %al
movq %rdi, %rdx
movq %rdx, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
andq $0xfff, %rcx            # imm = 0xFFF
movq %rcx, -0x30(%rbp)
movq -0x28(%rbp), %rsi
addq -0x30(%rbp), %rsi
movb -0x11(%rbp), %dil
movl $0x1, %edx
movl $0x3, %ecx
testb $0x1, %dil
cmovnel %ecx, %edx
movl 0x8(%rax), %r8d
movq -0x20(%rbp), %r9
subq -0x30(%rbp), %r9
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %ecx
callq 0x4670
movq %rax, -0x38(%rbp)
movq $-0x1, %rax
cmpq %rax, -0x38(%rbp)
jne 0x113c4
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11880
jmp 0x113d9
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x5ed0
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Alcaro[P]bridges/arlib/string.h
// Function: cstring::c_string::c_string(arrayview<unsigned char>, bool)
c_string(arrayview<uint8_t> data, bool has_term)
		{
			if (has_term)
			{
				ptr = (char*)data.ptr();
				do_free = false;
			}
			else
			{
				ptr = (char*)xmalloc(data.size()+1);
				memcpy(ptr, data.ptr(), data.size());
				ptr[data.size()] = '\0';
				do_free = true;
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %cl, %al
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
testb $0x1, -0x19(%rbp)
je 0x11695
leaq -0x10(%rbp), %rdi
callq 0x62c0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
jmp 0x11715
leaq -0x10(%rbp), %rdi
callq 0x6290
movq %rax, %rdi
addq $0x1, %rdi
callq 0x2d5e0
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x10970
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq (%rax), %rax
movq %rax, -0x48(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x62c0
movq %rax, -0x40(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x6290
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0x4280
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x6290
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
movb $0x0, (%rcx,%rdx)
movb $0x1, 0x8(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Alcaro[P]bridges/arlib/file.h
// Function: file::impl::readall()
virtual array<uint8_t> readall()
		{
			array<uint8_t> ret;
			ret.reserve_noinit(this->size());
			size_t actual = this->pread(ret, 0);
			ret.resize(actual);
			return ret;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x74b0
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x1cec0
movq -0x38(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x74f0
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
leaq -0x30(%rbp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x10(%rax)
movq -0x38(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
callq 0x1ce60
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x11854
movq -0x38(%rbp), %rdi
callq 0x1d720
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: Alcaro[P]bridges/arlib/file.cpp
// Function: file::impl::default_mmapw(unsigned long, unsigned long)
arrayvieww<uint8_t> file::impl::default_mmapw(size_t start, size_t len)
{
	uint8_t* ptr = xmalloc(sizeof(size_t) + len);
	*(size_t*)ptr = start;
	
	arrayvieww<uint8_t> ret(ptr+sizeof(size_t), len);
	size_t actual = this->pread(ret, start);
	return ret.slice(0, actual);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x2d5e0
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6bc0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x5ed0
leaq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x74f0
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq (%rdi), %rax
leaq -0x58(%rbp), %rsi
callq *0x10(%rax)
movq -0x68(%rbp), %rdi
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
leaq -0x40(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xc4c0
movq -0x60(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Alcaro[P]bridges/arlib/file.cpp
// Function: file::impl::default_unmapw(arrayvieww<unsigned char>)
bool file::impl::default_unmapw(arrayvieww<uint8_t> data)
{
	uint8_t* ptr = data.ptr() - sizeof(size_t);
	size_t start = *(size_t*)ptr;
	bool ok = this->pwrite(data, start);
	free(ptr);
	return ok;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x50(%rbp)
movq %rdi, %rax
movq -0x50(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x7490
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdi
addq $-0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq (%rsi), %rax
movq %rax, -0x38(%rbp)
movq 0x8(%rsi), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq (%rdi), %rax
callq *0x18(%rax)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4420
movb -0x21(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/file.cpp
// Function: file::change_ext(cstring, cstring)
string file::change_ext(cstring path, cstring new_ext)
{
	array<cstring> dir_name = path.crspliti<1>("/");
	if (dir_name.size() == 1)
		return dir_name[0].crsplit<1>(".")[0] + new_ext;
	else
		return dir_name[0] + dir_name[1].crsplit<1>(".")[0] + new_ext;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x100(%rbp)
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x20(%rbp)
leaq -0x48(%rbp), %rdi
leaq 0x51e6f(%rip), %rsi     # 0x63fda
callq 0x58c0
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x12b90
leaq -0x38(%rbp), %rdi
callq 0x12a40
cmpq $0x1, %rax
jne 0x1223a
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x26500
movq %rax, -0x108(%rbp)
leaq -0x78(%rbp), %rdi
leaq 0x53f2b(%rip), %rsi     # 0x660e2
callq 0x58c0
movq -0x108(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rcx
leaq -0x68(%rbp), %rdi
callq 0x12be0
leaq -0x68(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x26500
movq -0x100(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %r8
callq 0xb860
leaq -0x68(%rbp), %rdi
callq 0x26f60
movl $0x1, -0x8c(%rbp)
jmp 0x1234b
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x26500
movq (%rax), %rcx
movq %rcx, -0xb0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xa8(%rbp)
leaq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x26500
movq %rax, -0x110(%rbp)
leaq -0xe0(%rbp), %rdi
leaq 0x53e63(%rip), %rsi     # 0x660e2
callq 0x58c0
movq -0x110(%rbp), %rsi
movq -0xe0(%rbp), %rdx
movq -0xd8(%rbp), %rcx
leaq -0xd0(%rbp), %rdi
callq 0x12be0
leaq -0xd0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x26500
movq (%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq -0xc0(%rbp), %rcx
movq -0xb8(%rbp), %r8
leaq -0xa0(%rbp), %rdi
callq 0xb860
movq -0x100(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xf0(%rbp), %rdx
movq -0xe8(%rbp), %rcx
leaq -0xa0(%rbp), %rsi
callq 0xb770
leaq -0xa0(%rbp), %rdi
callq 0x5870
leaq -0xd0(%rbp), %rdi
callq 0x26f60
movl $0x1, -0x8c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x26f60
movq -0xf8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/file.cpp
// Function: file2::resize(long, arrayview<unsigned char>&, bool)
bool file2::resize(off_t newsize, bytesr& map, bool writable)
{
	mmap_t::unmap(map);
	if (!resize(newsize)) return false;
	mmap_t::map(map, *this, writable);
	return (map.size() != 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x10fc0
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x12c30
testb $0x1, %al
jne 0x129a3
movb $0x0, -0x1(%rbp)
jmp 0x129cd
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdi
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x10f00
movq -0x20(%rbp), %rdi
callq 0x6290
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Alcaro[P]bridges/arlib/array.h
// Function: decltype(decltype(__declval<cstring>(0)) std::declval<cstring>()() + std::declval<cstring>()) arrayview<cstring>::join<char const*>(cstring) const
decltype(std::declval<T>() + std::declval<T2>()) join(T2 between) const
	{
		if (!this->count) return decltype(T() + T2())();
		
		decltype(T() + T2()) out = this->items[0];
		for (size_t n=1;n < this->count;n++)
		{
			out += between;
			out += this->items[n];
		}
		return out;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0x12abf
movq -0x78(%rbp), %rdi
callq 0x7800
jmp 0x12b83
movq -0x78(%rbp), %rax
movq -0x68(%rbp), %rcx
movb $0x0, -0x31(%rbp)
movq (%rcx), %rcx
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
movq 0x8(%rcx), %rcx
movq %rcx, -0x40(%rbp)
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq %rdx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x5c00
movq -0x80(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x37020
movq $0x1, -0x50(%rbp)
movq -0x68(%rbp), %rcx
movq -0x50(%rbp), %rax
cmpq 0x8(%rcx), %rax
jae 0x12b6e
movq -0x78(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x5ce0
movq -0x78(%rbp), %rdi
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq -0x50(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x60(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x5e00
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x12b13
movb $0x1, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x12b81
movq -0x78(%rbp), %rdi
callq 0x5870
jmp 0x12b83
movq -0x70(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
// File: Alcaro[P]bridges/arlib/runloop2.h
// Function: async<void>::then(waiter_base<void>*)
void then(waiter_base<T>* next)
	{
		if (is_complete())
		{
			consume_sync();
			if constexpr (std::is_same_v<T, void>)
				next->complete(next);
			else
				next->complete(next, get_value());
		}
		else
		{
#ifndef ARLIB_OPT
			if (next->prod)
			{
				debug_warn_stack("attempted to assign a producer to an already-busy waiter");
				next->cancel();
			}
#endif
			next->prod = this->prod;
			this->prod->wait = next;
			this->prod = nullptr;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x13fd0
testb $0x1, %al
jne 0x133c3
jmp 0x133dc
movq -0x18(%rbp), %rdi
callq 0x13ff0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
jmp 0x1341a
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x133fb
leaq 0x501ad(%rip), %rdi     # 0x6359a
callq 0xe050
movq -0x10(%rbp), %rdi
callq 0x14010
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, (%rcx)
movq -0x10(%rbp), %rdx
movq (%rax), %rcx
movq %rdx, (%rcx)
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: Alcaro[P]bridges/arlib/runloop2.h
// Function: async<void>::~async()
~async()
	{
#ifndef ARLIB_OPT
		if (is_complete() || this->prod)
			debug_fatal_stack("can't discard an async without calling .then()");
#endif
		this->prod = nullptr; // null it out, in case the return value is here (nulling here allows parent's dtor to be optimized out)
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x13fd0
testb $0x1, %al
jne 0x13447
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x13453
leaq 0x50185(%rip), %rdi     # 0x635d3
callq 0xe080
movq -0x10(%rbp), %rdi
movq $0x0, (%rdi)
callq 0x14040
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::step(bool)
void step(bool wait)
{
	got_event = false;
	process_events(); // in case someone else (for example ctx-x11.cpp) did synchronous X calls behind our back
	runloop2::step(false);
	while (wait && !got_event)
		runloop2::step(true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movb $0x0, 0x1a(%rdi)
callq 0x13780
xorl %edi, %edi
callq 0x30180
xorl %eax, %eax
testb $0x1, -0x9(%rbp)
movb %al, -0x19(%rbp)
je 0x135e3
movq -0x18(%rbp), %rax
movb 0x1a(%rax), %al
xorb $-0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x135ec
jmp 0x135f8
movl $0x1, %edi
callq 0x30180
jmp 0x135cc
addq $0x20, %rsp
popq %rbp
retq
nop
// File: Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::process_events()
void process_events()
{
	while (XPending(window_x11.display))
	{
		XEvent ev;
		XNextEvent(window_x11.display, &ev);
		if (ev.xany.window == this->window)
			this->process_event(&ev);
	}
	
	runloop2::await_read(ConnectionNumber(window_x11.display)).then(&wait);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq 0x6dbc7(%rip), %rdi     # 0x81368
callq 0x42e0
cmpl $0x0, %eax
je 0x137e7
movq 0x6dbb6(%rip), %rdi     # 0x81368
leaq -0xc8(%rbp), %rsi
callq 0x44c0
movq -0xe0(%rbp), %rcx
movq -0xa8(%rbp), %rax
cmpq 0x10(%rcx), %rax
jne 0x137e5
movq -0xe0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x138a0
jmp 0x1379a
movq 0x6db7a(%rip), %rax     # 0x81368
movl 0x10(%rax), %esi
leaq -0xd8(%rbp), %rdi
callq 0x13370
movq -0xe0(%rbp), %rsi
addq $0x50, %rsi
leaq -0xd8(%rbp), %rdi
callq 0x133a0
leaq -0xd8(%rbp), %rdi
callq 0x13420
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/global.h
// Function: gameview_x11* container_of<gameview_x11, gameview_x11::waiter_t>(gameview_x11::waiter_t*, gameview_x11::waiter_t gameview_x11::*)
Tc* container_of(Ti* ptr, Ti Tc:: * memb)
{
	// https://wg21.link/P0908 proposes a better implementation, but it was forgotten and not accepted
	Tc* fake_object = (Tc*)0x12345678;  // doing math on a fake pointer is UB, but good luck proving that one is bogus
	fake_object = launder(fake_object); // especially across an asm (both gcc and clang will optimize out the fake pointer)
	size_t offset = (uintptr_t)&(fake_object->*memb) - (uintptr_t)fake_object;
	return (Tc*)((uint8_t*)ptr - offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x12345678, %eax       # imm = 0x12345678
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x13880
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
subq -0x20(%rbp), %rcx
addq %rcx, %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::set_all_keys()
void set_all_keys()
{
	uint8_t state[32];
	XQueryKeymap(display, (char*)state);
	for (int i=0;i<256/8;i++)
	{
		if (current_scans[i] == state[i]) continue;
		for (int bit=0;bit<8;bit++)
		{
			set_key((i<<3)|bit, state[i] & (1<<bit));
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x8(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4450
movl $0x0, -0x34(%rbp)
cmpl $0x20, -0x34(%rbp)
jge 0x13b65
movq -0x40(%rbp), %rax
movslq -0x34(%rbp), %rcx
movzbl 0x278(%rax,%rcx), %eax
movslq -0x34(%rbp), %rcx
movzbl -0x30(%rbp,%rcx), %ecx
cmpl %ecx, %eax
jne 0x13b01
jmp 0x13b57
movl $0x0, -0x38(%rbp)
cmpl $0x8, -0x38(%rbp)
jge 0x13b55
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %eax
shll $0x3, %eax
orl -0x38(%rbp), %eax
movb %al, -0x41(%rbp)
movslq -0x34(%rbp), %rax
movzbl -0x30(%rbp,%rax), %eax
movl -0x38(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movb -0x41(%rbp), %cl
andl %edx, %eax
cmpl $0x0, %eax
setne %al
movzbl %cl, %esi
movzbl %al, %edx
andl $0x1, %edx
callq 0x13b70
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x13b08
jmp 0x13b57
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x13ad8
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::set_key(unsigned char, bool)
void set_key(uint8_t scancode, bool state)
{
	int byte = scancode>>3;
	int bit = scancode&7;
	
	bool prevstate = (current_scans[byte] & (1<<bit));
	if (state == prevstate) return;
	
	current_scans[byte] = (current_scans[byte] & ~(1<<bit)) | (state<<bit);
	cb_keys(scancode, (key_t)scan_to_key[scancode], state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
andb $0x1, %al
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movzbl -0x9(%rbp), %ecx
sarl $0x3, %ecx
movl %ecx, -0x10(%rbp)
movzbl -0x9(%rbp), %ecx
andl $0x7, %ecx
movl %ecx, -0x14(%rbp)
movslq -0x10(%rbp), %rcx
movzbl 0x278(%rax,%rcx), %eax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x15(%rbp)
movb -0xa(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb -0x15(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x13be1
jmp 0x13c52
movq -0x20(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl 0x278(%rax,%rcx), %ecx
movl %ecx, -0x28(%rbp)
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl -0x28(%rbp), %ecx
xorl $-0x1, %edx
andl %edx, %ecx
movl %ecx, -0x24(%rbp)
movb -0xa(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %edx
movl -0x14(%rbp), %ecx
shll %cl, %edx
movl -0x24(%rbp), %ecx
orl %edx, %ecx
movb %cl, %dl
movslq -0x10(%rbp), %rcx
movb %dl, 0x278(%rax,%rcx)
movq %rax, %rdi
addq $0x298, %rdi            # imm = 0x298
movzbl -0x9(%rbp), %esi
movzbl -0x9(%rbp), %ecx
movw 0x78(%rax,%rcx,2), %ax
movb %al, %cl
movb -0xa(%rbp), %al
andb $0x1, %al
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x13cd0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Alcaro[P]bridges/arlib/function.h
// Function: function<void ()>::unref()
void unref()
	{
		if (LIKELY(!ref)) return;
		if (!--ref->count)
		{
			ref->destruct(ctx);
			delete ref;
		}
		ref = NULL;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x10(%rax)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x140e8
jmp 0x140ea
jmp 0x14141
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq (%rcx), %rax
addq $-0x1, %rax
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x14135
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rax
movq 0x8(%rax), %rax
movq (%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x14133
movq -0x18(%rbp), %rdi
movl $0x10, %esi
callq 0x4370
jmp 0x14135
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Alcaro[P]bridges/arlib/game-x11.cpp
// Function: gameview_x11::global_init()
static void global_init()
{
	if (window_x11.display) return;
	
	window_x11.display = XOpenDisplay(NULL);
	if (!window_x11.display)
	{
		perror("XOpenDisplay");
		exit(1);
	}
	window_x11.screen = DefaultScreen(window_x11.display);
	
	XkbSetDetectableAutoRepeat(window_x11.display, true, NULL);
	
	// this may be useful on Solaris, but I can't find any trace of it doing anything anywhere else
	// https://bugzilla.gnome.org/show_bug.cgi?id=76681
	//if (!XAddConnectionWatch(display,
	//	[](Display* display, char* g_userdata, int fd, Bool opening, char* * l_userdata) {
	//		printf("connwatch: %d %d\n",fd,opening);
	//		if (opening) runloop::global()->set_fd(fd, [](uintptr_t fd){ XProcessInternalConnection(display, fd); });
	//		else runloop::global()->set_fd(fd, NULL);
	//	}, NULL)) abort();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x6cecc(%rip)     # 0x81368
je 0x144a0
jmp 0x144f8
xorl %eax, %eax
movl %eax, %edi
callq 0x4490
movq %rax, 0x6ceb8(%rip)     # 0x81368
cmpq $0x0, 0x6ceb0(%rip)     # 0x81368
jne 0x144d0
leaq 0x4f141(%rip), %rdi     # 0x63602
callq 0x4290
movl $0x1, %edi
callq 0x4430
movq 0x6ce91(%rip), %rax     # 0x81368
movl 0xe0(%rax), %eax
movl %eax, 0x6ce8d(%rip)     # 0x81370
movq 0x6ce7e(%rip), %rdi     # 0x81368
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x4680
popq %rbp
retq
nop
nopl (%rax)
// File: Alcaro[P]bridges/arlib/image-png-decode.cpp
// Function: oimage::init_decode_png(arrayview<unsigned char>)::pngreader::chunk()
pngchunk chunk()
		{
			while (true)
			{
				pngchunk ret = chunk_raw();
				if (ret.type == 0x74524E53) return ret; // tRNS
				if (!(ret.type&0x20000000)) return ret; // critical
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15af0
movq -0x28(%rbp), %rax
cmpl $0x74524e53, 0x18(%rax) # imm = 0x74524E53
jne 0x15edf
jmp 0x15ef4
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x20000000, %eax       # imm = 0x20000000
cmpl $0x0, %eax
jne 0x15ef2
jmp 0x15ef4
jmp 0x15ec3
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: Alcaro[P]bridges/arlib/image.cpp
// Function: oimage::init_new(unsigned int, unsigned int, imagefmt)
void oimage::init_new(uint32_t width, uint32_t height, imagefmt fmt)
{
	size_t stride = byteperpix(fmt)*width;
	size_t nbytes = stride*height;
	storage = xmalloc(nbytes);
	init_ptr(storage, width, height, stride, fmt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %edi
callq 0x1ae50
movzbl %al, %eax
imull -0xc(%rbp), %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2d5e0
movq -0x38(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x18, %rdi
movq -0x30(%rbp), %rsi
callq 0x17060
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
callq 0x170a0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %r8
movl -0x14(%rbp), %r9d
callq 0x1aef0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/image.cpp
// Function: image::insert_tile(int, int, unsigned int, unsigned int, image const&)
void image::insert_tile(int32_t x, int32_t y, uint32_t width, uint32_t height, const image& other)
{
	uint32_t yy = 0;
	if (height >= other.height)
	{
		for (yy = 0; yy < height-other.height; yy += other.height)
		{
			image_insert_tile_row(*this, x, y+yy, width, other.height, other);
		}
	}
	
	if (yy < height)
	{
		image_insert_tile_row(*this, x, y+yy, width, height-yy, other);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x18(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jb 0x18732
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rdx
subl 0x4(%rdx), %ecx
cmpl %ecx, %eax
jae 0x18730
movq -0x30(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x24(%rbp), %edx
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl 0x4(%rax), %r8d
movq -0x20(%rbp), %r9
callq 0x18770
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x186ef
jmp 0x18732
movl -0x24(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x1875b
movq -0x30(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
addl -0x24(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
subl -0x24(%rbp), %r8d
movq -0x20(%rbp), %r9
callq 0x18770
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/image.cpp
// Function: image_insert_tile_row(image&, int, int, unsigned int, unsigned int, image const&)
static void image_insert_tile_row(image& target, int32_t x, int32_t y, uint32_t width, uint32_t height, const image& other)
{
	uint32_t xx = 0;
	if (width >= other.width)
	{
		for (xx = 0; xx < width-other.width; xx += other.width)
		{
			target.insert_sub(x+xx, y, other, 0, 0, other.width, height);
		}
	}
	if (xx < width)
	{
		target.insert_sub(x+xx, y, other, 0, 0, width-xx, height);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jb 0x187f4
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rdx
subl (%rdx), %ecx
cmpl %ecx, %eax
jae 0x187f2
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x24(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movl (%rax), %r10d
movl -0x18(%rbp), %eax
xorl %r9d, %r9d
movl %r9d, %r8d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x1af80
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x187a6
jmp 0x187f4
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x1882b
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x24(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %r10d
subl -0x24(%rbp), %r10d
movl -0x18(%rbp), %eax
xorl %r9d, %r9d
movl %r9d, %r8d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x1af80
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/image.cpp
// Function: image_insert_tile_row(image&, int, int, unsigned int, unsigned int, image const&, unsigned int, unsigned int)
static void image_insert_tile_row(image& target, int32_t x, int32_t y, uint32_t width, uint32_t height,
                                  const image& other, uint32_t offx, uint32_t offy)
{
	if (offx + width <= other.width)
	{
		target.insert_sub(x, y, other, offx, offy, width, height);
		return;
	}
	
	if (offx != 0)
	{
		target.insert_sub(x, y, other, offx, offy, other.width-offx, height);
		x += other.width-offx;
		width -= other.width-offx;
	}
	uint32_t xx = 0;
	if (width >= other.width)
	{
		for (xx = 0; xx < width-other.width; xx += other.width)
		{
			target.insert_sub(x+xx, y, other, 0, offy, other.width, height);
		}
	}
	if (xx < width)
	{
		target.insert_sub(x+xx, y, other, 0, offy, width-xx, height);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movl 0x10(%rbp), %eax
addl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
ja 0x18ab0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
movl 0x10(%rbp), %r8d
movl 0x18(%rbp), %r9d
movl -0x14(%rbp), %r10d
movl -0x18(%rbp), %eax
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x1af80
jmp 0x18ba7
cmpl $0x0, 0x10(%rbp)
je 0x18b07
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
movl 0x10(%rbp), %r8d
movl 0x18(%rbp), %r9d
movq -0x20(%rbp), %rax
movl (%rax), %r10d
subl 0x10(%rbp), %r10d
movl -0x18(%rbp), %eax
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x1af80
movq -0x20(%rbp), %rax
movl (%rax), %eax
subl 0x10(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl 0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jb 0x18b6f
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rdx
subl (%rdx), %ecx
cmpl %ecx, %eax
jae 0x18b6d
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x24(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
movl 0x18(%rbp), %r9d
movq -0x20(%rbp), %rax
movl (%rax), %r10d
movl -0x18(%rbp), %eax
xorl %r8d, %r8d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x1af80
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x18b20
jmp 0x18b6f
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x18ba7
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl -0x24(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
movl 0x18(%rbp), %r9d
movl -0x14(%rbp), %r10d
subl -0x24(%rbp), %r10d
movl -0x18(%rbp), %eax
xorl %r8d, %r8d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x1af80
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: Alcaro[P]bridges/arlib/image.cpp
// Function: oimage::init_decode_permissive(arrayview<unsigned char>)
bool oimage::init_decode_permissive(arrayview<uint8_t> data)
{
	this->fmt = ifmt_none;
	return
		init_decode(data) ||
		init_decode_extern(data) ||
		false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movl $0x0, 0x8(%rdi)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x198f0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x39(%rbp)
jne 0x19a00
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x19950
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x39(%rbp)
jne 0x19a00
xorl %eax, %eax
movb %al, -0x39(%rbp)
jmp 0x19a00
movb -0x39(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Alcaro[P]bridges/arlib/image.cpp
// Function: void image_insert_noov_8888_to_8888_blend<0u>(image&, int, int, image const&)
static inline void image_insert_noov_8888_to_8888_blend(image& target, int32_t x, int32_t y, const image& source)
{
	for (uint32_t yy=0;yy<source.height;yy++)
	{
		uint32_t* targetpx = target.pixels32 + (y+yy)*target.stride/sizeof(uint32_t) + x;
		uint32_t* sourcepx = source.pixels32 + yy*source.stride/sizeof(uint32_t);
		
		for (uint32_t xx=0;xx<source.width;xx++)
		{
			uint8_t alpha = sourcepx[xx] >> 24;
			
			if (alpha != 255)
			{
				if (alpha != 0)
				{
					uint32_t newpx = blend_8888_on_8888(targetpx[xx], sourcepx[xx]);
					if (newalpha == 0x00000000) newpx &= 0x00FFFFFF;
					if (newalpha == 0xFF000000) newpx |= 0xFF000000;
					targetpx[xx] = newpx;
				}
				//else a=0 -> do nothing
			}
			else
			{
				if (newalpha != (uint32_t)-1)
					targetpx[xx] = newalpha | (sourcepx[xx]&0x00FFFFFF);
				else
					targetpx[xx] = sourcepx[xx];
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x1a340
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull 0xc(%rdx), %ecx
movl %ecx, %ecx
shrq $0x2, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rdx
imull 0xc(%rdx), %ecx
movl %ecx, %ecx
shrq $0x2, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x1a330
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x18, %eax
movb %al, -0x35(%rbp)
movzbl -0x35(%rbp), %eax
cmpl $0xff, %eax
je 0x1a303
movzbl -0x35(%rbp), %eax
cmpl $0x0, %eax
je 0x1a301
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movl (%rax,%rcx,4), %edi
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movl (%rax,%rcx,4), %esi
callq 0x19090
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %edx
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x1a320
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movl (%rax,%rcx,4), %edx
andl $0xffffff, %edx         # imm = 0xFFFFFF
orl $0x0, %edx
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x1a322
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1a29a
jmp 0x1a332
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1a22d
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Alcaro[P]bridges/arlib/image.h
// Function: image::byteperpix(imagefmt)
static uint8_t byteperpix(imagefmt fmt)
	{
		//yes, this code is silly, but compiler gives shitty code for more obvious implementations
		//'magic' is, of course, optimized into a constant
		uint32_t magic = 0;
		
		magic |= (3-1) << (ifmt_rgb888_by*2);
		magic |= (4-1) << (ifmt_rgba8888_by*2);
		magic |= (4-1) << (ifmt_argb8888_by*2);
		magic |= (4-1) << (ifmt_abgr8888_by*2);
		magic |= (4-1) << (ifmt_bgra8888_by*2);
		magic |= (4-1) << (ifmt_xrgb8888*2);
		magic |= (4-1) << (ifmt_0rgb8888*2);
		magic |= (4-1) << (ifmt_bargb8888*2);
		magic |= (2-1) << (ifmt_rgb565*2);
		magic |= (2-1) << (ifmt_xrgb1555*2);
		magic |= (2-1) << (ifmt_0rgb1555*2);
		magic |= (2-1) << (ifmt_argb1555*2);
		
		return 1 + ((magic >> (fmt*2)) & 3);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x30, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0xc0, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x300, %eax            # imm = 0x300
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0xc00, %eax            # imm = 0xC00
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x3000, %eax           # imm = 0x3000
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0xc000, %eax           # imm = 0xC000
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x30000, %eax          # imm = 0x30000
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x40000, %eax          # imm = 0x40000
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x100000, %eax         # imm = 0x100000
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x400000, %eax         # imm = 0x400000
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
orl $0x1000000, %eax        # imm = 0x1000000
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl -0x4(%rbp), %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
addl $0x1, %eax
popq %rbp
retq