LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
subq $0x70, %rsp
movw %di, %ax
movw %ax, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x6c5a6(%rip), %rdi     # 0x90230
callq 0x25070
leaq 0x6bd7a(%rip), %rcx     # 0x8fa10
movl (%rcx), %ecx
cmpq %rcx, %rax
jb 0x23ca8
movw $0xfffc, -0x2(%rbp)     # imm = 0xFFFC
jmp 0x23d6a
leaq -0x30(%rbp), %rdi
callq 0x5770
callq 0x1f240
movq %rax, -0x68(%rbp)
jmp 0x23cbc
movq -0x68(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x5220
jmp 0x23ccb
movq -0x10(%rbp), %rcx
movl $0xffff, %edi           # imm = 0xFFFF
leaq -0x30(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movl $0x1, %r8d
callq 0x22e50
movw %ax, -0x6a(%rbp)
jmp 0x23ced
movw -0x6a(%rbp), %ax
movw %ax, -0x5e(%rbp)
movzwl -0x5e(%rbp), %eax
cmpl $0xfffb, %eax           # imm = 0xFFFB
jg 0x23d43
movzwl -0x4(%rbp), %eax
movl %eax, -0x70(%rbp)
leaq 0x6c522(%rip), %rdi     # 0x90230
callq 0x25110
movl -0x70(%rbp), %ecx
movl %ecx, 0x164(%rax)
jmp 0x23d43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x23d5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a48
jmp 0x23d5f
movw -0x5e(%rbp), %ax
movw %ax, -0x2(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a48
leaq -0x30(%rbp), %rdi
callq 0x5a48
jmp 0x23d6a
leaq -0x30(%rbp), %rdi
callq 0x5a48
jmp 0x23d74
movw -0x2(%rbp), %ax
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x5920
nopl (%rax)
// File: lotuskip[P]yuxtapa/server/players.cpp
// Function: usage_update()
void usage_update()
{
	if(!cur_players.empty())
	{
		short n = cur_players.size();
		short nbots = num_bots();
		usage_per_30min.push_back(n - nbots);
		string msg = lex_cast(n - nbots) + " players";
		if(nbots)
			msg += " (+ " + lex_cast(nbots) + " bots)";
		timed_log(msg);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
leaq 0x6c49e(%rip), %rdi     # 0x90230
callq 0x25150
testb $0x1, %al
jne 0x23f2a
leaq 0x6c48a(%rip), %rdi     # 0x90230
callq 0x25070
movw %ax, -0x2(%rbp)
callq 0x23f40
movw %ax, -0x4(%rbp)
movzwl -0x2(%rbp), %eax
movzwl -0x4(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x6(%rbp)
leaq 0x6c433(%rip), %rdi     # 0x90200
leaq -0x6(%rbp), %rsi
callq 0x25170
movswl -0x2(%rbp), %esi
movswl -0x4(%rbp), %eax
subl %eax, %esi
leaq -0x48(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x609d0
movq -0xc0(%rbp), %rsi
leaq 0x3db3f(%rip), %rdx     # 0x6193d
leaq -0x28(%rbp), %rdi
callq 0x18a40
jmp 0x23e09
leaq -0x48(%rbp), %rdi
callq 0x5a48
cmpw $0x0, -0x4(%rbp)
je 0x23f09
movswl -0x4(%rbp), %esi
leaq -0xb8(%rbp), %rdi
callq 0x609d0
jmp 0x23e2f
leaq 0x3db10(%rip), %rsi     # 0x61946
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0x18a90
jmp 0x23e4b
leaq 0x3daf9(%rip), %rdx     # 0x6194b
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x18a40
jmp 0x23e64
leaq -0x28(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x56e0
jmp 0x23e73
leaq -0x78(%rbp), %rdi
callq 0x5a48
leaq -0x98(%rbp), %rdi
callq 0x5a48
leaq -0xb8(%rbp), %rdi
callq 0x5a48
jmp 0x23f09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a48
jmp 0x23f33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x23f1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x23efb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x23eef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5a48
leaq -0x98(%rbp), %rdi
callq 0x5a48
leaq -0xb8(%rbp), %rdi
callq 0x5a48
jmp 0x23f1f
leaq -0x28(%rbp), %rdi
callq 0x28f60
jmp 0x23f14
leaq -0x28(%rbp), %rdi
callq 0x5a48
jmp 0x23f2a
leaq -0x28(%rbp), %rdi
callq 0x5a48
jmp 0x23f33
addq $0xc0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x5920
nopl (%rax)
// File: 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
subq $0x10, %rsp
movw $0x0, -0x2(%rbp)
leaq 0x6c2db(%rip), %rdi     # 0x90230
callq 0x1b360
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x247c0
testb $0x1, %al
jne 0x23f6d
jmp 0x23f84
leaq -0x10(%rbp), %rdi
callq 0x1b3c0
movw -0x2(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x2(%rbp)
jmp 0x23f5e
movw -0x2(%rbp), %ax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x80, %rsp
leaq 0x6c25e(%rip), %rdi     # 0x90200
callq 0x251a0
testb $0x1, %al
jne 0x240e8
movl $0x0, -0x4(%rbp)
leaq 0x6c243(%rip), %rdi     # 0x90200
callq 0x251e0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x25210
leaq 0x6c226(%rip), %rdi     # 0x90200
callq 0x25290
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x25250
testb $0x1, %al
jne 0x23ff6
jmp 0x24013
leaq -0x10(%rbp), %rdi
callq 0x252c0
movswl (%rax), %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x252e0
jmp 0x23fd3
cvtsi2ssl -0x4(%rbp), %xmm0
movss %xmm0, -0x78(%rbp)
leaq 0x6c1dc(%rip), %rdi     # 0x90200
callq 0x25300
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x74(%rbp)
testq %rax, %rax
movss %xmm0, -0x70(%rbp)
js 0x2405e
movss -0x74(%rbp), %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x78(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
divss %xmm1, %xmm0
leaq -0x60(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x60a70
movq -0x80(%rbp), %rdx
leaq 0x3d8ce(%rip), %rsi     # 0x61952
leaq -0x40(%rbp), %rdi
callq 0x18a90
jmp 0x2408f
leaq -0x40(%rbp), %rdi
callq 0x28d70
jmp 0x2409a
leaq -0x40(%rbp), %rdi
callq 0x5a48
leaq -0x60(%rbp), %rdi
callq 0x5a48
leaq 0x6c14d(%rip), %rdi     # 0x90200
callq 0x25320
jmp 0x240e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x240dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5a48
leaq -0x60(%rbp), %rdi
callq 0x5a48
jmp 0x240f1
addq $0x80, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x5920
nopw (%rax,%rax)
// File: lotuskip[P]yuxtapa/server/players.cpp
// Function: (anonymous namespace)::equal_sas(sockaddr_storage const*, sockaddr_storage const*)
bool equal_sas(const sockaddr_storage *first, const sockaddr_storage *second)
{
	if(!equal_ip(first, second))
		return false;
	// else check ports. (ss_families are same if IPs are)
	if(first->ss_family == AF_INET)
		return ((const sockaddr_in*)first)->sin_port
			== ((const sockaddr_in*)second)->sin_port;
	// else AF_INET6
	return ((const sockaddr_in6*)first)->sin6_port
		== ((const sockaddr_in6*)second)->sin6_port;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x232c0
testb $0x1, %al
jne 0x24887
movb $0x0, -0x1(%rbp)
jmp 0x248c9
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x248af
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzwl 0x2(%rcx), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x248c9
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzwl 0x2(%rcx), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lotuskip[P]yuxtapa/server/players.cpp
// Function: (anonymous namespace)::new_player()
list<PlayerStats>::iterator new_player()
{
	PlayerStats tmpstats;
	// determine a free ID for the new player:
	tmpstats.ID = next_ID_to_give;
	while(find(known_players.begin(), known_players.end(), tmpstats)
		!= known_players.end())
	{
		if(++(tmpstats.ID) == HIGHEST_VALID_ID)
			tmpstats.ID = 0;
	}
	next_ID_to_give = tmpstats.ID+1;
	// Generate password:
	for(char ch = 0; ch < PASSW_LEN; ++ch)
		tmpstats.password[ch] = char(random()%94+33); // this gives printing ASCII
	tmpstats.password[PASSW_LEN] = '\0';

	return known_players.insert(known_players.end(), tmpstats);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
leaq -0x140(%rbp), %rdi
callq 0x21ae0
movw 0x6b962(%rip), %ax      # 0x90260
movw %ax, -0x140(%rbp)
leaq 0x6b90c(%rip), %rdi     # 0x90218
movq %rdi, -0x198(%rbp)
callq 0x24e30
movq -0x198(%rbp), %rdi
movq %rax, -0x150(%rbp)
callq 0x24e90
movq %rax, -0x158(%rbp)
movq -0x150(%rbp), %rdi
movq -0x158(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x26330
movq %rax, -0x190(%rbp)
jmp 0x24955
movq -0x190(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq 0x6b8ae(%rip), %rdi     # 0x90218
callq 0x24e90
movq %rax, -0x170(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x24e60
testb $0x1, %al
jne 0x2498f
jmp 0x249de
movw -0x140(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x140(%rbp)
movzwl %ax, %eax
cmpl $0xfffb, %eax           # imm = 0xFFFB
jne 0x249d9
movw $0x0, -0x140(%rbp)
jmp 0x249d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x160(%rbp)
movl %eax, -0x164(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x24da0
jmp 0x24ab1
jmp 0x24905
movzwl -0x140(%rbp), %eax
addl $0x1, %eax
movw %ax, 0x6b871(%rip)      # 0x90260
movb $0x0, -0x171(%rbp)
movsbl -0x171(%rbp), %eax
cmpl $0x8, %eax
jge 0x24a36
callq 0x5270
movl $0x5e, %ecx
cqto
idivq %rcx
addq $0x21, %rdx
movb %dl, %cl
movsbq -0x171(%rbp), %rax
movb %cl, -0x13e(%rbp,%rax)
movb -0x171(%rbp), %al
addb $0x1, %al
movb %al, -0x171(%rbp)
jmp 0x249f6
movb $0x0, -0x136(%rbp)
leaq 0x6b7d4(%rip), %rdi     # 0x90218
movq %rdi, -0x1a8(%rbp)
callq 0x24e90
movq %rax, -0x188(%rbp)
leaq -0x180(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x24e10
movq -0x1a8(%rbp), %rdi
movq -0x180(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x26380
movq %rax, -0x1a0(%rbp)
jmp 0x24a8d
movq -0x1a0(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x24da0
movq -0x8(%rbp), %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq -0x160(%rbp), %rdi
callq 0x5920
nopl (%rax)
// File: 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
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x8(%rbp)
testb $0x1, 0x647ba(%rip)     # 0x8d540
je 0x28f11
callq 0x1ef50
movq %rax, %rsi
leaq 0x6791d(%rip), %rdx     # 0x906b8
leaq -0x28(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x24cb0
movq -0x240(%rbp), %rdi
callq 0x5200
movq %rax, %rsi
leaq -0x228(%rbp), %rdi
movl $0x1, %edx
callq 0x55a0
jmp 0x28dcd
movq -0x228(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x228(%rbp,%rax), %rdi
callq 0x5250
movb %al, -0x241(%rbp)
jmp 0x28ded
movb -0x241(%rbp), %al
testb $0x1, %al
jne 0x28dfc
jmp 0x28ea9
movq 0x641e5(%rip), %rdi     # 0x8cfe8
leaq 0x38c67(%rip), %rsi     # 0x61a71
callq 0x5510
movq %rax, -0x250(%rbp)
jmp 0x28e18
movq -0x250(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5470
movq %rax, -0x258(%rbp)
jmp 0x28e31
movq -0x258(%rbp), %rdi
leaq 0x384d1(%rip), %rsi     # 0x61310
callq 0x5510
movq %rax, -0x260(%rbp)
jmp 0x28e4d
movq -0x260(%rbp), %rdi
movq 0x6414d(%rip), %rsi     # 0x8cfa8
callq 0x5560
jmp 0x28e62
movb $0x0, 0x646d7(%rip)     # 0x8d540
movl $0x1, -0x238(%rbp)
jmp 0x28ee1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x28f06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x57d0
jmp 0x28f06
movq -0x8(%rbp), %rsi
leaq -0x228(%rbp), %rdi
callq 0x5470
movq %rax, -0x268(%rbp)
jmp 0x28ec2
movq -0x268(%rbp), %rdi
movq 0x640d8(%rip), %rsi     # 0x8cfa8
callq 0x5560
jmp 0x28ed7
movl $0x0, -0x238(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x57d0
leaq -0x28(%rbp), %rdi
callq 0x5a48
movl -0x238(%rbp), %eax
testl %eax, %eax
je 0x28f04
jmp 0x28f02
jmp 0x28f3f
jmp 0x28f11
leaq -0x28(%rbp), %rdi
callq 0x5a48
jmp 0x28f48
movq 0x640d0(%rip), %rdi     # 0x8cfe8
leaq 0x38b6c(%rip), %rsi     # 0x61a8b
callq 0x5510
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x5470
movq %rax, %rdi
movq 0x6406e(%rip), %rsi     # 0x8cfa8
callq 0x5560
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0x230(%rbp), %rdi
callq 0x5920
nopw %cs:(%rax,%rax)
// File: 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
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x54c0
movq -0x90(%rbp), %rdi
callq 0x5380
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
leaq 0x38af7(%rip), %rdx     # 0x61a91
leaq -0x1f(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movl $0x7, %esi
callq 0x5400
leaq -0x61(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x5930
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x18880
jmp 0x28fd2
movq -0x8(%rbp), %rdx
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1fb90
jmp 0x28fe5
leaq -0x40(%rbp), %rdi
callq 0x28d70
jmp 0x28ff0
leaq -0x40(%rbp), %rdi
callq 0x5a48
leaq -0x60(%rbp), %rdi
callq 0x5a48
leaq -0x61(%rbp), %rdi
callq 0x5590
addq $0x90, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2904e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x29045
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5a48
leaq -0x60(%rbp), %rdi
callq 0x5a48
leaq -0x61(%rbp), %rdi
callq 0x5590
movq -0x70(%rbp), %rdi
callq 0x5920
// File: 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
subq $0x90, %rsp
movl %edi, -0x8(%rbp)
cmpl $-0x1, 0x644cf(%rip)    # 0x8d544
jne 0x29085
movl -0x8(%rbp), %eax
movl %eax, 0x644c4(%rip)     # 0x8d544
jmp 0x2914d
movl 0x644b9(%rip), %eax     # 0x8d544
cmpl -0x8(%rbp), %eax
je 0x2914b
leaq -0x10(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x54c0
movq -0x88(%rbp), %rdi
callq 0x5380
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
leaq 0x389d9(%rip), %rdx     # 0x61a98
leaq -0x30(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movl $0x1e, %esi
callq 0x5400
leaq -0x59(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x5930
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0x18880
jmp 0x290f1
leaq -0x58(%rbp), %rdi
callq 0x28d70
jmp 0x290fc
leaq -0x58(%rbp), %rdi
callq 0x5a48
leaq -0x59(%rbp), %rdi
callq 0x5590
movl -0x8(%rbp), %eax
movl %eax, 0x6442d(%rip)     # 0x8d544
movb $0x1, -0x1(%rbp)
jmp 0x29151
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x29140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5a48
leaq -0x59(%rbp), %rdi
callq 0x5590
jmp 0x2915f
jmp 0x2914d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x5920
nopl (%rax,%rax)
// File: 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
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2e900
movq -0x50(%rbp), %rsi
movw %ax, -0x14(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x2e8c0
movswl (%rax), %eax
subl $0x1, %eax
movw %ax, -0x12(%rbp)
movswl -0x12(%rbp), %eax
cmpl $0x0, %eax
jl 0x2a438
movq -0x10(%rbp), %rdi
movswq -0x12(%rbp), %rsi
callq 0x2e6a0
movq %rax, %rdi
movq -0x50(%rbp), %rax
movswq (%rax), %rsi
leaq 0x379b3(%rip), %rdx     # 0x61dd8
callq 0x2e930
movw -0x12(%rbp), %ax
addw $-0x1, %ax
movw %ax, -0x12(%rbp)
jmp 0x2a3fc
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x68(%rbp)
movswq (%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x2ea90
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
leaq 0x37970(%rip), %rdx     # 0x61dd8
leaq -0x30(%rbp), %rdi
callq 0x2eab0
jmp 0x2a473
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x2e9e0
jmp 0x2a486
leaq -0x30(%rbp), %rdi
callq 0x26030
leaq -0x31(%rbp), %rdi
callq 0x26210
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2a4c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x26030
leaq -0x31(%rbp), %rdi
callq 0x26210
movq -0x40(%rbp), %rdi
callq 0x5920
nopw %cs:(%rax,%rax)
// File: 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
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
callq 0x5270
movl $0x3, %ecx
cqto
idivq %rcx
addq $0x2, %rdx
movb %dl, %al
movb %al, -0x19(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movswl 0x2(%rax), %eax
movsbl -0x19(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x28(%rbp)
leaq -0x24(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2eb30
movl (%rax), %eax
movw %ax, -0x1e(%rbp)
movq -0x48(%rbp), %rax
movswl -0x1e(%rbp), %ecx
movl %ecx, -0x4c(%rbp)
movswl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movswl 0x2(%rax), %eax
movsbl -0x19(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x30(%rbp)
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2eb70
movq %rax, %rcx
movl -0x4c(%rbp), %eax
cmpl (%rcx), %eax
jg 0x2ad9f
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movswl (%rax), %eax
movsbl -0x19(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x38(%rbp)
leaq -0x34(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2eb30
movl (%rax), %eax
movw %ax, -0x1c(%rbp)
movq -0x48(%rbp), %rax
movswl -0x1c(%rbp), %ecx
movl %ecx, -0x50(%rbp)
movswl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movswl (%rax), %eax
movsbl -0x19(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x40(%rbp)
leaq -0x3c(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2eb70
movq %rax, %rcx
movl -0x50(%rbp), %eax
cmpl (%rcx), %eax
jg 0x2ad8c
movq -0x10(%rbp), %rax
movswl (%rax), %eax
movswl -0x1c(%rbp), %ecx
subl %ecx, %eax
movq -0x10(%rbp), %rcx
movswl (%rcx), %ecx
movswl -0x1c(%rbp), %edx
subl %edx, %ecx
imull %ecx, %eax
movq -0x10(%rbp), %rcx
movswl 0x2(%rcx), %ecx
movswl -0x1e(%rbp), %edx
subl %edx, %ecx
movq -0x10(%rbp), %rdx
movswl 0x2(%rdx), %edx
movswl -0x1e(%rbp), %esi
subl %esi, %edx
imull %edx, %ecx
addl %ecx, %eax
movw %ax, -0x20(%rbp)
cwtl
movsbl -0x19(%rbp), %ecx
movsbl -0x19(%rbp), %edx
imull %edx, %ecx
cmpl %ecx, %eax
jg 0x2ad79
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
addq $0x8, %rdi
movswq -0x1e(%rbp), %rsi
callq 0x2e6a0
movq %rax, %rdi
movswq -0x1c(%rbp), %rsi
callq 0x2e6c0
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
jmp 0x2ad7b
movw -0x1c(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1c(%rbp)
jmp 0x2acb9
jmp 0x2ad8e
movw -0x1e(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1e(%rbp)
jmp 0x2ac4f
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x14(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x60430
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
leaq -0x1c(%rbp), %rdi
callq 0x60550
jmp 0x2b8ce
movq -0x38(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, -0x14(%rbp)
leaq -0x14(%rbp), %rsi
callq 0x2ba40
movb %al, -0x39(%rbp)
jmp 0x2b8e6
movb -0x39(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x3a(%rbp)
jne 0x2b930
jmp 0x2b8f5
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movswq -0x12(%rbp), %rsi
callq 0x2e6a0
movq %rax, %rdi
movswq -0x14(%rbp), %rsi
callq 0x2e6c0
movq %rax, %rdi
leaq 0x364b6(%rip), %rsi     # 0x61dd4
callq 0x2adb0
movb %al, -0x3b(%rbp)
jmp 0x2b928
movb -0x3b(%rbp), %al
movb %al, -0x3a(%rbp)
jmp 0x2b930
movb -0x3a(%rbp), %al
movb %al, -0x3c(%rbp)
leaq -0x1c(%rbp), %rdi
callq 0x60460
movb -0x3c(%rbp), %al
testb $0x1, %al
jne 0x2b948
jmp 0x2b9a5
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movswq 0x2(%rax), %rsi
callq 0x2e6a0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movswq (%rax), %rsi
callq 0x2e6c0
movzwl (%rax), %ecx
orl $0x8, %ecx
movw %cx, (%rax)
movl $0x1, -0x30(%rbp)
jmp 0x2b9fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x2ba09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1c(%rbp), %rdi
callq 0x60460
jmp 0x2ba09
leaq -0x18(%rbp), %rdi
callq 0x60390
movq %rax, -0x48(%rbp)
jmp 0x2b9b4
movq -0x48(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x2b9ee
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movswq 0x2(%rax), %rsi
callq 0x2e6a0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movswq (%rax), %rsi
callq 0x2e6c0
movzwl (%rax), %ecx
andl $-0x9, %ecx
movw %cx, (%rax)
jmp 0x2b9f3
jmp 0x2b8bc
movl $0x0, -0x30(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x60460
addq $0x50, %rsp
popq %rbp
retq
leaq -0x14(%rbp), %rdi
callq 0x60460
movq -0x28(%rbp), %rdi
callq 0x5920
nopl (%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x15(%rbp)
movswl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x38(%rbp), %rax
movswl (%rax), %eax
movl $0x2, %esi
cltd
idivl %esi
movswl %cx, %esi
movswl %ax, %edx
callq 0x60430
cmpl $0x8, -0x14(%rbp)
jne 0x2bb17
movb $0x1, -0x15(%rbp)
movl $0x1, -0x1c(%rbp)
jmp 0x2bbd8
leaq -0x20(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x60430
jmp 0x2bb26
movl -0x14(%rbp), %edx
leaq -0x30(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x60550
jmp 0x2bb38
movl -0x30(%rbp), %eax
movl %eax, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x60460
movq -0x38(%rbp), %rax
movswl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %edx
movq -0x38(%rbp), %rax
movswl -0x20(%rbp), %ecx
imull %edx, %ecx
movw %cx, -0x20(%rbp)
movswl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %edx
movq -0x48(%rbp), %rax
movswl -0x1e(%rbp), %ecx
imull %edx, %ecx
movw %cx, -0x1e(%rbp)
movswl -0x20(%rbp), %edx
movswl (%rax), %ecx
addl %edx, %ecx
movw %cx, (%rax)
movswl -0x1e(%rbp), %edx
movswl 0x2(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x2(%rax)
movb $0x1, -0x15(%rbp)
movl $0x1, -0x1c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x60460
jmp 0x2bbd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x2bbf1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x60460
jmp 0x2bbf1
testb $0x1, -0x15(%rbp)
jne 0x2bbe7
movq -0x48(%rbp), %rdi
callq 0x60460
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x60460
movq -0x28(%rbp), %rdi
callq 0x5920
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x361bd(%rip), %rsi     # 0x61de8
callq 0x2adb0
testb $0x1, %al
jne 0x2bc36
jmp 0x2bc44
movl 0x36190(%rip), %eax     # 0x61dcc
movl %eax, -0x4(%rbp)
jmp 0x2bccc
movq -0x18(%rbp), %rdi
leaq 0x3619d(%rip), %rsi     # 0x61dec
callq 0x2adb0
testb $0x1, %al
jne 0x2bc5a
jmp 0x2bc65
movl 0x36190(%rip), %eax     # 0x61df0
movl %eax, -0x4(%rbp)
jmp 0x2bccc
movq -0x18(%rbp), %rdi
leaq 0x36154(%rip), %rsi     # 0x61dc4
callq 0x2adb0
testb $0x1, %al
jne 0x2bc7b
jmp 0x2bc86
movl 0x3613f(%rip), %eax     # 0x61dc0
movl %eax, -0x4(%rbp)
jmp 0x2bccc
movq -0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x5c, %eax
je 0x2bca0
movq -0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x2b, %eax
jne 0x2bcab
movl 0x3611a(%rip), %eax     # 0x61dc0
movl %eax, -0x4(%rbp)
jmp 0x2bccc
movq -0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x23, %eax
jne 0x2bcc3
movl 0x36116(%rip), %eax     # 0x61dd4
movl %eax, -0x4(%rbp)
jmp 0x2bccc
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movswl (%rcx), %ecx
movl %ecx, -0x1c(%rbp)
movswl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c1be
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movswl 0x2(%rcx), %ecx
movl %ecx, -0x2c(%rbp)
movswl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c181
movl $0x7, -0x4(%rbp)
jmp 0x2c2a9
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movswl 0x2(%rcx), %ecx
movl %ecx, -0x30(%rbp)
movswl (%rax), %eax
shll %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x30(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c1b2
movl $0x6, -0x4(%rbp)
jmp 0x2c2a9
movl $0x5, -0x4(%rbp)
jmp 0x2c2a9
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movswl (%rcx), %ecx
movl %ecx, -0x34(%rbp)
movswl (%rax), %eax
shll %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c248
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movswl 0x2(%rcx), %ecx
movl %ecx, -0x38(%rbp)
movswl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x38(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c211
movl $0x0, -0x4(%rbp)
jmp 0x2c2a9
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movswl 0x2(%rcx), %ecx
movl %ecx, -0x3c(%rbp)
movswl (%rax), %eax
shll %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x3c(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c23f
movl $0x8, -0x4(%rbp)
jmp 0x2c2a9
movl $0x4, -0x4(%rbp)
jmp 0x2c2a9
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movswl 0x2(%rcx), %ecx
movl %ecx, -0x40(%rbp)
movswl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x40(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c274
movl $0x1, -0x4(%rbp)
jmp 0x2c2a9
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movswl 0x2(%rcx), %ecx
movl %ecx, -0x44(%rbp)
movswl (%rax), %eax
shll %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c2a2
movl $0x2, -0x4(%rbp)
jmp 0x2c2a9
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: lotuskip[P]yuxtapa/server/map.cpp
// Function: (anonymous namespace)::tile_from_char(char, Tile&)
bool tile_from_char(const char ch, Tile& t)
{
	switch(ch)
	{
	case '.': t = T_GROUND; break;
	case ',': t = T_ROAD; break;
	case '_': t = T_FLOOR; break;
	case '#': t = T_WALL; break;
	case 'H': t = T_WALL; t.flags |= TF_NODIG; break;
	case 'T': t = T_TREE; break;
	case 'I': t = T_ILLUSION_WALL; break;
	case ' ': t = T_CHASM; break;
	case '\"': t = T_SWAMP; break;
	case '~': t = T_WATER; break;
	case ';': t = T_ROUGH; break;
	case '+': t = T_DOOR; break;
	case '\\': t = T_DOOR; t.symbol = ch; t.flags |= TF_WALKTHRU|TF_SEETHRU; break;
	case '|':
	case '-': t = T_WINDOW; t.symbol = ch; break;
	default: return true; // unrecognized!
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x2(%rbp)
movq %rsi, -0x10(%rbp)
movsbl -0x2(%rbp), %eax
addl $-0x20, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x5e, %eax
ja 0x2cc42
movq -0x18(%rbp), %rax
leaq 0x34ff1(%rip), %rcx     # 0x61b20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl 0x3528a(%rip), %ecx     # 0x61dcc
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x35275(%rip), %ecx     # 0x61dc8
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x3525c(%rip), %ecx     # 0x61dc0
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x3525f(%rip), %ecx     # 0x61dd4
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x3524e(%rip), %ecx     # 0x61dd4
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movzwl (%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movw %cx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x35241(%rip), %ecx     # 0x61de8
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x35224(%rip), %ecx     # 0x61ddc
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x37207(%rip), %ecx     # 0x63dd0
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x35215(%rip), %ecx     # 0x61dec
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x3520b(%rip), %ecx     # 0x61df0
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x351d1(%rip), %ecx     # 0x61dc4
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x351df(%rip), %ecx     # 0x61de0
movl %ecx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x351d1(%rip), %ecx     # 0x61de0
movl %ecx, (%rax)
movb -0x2(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rbp), %rax
movzwl (%rax), %ecx
orl $0x5, %ecx
movw %cx, (%rax)
jmp 0x2cc48
movq -0x10(%rbp), %rax
movl 0x351b0(%rip), %ecx     # 0x61de4
movl %ecx, (%rax)
movb -0x2(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0x2cc48
movb $0x1, -0x1(%rbp)
jmp 0x2cc4c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lotuskip[P]yuxtapa/server/map.cpp
// Function: (anonymous namespace)::char_from_tile(Tile const&)
char char_from_tile(const Tile& t)
{
	switch(t.symbol)
	{
	case '.': // floor, ground, or road
		if(t.cpair == C_GRASS)
			return t.symbol;
		if(t.cpair == C_ROAD)
			return ',';
		// must be floor
		return '_';
	case '#': // walls
		if(t.flags & TF_NODIG) // undiggable
			return 'H';
		if(t.flags & TF_WALKTHRU) // illusion wall
			return 'I';
		// fall down:
	default:
	/*case 'T': // tree
	case ' ': // chasm
	case '\"': // swamp
	case '~': // water
	case ';': // rough
	case '+': // open door
	case '\\': // closed door
	case '|': case '-': // windows */
		return t.symbol;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x23, %eax
je 0x2d086
jmp 0x2d04a
movl -0x14(%rbp), %eax
subl $0x2e, %eax
jne 0x2d0b4
jmp 0x2d054
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x18, %eax
jne 0x2d06d
movq -0x10(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x1(%rbp)
jmp 0x2d0be
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x19, %eax
jne 0x2d080
movb $0x2c, -0x1(%rbp)
jmp 0x2d0be
movb $0x5f, -0x1(%rbp)
jmp 0x2d0be
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x2d09d
movb $0x48, -0x1(%rbp)
jmp 0x2d0be
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2d0b2
movb $0x49, -0x1(%rbp)
jmp 0x2d0be
jmp 0x2d0b4
movq -0x10(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: (anonymous namespace)::upd_num_boulders()
void upd_num_boulders()
{
	boulders_left = 0;
	for(list<OccEnt>::const_iterator b_it = boulders.begin();
		b_it != boulders.end(); ++b_it)
	{
		if(!b_it->isvoid() &&
			Game::curmap->coords_in_sector(b_it->getpos()) == obj_sector)
			++boulders_left; // a boulder is in the target sector
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movw $0x0, 0x5a7ef(%rip)     # 0x92600
leaq 0x5b1d8(%rip), %rdi     # 0x92ff0
callq 0x3d130
movq %rax, -0x10(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x3d240
leaq 0x5b1bb(%rip), %rdi     # 0x92ff0
callq 0x3d190
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3d240
leaq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3db80
testb $0x1, %al
jne 0x37e61
jmp 0x37f2e
leaq -0x8(%rbp), %rdi
callq 0x3dbb0
movq %rax, %rdi
callq 0x3ce40
movb %al, %cl
movb $0x0, -0x25(%rbp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x35(%rbp)
jne 0x37ecb
movq 0x59f4f(%rip), %rax     # 0x91dd8
movq %rax, -0x50(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x3dbb0
movq %rax, %rsi
leaq -0x24(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x1b190
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movb $0x1, -0x25(%rbp)
callq 0x2c120
movl %eax, -0x3c(%rbp)
jmp 0x37ebc
movl -0x3c(%rbp), %eax
cmpl 0x556cb(%rip), %eax     # 0x8d590
sete %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
movb %al, -0x51(%rbp)
testb $0x1, -0x25(%rbp)
jne 0x37ed9
jmp 0x37ee2
leaq -0x24(%rbp), %rdi
callq 0x60460
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x37eeb
jmp 0x37f1e
movw 0x5a70e(%rip), %ax      # 0x92600
addw $0x1, %ax
movw %ax, 0x5a703(%rip)      # 0x92600
jmp 0x37f1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
testb $0x1, -0x25(%rbp)
jne 0x37f13
jmp 0x37f1c
leaq -0x24(%rbp), %rdi
callq 0x60460
jmp 0x37f34
jmp 0x37f20
leaq -0x8(%rbp), %rdi
callq 0x3dbe0
jmp 0x37e2e
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5920
nopl (%rax)
// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: (anonymous namespace)::validate_and_process(Axn const&, std::_List_iterator<Player>)
void validate_and_process(const Axn &axn, const list<Player>::iterator pit)
{
	if(axn.xncode <= XN_MOVE // these are always "sensible"
		|| short(axn.xncode - XN_SHOOT) == short(pit->cl))
		process_action(axn, pit);
	else
	{
		// Resend class info; ("client plays a healer but is sending a
		// shoot action; it must think it is still playing an archer!")
		send_full_state_refresh(pit);
		pit->action_queue.clear(); // discard rest of so-far-received actions, too
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x4, %eax
jle 0x3a6d6
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
subl $0x5, %eax
cwtl
movl %eax, -0x24(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq %rax, %rcx
movl -0x24(%rbp), %eax
movl 0xb0(%rcx), %ecx
movswl %cx, %ecx
cmpl %ecx, %eax
jne 0x3a6ed
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
callq 0x4ed70
jmp 0x3a716
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x36720
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq %rax, %rdi
addq $0xd8, %rdi
callq 0x3d5f0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: (anonymous namespace)::send_state_upd(std::_List_iterator<Player>)
void send_state_upd(const list<Player>::iterator it)
{
	Network::send_buffer.clear();
	Network::send_buffer.add((unsigned char)MID_STATE_UPD);
	Network::send_buffer.add(
		static_cast<unsigned char>(it->cl_props.hp));
	Network::send_buffer.add(
		static_cast<unsigned char>(it->cl_props.tohit));
	Network::send_buffer.add(
		static_cast<unsigned char>(it->cl_props.dam_add));
	Network::send_buffer.add((unsigned char)it->cl_props.dv);
	Network::send_buffer.add((unsigned char)(it->poisoner != cur_players.end()));
	Network::send_buffer.add((unsigned char)it->sector);
	Network::send_buffer.add(it->torch_symbol(it->is_alive() && it->own_pc->torch_is_lit()));
	Network::send_to_player(*it);
	it->needs_state_upd = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x53b65(%rip), %rdi     # 0x8e298
callq 0x5f370
leaq 0x53b59(%rip), %rdi     # 0x8e298
movl $0xb, %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x1b050
leaq 0x53b3f(%rip), %rdi     # 0x8e298
movzbl 0x143(%rax), %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x1b050
leaq 0x53b23(%rip), %rdi     # 0x8e298
movzbl 0x144(%rax), %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x1b050
leaq 0x53b07(%rip), %rdi     # 0x8e298
movzbl 0x147(%rax), %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x1b050
leaq 0x53aeb(%rip), %rdi     # 0x8e298
movzbl 0x148(%rax), %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x1b050
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x28(%rbp)
leaq 0x55a5d(%rip), %rdi     # 0x90230
callq 0x189f0
movq -0x28(%rbp), %rdi
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rsi
callq 0x1b100
andb $0x1, %al
leaq 0x53aa6(%rip), %rdi     # 0x8e298
movzbl %al, %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x1b050
movl 0x15c(%rax), %eax
leaq 0x53a88(%rip), %rdi     # 0x8e298
movzbl %al, %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq %rax, -0x20(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq %rax, %rdi
callq 0x21cd0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x11(%rbp)
jne 0x3a844
jmp 0x3a85c
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0x138(%rax), %rdi
callq 0x3d0d0
movb %al, -0x11(%rbp)
movq -0x20(%rbp), %rdi
movb -0x11(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x21e80
leaq 0x53a23(%rip), %rdi     # 0x8e298
movzbl %al, %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x28450
movq %rax, %rdi
leaq 0x53a08(%rip), %rsi     # 0x8e298
callq 0x1af60
leaq -0x8(%rbp), %rdi
callq 0x1b050
movb $0x0, 0x14d(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: Game::send_state_change(std::_List_const_iterator<Player>)
void Game::send_state_change(const list<Player>::const_iterator to)
{
	Network::send_buffer.clear();
	Network::send_buffer.add((unsigned char)MID_STATE_CHANGE);
	Network::send_buffer.add((unsigned char)to->next_cl);
	Network::send_buffer.add((unsigned char)to->team);
	Network::send_to_player(*to);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x52ff5(%rip), %rdi     # 0x8e298
callq 0x5f370
leaq 0x52fe9(%rip), %rdi     # 0x8e298
movl $0xc, %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x24f40
movl 0xb4(%rax), %eax
leaq 0x52fc9(%rip), %rdi     # 0x8e298
movzbl %al, %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x24f40
movl 0xac(%rax), %eax
leaq 0x52fab(%rip), %rdi     # 0x8e298
movzbl %al, %esi
callq 0x5f390
leaq -0x8(%rbp), %rdi
callq 0x3d790
movq %rax, %rdi
leaq 0x52f90(%rip), %rsi     # 0x8e298
callq 0x1af60
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: (anonymous namespace)::player_left_team(std::_List_iterator<Player>)
void player_left_team(const list<Player>::iterator pit)
{
	pit->own_vp->move_watchers();
	if(!intermission)
	{
		if(pit->is_alive())
			kill_player(pit);
		Game::del_owneds(pit);
		Game::send_times(pit);
	}
	post_join_msg(pit);
	Game::send_team_upds(cur_players.end());
	active_teambal_check();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0xc0(%rax), %rdi
callq 0x42870
leaq 0x518c8(%rip), %rax     # 0x8d530
testb $0x1, (%rax)
jne 0x3bcc1
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq %rax, %rdi
callq 0x21cd0
testb $0x1, %al
jne 0x3bc84
jmp 0x3bc95
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x546a0
leaq -0x18(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x18a20
movq -0x18(%rbp), %rdi
callq 0x3c230
leaq -0x20(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x18a20
movq -0x20(%rbp), %rdi
callq 0x38160
leaq -0x28(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x18a20
movq -0x28(%rbp), %rdi
callq 0x3be00
leaq 0x54552(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x18a20
movq -0x30(%rbp), %rdi
callq 0x36ce0
callq 0x3c7a0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: (anonymous namespace)::check_class_limit(e_Team, e_Class)
bool check_class_limit(const e_Team t, const e_Class c)
{
	if(int_settings[IS_CLASSLIMIT])
	{
		unsigned char num = 0;
		for(list<Player>::const_iterator it = cur_players.begin();
			it != cur_players.end(); ++it)
		{
			// Note: checking next_cl, not current class!
			if((it->team == t || it->team == T_SPEC) && it->next_cl == c
				&& ++num == int_settings[IS_CLASSLIMIT])
				return true;
		}
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x53ceb(%rip), %rax     # 0x8fa10
cmpl $0x0, 0x10(%rax)
je 0x3bde9
movb $0x0, -0xd(%rbp)
leaq 0x544f6(%rip), %rdi     # 0x90230
callq 0x1b360
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x18a20
leaq 0x544d9(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x18a20
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x24f10
testb $0x1, %al
jne 0x3bd80
jmp 0x3bde7
leaq -0x18(%rbp), %rdi
callq 0x24f40
movl 0xac(%rax), %eax
cmpl -0x8(%rbp), %eax
je 0x3bda6
leaq -0x18(%rbp), %rdi
callq 0x24f40
cmpl $0x2, 0xac(%rax)
jne 0x3bdd7
leaq -0x18(%rbp), %rdi
callq 0x24f40
movl 0xb4(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x3bdd7
movb -0xd(%rbp), %al
addb $0x1, %al
movb %al, -0xd(%rbp)
movzbl %al, %eax
leaq 0x53c44(%rip), %rcx     # 0x8fa10
cmpl 0x10(%rcx), %eax
jne 0x3bdd7
movb $0x1, -0x1(%rbp)
jmp 0x3bded
jmp 0x3bdd9
leaq -0x18(%rbp), %rdi
callq 0x250a0
jmp 0x3bd50
jmp 0x3bde9
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: (anonymous namespace)::post_spawn_msg(std::_List_const_iterator<Player>)
void post_spawn_msg(const list<Player>::const_iterator pit)
{
	string s = "You will spawn as a " + team_name[pit->team];
	s += ' ';
	s += classnames[pit->next_cl];
	s += '.';
	Network::construct_msg(s, team_colour[pit->team]);
	Network::send_to_player(*pit);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x24f40
movl 0xac(%rax), %eax
shlq $0x5, %rax
leaq 0x554ba(%rip), %rdx     # 0x913a0
addq %rax, %rdx
leaq 0x2835b(%rip), %rsi     # 0x6424b
leaq -0x28(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x1f390
movq -0x40(%rbp), %rdi
movl $0x20, %esi
callq 0x5310
jmp 0x3bf0d
leaq -0x8(%rbp), %rdi
callq 0x24f40
movl 0xb4(%rax), %eax
shlq $0x5, %rax
leaq 0x55519(%rip), %rsi     # 0x91440
addq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x56e0
jmp 0x3bf35
leaq -0x28(%rbp), %rdi
movl $0x2e, %esi
callq 0x5310
jmp 0x3bf45
leaq -0x8(%rbp), %rdi
callq 0x24f40
movl 0xac(%rax), %eax
leaq 0x28064(%rip), %rcx     # 0x63fbf
movzbl (%rax,%rcx), %esi
leaq -0x28(%rbp), %rdi
callq 0x1ab10
jmp 0x3bf6a
leaq -0x8(%rbp), %rdi
callq 0x3d790
movq %rax, %rdi
leaq 0x5231b(%rip), %rsi     # 0x8e298
callq 0x1af60
jmp 0x3bf84
leaq -0x28(%rbp), %rdi
callq 0x5a48
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5a48
movq -0x30(%rbp), %rdi
callq 0x5920
nopw %cs:(%rax,%rax)
// File: lotuskip[P]yuxtapa/server/game.cpp
// Function: (anonymous namespace)::active_teambal_check()
void active_teambal_check()
{
	if(Config::int_settings[IS_TEAMBALANCE] == TB_ACTIVE)
	{
		if(abs(num_players[T_GREEN] - num_players[T_PURPLE]) >= 2)
		{
			// teams are unbalanced; were they already?
			if(!team_unbalance)
			{
				team_unbalance = true;
				time(&teams_unbal_since);
			}
			// in any case, give the request:
			Network::to_chat("The teams are unbalanced, please fix them!");
		}
		else // teams are balanced (once more)
			team_unbalance = false;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x53261(%rip), %rax     # 0x8fa10
cmpl $0x2, 0x4(%rax)
jne 0x3c86e
movzbl 0x54bd1(%rip), %eax     # 0x91391
movzbl 0x54bcb(%rip), %ecx     # 0x91392
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0x2, %eax
jl 0x3c865
testb $0x1, 0x55e10(%rip)     # 0x925f0
jne 0x3c7f5
movb $0x1, 0x55e07(%rip)     # 0x925f0
leaq 0x55e08(%rip), %rdi     # 0x925f8
callq 0x54c0
leaq -0x21(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x5930
movq -0x40(%rbp), %rdx
leaq 0x27a53(%rip), %rsi     # 0x64260
leaq -0x20(%rbp), %rdi
callq 0x18880
jmp 0x3c818
leaq -0x20(%rbp), %rdi
callq 0x1acd0
jmp 0x3c823
leaq -0x20(%rbp), %rdi
callq 0x5a48
leaq -0x21(%rbp), %rdi
callq 0x5590
jmp 0x3c86c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3c85a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5a48
leaq -0x21(%rbp), %rdi
callq 0x5590
jmp 0x3c874
movb $0x0, 0x55d84(%rip)     # 0x925f0
jmp 0x3c86e
addq $0x40, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5920
nopl (%rax)