LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/font.cpp
// Function: font::render_justified(image&, int, int, unsigned int, unsigned int, cstring, bool) const
void font::render_justified(image& img, int32_t x, int32_t y, uint32_t width1, uint32_t width2, cstring text, bool align) const
{
	size_t linestart = 0;
	size_t numspaces = 0;
	
	uint32_t linewidth = 0;
	for (size_t i=0;i<=text.length();i++)
	{
		if (i == text.length() || text[i] == '\n')
		{
			linewidth *= this->scale;
			
			float spacesize;
			if (linewidth >= width1 && linewidth <= width2) spacesize = ((width2 - linewidth) / (float)numspaces);
			else spacesize = 0;
			
			this->render(img, x, y, text.substr(linestart, i), spacesize, align);
			
			y += this->height * this->scale;
			linestart = i+1;
			linewidth = 0;
			numspaces = 0;
			continue;
		}
		
		if (text[i] == ' ') numspaces++;
		linewidth += this->width[(uint8_t)text[i]];
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
movl %ecx, %r14d
movl %edx, 0x10(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, %r13
leaq 0x60(%rsp), %rbx
movb 0xf(%rbx), %dl
testb %dl, %dl
setns %dil
xorl %r15d, %r15d
movzbl 0x70(%rsp), %r12d
xorl %esi, %esi
xorl %ebp, %ebp
xorl %eax, %eax
xorl %ecx, %ecx
movl %edx, %r8d
xorb $0xf, %r8b
movzbl %r8b, %r8d
testb $0x1, %dil
cmovel 0x8(%rbx), %r8d
cmpq %r8, %rbp
je 0x1e49c
movq %rbx, %rdi
testb %dl, %dl
jns 0x1e487
movq (%rbx), %rdi
movq %r15, %rdx
sarq $0x20, %rdx
movzbl (%rdi,%rdx), %edx
cmpq $0xa, %rdx
jne 0x1e545
testq %rcx, %rcx
js 0x1e4ab
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
jmp 0x1e4c3
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movzbl 0x488(%r13), %ecx
imull %ecx, %eax
movl 0x18(%rsp), %ecx
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
subl %eax, %ecx
jb 0x1e4e8
xorps %xmm1, %xmm1
cvtsi2ss %rcx, %xmm1
divss %xmm0, %xmm1
cmpl 0x14(%rsp), %eax
jb 0x1e4f1
movaps %xmm1, %xmm2
movss %xmm2, 0x1c(%rsp)
movq %rbx, %rdi
movl %ebp, %edx
callq 0x658a
movq %rdx, %r9
movl %r12d, (%rsp)
movq %r13, %rdi
movq 0x20(%rsp), %rsi
movl 0x10(%rsp), %edx
movl %r14d, %ecx
movq %rax, %r8
movss 0x1c(%rsp), %xmm0
callq 0x1e19a
movzbl 0x480(%r13), %eax
movzbl 0x488(%r13), %ecx
imull %eax, %ecx
addl %ecx, %r14d
leaq 0x1(%rbp), %rsi
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x1e55d
xorl %edi, %edi
cmpq $0x20, %rdx
sete %dil
addq %rdi, %rcx
movzbl 0x400(%r13,%rdx), %edx
addl %edx, %eax
leaq 0x1(%rbp), %r8
movzbl 0xf(%rbx), %edx
movl %edx, %r9d
xorl $0xf, %r9d
testb %dl, %dl
cmovsl 0x8(%rbx), %r9d
setns %dil
movabsq $0x100000000, %r10      # imm = 0x100000000
addq %r10, %r15
cmpq %r9, %rbp
movq %r8, %rbp
jb 0x1e464
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/font.cpp
// Function: font::render_wrap(image&, int, int, unsigned int, cstring) const
void font::render_wrap(image& img, int32_t x, int32_t y, uint32_t width, cstring text) const
{
	size_t linestart = 0;
	size_t numspaces = 0;
	
	size_t lastspace = 0; // index to the string
	uint32_t widthlastspace = 0; // text width (pixels) from linestart to lastspace
	
	uint32_t linewidth = 0; // text width (pixels) from linestart to i
	
	for (size_t i=0;i<=text.length();i++)
	{
		if (i == text.length() || text[i] == '\n' || linewidth >= width)
		{
			float spacesize = 0;
			if (linewidth >= width)
			{
				i = lastspace;
				linewidth = widthlastspace;
				spacesize = ((width - linewidth) / (float)(numspaces-1));
			}
			
			this->render(img, x, y, text.substr(linestart, i), spacesize, true);
			
			y += this->height * this->scale;
			linestart = i+1;
			linewidth = 0;
			numspaces = 0;
			continue;
		}
		
		if (text[i] == ' ')
		{
			lastspace = i;
			widthlastspace = linewidth;
			numspaces++;
		}
		linewidth += this->width[(uint8_t)text[i]] * this->scale;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, %r12
leaq 0x60(%rsp), %r13
movb 0xf(%r13), %dl
testb %dl, %dl
setns %dil
xorl %esi, %esi
xorl %r14d, %r14d
xorl %ecx, %ecx
movl $0x0, 0x14(%rsp)
xorl %r15d, %r15d
xorl %eax, %eax
movl %edx, %r8d
xorb $0xf, %r8b
movzbl %r8b, %r8d
testb $0x1, %dil
cmovel 0x8(%r13), %r8d
cmpq %r8, %r14
jne 0x1e615
xorps %xmm1, %xmm1
cmpl %ebx, %ecx
jb 0x1e699
decq %rax
js 0x1e66c
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
jmp 0x1e684
movq %r13, %rdi
testb %dl, %dl
jns 0x1e620
movq (%r13), %rdi
movslq %r14d, %rdx
movzbl (%rdi,%rdx), %edx
cmpq $0xa, %rdx
je 0x1e5fb
cmpl %ebx, %ecx
jae 0x1e5fb
xorl %edi, %edi
cmpq $0x20, %rdx
cmoveq %r14, %r15
sete %dil
movl 0x14(%rsp), %r8d
cmovel %ecx, %r8d
movl %r8d, 0x14(%rsp)
addq %rdi, %rax
movzbl 0x400(%r12,%rdx), %edx
movzbl 0x488(%r12), %edi
imull %edx, %edi
addl %edi, %ecx
jmp 0x1e6ef
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movl %ebx, %eax
subl 0x14(%rsp), %eax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
divss %xmm0, %xmm1
movq %r15, %r14
movss %xmm1, 0x1c(%rsp)
movq %r13, %rdi
movl %r14d, %edx
callq 0x658a
movq %rdx, %r9
movl $0x1, (%rsp)
movq %r12, %rdi
movq 0x20(%rsp), %rsi
movl 0x18(%rsp), %edx
movl %ebp, %ecx
movq %rax, %r8
movss 0x1c(%rsp), %xmm0
callq 0x1e19a
movzbl 0x480(%r12), %eax
movzbl 0x488(%r12), %ecx
imull %eax, %ecx
addl %ecx, %ebp
leaq 0x1(%r14), %rsi
xorl %eax, %eax
xorl %ecx, %ecx
incq %r14
movzbl 0xf(%r13), %edx
movl %edx, %r8d
xorl $0xf, %r8d
testb %dl, %dl
setns %dil
cmovsl 0x8(%r13), %r8d
cmpq %r8, %r14
jbe 0x1e5e2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/game.cpp
// Function: (anonymous namespace)::game_impl::save(arrayvieww<unsigned char>)
void save(bytesw dat)
	{
		if (dat.size() != savedat_size) abort();
		
		dat[0] = unlocked;
		dat[1] = seen_random_tutorial;
		
#ifdef ARLIB_THREAD
		writeu_le64(dat.skip(2 ).ptr(), gamegen_next[0]);
		writeu_le32(dat.skip(10).ptr(), gamegen_diff_expect[0]);
		writeu_le64(dat.skip(14).ptr(), gamegen_next[1]);
		writeu_le32(dat.skip(22).ptr(), gamegen_diff_expect[1]);
		writeu_le64(dat.skip(26).ptr(), gamegen_next[2]);
		writeu_le32(dat.skip(34).ptr(), gamegen_diff_expect[2]);
#else
		writeu_le64(dat.skip(2 ).ptr(), 0);
		writeu_le32(dat.skip(10).ptr(), 0);
		writeu_le64(dat.skip(14).ptr(), 0);
		writeu_le32(dat.skip(22).ptr(), 0);
		writeu_le64(dat.skip(26).ptr(), 0);
		writeu_le32(dat.skip(34).ptr(), 0);
#endif
	}

// Assembly:
cmpq $0x26, 0x8(%rsi)
jne 0x2239e
movb 0x4c(%rdi), %al
movq (%rsi), %rcx
movb %al, (%rcx)
movb 0x24acd(%rdi), %al
movq (%rsi), %rcx
movb %al, 0x1(%rcx)
movq (%rsi), %rax
movq 0x24a80(%rdi), %rcx
movq %rcx, 0x2(%rax)
movq (%rsi), %rax
movl 0x24aac(%rdi), %ecx
movl %ecx, 0xa(%rax)
movq (%rsi), %rax
movq 0x24a88(%rdi), %rcx
movq %rcx, 0xe(%rax)
movq (%rsi), %rax
movl 0x24ab0(%rdi), %ecx
movl %ecx, 0x16(%rax)
movq (%rsi), %rax
movq 0x24a90(%rdi), %rcx
movq %rcx, 0x1a(%rax)
movq (%rsi), %rax
movl 0x24ab4(%rdi), %ecx
movl %ecx, 0x22(%rax)
retq
pushq %rax
callq 0x3180
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/game.cpp
// Function: (anonymous namespace)::birds::reset(bool)
void reset(bool force)
	{
		if (frame < -800/spd) return; // approaching but not on the screen = leave them there, so they appear earlier
		
		// first, pick a center for the birds, anywhere in the screen that's at least 100px from the edge
		xmid = 100 + g_rand(640-200);
		ymid = 100 + g_rand(480-200);
		
		// then pick a random direction
		angle = (float)g_rand.rand32()/65536/65536 * M_PI*2;
		
		frame = -800/spd;
		if (!force)
		{
			frame -= 60*60 + g_rand(60*60);
		}
	}

// Assembly:
cmpl $0xffffff38, 0xc(%rdi)  # imm = 0xFFFFFF38
jl 0x224a9
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x24007(%rip), %r14     # 0x46410
movq %r14, %rdi
movl $0x1b8, %esi            # imm = 0x1B8
callq 0x1693a
addl $0x64, %eax
cvtsi2ss %rax, %xmm0
movss %xmm0, (%rbx)
movq %r14, %rdi
movl $0x118, %esi            # imm = 0x118
callq 0x1693a
addl $0x64, %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
movss %xmm0, 0x4(%rbx)
movq %r14, %rdi
callq 0x165dc
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
movss 0xf7eb(%rip), %xmm1     # 0x31c44
mulss %xmm1, %xmm0
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0xfadb(%rip), %xmm0     # 0x31f48
addsd %xmm0, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rbx)
movl $0xffffff38, 0xc(%rbx)  # imm = 0xFFFFFF38
testb %bpl, %bpl
jne 0x224a5
leaq 0x23f83(%rip), %rdi     # 0x46410
movl $0xe10, %esi            # imm = 0xE10
callq 0x1693a
movl 0xc(%rbx), %ecx
subl %eax, %ecx
addl $0xfffff1f0, %ecx       # imm = 0xFFFFF1F0
movl %ecx, 0xc(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/game.cpp
// Function: (anonymous namespace)::game_impl::background()
void background()
	{
		if (tileset == 0)
		{
			out.insert_tile(0, 0, 640, 480, ((bgpos/15) & 1) ? resources::bg0b : resources::bg0);
		}
		if (tileset == 1)
		{
			int off = (bgpos/6)%21;
			out.insert_tile(0, 0, 640, 480, resources::bg1, off, 21-off);
		}
		if (tileset == 2)
		{
			out.insert_tile(0, 0, 640, 480, resources::bg2);
		}
		
		bgpos++;
		//must be a multiple of
		//- 30 (bg0 animation)
		//- 6*21 (bg1 animation)
		//- 90 (castle flag animation)
		bgpos %= 630;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x48(%rdi)
jne 0x224fc
leaq 0x28(%rbx), %rdi
movslq 0x44(%rbx), %rax
imulq $-0x77777777, %rax, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
shrl $0x3, %ecx
addl %eax, %ecx
testb $0x1, %cl
jne 0x224e1
leaq 0x23b61(%rip), %r9      # 0x46040
jmp 0x224e8
leaq 0x23b70(%rip), %r9      # 0x46058
xorl %esi, %esi
xorl %edx, %edx
movl $0x280, %ecx            # imm = 0x280
movl $0x1e0, %r8d            # imm = 0x1E0
callq 0xc182
cmpl $0x1, 0x48(%rbx)
jne 0x22567
movslq 0x44(%rbx), %rax
imulq $0x2aaaaaab, %rax, %rax # imm = 0x2AAAAAAB
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
cltq
imulq $0x30c30c31, %rax, %rcx # imm = 0x30C30C31
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,4), %edx
leal (%rcx,%rdx,4), %ecx
subl %ecx, %eax
leaq 0x28(%rbx), %rdi
movl $0x15, %r10d
subl %eax, %r10d
leaq 0x23b24(%rip), %r9      # 0x46070
xorl %esi, %esi
xorl %edx, %edx
movl $0x280, %ecx            # imm = 0x280
movl $0x1e0, %r8d            # imm = 0x1E0
pushq %r10
pushq %rax
callq 0xc304
addq $0x10, %rsp
cmpl $0x2, 0x48(%rbx)
jne 0x2258c
leaq 0x28(%rbx), %rdi
leaq 0x23b10(%rip), %r9      # 0x46088
xorl %esi, %esi
xorl %edx, %edx
movl $0x280, %ecx            # imm = 0x280
movl $0x1e0, %r8d            # imm = 0x1E0
callq 0xc182
movl 0x44(%rbx), %eax
movl %eax, %ecx
incl %ecx
movslq %ecx, %rcx
imulq $-0x2ff2ff2f, %rcx, %rcx # imm = 0xD00D00D1
shrq $0x20, %rcx
addl %eax, %ecx
incl %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x9, %ecx
addl %edx, %ecx
imull $0x276, %ecx, %ecx      # imm = 0x276
negl %ecx
addl %ecx, %eax
incl %eax
movl %eax, 0x44(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/gamemap.cpp
// Function: gamemap::toggle(int, int, int)
void gamemap::toggle(int x, int y, int dir)
{
	if (dir == 0)
	{
		island& here = map[y][x];
		if (here.bridges[0] == 3) return;
		
		int newbridges = (here.bridges[0]+1)%3;
		int diff = newbridges - here.bridges[0];
		for (int xx=0;xx<here.bridgelen[0];xx++)
		{
			map[y][x+xx  ].bridges[0] = newbridges;
			map[y][x+xx+1].bridges[2] = newbridges;
			get(map[y][x+xx  ].rootnode).totbridges += diff;
			get(map[y][x+xx+1].rootnode).totbridges += diff;
		}
	}
	else
	{
		island& here = map[y][x];
		if (here.bridges[3] == 3) return;
		
		int newbridges = (here.bridges[3]+1)%3;
		int diff = newbridges - here.bridges[3];
		for (int yy=0;yy<here.bridgelen[3];yy++)
		{
			map[y+yy  ][x].bridges[3] = newbridges;
			map[y+yy+1][x].bridges[1] = newbridges;
			get(map[y+yy  ][x].rootnode).totbridges += diff;
			get(map[y+yy+1][x].rootnode).totbridges += diff;
		}
	}
}

// Assembly:
leaq 0xc(%rdi), %rax
movslq %edx, %rdx
imulq $0x4b0, %rdx, %r8       # imm = 0x4B0
movslq %esi, %rdx
leaq (%rdi,%r8), %r9
addq $0xc, %r9
leaq (%rdx,%rdx,2), %rsi
leaq (%r9,%rsi,4), %rdx
testl %ecx, %ecx
je 0x2332e
movzbl 0xb(%rdx), %r10d
cmpl $0x3, %r10d
je 0x233de
cmpb $0x0, 0x7(%rdx)
jle 0x233de
movl %r10d, %ecx
incl %ecx
imulq $0x55555556, %rcx, %rcx # imm = 0x55555556
shrq $0x20, %rcx
leal (%rcx,%rcx,2), %ecx
negl %ecx
addl %r10d, %ecx
incl %ecx
movl %ecx, %r9d
subb %r10b, %r9b
leaq (%r8,%rsi,4), %rsi
addq %rdi, %rsi
addq $0x4c5, %rsi            # imm = 0x4C5
xorl %edi, %edi
movb %cl, -0x4ae(%rsi)
movb %cl, (%rsi)
movzwl -0x4b7(%rsi), %r8d
imulq $0x28f5c29, %r8, %r10   # imm = 0x28F5C29
shrq $0x20, %r10
imull $0x64, %r10d, %r11d
subl %r11d, %r8d
imulq $0x4b0, %r10, %r10      # imm = 0x4B0
addq %rax, %r10
leaq (%r8,%r8,2), %r8
addb %r9b, 0x1(%r10,%r8,4)
movzwl -0x7(%rsi), %r8d
imulq $0x28f5c29, %r8, %r10   # imm = 0x28F5C29
shrq $0x20, %r10
imull $0x64, %r10d, %r11d
subl %r11d, %r8d
imulq $0x4b0, %r10, %r10      # imm = 0x4B0
addq %rax, %r10
leaq (%r8,%r8,2), %r8
addb %r9b, 0x1(%r10,%r8,4)
incq %rdi
movsbq 0x7(%rdx), %r8
addq $0x4b0, %rsi            # imm = 0x4B0
cmpq %r8, %rdi
jl 0x232b6
jmp 0x233de
movzbl 0x8(%rdx), %r10d
cmpl $0x3, %r10d
je 0x233de
cmpb $0x0, 0x4(%rdx)
jle 0x233de
movl %r10d, %ecx
incl %ecx
imulq $0x55555556, %rcx, %rcx # imm = 0x55555556
shrq $0x20, %rcx
leal (%rcx,%rcx,2), %ecx
negl %ecx
addl %r10d, %ecx
incl %ecx
movl %ecx, %r9d
subb %r10b, %r9b
leaq (%r8,%rsi,4), %rsi
addq %rdi, %rsi
addq $0x22, %rsi
xorl %edi, %edi
movb %cl, -0xe(%rsi)
movb %cl, (%rsi)
movzwl -0x14(%rsi), %r8d
imulq $0x28f5c29, %r8, %r10   # imm = 0x28F5C29
shrq $0x20, %r10
imull $0x64, %r10d, %r11d
subl %r11d, %r8d
imulq $0x4b0, %r10, %r10      # imm = 0x4B0
addq %rax, %r10
leaq (%r8,%r8,2), %r8
addb %r9b, 0x1(%r10,%r8,4)
movzwl -0x8(%rsi), %r8d
imulq $0x28f5c29, %r8, %r10   # imm = 0x28F5C29
shrq $0x20, %r10
imull $0x64, %r10d, %r11d
subl %r11d, %r8d
imulq $0x4b0, %r10, %r10      # imm = 0x4B0
addq %rax, %r10
leaq (%r8,%r8,2), %r8
addb %r9b, 0x1(%r10,%r8,4)
incq %rdi
movsbq 0x4(%rdx), %r8
addq $0xc, %rsi
cmpq %r8, %rdi
jl 0x23374
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/gamemap.cpp
// Function: gamemap::reset()
void gamemap::reset()
{
	for (int y=0;y<height;y++)
	for (int x=0;x<width;x++)
	{
		island& here = map[y][x];
		
		here.totbridges = 0;
		if (here.bridges[0] <= 2) here.bridges[0] = 0;
		if (here.bridges[1] <= 2) here.bridges[1] = 0;
		if (here.bridges[2] <= 2) here.bridges[2] = 0;
		if (here.bridges[3] <= 2) here.bridges[3] = 0;
	}
}

// Assembly:
movslq 0x4(%rdi), %rax
testq %rax, %rax
jle 0x23457
movl (%rdi), %ecx
addq $0x17, %rdi
movq %rcx, %rdx
shlq $0x2, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
testl %ecx, %ecx
jle 0x23448
xorl %r8d, %r8d
movb $0x0, -0xa(%rdi,%r8)
cmpb $0x2, -0x3(%rdi,%r8)
ja 0x23417
movb $0x0, -0x3(%rdi,%r8)
cmpb $0x2, -0x2(%rdi,%r8)
ja 0x23425
movb $0x0, -0x2(%rdi,%r8)
cmpb $0x2, -0x1(%rdi,%r8)
ja 0x23433
movb $0x0, -0x1(%rdi,%r8)
cmpb $0x2, (%rdi,%r8)
ja 0x2343f
movb $0x0, (%rdi,%r8)
addq $0xc, %r8
cmpq %r8, %rdx
jne 0x23403
incq %rsi
addq $0x4b0, %rdi            # imm = 0x4B0
cmpq %rax, %rsi
jne 0x233fc
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/gamemap.cpp
// Function: gamemap::serialize()
string gamemap::serialize()
{
	char ret[100*101+1];
	memset(ret, 0, (width+1)*height+1);
	
	for (int y=0;y<height;y++)
	{
		for (int x=0;x<width;x++)
		{
			island& here = map[y][x];
			
			if (here.rootnode != y*100+x) continue;
			
			char ch = -1; // populations other than the listed ones are impossible, but gcc won't realize that
			
			if(0);
			else if (here.population == -1) ch = ' ';
			else if (here.population == -2) ch = '#';
			else if (here.population <  10) ch = '0'+here.population;
			else if (here.population <  36) ch = 'A'+here.population-10;
			else if (here.population == 80) ch = 'r';
			else if (here.population == 81) ch = 'b';
			else if (here.population == 82) ch = 'y';
			else if (here.population == 83) ch = 'g';
			
			serialize_fill(*this, ret, width, x, y);
			
			ret[(width+1)*y + x] = ch;
		}
		ret[(width+1)*y + width] = '\n';
	}
	
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2798, %rsp           # imm = 0x2798
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
movslq (%rsi), %rdx
incq %rdx
movslq 0x4(%rsi), %rbx
imulq %rbx, %rdx
incq %rdx
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x3170
testq %rbx, %rbx
jle 0x23805
leaq 0xe(%r14), %rbp
xorl %ebx, %ebx
xorl %esi, %esi
movl (%r14), %edx
testl %edx, %edx
movq %rbp, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
jle 0x237ce
movslq %esi, %r12
xorl %r13d, %r13d
movswq (%rbp), %rax
leaq (%rbx,%r13), %rcx
movl %eax, %eax
cmpq %rax, %rcx
jne 0x237a4
movzbl -0x2(%rbp), %ecx
cmpl $0xff, %ecx
je 0x23761
cmpl $0xfe, %ecx
jne 0x23766
movb $0x23, %r15b
jmp 0x2377b
movb $0x20, %r15b
jmp 0x2377b
cmpb $0x9, %cl
jg 0x23770
addb $0x30, %cl
jmp 0x23778
cmpb $0x23, %cl
jg 0x237b5
addb $0x37, %cl
movl %ecx, %r15d
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
movl %r13d, %ecx
movl %r12d, %r8d
callq 0x2383a
movslq (%r14), %rax
incq %rax
imulq %r12, %rax
addq %rsp, %rax
addq $0x20, %rax
movb %r15b, (%r13,%rax)
incq %r13
movslq (%r14), %rdx
addq $0xc, %rbp
cmpq %rdx, %r13
jl 0x23738
jmp 0x237ce
addb $-0x50, %cl
movb $-0x1, %r15b
cmpb $0x3, %cl
ja 0x2377b
shlb $0x3, %cl
movl $0x67796272, %r15d      # imm = 0x67796272
shrl %cl, %r15d
jmp 0x2377b
leal 0x1(%rdx), %eax
movq 0x10(%rsp), %rsi
movl %esi, %ecx
imull %eax, %ecx
addl %edx, %ecx
movslq %ecx, %rax
movb $0xa, 0x20(%rsp,%rax)
incq %rsi
movslq 0x4(%r14), %rax
addq $0x64, %rbx
movq 0x18(%rsp), %rbp
addq $0x4b0, %rbp            # imm = 0x4B0
cmpq %rax, %rsi
jl 0x2371d
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x30f0
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1929c
movq %rbx, %rax
addq $0x2798, %rsp           # imm = 0x2798
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/gamemap.cpp
// Function: serialize_fill(gamemap&, char*, int, int, int)
static void serialize_fill(gamemap& map, char * ret, int width, int x, int y)
{
	if (map.map[y][x].bridges[0] == 3 && ret[(width+1)*y+(x+1)] == '\0')
	{
		ret[(width+1)*y+(x+1)] = '<';
		serialize_fill(map, ret, width, x+1, y);
	}
	if (map.map[y][x].bridges[1] == 3 && ret[(width+1)*(y-1)+x] == '\0')
	{
		ret[(width+1)*(y-1)+x] = 'v';
		serialize_fill(map, ret, width, x, y-1);
	}
	if (map.map[y][x].bridges[2] == 3 && ret[(width+1)*y+(x-1)] == '\0')
	{
		ret[(width+1)*y+(x-1)] = '>';
		serialize_fill(map, ret, width, x-1, y);
	}
	if (map.map[y][x].bridges[3] == 3 && ret[(width+1)*(y+1)+x] == '\0')
	{
		ret[(width+1)*(y+1)+x] = '^';
		serialize_fill(map, ret, width, x, y+1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebx
movq %rsi, %r12
movq %rdx, 0x18(%rsp)
leal 0x1(%rdx), %ebp
leal 0x1(%rbx), %r15d
imull %ebp, %r15d
movl %r8d, %esi
imull %ebp, %esi
leal -0x1(%rsi), %r9d
incl %esi
movslq %r8d, %r13
imulq $0x4b0, %r13, %rax      # imm = 0x4B0
movslq %ecx, %r10
leaq (%r10,%r10,2), %rdx
leaq (%rax,%rdx,4), %rax
movq %rdi, 0x10(%rsp)
leaq (%rdi,%rax), %r14
addq $0x17, %r14
decl %r13d
imull %ebp, %r13d
incl %r10d
movq %r10, 0x30(%rsp)
leal -0x1(%rcx), %eax
movl %eax, 0x2c(%rsp)
movq %rcx, 0x20(%rsp)
cmpb $0x3, -0x3(%r14)
jne 0x238f0
leal (%rcx,%rsi), %eax
cltq
cmpb $0x0, (%r12,%rax)
jne 0x238f0
movb $0x3c, (%r12,%rax)
movq 0x10(%rsp), %rdi
movq %rsi, 0x8(%rsp)
movq %r12, %rsi
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl %ebx, %r8d
movq %r9, (%rsp)
callq 0x2383a
movq (%rsp), %r9
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rcx
cmpb $0x3, -0x2(%r14)
jne 0x23936
leal (%rcx,%r13), %eax
cltq
cmpb $0x0, (%r12,%rax)
jne 0x23936
leal -0x1(%rbx), %r8d
movb $0x76, (%r12,%rax)
movq 0x10(%rsp), %rdi
movq %rsi, 0x8(%rsp)
movq %r12, %rsi
movq 0x18(%rsp), %rdx
movq %r9, (%rsp)
callq 0x2383a
movq (%rsp), %r9
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rcx
cmpb $0x3, -0x1(%r14)
jne 0x2397f
leal (%rcx,%r9), %eax
cltq
cmpb $0x0, (%r12,%rax)
jne 0x2397f
movb $0x3e, (%r12,%rax)
movq 0x10(%rsp), %rdi
movq %rsi, 0x8(%rsp)
movq %r12, %rsi
movq 0x18(%rsp), %rdx
movl 0x2c(%rsp), %ecx
movl %ebx, %r8d
movq %r9, (%rsp)
callq 0x2383a
movq (%rsp), %r9
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rcx
cmpb $0x3, (%r14)
jne 0x239b0
leal (%rcx,%r15), %eax
cltq
cmpb $0x0, (%r12,%rax)
jne 0x239b0
movb $0x5e, (%r12,%rax)
addl %ebp, %r15d
addl %ebp, %r9d
addl %ebp, %esi
addq $0x4b0, %r14            # imm = 0x4B0
addl %ebp, %r13d
incl %ebx
jmp 0x238a7
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/generate.cpp
// Function: gamemap::generator::generator(gamemap::genparams const&)
gamemap::generator::generator(const gamemap::genparams& par) : par(par)
{
	//WARNING: Even if this one is made constant, output will still be nondeterministic,
	//  due to threads finishing in varying order, making different maps seem superior;
	//  therefore, it is not allowed to override it.
	//A fixed random seed with exactly one thread will be deterministic.
	randseed = time_us() << 16;
	
#ifdef ARLIB_THREAD
	unsigned n_threads = thread_num_cores_idle();
	// don't spin up too many shortlived threads
	if (n_threads > par.quality / 500) n_threads = par.quality / 500;
	if (n_threads > 32) n_threads = 32; // more than 32 is just excessive, such high quality is pointless
	if (n_threads < 1) n_threads = 1;
	
	n_started = n_threads;
	n_more_threads = n_threads-1;
	thread_create(bind_this(&generator::threadproc), pri_idle);
#else
	n_started = 1;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rdi)
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
movq 0x20(%rsi), %rax
movq %rax, 0x20(%rdi)
movq 0x28(%rsi), %rax
movq %rax, 0x28(%rdi)
testq %rax, %rax
jne 0x23ab5
leaq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0x3560
leaq 0x58(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
movaps 0xeb55(%rip), %xmm0     # 0x32570
movups %xmm0, 0x84(%rbx)
movabsq $0xf423f00000000, %rax  # imm = 0xF423F00000000
movq %rax, 0xa0(%rbx)
movb $0x0, 0xa8(%rbx)
callq 0x1c31c
shlq $0x10, %rax
movq %rax, 0x78(%rbx)
callq 0x1c2be
movl 0x14(%r14), %ecx
imulq $0x10624dd3, %rcx, %rcx # imm = 0x10624DD3
shrq $0x25, %rcx
cmpl %ecx, %eax
cmovbl %eax, %ecx
cmpl $0x20, %ecx
movl $0x20, %eax
cmovbl %ecx, %eax
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x80(%rbx)
decb %al
movb %al, 0xa9(%rbx)
leaq 0x2336(%rip), %rax      # 0x25dbc
movq %rsp, %r14
movq %rax, 0x8(%r14)
movq %rbx, (%r14)
movq $0x0, 0x10(%r14)
movq %r14, %rdi
movl $0x3, %esi
callq 0x1c1c4
movq %r14, %rdi
callq 0xa752
addq $0x18, %rsp
popq %rbx
popq %r14
retq
incq (%rax)
jmp 0x239fc
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/generate.cpp
// Function: gamemap::generator::threadproc()
void gamemap::generator::threadproc()
{
	gamemap map; // this object is huge, cache it to avoid pointless stack probing
	
	workitem w;
	synchronized(mut)
	{
		get_work(true, w);
		
#ifdef ARLIB_THREAD
		if (n_more_threads)
		{
			thread_create(bind_this(&generator::threadproc), pri_idle);
			n_more_threads--;
		}
#endif
	}
	
	while (true)
	{
		do_work(w, map);
		
		synchronized(mut)
		{
			finish_work(w);
			
			if (!get_work(false, w))
			{
				if (n_started == n_finished) sem.release();
				return; // not break, synchronized() uses a for loop internally
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x24a28, %rsp          # imm = 0x24A28
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
movq %r14, %rdi
callq 0x3520
movq 0x78(%rbx), %rax
incq %rax
movq %rax, 0x78(%rbx)
movq %rax, 0x8(%rsp)
cmpb $0x0, 0xa9(%rbx)
je 0x23b2d
leaq 0x22be(%rip), %rax      # 0x25dbc
leaq 0x20(%rsp), %r15
movq %rax, 0x8(%r15)
movq %rbx, (%r15)
movq $0x0, 0x10(%r15)
movq %r15, %rdi
movl $0x3, %esi
callq 0x1c1c4
movq %r15, %rdi
callq 0xa752
decb 0xa9(%rbx)
movq %r14, %rdi
callq 0x3250
leaq 0x58(%rbx), %r15
leaq 0x8(%rsp), %r12
leaq 0x20(%rsp), %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x23c22
movq %r14, %rdi
callq 0x3520
movq %rbx, %rdi
movq %r12, %rsi
callq 0x252d6
cmpb $0x0, 0xa8(%rbx)
jne 0x23b9c
cmpl $0x0, 0x84(%rbx)
je 0x23b81
movl 0x80(%rbx), %eax
cmpl 0x14(%rbx), %eax
jae 0x23b9c
incl 0x80(%rbx)
movq 0x78(%rbx), %rax
incq %rax
movq %rax, 0x78(%rbx)
movq %rax, 0x8(%rsp)
movb $0x1, %bpl
jmp 0x23b9e
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x23bad
movq %r14, %rdi
callq 0x3250
jmp 0x23b43
movl 0x80(%rbx), %eax
cmpl 0x88(%rbx), %eax
jne 0x23bc3
movq %r15, %rdi
callq 0x3650
movq %r14, %rdi
callq 0x3250
testb %bpl, %bpl
jne 0x23b43
addq $0x24a28, %rsp          # imm = 0x24A28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/generate.cpp
// Function: gamemap::generator::get_work(bool, gamemap::generator::workitem&)
bool gamemap::generator::get_work(bool first, workitem& w)
{
	if (!first)
	{
		if (stop) return false;
		if (n_valid > 0 && n_started >= par.quality) return false;
		n_started++;
	}
	
	randseed++;
	w.seed = randseed;
	return true;
}

// Assembly:
testl %esi, %esi
jne 0x23c0d
cmpb $0x0, 0xa8(%rdi)
jne 0x23c1e
cmpl $0x0, 0x84(%rdi)
je 0x23c07
movl 0x80(%rdi), %eax
cmpl 0x14(%rdi), %eax
jae 0x23c1e
incl 0x80(%rdi)
movq 0x78(%rdi), %rax
incq %rax
movq %rax, 0x78(%rdi)
movq %rax, (%rdx)
movb $0x1, %al
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/generate.cpp
// Function: gamemap::generator::do_work(gamemap::generator::workitem&, gamemap&)
void gamemap::generator::do_work(workitem& w, gamemap& map)
{
	loc_generator lgen(map, par);
	lgen.generate_one(w.seed);
	
	//if (!map.finished()) abort();
	w.valid = true;
	if (map.numislands <= 1 && par.width*par.height >= 5) w.valid = false;
	if (!par.allow_ambiguous && map.solve_another()) w.valid = false;
	
	if (w.valid)
	{
		w.diff = map.difficulty();
		
		w.penalty = 0;
		if (!par.dense)
		{
			unsigned n_close = 0;
			
			for (int y=0;y<map.height;y++)
			for (int x=0;x<map.width;x++)
			{
				int idx = y*100+x;
				gamemap::island& here = map.get(idx);
				
				if (here.population < 0) continue;
				n_close += (here.bridgelen[0] == 1) + (here.bridgelen[3] == 1);
			}
			w.penalty += (unsigned)(5 * powf(n_close, 1.5f));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x10(%rsp), %rdi
movq %rdx, -0x10(%rdi)
movq %r15, -0x8(%rdi)
movq $0x0, (%rdi)
callq 0x165a4
movq (%rbx), %rsi
movq %rsp, %rdi
callq 0x23d66
movb $0x1, 0x8(%rbx)
cmpl $0x1, 0x8(%r14)
jg 0x23c79
movzbl (%r15), %eax
movzbl 0x1(%r15), %ecx
imull %eax, %ecx
cmpl $0x5, %ecx
jb 0x23c79
movb $0x0, 0x8(%rbx)
cmpb $0x0, 0xc(%r15)
jne 0x23c90
movq %r14, %rdi
callq 0x2633c
testb %al, %al
je 0x23c90
movb $0x0, 0x8(%rbx)
cmpb $0x1, 0x8(%rbx)
jne 0x23d5b
movq %r14, %rdi
callq 0x2686a
movl %eax, 0xc(%rbx)
movl $0x0, 0x10(%rbx)
cmpb $0x0, 0x8(%r15)
jne 0x23d5b
movl 0x4(%r14), %eax
testl %eax, %eax
jle 0x23d3b
movl (%r14), %ecx
addq $0xc, %r14
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
movl %edx, %r8d
movl %ecx, %r9d
testl %ecx, %ecx
jle 0x23d29
movzwl %r8w, %r11d
imulq $0x28f5c29, %r11, %r10  # imm = 0x28F5C29
shrq $0x20, %r10
imull $0x64, %r10d, %ebp
subl %ebp, %r11d
imulq $0x4b0, %r10, %r10      # imm = 0x4B0
addq %r14, %r10
leaq (%r11,%r11,2), %r11
cmpb $0x0, (%r10,%r11,4)
js 0x23d21
leaq (%r10,%r11,4), %r10
xorl %r11d, %r11d
cmpb $0x1, 0x4(%r10)
sete %r11b
xorl %ebp, %ebp
cmpb $0x1, 0x7(%r10)
sete %bpl
addl %r11d, %esi
addl %ebp, %esi
incl %r8d
decl %r9d
jne 0x23cd6
incl %edi
addl $0x64, %edx
cmpl %eax, %edi
jne 0x23ccc
movl %esi, %eax
cvtsi2ss %rax, %xmm0
jmp 0x23d3e
xorps %xmm0, %xmm0
movss 0xe84a(%rip), %xmm1     # 0x32590
callq 0x35b0
mulss 0xe841(%rip), %xmm0     # 0x32594
cvttss2si %xmm0, %rax
addl %eax, 0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/generate.cpp
// Function: gamemap::generator::finish_work(gamemap::generator::workitem&)
void gamemap::generator::finish_work(workitem& w)
{
	n_finished++;
	
	if (w.valid)
	{
		auto absdiff = [](unsigned a, unsigned b)->unsigned { if (a > b) return a-b; else return b-a; };
		
		n_valid++;
		
		if (w.diff > diff_max) diff_max = w.diff;
		if (w.diff < diff_min) diff_min = w.diff;
		
		unsigned ideal_diff = (diff_max-diff_min)*par.difficulty + diff_min;
//printf("%u,%u,%u=%u ",w.diff,ideal_diff,w.penalty,absdiff(w.diff,ideal_diff) + w.penalty);
//printf("%u,%u,%u=%u\n",best_diff, ideal_diff, best_pen,absdiff(best_diff,ideal_diff) + best_pen);
		if (diff_max<=diff_min || absdiff(w.diff, ideal_diff) + w.penalty <= absdiff(best_diff, ideal_diff) + best_pen)
		{
			best_seed = w.seed;
			best_diff = w.diff;
			best_pen = w.penalty;
//printf("%u-%u (#%u)\n",best_diff,w.penalty,n_valid);
		}
	}
}

// Assembly:
incl 0x88(%rdi)
cmpb $0x1, 0x8(%rsi)
jne 0x25381
incl 0x84(%rdi)
movl 0xc(%rsi), %eax
cmpl 0x90(%rdi), %eax
jbe 0x252fd
movl %eax, 0x90(%rdi)
cmpl 0x8c(%rdi), %eax
jae 0x2530b
movl %eax, 0x8c(%rdi)
movl 0x8c(%rdi), %ecx
movl 0x90(%rdi), %edx
subl %ecx, %edx
jbe 0x25368
cvtsi2ss %rdx, %xmm0
movl %ecx, %ecx
cvtsi2ss %rcx, %xmm1
mulss 0x10(%rdi), %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %rcx
movl 0xa0(%rdi), %edx
movl %ecx, %r8d
subl %edx, %r8d
negl %r8d
movl %ecx, %r9d
subl %edx, %r9d
cmovbl %r8d, %r9d
movl %ecx, %edx
subl %eax, %edx
negl %edx
subl %eax, %ecx
cmovbl %edx, %ecx
addl 0x10(%rsi), %ecx
addl 0xa4(%rdi), %r9d
cmpl %r9d, %ecx
ja 0x25381
movq (%rsi), %rcx
movq %rcx, 0x98(%rdi)
movl %eax, 0xa0(%rdi)
movl 0x10(%rsi), %eax
movl %eax, 0xa4(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/generate.cpp
// Function: gamemap::generator::finish(gamemap&)
bool gamemap::generator::finish(gamemap& map)
{
	uint64_t seed = pack();
	if (!seed) return false;
	unpack(par, seed, map);
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %r14
callq 0x25424
movq %rax, %rbx
testq %rax, %rax
je 0x25414
leaq 0x18(%rsp), %rdi
movq %r15, -0x10(%rdi)
movq %r14, -0x8(%rdi)
movq $0x0, (%rdi)
callq 0x165a4
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x23d66
testq %rbx, %rbx
setne %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/generate.cpp
// Function: gamemap::generator::pack()
uint64_t gamemap::generator::pack()
{
#ifndef ARLIB_THREAD
	threadproc();
#endif
	sem.wait();
	
//printf("Generated %u maps (%u usable)\n", n_finished, n_valid);
//printf("Difficulty: %i (%f, desired %f), range %i-%i\n", best_diff,
//(best_diff-diff_min) / (float)(diff_max-diff_min), par.difficulty, diff_min, diff_max);
//puts(serialize());
	
	uint64_t ret;
	synchronized(mut) // must grab mutex after awaiting the semaphore, to avoid race condition on releasing vs freeing mutex
	{
		ret = n_valid ? best_seed : 0;
	}
	
	sem.release(); // in case some fool decides to call pack() multiple times
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
leaq 0x58(%rdi), %rbx
movq %rbx, %rdi
callq 0x25da0
leaq 0x30(%r15), %r14
movq %r14, %rdi
callq 0x3520
cmpl $0x0, 0x84(%r15)
je 0x25457
movq 0x98(%r15), %r15
jmp 0x2545a
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x3250
movq %rbx, %rdi
callq 0x3650
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/solver.cpp
// Function: (anonymous namespace)::linker::join(unsigned short, unsigned short)
bool join(uint16_t a, uint16_t b)
	{
		uint16_t r1 = root(a);
		uint16_t r2 = root(b);
		
		if (r1 == r2) return true;
		
		link_t& lr1 = links[r1];
		link_t& lr2 = links[r2];
		
		links[lr1.join_last].join_next = r2;
		links[lr2.join_last].join_next = r1;
		lr1.join_last = lr2.join_last;
		lr2.join_root = r1;
		
		if (lr1.castlecolor >= 80 || lr2.castlecolor >= 80)
		{
			if (lr1.castlecolor == lr2.castlecolor) return true;
			if (lr1.castlecolor >= 80 && lr2.castlecolor >= 80) return false;
			if (lr1.castlecolor < lr2.castlecolor) lr1.castlecolor = lr2.castlecolor;
		}
		return true;
	}

// Assembly:
movl %esi, %eax
movl %eax, %r8d
movzwl %ax, %ecx
movl %ecx, %eax
shll $0x4, %eax
movzwl 0x8(%rdi,%rax), %eax
cmpw %ax, %cx
jne 0x2809e
cmpw %si, %r8w
je 0x280d0
movzwl %si, %eax
shll $0x4, %eax
movzwl 0x8(%rdi,%rax), %esi
movw %r8w, 0x8(%rdi,%rax)
cmpw %r8w, %si
jne 0x280b9
movl %edx, %eax
movl %eax, %r9d
movzwl %ax, %esi
movl %esi, %eax
shll $0x4, %eax
movzwl 0x8(%rdi,%rax), %eax
cmpw %ax, %si
jne 0x280d2
cmpw %dx, %r9w
je 0x28104
movzwl %dx, %eax
shll $0x4, %eax
movzwl 0x8(%rdi,%rax), %edx
movw %r9w, 0x8(%rdi,%rax)
cmpw %r9w, %dx
jne 0x280ed
movb $0x1, %al
cmpw %r9w, %r8w
je 0x2816e
shll $0x4, %ecx
shll $0x4, %esi
leaq (%rdi,%rsi), %rdx
movzwl 0xc(%rdi,%rcx), %r10d
shll $0x4, %r10d
movw %r9w, 0xa(%rdi,%r10)
movzwl 0xc(%rdi,%rsi), %r9d
movl %r9d, %r10d
shll $0x4, %r10d
movw %r8w, 0xa(%rdi,%r10)
movw %r9w, 0xc(%rdi,%rcx)
movw %r8w, 0x8(%rdi,%rsi)
movzwl 0xe(%rdi,%rcx), %esi
cmpw $0x4f, %si
ja 0x28157
cmpw $0x50, 0xe(%rdx)
jb 0x2816e
movzwl 0xe(%rdx), %edx
cmpw %dx, %si
je 0x2816e
cmpw $0x50, %si
jb 0x2816f
cmpw $0x4f, %dx
jbe 0x2816f
xorl %eax, %eax
retq
cmpw %dx, %si
jae 0x2816e
addq %rcx, %rdi
movw %dx, 0xe(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/solver.cpp
// Function: (anonymous namespace)::linker::query(unsigned short, unsigned short)
uint16_t query(uint16_t index, uint16_t other)
	{
		if (other != (uint16_t)-1) other = root(other);
		uint16_t r = root(index);
		uint16_t ni = r;
		do {
			link_t& link = links[ni];
			
			for (int i=0;i<4;i++)
			{
				if (link.links[i] != (uint16_t)-1)
				{
					uint16_t targetroot = root(link.links[i]);
					if (targetroot == r)
						link.links[i] = -1;
					else if (targetroot == other)
						other = -1;
					else
						return link.links[i];
				}
			}
			
			ni = link.join_next;
			//if (other != (uint16_t)-1) links[r].join_firstneighbor = ni;
		} while (ni != r);
		return -1;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
cmpl $0xffff, %edx           # imm = 0xFFFF
je 0x281bf
movl %edx, %ecx
movl %ecx, %eax
movzwl %cx, %r8d
movl %r8d, %ecx
shll $0x4, %ecx
movzwl 0x8(%rdi,%rcx), %ecx
cmpw %cx, %r8w
jne 0x2818c
cmpw %dx, %ax
je 0x281bd
movzwl %dx, %ecx
shll $0x4, %ecx
movzwl 0x8(%rdi,%rcx), %edx
movw %ax, 0x8(%rdi,%rcx)
cmpw %ax, %dx
jne 0x281a8
movl %eax, %edx
movl %esi, %eax
movl %eax, %ecx
movzwl %ax, %r8d
movl %r8d, %eax
shll $0x4, %eax
movzwl 0x8(%rdi,%rax), %eax
cmpw %ax, %r8w
jne 0x281c1
cmpw %si, %cx
je 0x281f2
movzwl %si, %eax
shll $0x4, %eax
movzwl 0x8(%rdi,%rax), %esi
movw %cx, 0x8(%rdi,%rax)
cmpw %cx, %si
jne 0x281dd
movl %ecx, %esi
movzwl %si, %r8d
shll $0x4, %r8d
addq %rdi, %r8
xorl %r10d, %r10d
xorl %r9d, %r9d
movzwl (%r8,%r10,2), %ebx
cmpw $-0x1, %bx
je 0x2827a
movl %ebx, %ebp
movl %ebp, %r11d
movzwl %bp, %r14d
movl %r14d, %r15d
shll $0x4, %r15d
movzwl 0x8(%rdi,%r15), %ebp
cmpw %bp, %r14w
jne 0x28212
cmpw %bx, %r11w
je 0x2824c
movzwl %bx, %r14d
shll $0x4, %r14d
movzwl 0x8(%rdi,%r14), %ebx
movw %r11w, 0x8(%rdi,%r14)
cmpw %r11w, %bx
jne 0x28232
cmpw %cx, %r11w
jne 0x2825e
movw $0xffff, (%r8,%r10,2)   # imm = 0xFFFF
movb $0x1, %r11b
jmp 0x28275
cmpw %dx, %r11w
jne 0x2826d
movb $0x1, %r11b
movw $0xffff, %dx            # imm = 0xFFFF
jmp 0x28275
movzwl (%r8,%r10,2), %eax
xorl %r11d, %r11d
testb %r11b, %r11b
je 0x28293
cmpq $0x3, %r10
leaq 0x1(%r10), %r11
setae %r9b
movq %r11, %r10
cmpq $0x4, %r11
jne 0x28205
testb $0x1, %r9b
je 0x2829e
movzwl 0xa(%r8), %esi
testb $0x1, %r9b
je 0x282b1
cmpw %cx, %si
jne 0x281f4
movw $0xffff, %ax            # imm = 0xFFFF
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/./arlib/game.h
// Function: gameview* gameview::create<aropengl>(aropengl&, unsigned int, unsigned int, unsigned int, cstring)
static gameview* create(Taropengl& gl, uint32_t width, uint32_t height, uint32_t glflags, cstring windowtitle)
{
#ifndef _WIN32
	uintptr_t window;
	if (!gl.create(width, height, root_parent(), &window, glflags)) return NULL;
	return create_finish(window, width, height, windowtitle);
#else
	// GL only works on child windows on windows
	uintptr_t parent;
	uintptr_t* child;
	gameview* ret = create(width, height, windowtitle, &parent, &child);
	if (!gl.create(width, height, parent, child, glflags)) { delete ret; return NULL; }
	return ret;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r14
movl %ecx, %r12d
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r13
callq 0x9f8e
leaq 0x8(%r13), %rbx
leaq 0x10(%rsp), %rcx
movl %r15d, %edi
movl %ebp, %esi
movq %rax, %rdx
movl %r12d, %r8d
callq 0x161b8
leaq 0x7f44(%rip), %rdx      # 0x32e56
movq %r13, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x1653c
testb %al, %al
je 0x2af3d
movq 0x10(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r14, %rcx
movq 0x8(%rsp), %r8
callq 0x9f40
jmp 0x2af3f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/./arlib/argparse.h
// Function: argparse::add(char, cstring, bool*)
arg_bool& add(char sname, cstring name, bool* target)
	{
		arg_bool* arg = new arg_bool(target);
		arg->name = name;
		arg->sname = sname;
		m_args.append_take(*arg);
		return *arg;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movl $0x28, %edi
callq 0x3340
movq %rax, %r14
leaq 0x8(%rax), %rdi
movb $0xf, 0x17(%rax)
xorl %eax, %eax
movb %al, 0x8(%r14)
movl $0x1000001, 0x19(%r14)  # imm = 0x1000001
movb %al, 0x1d(%r14)
leaq 0x1aa26(%rip), %rax     # 0x459c0
movq %rax, (%r14)
movq %r12, 0x20(%r14)
leaq 0x8(%rsp), %rax
movq %r15, (%rax)
movq %r13, 0x8(%rax)
movzbl 0xf(%rax), %ecx
movq %rcx, %rsi
xorq $0xf, %rsi
testb %cl, %cl
movl %r13d, %edx
cmovnsq %rax, %r15
cmovnsq %rsi, %rdx
movq %r15, %rsi
callq 0x193dc
movb %bpl, 0x18(%r14)
leaq 0x10(%rbx), %rdi
movq 0x18(%rbx), %r15
leaq 0x1(%r15), %rsi
callq 0x2b070
movq 0x10(%rbx), %rax
leaq (%rax,%r15,8), %rsi
leaq (%rax,%r15,8), %rdi
addq $0x8, %rdi
movq %r15, %rdx
notq %rdx
addq 0x18(%rbx), %rdx
shlq $0x3, %rdx
callq 0x3600
movq 0x10(%rbx), %rax
movq %r14, (%rax,%r15,8)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deps/miniz.c
// Function: mz_adler32
mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len)
{
  mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16); size_t block_len = buf_len % 5552;
  if (!ptr) return MZ_ADLER32_INIT;
  while (buf_len) {
    for (i = 0; i + 7 < block_len; i += 8, ptr += 8) {
      s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1;
      s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1;
    }
    for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1;
    s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552;
  }
  return (s2 << 16) + s1;
}

// Assembly:
testq %rsi, %rsi
je 0x2b263
movq %rdx, %r8
movq %rdi, %rcx
shrq $0x10, %rcx
movzwl %di, %edi
testq %rdx, %rdx
je 0x2b25c
movq %r8, %rax
shrq $0x4, %rax
movabsq $0x179baa6bb6398b7, %rdx # imm = 0x179BAA6BB6398B7
mulq %rdx
shrq %rdx
imulq $0x15b0, %rdx, %rdx     # imm = 0x15B0
movq %r8, %rax
subq %rdx, %rax
movl $0x80078071, %edx       # imm = 0x80078071
xorl %r9d, %r9d
cmpq $0x8, %rax
jb 0x2b204
movzbl (%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x1(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x2(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x3(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x4(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x5(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x6(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x7(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
addq $0x8, %r9
leal 0x7(%r9), %r10d
cmpl %eax, %r10d
jb 0x2b199
addq %r9, %rsi
movq %rax, %r10
subq %r9, %r10
jbe 0x2b224
xorl %r9d, %r9d
movzbl (%rsi,%r9), %r11d
addl %r11d, %edi
addl %edi, %ecx
incq %r9
cmpq %r9, %r10
jne 0x2b20f
addq %r10, %rsi
movl %edi, %r9d
imulq %rdx, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %edi
movl %ecx, %r9d
imulq %rdx, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %ecx
subq %rax, %r8
movl $0x15b0, %eax           # imm = 0x15B0
jne 0x2b190
shll $0x10, %ecx
orl %edi, %ecx
jmp 0x2b268
movl $0x1, %ecx
movq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deps/miniz.c
// Function: tdefl_flush_output_buffer
static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d)
{
  if (d->m_pIn_buf_size)
  {
    *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf;
  }

  if (d->m_pOut_buf_size)
  {
    size_t n = MZ_MIN(*d->m_pOut_buf_size - d->m_out_buf_ofs, d->m_output_flush_remaining);
    memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n);
    d->m_output_flush_ofs += (mz_uint)n;
    d->m_output_flush_remaining -= (mz_uint)n;
    d->m_out_buf_ofs += n;

    *d->m_pOut_buf_size = d->m_out_buf_ofs;
  }

  return (d->m_finished && !d->m_output_flush_remaining) ? TDEFL_STATUS_DONE : TDEFL_STATUS_OKAY;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rax
testq %rax, %rax
je 0x2b46f
movq 0xb0(%rbx), %rcx
subq 0x88(%rbx), %rcx
movq %rcx, (%rax)
movq 0xa0(%rbx), %rax
testq %rax, %rax
je 0x2b4cf
movq (%rax), %r14
movq 0xc0(%rbx), %rdi
subq %rdi, %r14
movl 0x74(%rbx), %eax
cmpq %rax, %r14
cmovaeq %rax, %r14
movl 0x70(%rbx), %eax
addq 0x90(%rbx), %rdi
leaq (%rbx,%rax), %rsi
addq $0x392aa, %rsi          # imm = 0x392AA
movq %r14, %rdx
callq 0x3280
addl %r14d, 0x70(%rbx)
subl %r14d, 0x74(%rbx)
addq 0xc0(%rbx), %r14
movq %r14, 0xc0(%rbx)
movq 0xa0(%rbx), %rax
movq %r14, (%rax)
cmpl $0x0, 0x78(%rbx)
je 0x2b4e0
xorl %eax, %eax
cmpl $0x0, 0x74(%rbx)
sete %al
jmp 0x2b4e2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deps/miniz.c
// Function: tdefl_init
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
  d->m_pPut_buf_func = pPut_buf_func; d->m_pPut_buf_user = pPut_buf_user;
  d->m_flags = (mz_uint)(flags); d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3; d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0;
  d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3;
  if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) MZ_CLEAR_OBJ(d->m_hash);
  d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0;
  d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0;
  d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8;
  d->m_pOutput_buf = d->m_output_buf; d->m_pOutput_buf_end = d->m_output_buf; d->m_prev_return_status = TDEFL_STATUS_OKAY;
  d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0; d->m_adler32 = 1;
  d->m_pIn_buf = NULL; d->m_pOut_buf = NULL;
  d->m_pIn_buf_size = NULL; d->m_pOut_buf_size = NULL;
  d->m_flush = TDEFL_NO_FLUSH; d->m_pSrc = NULL; d->m_src_buf_left = 0; d->m_out_buf_ofs = 0;
  memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
  memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
  return TDEFL_STATUS_OKAY;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movl %ecx, 0x10(%rdi)
movl %ecx, %eax
andl $0xfff, %eax            # imm = 0xFFF
leal 0x2(%rax), %edx
imulq $0x55555556, %rdx, %rdx # imm = 0x55555556
shrq $0x20, %rdx
incl %edx
movl %edx, 0x14(%rdi)
movl %ecx, %edx
shrl $0xe, %edx
andl $0x1, %edx
movl %edx, 0x1c(%rdi)
shrl $0x2, %eax
addl $0x2, %eax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
shrq $0x20, %rax
incl %eax
movl %eax, 0x18(%rdi)
testw %cx, %cx
js 0x2cc41
leaq 0x292aa(%rbx), %rdi
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x3170
xorl %eax, %eax
movq %rax, 0x28(%rbx)
leaq 0x92aa(%rbx), %rcx
leaq 0x92ab(%rbx), %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x54(%rbx)
movups %xmm0, 0x70(%rbx)
movq %rax, 0x80(%rbx)
movq %rdx, 0x30(%rbx)
movq %rcx, 0x38(%rbx)
movl $0x8, 0x50(%rbx)
leaq 0x392aa(%rbx), %rcx
movq %rcx, 0x40(%rbx)
movq %rcx, 0x48(%rbx)
movl %eax, 0x6c(%rbx)
movq %rax, 0x64(%rbx)
movq $0x1, 0x20(%rbx)
leaq 0x81ca(%rbx), %rdi
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movl %eax, 0xa8(%rbx)
movups %xmm0, 0xb0(%rbx)
movq %rax, 0xc0(%rbx)
movl $0x280, %edx            # imm = 0x280
xorl %esi, %esi
callq 0x3170
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deps/miniz.c
// Function: tdefl_compress_mem_to_output
mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
  tdefl_compressor *pComp; mz_bool succeeded; if (((buf_len) && (!pBuf)) || (!pPut_buf_func)) return MZ_FALSE;
  pComp = (tdefl_compressor*)MZ_MALLOC(sizeof(tdefl_compressor)); if (!pComp) return MZ_FALSE;
  succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == TDEFL_STATUS_OKAY);
  succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE);
  MZ_FREE(pComp); return succeeded;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
testq %rsi, %rsi
setne %al
testq %rdi, %rdi
sete %cl
andb %al, %cl
testq %rdx, %rdx
sete %al
xorl %r13d, %r13d
orb %cl, %al
jne 0x2cd58
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl %r8d, 0x4(%rsp)
movl $0x4df78, %edi          # imm = 0x4DF78
callq 0x3490
testq %rax, %rax
je 0x2cd58
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl 0x4(%rsp), %ecx
callq 0x2cbe0
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x4, %ecx
callq 0x2cba4
xorl %r13d, %r13d
cmpl $0x1, %eax
sete %r13b
movq %rbp, %rdi
callq 0x3430
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Alcaro[P]bridges/arlib/deps/miniz.c
// Function: tdefl_compress_mem_to_heap
void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
{
  tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
  if (!pOut_len) return MZ_FALSE; else *pOut_len = 0;
  out_buf.m_expandable = MZ_TRUE;
  if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return NULL;
  *pOut_len = out_buf.m_size; return out_buf.m_pBuf;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rdx, %rdx
je 0x2cdb5
movl %ecx, %r8d
movq %rdx, %rbx
movq $0x0, (%rdx)
movq %rsp, %rcx
movl $0x1, 0x18(%rcx)
leaq 0x1f(%rip), %rdx        # 0x2cdbd
callq 0x2ccd8
testl %eax, %eax
je 0x2cdb5
movq (%rsp), %rax
movq %rax, (%rbx)
movq 0x10(%rsp), %rax
jmp 0x2cdb7
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq