LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/server.cpp
// Function: (anonymous namespace)::goto_intermission(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void goto_intermission(const string &loadmap)
{
	intermission = true;
	Game::next_map(loadmap);
	if(turns_lagged)
	{
		string str = "Warning: the server lagged "
			+ lex_cast(turns_lagged) + " turns this map.";
		to_log(str);
	}
	interm_over = time(NULL) + Config::int_settings[Config::IS_INTERM_SECS];
	Network::clocksync(interm_over - time(NULL), 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movb $0x1, 0x32c2a(%rip)     # 0x40410
callq 0x199a4
movswl 0x332de(%rip), %esi     # 0x40ad0
testl %esi, %esi
je 0xd8ff
leaq -0x78(%rbp), %rbx
movq %rbx, %rdi
callq 0x2be77
leaq 0x1e994(%rip), %rcx     # 0x2c1a1
movl $0x1b, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4440
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xd843
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0xd84a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x58(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1e951(%rip), %rsi     # 0x2c1bd
callq 0x47c0
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xd895
movq %rdx, -0x38(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x28(%rbp)
jmp 0xd89c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x30(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0xd8c8
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd8e1
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x38(%rbp), %rdi
callq 0x15050
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xd8ff
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
xorl %edi, %edi
callq 0x43b0
leaq 0x34f93(%rip), %rcx     # 0x428a0
movl 0x18(%rcx), %ebx
addq %rax, %rbx
movq %rbx, 0x3319e(%rip)     # 0x40ab8
xorl %edi, %edi
callq 0x43b0
subl %eax, %ebx
movzwl %bx, %edi
xorl %esi, %esi
callq 0xf83a
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xd980
movq -0x28(%rbp), %rsi
jmp 0xd978
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0xd967
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0xd967
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd980
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/network.cpp
// Function: Network::shutdown()
void Network::shutdown()
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_QUIT);
	broadcast();
	close(s_me);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x32dd8(%rip), %rbx     # 0x41128
movq %rbx, %rdi
callq 0x2b340
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2b354
movl $0xffff, %edi           # imm = 0xFFFF
movq %rbx, %rsi
callq 0xe383
movl 0x33dd0(%rip), %edi     # 0x42148
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x47d0
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/network.cpp
// Function: Network::construct_msg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned char)
void Network::construct_msg(string &s, const unsigned char cpair)
{
	/* Note: all message are server-generated, and pretty much the only content
	 * unknown at compile time and beyond the admin's control are the player nicks,
	 * which have limited lenght. Hence, we can rest assured that the strings do
	 * not contain words of lenght > MSG_WIN_X (=57). */
	vector<string> blocks;
	size_t i;
	// break up at spaces:
	while(num_syms(s) > MSG_WIN_X)
	{
		if((i = s.rfind(' ', MSG_WIN_X)) == string::npos)
			i = MSG_WIN_X;
		blocks.push_back(s.substr(0, i));
		s.erase(0, i+1);
	}
	if(!s.empty())
		blocks.push_back(s);
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_ADD_MSG);
	send_buffer.add(cpair);
	send_buffer.add((unsigned char)blocks.size());
	for(i = 0; i < blocks.size(); ++i)
		send_buffer.add(blocks[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movl $0x39, %ebx
leaq -0x70(%rbp), %r12
movq %r14, %rdi
callq 0x2b890
cmpw $0x3a, %ax
jl 0xf591
movl $0x39, %edx
movq %r14, %rdi
movl $0x20, %esi
callq 0x47e0
movq %rax, %r13
cmpq $-0x1, %rax
cmoveq %rbx, %r13
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x4410
movq %r15, %rdi
movq %r12, %rsi
callq 0xfcce
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xf57f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x43f0
incq %r13
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x40c0
jmp 0xf520
cmpq $0x0, 0x8(%r14)
je 0xf5a4
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0xf9be
leaq 0x31b7d(%rip), %rdi     # 0x41128
callq 0x2b340
leaq 0x31b71(%rip), %rdi     # 0x41128
movl $0xa, %esi
callq 0x2b354
movzbl -0x2c(%rbp), %esi
leaq 0x31b5c(%rip), %rdi     # 0x41128
callq 0x2b354
movl -0x48(%rbp), %eax
subl -0x50(%rbp), %eax
shrl $0x5, %eax
movzbl %al, %esi
leaq 0x31b44(%rip), %rdi     # 0x41128
callq 0x2b354
movq -0x50(%rbp), %rsi
cmpq %rsi, -0x48(%rbp)
je 0xf626
xorl %r14d, %r14d
leaq 0x31b2b(%rip), %rbx     # 0x41128
xorl %r15d, %r15d
addq %r14, %rsi
movq %rbx, %rdi
callq 0x2b392
incq %r15
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %r14
cmpq %rax, %r15
jb 0xf600
leaq -0x50(%rbp), %rdi
callq 0xfa0a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf662
jmp 0xf662
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xf665
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0xf665
jmp 0xf662
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0xfa0a
movq %r14, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/network.cpp
// Function: Network::to_chat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Network::to_chat(const string &s)
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_SAY_CHAT);
	send_buffer.add((unsigned short)0);
	send_buffer.add(s);
	send_buffer.add(string("* "));
	send_buffer.add((unsigned char)T_NO_TEAM); // no team, server speaking
	broadcast();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x31a9b(%rip), %rbx     # 0x41128
movq %rbx, %rdi
callq 0x2b340
movq %rbx, %rdi
movl $0x4, %esi
callq 0x2b354
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2b368
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b392
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x1cc28(%rip), %rsi     # 0x2c2ee
leaq 0x1cc23(%rip), %rdx     # 0x2c2f0
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0xdfec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b392
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xf6f9
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq 0x31a28(%rip), %rbx     # 0x41128
movq %rbx, %rdi
movl $0x3, %esi
callq 0x2b354
movl $0xffff, %edi           # imm = 0xFFFF
movq %rbx, %rsi
callq 0xe383
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xf73d
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/network.cpp
// Function: Network::clocksync(unsigned short, unsigned char)
void Network::clocksync(const unsigned short time, const unsigned char spawn)
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_TIME_UPD);
	send_buffer.add(time);
	send_buffer.add(spawn);
	broadcast();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
leaq 0x318d8(%rip), %r15     # 0x41128
movq %r15, %rdi
callq 0x2b340
movq %r15, %rdi
movl $0xe, %esi
callq 0x2b354
movq %r15, %rdi
movl %r14d, %esi
callq 0x2b368
movq %r15, %rdi
movl %ebx, %esi
callq 0x2b354
movl $0xffff, %edi           # imm = 0xFFFF
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe383
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/settings.cpp
// Function: (anonymous namespace)::construct_value_list(std::vector<char, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*)
string construct_value_list(const vector<char> &l, string const* const s)
{
	string ret = "";
	for(vector<char>::const_iterator it = l.begin(); it != l.end(); ++it)
		ret += s[*it] + '/';
	ret.erase(ret.size()-1, 1);
	if(ret.size() > MAX_LIST_LEN)
	{
		ret.erase(ret.rfind('/', MAX_LIST_LEN-4));
		ret += "...";
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rax, (%rdi)
leaq 0x1a730(%rip), %rdx     # 0x2c2f0
movq %rdi, -0x30(%rbp)
movq %rdx, %rsi
callq 0xdfec
movq (%r15), %rbx
cmpq 0x8(%r15), %rbx
je 0x11c45
leaq -0x48(%rbp), %r13
leaq -0x58(%rbp), %r12
movsbq (%rbx), %rax
shlq $0x5, %rax
movq %r13, -0x58(%rbp)
movq (%r14,%rax), %rsi
movq 0x8(%r14,%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xfa82
movq -0x50(%rbp), %rsi
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
movl $0x2f, %r8d
callq 0x47b0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rdi
callq 0x4130
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x11c3c
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
incq %rbx
cmpq 0x8(%r15), %rbx
jne 0x11bdd
movq -0x30(%rbp), %rbx
movq 0x8(%rbx), %rsi
decq %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x40c0
cmpq $0x51, 0x8(%rbx)
jb 0x11c99
movl $0x4c, %edx
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x47e0
movq 0x8(%rbx), %rcx
cmpq %rax, %rcx
jb 0x11cab
movq %rax, 0x8(%rbx)
movq (%rbx), %rcx
movb $0x0, (%rcx,%rax)
leaq 0x23ec5(%rip), %rsi     # 0x35b56
movq %rbx, %rdi
callq 0x47c0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1aa57(%rip), %rdi     # 0x2c709
leaq 0x1aa3c(%rip), %rsi     # 0x2c6f5
movq %rax, %rdx
xorl %eax, %eax
callq 0x4610
jmp 0x11cc5
movq %rax, %r14
jmp 0x11ce4
jmp 0x11ccc
movq %rax, %r14
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x11ce4
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x30(%rbp), %rax
movq (%rax), %rdi
cmpq -0x38(%rbp), %rdi
je 0x11d00
movq -0x38(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x43f0
movq %r14, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/sighandle.cpp
// Function: reg_sig_handlers()
void reg_sig_handlers()
{
	struct sigaction sa;
	sa.sa_handler = handle_signal;
	sigemptyset(&sa.sa_mask);
	sa.sa_flags = 0;
	// List here all signals we're interested in:
	sigaction(SIGINT, &sa, 0);
	sigaction(SIGQUIT, &sa, 0);

	// Child processes would be bots. Let them be reaped:
	signal(SIGCHLD, SIG_IGN);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
leaq 0x5b(%rip), %rax        # 0x124ce
leaq -0x98(%rbp), %rbx
movq %rax, -0x8(%rbx)
movq %rbx, %rdi
callq 0x44e0
movl $0x0, 0x80(%rbx)
leaq -0xa0(%rbp), %rbx
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x44f0
movl $0x3, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x44f0
movl $0x1, %esi
movl $0x11, %edi
callq 0x4490
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: PlayerStats::PlayerStats()
PlayerStats::PlayerStats() : last_known_as(""), deaths(0), tks(0),
	healing_recvd(0), total_time(0), time_specced(0), arch_hits(0),
	arch_shots(0), cm_hits(0), cm_shots(0), ad_lvl(AL_GUEST)
{
	int i;
	for(i = 0; i < NO_CLASS; ++i)
		time_played[i] = 0;
	for(i = 0; i < MAX_WAY_TO_KILL; ++i)
		kills[i] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x10, %rdi
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
leaq 0x19ddf(%rip), %rdx     # 0x2c2f0
movq %rdx, %rsi
callq 0xdfec
xorl %r14d, %r14d
movq %r14, 0x30(%rbx)
leaq 0x90(%rbx), %rdi
movl $0x0, 0x130(%rbx)
movl $0x98, %edx
xorl %esi, %esi
callq 0x4200
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movq %r14, 0x88(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: Player::burn_torch()
bool Player::burn_torch()
{
	--torch_left;
	if(torch_left == 3*TORCH_DURATION/2 || torch_left == TORCH_DURATION/2
		|| torch_left == TORCH_DURATION || !torch_left)
		needs_state_upd = true;
	return !torch_left;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0x160(%rdi), %ecx
leal -0x1(%rcx), %eax
movw %ax, 0x160(%rdi)
cmpl $0x1f4, %ecx            # imm = 0x1F4
jg 0x126d0
cmpl $0x1, %ecx
je 0x126e0
cmpl $0xfb, %ecx
je 0x126e0
jmp 0x126e7
cmpl $0x2ef, %ecx            # imm = 0x2EF
je 0x126e0
cmpl $0x1f5, %ecx            # imm = 0x1F5
jne 0x126e7
movb $0x1, 0x14d(%rdi)
testw %ax, %ax
sete %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: Player::torch_symbol(bool) const
unsigned char Player::torch_symbol(const bool lit) const
{
	if(cl_props.torch)
	{
		if(!torch_left)
			return ',';
		if(lit)
			return torch_sym[2*torch_left/TORCH_DURATION];
		return ' '; // torch not lit
	}
	return '-'; // no torch whatsoever
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x2d, %al
cmpb $0x1, 0x14b(%rdi)
jne 0x1274b
movzwl 0x160(%rdi), %ecx
testw %cx, %cx
setne %dl
movl $0x20, %edi
movl $0x2c, %eax
cmovnel %edi, %eax
andb %sil, %dl
cmpb $0x1, %dl
jne 0x1274b
movswl %cx, %eax
imull $0xffff8313, %eax, %eax # imm = 0xFFFF8313
shrl $0x10, %eax
addl %ecx, %eax
movzwl %ax, %eax
movswl %ax, %ecx
shrl $0xf, %eax
sarl $0x7, %ecx
addl %eax, %ecx
movswq %cx, %rax
leaq 0x1a31a(%rip), %rcx     # 0x2ca62
movb (%rax,%rcx), %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: store_known_players()
void store_known_players()
{
	// This function is called when the server shuts down. Now, it might be that
	// there were players connected at that time, and we need to stat their
	// playing times here!
	extern bool intermission;
	for(list<Player>::iterator pit = cur_players.begin();
		pit != cur_players.end(); ++pit)
	{
		if(pit->botpid != -1) // it's a bot
			known_players.erase(pit->stats_i);
		else
		{
			pit->stats_i->total_time += time(NULL) - pit->stats_i->last_seen;
			time(&(pit->stats_i->last_seen));
		
			if(pit->is_alive())
				pit->stats_i->time_played[pit->cl] += time(NULL) - pit->last_switched_cl;
			else if(pit->team == T_SPEC && !intermission)
				pit->stats_i->time_specced += time(NULL) - pit->last_switched_cl;
		}
	}

	// Now start actually storing the player statistics:
	write_player_stats();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x30230(%rip), %r14     # 0x430c0
leaq 0x30229(%rip), %r15     # 0x430c0
cmpq %r15, %r14
je 0x12f64
leaq 0x2d569(%rip), %r12     # 0x40410
leaq 0x301fa(%rip), %rbx     # 0x430a8
cmpl $-0x1, 0x174(%r14)
je 0x12ecc
movq 0x90(%r14), %rsi
movq %rbx, %rdi
callq 0x14ed0
jmp 0x12f58
xorl %edi, %edi
callq 0x43b0
movq 0x90(%r14), %rcx
subq 0x138(%rcx), %rax
leaq 0x138(%rcx), %rdi
addq %rax, 0xb0(%rcx)
callq 0x43b0
movl 0xbc(%r14), %eax
cmpl $0x2, %eax
je 0x12f30
cmpb $0x0, 0x153(%r14)
jle 0x12f30
xorl %edi, %edi
callq 0x43b0
subq 0xc8(%r14), %rax
movq 0x90(%r14), %rcx
movl 0xc0(%r14), %edx
addq %rax, 0xc0(%rcx,%rdx,8)
jmp 0x12f58
cmpl $0x2, %eax
jne 0x12f58
cmpb $0x0, (%r12)
jne 0x12f58
xorl %edi, %edi
callq 0x43b0
subq 0xc8(%r14), %rax
movq 0x90(%r14), %rcx
addq %rax, 0xb8(%rcx)
movq (%r14), %r14
cmpq %r15, %r14
jne 0x12eae
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12f71
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: (anonymous namespace)::equal_ip(sockaddr_storage const*, sockaddr_storage const*)
bool equal_ip(const sockaddr_storage *first, const sockaddr_storage *second)
{
	if(first->ss_family == second->ss_family)
	{
		if(first->ss_family == AF_INET)
			return !memcmp(&(((const sockaddr_in*)first)->sin_addr),
				&(((const sockaddr_in*)second)->sin_addr), sizeof(in_addr));
		// else address family is AF_INET6
		return !memcmp(&(((const sockaddr_in6*)first)->sin6_addr),
				&(((const sockaddr_in6*)second)->sin6_addr), sizeof(in6_addr));
	}
	return false; // one is IPv4, other IPv6
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %eax
cmpw (%rsi), %ax
jne 0x1349f
cmpw $0x2, %ax
jne 0x134a3
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
jmp 0x134ba
xorl %eax, %eax
jmp 0x134bd
movdqu 0x8(%rdi), %xmm0
movdqu 0x8(%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
sete %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: (anonymous namespace)::add_and_register_player(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, sockaddr_storage&, bool)
unsigned short add_and_register_player(const string &nick, string &passw,
	sockaddr_storage &sas, const bool is_bot)
{
	list<PlayerStats>::iterator newpl = new_player();
	register_player(nick, sas, newpl, is_bot);
	passw.assign(newpl->password);
	return newpl->ID;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movl %ecx, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, %rbx
movq %rdi, %r12
leaq -0x170(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq -0x160(%rbp), %rdi
movl $0x0, 0x100(%rdi)
xorl %r13d, %r13d
movl $0xf8, %edx
xorl %esi, %esi
callq 0x4200
movzwl 0x2fbd2(%rip), %eax     # 0x430f0
movq 0x2fb83(%rip), %rcx     # 0x430a8
leaq 0x2fb7c(%rip), %rdx     # 0x430a8
cmpq %rdx, %rcx
je 0x13553
movq %rcx, %rsi
cmpw %ax, 0x10(%rsi)
je 0x13542
movq (%rsi), %rsi
cmpq %rdx, %rsi
jne 0x13534
cmpq %rdx, %rsi
je 0x13553
incl %eax
cmpw $-0x5, %ax
cmovel %r13d, %eax
jmp 0x1352c
movw %ax, -0x190(%rbp)
incl %eax
movw %ax, 0x2fb8d(%rip)      # 0x430f0
movl $0x2, %r13d
movabsq $0x572620ae4c415c99, %r15 # imm = 0x572620AE4C415C99
callq 0x41d0
movq %rax, %rcx
imulq %r15
movq %rdx, %rax
shrq $0x3f, %rax
shrl $0x5, %edx
addl %eax, %edx
imull $0x5e, %edx, %eax
subl %eax, %ecx
addb $0x21, %cl
movb %cl, -0x190(%rbp,%r13)
incq %r13
cmpq $0xa, %r13
jne 0x13573
leaq -0x190(%rbp), %rsi
movb $0x0, 0xa(%rsi)
leaq 0x2faf3(%rip), %rdi     # 0x430a8
callq 0x14990
movq %rax, %r13
leaq 0x2fae4(%rip), %rsi     # 0x430a8
movq %rax, %rdi
callq 0x4060
incq 0x2fae5(%rip)           # 0x430b8
movq -0x180(%rbp), %rdi
cmpq %r14, %rdi
je 0x135ee
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %r12
movq %r12, %rdi
callq 0xfa82
movzbl -0x2c(%rbp), %ecx
movq %r12, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x136ab
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x13636
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %r13, %r14
addq $0x12, %r14
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x41a0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x4640
movzwl 0x10(%r13), %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x136a3
movq -0x48(%rbp), %rsi
jmp 0x1369b
movq %rax, %rbx
movq -0x180(%rbp), %rdi
cmpq %r14, %rdi
je 0x136a3
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: bot_connect(unsigned short, sockaddr_storage&)
unsigned short bot_connect(const unsigned short pid, sockaddr_storage &sas)
{
	// Basically we delegate to player_hello, but some extra checks:
	// We don't want to "drop bots to make room for bots":
	if(cur_players.size() >= Config::int_settings[Config::IS_MAXPLAYERS])
		return SERVER_FULL;
	// else:
	string tmp1, tmp2 = Config::new_bot_name();
	unsigned short sh = player_hello(0xFFFF, tmp1, tmp2, sas, true);
	if(sh <= HIGHEST_VALID_ID) // player was added
		cur_players.back().botpid = pid;
	return sh;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x2edce(%rip), %rax     # 0x428a0
movl (%rax), %eax
movw $0xfffc, %r14w          # imm = 0xFFFC
cmpq %rax, 0x2f5f0(%rip)     # 0x430d0
jae 0x13b80
movq %rsi, %r15
movl %edi, %ebx
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
callq 0x11d57
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0xfa82
leaq -0x68(%rbp), %rsi
leaq -0x48(%rbp), %rdx
movl $0xffff, %edi           # imm = 0xFFFF
movq %r15, %rcx
movl $0x1, %r8d
callq 0x13287
movl %eax, %r14d
cmpw $-0x5, %ax
ja 0x13b56
movzwl %bx, %eax
movq 0x2f578(%rip), %rcx     # 0x430c8
movl %eax, 0x174(%rcx)
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x13b6b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x13b80
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x13baf
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x13baf
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x13bc4
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: num_bots()
short num_bots()
{
	short num = 0;
	list<Player>::iterator bit = cur_players.begin();
	while(next_bot(bit))
	{
		++bit;
		++num;
	}
	return num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2f1f9(%rip), %rcx     # 0x430c0
xorl %edi, %edi
movq %rcx, %rdx
movl %edi, %eax
movq (%rdx), %rdx
cmpq %rcx, %rdx
setne %sil
je 0x13ee3
cmpl $-0x1, 0x174(%rdx)
je 0x13ece
leal 0x1(%rax), %edi
testb %sil, %sil
jne 0x13ecc
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/players.cpp
// Function: usage_report()
void usage_report()
{
	if(!usage_per_30min.empty())
	{
		// compute average:
		int sum = 0;
		for(vector<short>::const_iterator i = usage_per_30min.begin();
			i != usage_per_30min.end(); ++i)
			sum += *i;
		to_log("Average presence: " +
			lex_cast_fl(float(sum)/usage_per_30min.size()));
		usage_per_30min.clear();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq 0x2f191(%rip), %rcx     # 0x43090
movq 0x2f192(%rip), %rax     # 0x43098
cmpq %rax, %rcx
je 0x14003
xorl %edx, %edx
movq %rcx, %rsi
movswl (%rsi), %edi
addl %edi, %edx
addq $0x2, %rsi
cmpq %rax, %rsi
jne 0x13f14
cvtsi2ss %edx, %xmm0
subq %rcx, %rax
sarq %rax
js 0x13f35
cvtsi2ss %rax, %xmm1
jmp 0x13f4a
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x2bf0d
leaq 0x189ec(%rip), %rcx     # 0x2c94d
movl $0x12, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4440
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x13f97
movq %rdx, -0x30(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x20(%rbp)
jmp 0x13f9e
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x30(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x15050
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x13fd3
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13fec
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
movq 0x2f09d(%rip), %rax     # 0x43090
cmpq %rax, 0x2f09e(%rip)     # 0x43098
je 0x14003
movq %rax, 0x2f095(%rip)     # 0x43098
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x14029
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x14029
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14042
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/log.cpp
// Function: to_log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void to_log(const string &s)
{
	if(canlog)
	{
		string fname = Config::get_config_dir() + logfilename;
		ofstream logfile(fname.c_str(), ios_base::app);
		if(!logfile)
		{
			cerr << "Could not open log file (" << fname << ")!" << endl;
			canlog = false;
			return;
		}
		logfile << s << endl;
	}
#ifdef DEBUG
	cerr << "LOG: " << s << endl;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
cmpb $0x0, 0x2e4fe(%rip)     # 0x43568
jne 0x151bd
callq 0x11ada
leaq 0x2e4cc(%rip), %rdx     # 0x43548
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x1483d
movq (%r14), %rsi
leaq -0x238(%rbp), %rdi
movl $0x1, %edx
callq 0x4430
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rax
movl -0x218(%rbp,%rax), %r15d
testb $0x5, %r15b
je 0x1512b
movq 0x2af31(%rip), %rdi     # 0x3fff0
leaq 0x179ab(%rip), %rsi     # 0x2ca71
movl $0x19, %edx
callq 0x4460
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x2af11(%rip), %rdi     # 0x3fff0
callq 0x4460
movq %rax, %r14
leaq 0x171d6(%rip), %rsi     # 0x2c2c4
movl $0x2, %edx
movq %rax, %rdi
callq 0x4460
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x43d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
movb $0x1, 0x2e43f(%rip)     # 0x43568
jmp 0x15168
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq -0x238(%rbp), %rdi
callq 0x4460
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x43d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
movq 0x2ae39(%rip), %rax     # 0x3ffa8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x230(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x238(%rbp,%rcx)
callq 0x4330
leaq -0x140(%rbp), %rdi
callq 0x4140
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x151b7
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
testb $0x5, %r15b
jne 0x15211
movq 0x2ae2c(%rip), %r14     # 0x3fff0
leaq 0x178c0(%rip), %rsi     # 0x2ca8b
movl $0x5, %edx
movq %r14, %rdi
callq 0x4460
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4460
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x43d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x15233
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x45f0
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1524c
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/log.cpp
// Function: timed_log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void timed_log(const string &s)
{
	time_t rawtime;
	struct tm *timeinfo;
	char buffer[7]; // eg. "12:13 " (and '\0')

	time(&rawtime);
 	timeinfo = localtime(&rawtime);
	strftime(buffer, 7, "%H:%M ", timeinfo);
	to_log(string(buffer) + s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq -0x70(%rbp), %r14
movq %r14, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x42b0
leaq 0x17810(%rip), %rdx     # 0x2ca91
leaq -0x27(%rbp), %r14
movl $0x7, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x4300
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x41a0
leaq (%rax,%rbp), %rdx
addq $-0x27, %rdx
leaq -0x68(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xdfec
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x4130
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x152f0
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x152f7
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x15050
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x1532c
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x15341
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x1536b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x1536b
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x15380
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/log.cpp
// Function: check_date_change(int)
bool check_date_change(const int d)
{
	// This check is only true on the first test, when the day is not yet
	// initialized:
	if(cur_mday == -1)
		cur_mday = d;
	else if(cur_mday != d)
	{
		time_t rawt;
		char b[30];
		time(&rawt);
		tm *timeinfo = localtime(&rawt);
		strftime(b, 30, "Day changed to %a %d %b", timeinfo);
		to_log(string(b));
		cur_mday = d;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edi, %ebx
movl 0x2b081(%rip), %eax     # 0x40420
cmpl $-0x1, %eax
je 0x1542e
cmpl %ebx, %eax
je 0x15434
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x42b0
leaq 0x176cd(%rip), %rdx     # 0x2ca98
leaq -0x70(%rbp), %r14
movl $0x1e, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x4300
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x41a0
leaq (%rax,%rbp), %rdx
addq $-0x70, %rdx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xdfec
movq %r15, %rdi
callq 0x15050
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x15424
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43f0
movl %ebx, 0x2aff6(%rip)     # 0x40420
movb $0x1, %al
jmp 0x15436
movl %ebx, 0x2afec(%rip)     # 0x40420
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x1545b
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::make_right_size(std::vector<std::vector<Tile, std::allocator<Tile>>, std::allocator<std::vector<Tile, std::allocator<Tile>>>>&) const
void Map::make_right_size(std::vector< std::vector<Tile> > &res) const
{
	// Resize the "inner vectors" (rows) that will remain
	for(short i = min(short(res.size()), mapsize)-1; i >= 0; --i)
		res[i].resize(mapsize, EMPTY_TILE);
	// Resize the outer vector (the collection of rows):
	res.resize(mapsize, vector<Tile>(mapsize, EMPTY_TILE));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl 0x8(%rsi), %eax
subl (%rsi), %eax
movq %rdi, %r14
shrl $0x3, %eax
imull $0xffffaaab, %eax, %eax # imm = 0xFFFFAAAB
movl (%rdi), %ecx
cmpw %ax, %cx
cmovll %ecx, %eax
decw %ax
js 0x166f8
movzwl %ax, %eax
leaq 0x1(%rax), %r12
shll $0x3, %eax
leaq (%rax,%rax,2), %r13
leaq 0x165af(%rip), %r15     # 0x2cc8c
movq (%rbx), %rdi
addq %r13, %rdi
movswq (%r14), %rsi
movq %r15, %rdx
callq 0x18974
addq $-0x18, %r13
decq %r12
jg 0x166dd
movswq (%r14), %r14
leaq 0x16589(%rip), %rdx     # 0x2cc8c
leaq -0x48(%rbp), %r15
leaq -0x29(%rbp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x189f8
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x189ae
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x16739
movq -0x38(%rbp), %rsi
subq %rdi, %rsi
callq 0x43f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x16760
movq -0x38(%rbp), %rsi
subq %rdi, %rsi
callq 0x43f0
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::add_patch(Coords const&, Tile const&)
void Map::add_patch(const Coords &c, const Tile &t)
{
	char radius = random()%3 + 2; //2..4
	short x, y, cmp;
	for(y = max(0, c.y - radius); y <= min(mapsize-1, c.y + radius); ++y)
	{
		for(x = max(0, c.x - radius); x <= min(mapsize-1, c.x + radius); ++x)
		{
			if((cmp = (c.x-x)*(c.x-x)+(c.y-y)*(c.y-y)) <= radius*radius)
				data[y][x] = t;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x41d0
movq %rax, %rcx
movabsq $0x5555555555555556, %rdx # imm = 0x5555555555555556
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
addl %edx, %eax
leal (%rax,%rax,2), %eax
subl %eax, %ecx
addl $0x2, %ecx
movswl 0x2(%r14), %edx
movzbl %cl, %eax
leal (%rax,%rdx), %esi
subl %eax, %edx
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
movswl (%r15), %edi
decl %edi
cmpl %edi, %esi
cmovll %esi, %edi
cmpl %edx, %edi
jl 0x1687e
movl %eax, %esi
imull %eax, %esi
movl %edx, %edi
movswl (%r14), %r9d
movl %r9d, %r11d
subl %eax, %r11d
testl %r11d, %r11d
cmovlel %ecx, %r11d
movswl (%r15), %r8d
decl %r8d
leal (%rax,%r9), %r10d
cmpl %r8d, %r10d
cmovll %r10d, %r8d
cmpl %r11d, %r8d
jl 0x1685a
movswq %di, %r8
movl %r11d, %r10d
subl %r11d, %r9d
imull %r9d, %r9d
movzwl 0x2(%r14), %r11d
subl %edx, %r11d
imull %r11d, %r11d
addl %r9d, %r11d
movswl %r11w, %r9d
cmpl %esi, %r9d
jg 0x16838
movq 0x8(%r15), %r9
leaq (%r8,%r8,2), %r11
movswq %r10w, %r12
movq (%r9,%r11,8), %r9
movl (%rbx), %r11d
movl %r11d, (%r9,%r12,4)
incl %r10d
movswl %r10w, %r11d
movswl (%r15), %r12d
decl %r12d
movswl (%r14), %r9d
leal (%rax,%r9), %r13d
cmpl %r12d, %r13d
cmovll %r13d, %r12d
cmpl %r11d, %r12d
jge 0x16802
incl %edi
movswl %di, %edx
movswl (%r15), %r8d
decl %r8d
movswl 0x2(%r14), %r9d
addl %eax, %r9d
cmpl %r8d, %r9d
cmovgel %r8d, %r9d
cmpl %edx, %r9d
jge 0x167d3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::apply_house(Coords const&)
void Map::apply_house(const Coords &c)
{
	short i, j;
	Tile* tp;
	for(i = 0; i < MAX_HS; ++i)
	{
		if(c.x+i >= mapsize-1 || c.y+i <= 0)
			break;
		for(j = 0; j < MAX_HS; ++j)
		{
			if(c.y+j >= mapsize-1 || c.y+j <= 0)
				break;
			tp = mod_tile(c.x + i, c.y + j);
			switch(house[j*MAX_HS+i])
			{
			case ':': case '.':
				*tp = T_FLOOR; break;
			case '#':
				*tp = T_WALL; break;
			case 'I':
				*tp = T_ILLUSION_WALL; break;
			case '+':
				*tp = T_DOOR;
				if(random()%2) // open instead of closed
				{
					tp->symbol = '\\';
					tp->flags |= TF_WALKTHRU|TF_SEETHRU;
				}
				break;
			case '|': case '-':
				*tp = T_WINDOW;
				tp->symbol = house[j*MAX_HS+i];
				break;
			// default: do nothing
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorl %esi, %esi
leaq 0x2cd8d(%rip), %r12     # 0x43b00
movq %rdi, -0x40(%rbp)
movswl (%rbx), %eax
addl %esi, %eax
movswl (%rdi), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x16e7f
movswl 0x2(%rbx), %eax
addl %esi, %eax
jle 0x16e7f
xorl %r13d, %r13d
movq %r12, -0x38(%rbp)
movl %esi, -0x2c(%rbp)
movswl 0x2(%rbx), %eax
addl %r13d, %eax
testl %eax, %eax
jle 0x16e6d
movswl (%rdi), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x16e6d
movzwl (%rbx), %ecx
addw %si, %cx
movswq %ax, %rax
movq 0x8(%rdi), %rdx
leaq (%rax,%rax,2), %rax
movswq %cx, %r15
movq (%rdx,%rax,8), %r14
movb (%r12), %al
movzbl %al, %ecx
cmpl $0x2d, %ecx
jle 0x16dfa
cmpl $0x48, %ecx
jg 0x16e0b
cmpl $0x2e, %ecx
je 0x16df0
cmpl $0x3a, %ecx
jne 0x16e5b
movl $0x1c2e0005, (%r14,%r15,4) # imm = 0x1C2E0005
jmp 0x16e5b
cmpl $0x23, %ecx
je 0x16e24
cmpl $0x2b, %ecx
je 0x16e38
cmpl $0x2d, %ecx
je 0x16e15
jmp 0x16e5b
cmpl $0x49, %ecx
je 0x16e2e
cmpl $0x7c, %ecx
jne 0x16e5b
movl $0x1a7c0004, (%r14,%r15,4) # imm = 0x1A7C0004
movb %al, 0x2(%r14,%r15,4)
jmp 0x16e5b
movl $0x1a230000, (%r14,%r15,4) # imm = 0x1A230000
jmp 0x16e5b
movl $0x1a230001, (%r14,%r15,4) # imm = 0x1A230001
jmp 0x16e5b
movl $0x1b2b0000, (%r14,%r15,4) # imm = 0x1B2B0000
callq 0x41d0
movl -0x2c(%rbp), %esi
movq -0x40(%rbp), %rdi
testb $0x1, %al
je 0x16e5b
movb $0x5c, 0x2(%r14,%r15,4)
orb $0x5, (%r14,%r15,4)
addq $0xe, %r12
incl %r13d
cmpw $0xe, %r13w
jne 0x16d9f
incl %esi
movq -0x38(%rbp), %r12
incq %r12
cmpl $0xe, %esi
jne 0x16d77
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::fix_boundary()
void Map::fix_boundary()
{
	rowit rit = data.begin();
	vector<Tile>::iterator it;
	for(it = rit->begin(); it != rit->end(); ++it)
	{
		*it = T_WALL;
		it->flags |= TF_NODIG;
	}
	rit = data.begin()+mapsize-1;
	for(it = rit->begin(); it != rit->end(); ++it)
	{
		*it = T_WALL;
		it->flags |= TF_NODIG;
	}
	for(rit = data.begin(); rit != data.end(); ++rit)
	{
		(*rit)[0] = (*rit)[mapsize-1] = T_WALL;
		(*rit)[0].flags |= TF_NODIG;
		(*rit)[mapsize-1].flags |= TF_NODIG;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x16eb0
movl $0x1a230000, (%rcx)     # imm = 0x1A230000
movw $0x1000, (%rcx)         # imm = 0x1000
addq $0x4, %rcx
jmp 0x16e99
movq 0x8(%rdi), %rcx
movswq (%rdi), %rax
leaq (%rax,%rax,2), %rdx
movq -0x18(%rcx,%rdx,8), %rax
cmpq -0x10(%rcx,%rdx,8), %rax
je 0x16ee1
leaq (%rcx,%rdx,8), %rcx
movl $0x1a230000, (%rax)     # imm = 0x1A230000
movw $0x1000, (%rax)         # imm = 0x1000
addq $0x4, %rax
cmpq -0x10(%rcx), %rax
jne 0x16ecc
movq 0x8(%rdi), %rax
cmpq 0x10(%rdi), %rax
je 0x16f1f
movl $0x1a230000, %ecx       # imm = 0x1A230000
movw $0x1000, %dx            # imm = 0x1000
movswq (%rdi), %rsi
movq (%rax), %r8
movl %ecx, -0x4(%r8,%rsi,4)
movq (%rax), %rsi
movl %ecx, (%rsi)
movq (%rax), %rsi
orw %dx, (%rsi)
movswq (%rdi), %r8
orw %dx, -0x4(%rsi,%r8,4)
addq $0x18, %rax
cmpq 0x10(%rdi), %rax
jne 0x16ef4
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::upd_by_wall_flag(Coords const&)
void Map::upd_by_wall_flag(const Coords &c)
{
	Coords cn;
	e_Dir d = D_N;
	for(;;)
	{
		if(!point_out_of_map((cn = c.in(d)))
			&& data[cn.y][cn.x] == T_WALL)
		{
			data[c.y][c.x].flags |= TF_BYWALL;
			return;
		}
		if(++d == D_N) // went around!
		{
			data[c.y][c.x].flags &= ~(TF_BYWALL);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
leaq -0x38(%rbp), %r13
movl $0x0, (%r13)
leaq -0x34(%rbp), %r12
movl -0x38(%rbp), %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2bc76
movl -0x34(%rbp), %ecx
movl %ecx, -0x30(%rbp)
movswq %cx, %rax
testq %rax, %rax
js 0x16f92
movzwl (%r14), %edx
cmpw %dx, %cx
jge 0x16f92
movzwl -0x2e(%rbp), %ecx
testw %cx, %cx
sets %sil
cmpw %dx, %cx
setge %cl
orb %sil, %cl
je 0x16fa9
movq %r12, %rdi
callq 0x2bbf6
movq %r13, %rdi
callq 0x2bb9c
cmpl $0x0, (%rax)
jne 0x16f56
jmp 0x16ff6
movswq -0x2e(%rbp), %rcx
movq 0x8(%r14), %rdx
leaq (%rcx,%rcx,2), %rcx
movq (%rdx,%rcx,8), %rcx
movb 0x2(%rcx,%rax,4), %r15b
movb 0x3(%rcx,%rax,4), %al
movb %al, -0x29(%rbp)
movq %r12, %rdi
callq 0x2bbf6
cmpb $0x23, %r15b
jne 0x16f9a
cmpb $0x1a, -0x29(%rbp)
jne 0x16f9a
movswq 0x2(%rbx), %rax
movq 0x8(%r14), %rcx
leaq (%rax,%rax,2), %rax
movswq (%rbx), %rdx
movq (%rcx,%rax,8), %rax
orw $0x8, (%rax,%rdx,4)
jmp 0x17010
movswq 0x2(%rbx), %rax
movq 0x8(%r14), %rcx
leaq (%rax,%rax,2), %rax
movswq (%rbx), %rdx
movq (%rcx,%rax,8), %rax
andw $-0x9, (%rax,%rdx,4)
leaq -0x30(%rbp), %rdi
callq 0x2bbf6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1702a
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2bbf6
movq %rbx, %rdi
callq 0x4750
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::get_center_of_sector(e_Dir) const
Coords Map::get_center_of_sector(const e_Dir d) const
{
	Coords c(mapsize/2, mapsize/2);
	if(d == MAX_D)
		return c;
	Coords shift(0,0);
	shift = shift.in(d);
	shift.x *= mapsize/3;
	shift.y *= mapsize/3;
	c.x += shift.x;
	c.y += shift.y;
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movzwl (%rsi), %eax
movl %eax, %ecx
shrl $0xf, %ecx
addl %eax, %ecx
movswl %cx, %edx
sarl %edx
movl %edx, %esi
callq 0x2bbe8
cmpl $0x8, %r15d
je 0x1710e
leaq -0x1c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
leaq -0x20(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
movl %r15d, %edx
callq 0x2bc76
leaq -0x20(%rbp), %rdi
movl (%rdi), %eax
leaq -0x1c(%rbp), %r15
movl %eax, (%r15)
callq 0x2bbf6
movswl (%r14), %eax
imull $0x5556, %eax, %eax     # imm = 0x5556
movl %eax, %ecx
shrl $0x1f, %ecx
shrl $0x10, %eax
addl %ecx, %eax
movzwl (%r15), %ecx
imulw %ax, %cx
movw %cx, (%r15)
imulw 0x2(%r15), %ax
addw %cx, (%rbx)
movw %ax, 0x2(%r15)
addw %ax, 0x2(%rbx)
movq %r15, %rdi
callq 0x2bbf6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x1c(%rbp), %rdi
callq 0x2bbf6
jmp 0x1712d
movq %rax, %r14
movq %rbx, %rdi
callq 0x2bbf6
movq %r14, %rdi
callq 0x4750
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::subsample_tile(Tile const&) const
Tile Map::subsample_tile(const Tile &t) const
{
	// 't' is assumed to be a tile of a type of which there exists
	// only a few in a sampling area. We "change it into" something
	// more representative.
	if(t == T_TREE)
		return T_GROUND;
	if(t == T_SWAMP)
		return T_WATER;
	if(t == T_ROUGH)
		return T_FLOOR;
	if(t.symbol == '\\' || t.symbol == '+') // doors
		return T_FLOOR;
	if(t.symbol == '#') // includes illusory walls
		return T_WALL;
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x2(%rsi), %ecx
movl %ecx, %r8d
xorb $0x54, %r8b
movb 0x3(%rsi), %dl
movl %edx, %edi
xorb $0x17, %dil
movl $0x182e0005, %eax       # imm = 0x182E0005
orb %dil, %r8b
je 0x17184
movl %ecx, %r8d
xorb $0x22, %r8b
movl $0x1d7e0405, %eax       # imm = 0x1D7E0405
orb %dil, %r8b
je 0x17184
movl %ecx, %edi
xorb $0x3b, %dil
xorb $0x1a, %dl
movl $0x1c2e0005, %eax       # imm = 0x1C2E0005
orb %dil, %dl
jne 0x17186
popq %rbp
retq
cmpl $0x5c, %ecx
je 0x17184
cmpl $0x2b, %ecx
je 0x17184
cmpl $0x23, %ecx
jne 0x1719c
movl $0x1a230000, %eax       # imm = 0x1A230000
jmp 0x17184
movl (%rsi), %eax
jmp 0x17184
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: Map::coords_in_sector(Coords const&) const
e_Dir Map::coords_in_sector(const Coords &c) const
{
	if(c.x < mapsize/3)
	{
		if(c.y < mapsize/3)
			return D_NW;
		if(c.y < 2*mapsize/3)
			return D_W;
		return D_SW;
	}
	if(c.x < 2*mapsize/3)
	{
		if(c.y < mapsize/3)
			return D_N;
		if(c.y < 2*mapsize/3)
			return MAX_D;
		return D_S;
	}
	if(c.y < mapsize/3)
		return D_NE;
	if(c.y < 2*mapsize/3)
		return D_E;
	return D_SE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movswl (%rsi), %eax
movswq (%rdi), %rdx
imulq $0x55555556, %rdx, %rcx # imm = 0x55555556
movq %rcx, %rdi
shrq $0x3f, %rdi
shrq $0x20, %rcx
addl %edi, %ecx
cmpl %eax, %ecx
jle 0x1745b
movswl 0x2(%rsi), %esi
movl $0x7, %eax
cmpl %esi, %ecx
jg 0x174a5
leal (%rdx,%rdx), %eax
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x20, %rcx
addl %eax, %ecx
xorl %eax, %eax
cmpl %esi, %ecx
setg %al
addl $0x5, %eax
jmp 0x174a5
addl %edx, %edx
movslq %edx, %rdx
imulq $0x55555556, %rdx, %rdx # imm = 0x55555556
movq %rdx, %rdi
shrq $0x3f, %rdi
shrq $0x20, %rdx
addl %edi, %edx
movswl 0x2(%rsi), %esi
cmpl %eax, %edx
jle 0x17492
xorl %eax, %eax
cmpl %esi, %ecx
jg 0x174a5
xorl %eax, %eax
cmpl %esi, %edx
setg %al
leal 0x4(,%rax,4), %eax
jmp 0x174a5
movl $0x1, %eax
cmpl %esi, %ecx
jg 0x174a5
xorl %eax, %eax
cmpl %esi, %edx
setg %al
xorl $0x3, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/map.cpp
// Function: (anonymous namespace)::fill_hc_old(std::vector<Coords, std::allocator<Coords>>&, char, short)
void fill_hc_old(vector<Coords> &hc, const char num, const short size)
{
	hc[0].x = size/3 + random()%(size/3);
	hc[0].y = size/3 + random()%(size/3);
	for(char i = 1; i < num; ++i)
	{
		hc[i].x = hc[i-1].x + MAX_HS + 1 + random()%MAX_HS;
		hc[i].y = hc[i-1].y + random()%7 - 3;
		if(hc[i].x >= size - MAX_HS - 1) // wen't too far
		{
			hc[i].x = 2 + random()%10;
			hc[i].y += MAX_HS + 1 + random()%MAX_HS;
			if(hc[i].y >= size - MAX_HS - 1)
				hc[i].y = 2 + random()%10;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movslq %edx, %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movslq %eax, %r12
callq 0x41d0
cqto
idivq %r12
addl %r12d, %edx
movq (%r14), %rax
movw %dx, (%rax)
callq 0x41d0
cqto
idivq %r12
addl %r12d, %edx
movq (%r14), %rax
movw %dx, 0x2(%rax)
cmpb $0x2, %r15b
jl 0x181eb
addl $-0xf, %ebx
movzbl %r15b, %eax
leaq -0x4(,%rax,4), %rax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
movabsq $0x4924924924924925, %r13 # imm = 0x4924924924924925
movq (%r14), %rax
movzwl (%rax,%r12), %r15d
callq 0x41d0
movq %rax, %rcx
imulq %r13
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x2, %rdx
addl %eax, %edx
movl %edx, %eax
shll $0x4, %eax
addl %edx, %edx
subl %eax, %edx
addl %edx, %ecx
leal (%r15,%rcx), %eax
addl $0xf, %eax
movq (%r14), %rcx
movw %ax, 0x4(%rcx,%r12)
movzwl 0x2(%rcx,%r12), %r15d
callq 0x41d0
movq %rax, %rcx
imulq %r13
movq %rdx, %rax
shrq $0x3f, %rax
shrl %edx
addl %eax, %edx
leal (,%rdx,8), %eax
subl %eax, %edx
addl %edx, %ecx
addw %r15w, %cx
addl $-0x3, %ecx
movq (%r14), %rax
movw %cx, 0x6(%rax,%r12)
movswl 0x4(%rax,%r12), %eax
cmpl %eax, %ebx
jg 0x181dd
callq 0x41d0
movq %rax, %rcx
movabsq $0x6666666666666667, %rdx # imm = 0x6666666666666667
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrl $0x2, %edx
addl %eax, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %eax
subl %eax, %ecx
addl $0x2, %ecx
movq (%r14), %rax
movw %cx, 0x4(%rax,%r12)
callq 0x41d0
movq %rax, %rcx
imulq %r13
movq %rdx, %rax
shrq $0x3f, %rax
shrl $0x2, %edx
addl %eax, %edx
movl %edx, %eax
shll $0x4, %eax
addl %edx, %edx
subl %eax, %edx
addl %edx, %ecx
movq (%r14), %rax
addw 0x6(%rax,%r12), %cx
addl $0xf, %ecx
movw %cx, 0x6(%rax,%r12)
movswl %cx, %eax
cmpl %eax, %ebx
jg 0x181dd
callq 0x41d0
movq %rax, %rcx
movabsq $0x6666666666666667, %rdx # imm = 0x6666666666666667
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x2, %rdx
addl %eax, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %eax
subl %eax, %ecx
addl $0x2, %ecx
movq (%r14), %rax
movw %cx, 0x6(%rax,%r12)
addq $0x4, %r12
cmpq %r12, -0x30(%rbp)
jne 0x180b9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq