// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/game.cpp
// Function: Game::process_turn()
bool Game::process_turn()
{
	/* Turn processing process:
	 * 1. check teammates wanting to change places
	 * 2. update each entity, process poisonings
	 * 3. do "garbage collection"
	 * 4. process spawning
	 * 5. process an action in each player's action queue, if any
	 * 6. render the situation to the players
	 * 7. possible active teambalance check
	 * 8. see if map should end
	 */
#ifdef TIME_SERVER_TURN
	// Timing the turn process, for performance purposes:
	timeval tv;	
	long start_usecs;
	gettimeofday(&tv, 0);
	start_usecs = tv.tv_sec*1000000 + tv.tv_usec;
#endif

	// All player movement actions have been processed, finish by checking
	// teammates swapping places:
	process_swaps();

	// Update entities that need it:
	list<Arrow>::iterator a_it; 
	for(a_it = arrows.begin(); a_it != arrows.end(); ++a_it)
		a_it->update();
	list<MM>::iterator m_it; 
	for(m_it = MMs.begin(); m_it != MMs.end(); ++m_it)
		m_it->update();
	list<Zap>::iterator z_it; 
	for(z_it = zaps.begin(); z_it != zaps.end(); ++z_it)
		z_it->update();
	list<NOccEnt>::iterator ne_it;
	for(ne_it = noccents[NOE_CORPSE].begin();
		ne_it != noccents[NOE_CORPSE].end(); ++ne_it)
		ne_it->update();

	// Check poisoning:
	list<Player>::iterator it;
	if(!(curturn % POISON_EVERY_N_TURN))
	{
		for(it = cur_players.begin(); it != cur_players.end(); ++it)
		{
			// a valid poisoner implies player is dead!
			if(it->poisoner != cur_players.end())
			{
				if(--(it->cl_props.hp) <= 0)
					player_poisoned(it);
				else
					it->needs_state_upd = true;
			}
		}
	}

	// Destroy voided entities: (perhaps due to bad design, I don't see an easy
	// way to use templates here, so it's kind of repetitive...)
	a_it = arrows.begin();
	while(a_it != arrows.end())
	{
		if(a_it->isvoid()) a_it = arrows.erase(a_it);
		else ++a_it;
	}
	m_it = MMs.begin();
	while(m_it != MMs.end())
	{
		if(m_it->isvoid()) m_it = MMs.erase(m_it);
		else ++m_it;
	}
	z_it = zaps.begin();
	while(z_it != zaps.end())
	{
		if(z_it->isvoid()) z_it = zaps.erase(z_it);
		else ++z_it;
	}
	list<PCEnt>::iterator pc_it = PCs.begin();
	while(pc_it != PCs.end())
	{
		if(pc_it->isvoid()) pc_it = PCs.erase(pc_it);
		// With PCs, save time and update torches at the same time:
		else
		{
			if(pc_it->torch_is_lit())
			{
				if(pc_it->get_owner()->burn_torch())
				{
					string msg = "Suddenly your torch burns out.";
					Network::construct_msg(msg, C_LIGHT_TRAP_LIT);
					Network::send_to_player(*(pc_it->get_owner()));
					pc_it->toggle_torch();
					event_set.insert(pc_it->getpos());
				}
			}
			++pc_it;
		}
	}
	list<OccEnt>::iterator b_it = boulders.begin();
	while(b_it != boulders.end())
	{
		if(b_it->isvoid()) b_it = boulders.erase(b_it);
		else ++b_it;
	}
	ne_it = noccents[NOE_CORPSE].begin();
	while(ne_it != noccents[NOE_CORPSE].end())
	{
		if(ne_it->isvoid()) ne_it = noccents[NOE_CORPSE].erase(ne_it);
		else ++ne_it;
	}
	
	// Handle spawning:
	if(!(curturn % spawn_cycle))
	{
		if(spawn_team(T_PURPLE))
			return true;
	}
	else if(!((curturn + spawn_cycle/2) % spawn_cycle))
	{
		if(spawn_team(T_GREEN))
			return true;
	}
	
	// Go through non-spectators, checking who acted and who didn't:
	for(it = cur_players.begin(); it != cur_players.end(); ++it)
	{
		// If we haven't heard from a player for MAX_PING_TURNS turns,
		// assume that the client has disconnected.
		if(curturn - it->last_heard_of > MAX_PING_TURNS)
		{
			it = remove_player(it, " dropped.");
			continue;
		}

		if(it->is_alive())
		{
			// First check for drowning. If is in water and could've
			// moved away, drowning damage.
			if(!it->wait_turns &&
				(curmap->mod_tile(it->own_pc->getpos())->flags & TF_DROWNS))
			{
				string s = "You are drowning!";
				Network::construct_msg(s, C_WATER_LIT);
				Network::send_to_player(*it);
				it->cl_props.hp -= random()%(classes[it->cl].hp/2 + (classes[it->cl].hp%2));
				if(it->cl_props.hp <= 0)
				{
					player_death(it, " drowned.", false);
					continue;
				}
				// else (needs_state_upd is set in player_death otherwise)
				it->needs_state_upd = true;
				// splashing sounds for drowning regardless of class:
				add_sound(it->own_pc->getpos(), S_SPLASH);
			}
			// if here, did not die of drowning:
			if(!it->acted_this_turn)
			{
				if(it->wait_turns) // lost turn(s) due to something
					it->wait_turns--;
				else if(it->doing_a_chore) // working on something
					progress_chore(it);
				else if(it->action_queue.empty())
				{
					if(it->cl != C_ASSASSIN && it->cl != C_PLANEWALKER
						&& it->limiter)
						it->limiter--;
					// Being blind prevents trap detection and is not considered idling:
					if(!it->own_vp->is_blind())
					{
						it->turns_without_axn++;
						trap_detection(it);
					}
				}
				else
				{
					validate_and_process(it->action_queue.front(), it);
					if(!it->action_queue.empty()) /* Might've been cleared
							in processing! */
						it->action_queue.pop_front();
				}
			}
			else
			{
				it->acted_this_turn = false; // for next turn
				it->turns_without_axn = 0;
			}
		} // if alive
	} // loop players
	
	/// Render&Send
	using Network::send_buffer;
	vector<string> shouts;
	short i, j;
	for(it = cur_players.begin(); it != cur_players.end(); ++it)
	{
		// check if this player's viewpoint has any watchers (if not, no point
		// in rendering!)
		if(it->own_vp->has_watchers())
		{
			send_buffer.clear();
			send_buffer.add((unsigned char)MID_VIEW_UPD);
			send_buffer.add(curturn);

			/* Check if there have been any events during this turn in the
			 * vicinity of this viewpoint. If there are none, we don't
			 * need to render, but must anyway send a "tick message"
			 * indicating that a turn has passed. Also always rerender for
			 * poisoned PCs. */
			if(it->own_vp->pos_changed() || events_around(it->own_vp->get_pos())
				|| it->poisoner != cur_players.end())
			{
				i = it->own_vp->render(renderbuffer, shouts);
				if(it->poisoner != cur_players.end())
				{
					// if poisoned, draw random tiles sickly green
					for(j = 0; j < 2*VIEWSIZE*VIEWSIZE; j += 2)
					{
						if(renderbuffer[j+1] != '?' && !(random()%3))
							renderbuffer[j] = C_ACID_TRAP;
					}
				}
				send_buffer.write_compressed(renderbuffer, i);
			}

			// Send to all watchers:
			for(vector< list<Player>::iterator >::const_iterator wi =
				it->own_vp->foll_beg(); wi != it->own_vp->foll_end(); ++wi)
				Network::send_to_player(**wi);
			// Send possible shouts:
			while(!shouts.empty())
			{
				Network::construct_msg(shouts.back(), DEF_MSG_COL);
				for(vector< list<Player>::iterator >::const_iterator wi =
					it->own_vp->foll_beg(); wi != it->own_vp->foll_end(); ++wi)
					Network::send_to_player(**wi);
				shouts.pop_back();
			}
		}
		// If the viewpoint is blinded, reduce time left:
		it->own_vp->reduce_blind();
		// Check if the player needs a state update:
		if(it->needs_state_upd)
			send_state_upd(it);
	}
	event_set.clear();
	clear_action_inds();
	clear_sounds();
	fball_centers.clear();

	// Teams need shuffled?
	if(team_unbalance && time(NULL) - teams_unbal_since >= SECS_TO_SHUFFLE)
	{
		shuffle_teams();
		team_unbalance = false;
	}

#ifdef TIME_SERVER_TURN
	// Timing the turn process, for performance purposes:
	gettimeofday(&tv, 0);
	cout << tv.tv_sec*1000000 + tv.tv_usec - start_usecs << "µs" << endl;
#endif

	return (++curturn == map_over_turn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
callq 0x25b05
leaq 0x2aa46(%rip), %r12     # 0x45e98
movq (%r12), %rbx
cmpq %r12, %rbx
je 0x1b46b
leaq 0x10(%rbx), %rdi
movq 0x10(%rbx), %rax
callq *0x10(%rax)
movq (%rbx), %rbx
jmp 0x1b456
leaq 0x2aa3e(%rip), %r15     # 0x45eb0
movq (%r15), %rbx
cmpq %r15, %rbx
je 0x1b48a
leaq 0x10(%rbx), %rdi
movq 0x10(%rbx), %rax
callq *0x10(%rax)
movq (%rbx), %rbx
jmp 0x1b475
leaq 0x2aa37(%rip), %r14     # 0x45ec8
movq (%r14), %rbx
cmpq %r14, %rbx
je 0x1b4a9
leaq 0x10(%rbx), %rdi
movq 0x10(%rbx), %rax
callq *0x10(%rax)
movq (%rbx), %rbx
jmp 0x1b494
leaq 0x2a910(%rip), %rbx     # 0x45dc0
movq (%rbx), %r13
cmpq %rbx, %r13
je 0x1b4c9
leaq 0x10(%r13), %rdi
movq 0x10(%r13), %rax
callq *0x10(%rax)
movq (%r13), %r13
jmp 0x1b4b3
movzwl 0x29790(%rip), %eax     # 0x44c60
imull $0xffffcccd, %eax, %eax # imm = 0xFFFFCCCD
rorw $0x3, %ax
movzwl %ax, %eax
cmpl $0x667, %eax            # imm = 0x667
setae %al
leaq 0x27bd4(%rip), %rdx     # 0x430c0
movq (%rdx), %r13
cmpq %rdx, %r13
sete %cl
orb %al, %cl
jne 0x1b538
cmpq %rdx, 0x160(%r13)
je 0x1b528
movb 0x153(%r13), %al
decb %al
movb %al, 0x153(%r13)
testb %al, %al
jle 0x1b520
movb $0x1, 0x15d(%r13)
jmp 0x1b528
movq %r13, %rdi
callq 0x24ed9
movq (%r13), %r13
leaq 0x27b8d(%rip), %rdx     # 0x430c0
cmpq %rdx, %r13
jne 0x1b4f9
movq (%r12), %rax
cmpq %r12, %rax
je 0x1b559
cmpb $0x1, 0x1e(%rax)
jne 0x1b554
movq %r12, %rdi
movq %rax, %rsi
callq 0x1d5e0
jmp 0x1b53c
movq (%rax), %rax
jmp 0x1b53c
movq (%r15), %rax
cmpq %r15, %rax
je 0x1b579
cmpb $0x1, 0x1e(%rax)
jne 0x1b574
movq %r15, %rdi
movq %rax, %rsi
callq 0x1d618
jmp 0x1b55c
movq (%rax), %rax
jmp 0x1b55c
movq (%r14), %rax
cmpq %r14, %rax
je 0x1b599
cmpb $0x1, 0x1e(%rax)
jne 0x1b594
movq %r14, %rdi
movq %rax, %rsi
callq 0x1d650
jmp 0x1b57c
movq (%rax), %rax
jmp 0x1b57c
leaq 0x2a940(%rip), %r14     # 0x45ee0
movq (%r14), %r15
cmpq %r14, %r15
je 0x1b675
leaq -0x50(%rbp), %r12
leaq -0x78(%rbp), %r13
cmpb $0x1, 0x1e(%r15)
jne 0x1b5ce
movq %r14, %rdi
movq %r15, %rsi
callq 0x1d688
movq %rax, %r15
jmp 0x1b66c
cmpb $0x1, 0x30(%r15)
jne 0x1b669
movq 0x20(%r15), %rdi
addq $0x10, %rdi
callq 0x126a4
testb %al, %al
je 0x1b669
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r12, %rdi
leaq 0x13981(%rip), %rsi     # 0x2ef7d
leaq 0x13998(%rip), %rdx     # 0x2ef9b
callq 0xdfec
movq %r12, %rdi
movl $0x36, %esi
callq 0xf4ed
movq 0x20(%r15), %rdi
addq $0x10, %rdi
leaq 0x25b04(%rip), %rsi     # 0x41128
callq 0xf816
leaq 0x10(%r15), %rdi
callq 0x2213a
movl 0x18(%r15), %eax
movl %eax, -0x78(%rbp)
leaq 0x2a998(%rip), %rdi     # 0x45fd8
movq %r13, %rsi
callq 0xfb84
movq %r13, %rdi
callq 0x2bbf6
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1b669
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
movq (%r15), %r15
cmpq %r14, %r15
jne 0x1b5b4
leaq 0x2a804(%rip), %r14     # 0x45e80
movq (%r14), %rax
cmpq %r14, %rax
leaq 0x27a37(%rip), %r13     # 0x430c0
je 0x1b6a6
cmpb $0x1, 0x1e(%rax)
jne 0x1b69e
movq %r14, %rdi
movq %rax, %rsi
callq 0x1d6c0
jmp 0x1b6a1
movq (%rax), %rax
cmpq %r14, %rax
jne 0x1b68b
movq (%rbx), %rax
cmpq %rbx, %rax
je 0x1b6c6
cmpb $0x1, 0x1e(%rax)
jne 0x1b6c1
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1d6f8
jmp 0x1b6a9
movq (%rax), %rax
jmp 0x1b6a9
movzwl 0x29593(%rip), %ecx     # 0x44c60
movzbl 0x295a0(%rip), %esi     # 0x44c74
movl %ecx, %eax
xorl %edx, %edx
divl %esi
testl %edx, %edx
je 0x1b6f0
movl %esi, %eax
shrl %eax
addl %ecx, %eax
xorl %edx, %edx
divl %esi
testl %edx, %edx
jne 0x1b704
xorl %edi, %edi
jmp 0x1b6f5
movl $0x1, %edi
callq 0x1bd51
movb $0x1, %bl
testb %al, %al
jne 0x1bc95
movq (%r13), %rbx
cmpq %r13, %rbx
je 0x1ba15
leaq -0x40(%rbp), %r14
leaq 0x13889(%rip), %r12     # 0x2efa5
leaq -0x50(%rbp), %rdx
movzwl 0x29539(%rip), %eax     # 0x44c60
movzwl 0xb8(%rbx), %ecx
subl %ecx, %eax
cmpl $0x15, %eax
jl 0x1b773
movq %r14, -0x50(%rbp)
movq %rdx, %rdi
movq %rdx, %r15
leaq 0x13856(%rip), %rsi     # 0x2ef9c
movq %r12, %rdx
callq 0xdfec
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1bff2
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1b79c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x1b79c
leaq 0x10(%rbx), %r13
movq %r13, %rdi
callq 0x125e6
testb %al, %al
je 0x1b795
movq %r14, %r12
movb 0x141(%rbx), %al
testb %al, %al
je 0x1b7b1
xorl %r15d, %r15d
jmp 0x1b7e7
leaq 0x27924(%rip), %r13     # 0x430c0
leaq -0x50(%rbp), %rdx
movq (%rbx), %rbx
cmpq %r13, %rbx
jne 0x1b720
jmp 0x1ba15
movq 0x294b0(%rip), %rcx     # 0x44c68
movq 0x148(%rbx), %rdx
movl 0x8(%rdx), %edx
movl %edx, -0x54(%rbp)
movswq -0x52(%rbp), %rsi
movq 0x8(%rcx), %rcx
leaq (%rsi,%rsi,2), %rsi
movswq %dx, %rdx
movq (%rcx,%rsi,8), %rcx
movb 0x1(%rcx,%rdx,4), %r15b
andb $0x4, %r15b
shrb $0x2, %r15b
testb %al, %al
leaq -0x50(%rbp), %rdx
jne 0x1b7fc
leaq -0x54(%rbp), %rdi
callq 0x2bbf6
leaq -0x50(%rbp), %rdx
testb %r15b, %r15b
movq %r12, %r14
je 0x1b92a
movq %r14, -0x50(%rbp)
movq %rdx, %rdi
movq %rdx, %r15
leaq 0x1378d(%rip), %rsi     # 0x2efa6
leaq 0x13797(%rip), %rdx     # 0x2efb7
callq 0xdfec
movq %r15, %rdi
movl $0x31, %esi
callq 0xf4ed
movq %r13, %rdi
leaq 0x258ec(%rip), %rsi     # 0x41128
callq 0xf816
callq 0x41d0
movl 0xc0(%rbx), %ecx
leaq (%rcx,%rcx,2), %rdx
leaq (%rcx,%rdx,4), %rcx
leaq 0x13585(%rip), %rdx     # 0x2ede0
movsbl 0x3(%rdx,%rcx), %ecx
movl %ecx, %edx
shrb $0x7, %dl
addb %cl, %dl
sarb %dl
movsbl %dl, %edx
movl %ecx, %esi
shrl $0x1f, %esi
addl %ecx, %esi
andl $-0x2, %esi
subl %esi, %ecx
addl %edx, %ecx
movslq %ecx, %rcx
cqto
idivq %rcx
movb 0x153(%rbx), %r13b
subb %dl, %r13b
movb %r13b, 0x153(%rbx)
testb %r13b, %r13b
jle 0x1b8c4
movb $0x1, 0x15d(%rbx)
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
movl %eax, -0x78(%rbp)
leaq -0x78(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x20b4f
movq %r15, %rdi
callq 0x2bbf6
jmp 0x1b90c
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x78(%rbp), %r15
movq %r15, %rdi
leaq 0x136de(%rip), %rsi     # 0x2efb8
leaq 0x136e0(%rip), %rdx     # 0x2efc1
callq 0xdfec
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x24c43
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1b90c
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1b921
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
testb %r13b, %r13b
leaq -0x50(%rbp), %rdx
jle 0x1b943
cmpb $0x0, 0x138(%rbx)
je 0x1b956
movb $0x0, 0x138(%rbx)
movw $0x0, 0x13a(%rbx)
leaq 0x27776(%rip), %r13     # 0x430c0
leaq 0x13654(%rip), %r12     # 0x2efa5
jmp 0x1b7a0
movb 0x141(%rbx), %al
testb %al, %al
leaq 0x2775b(%rip), %r13     # 0x430c0
leaq 0x13639(%rip), %r12     # 0x2efa5
je 0x1b97b
decb %al
movb %al, 0x141(%rbx)
jmp 0x1b7a0
cmpb $0x0, 0x142(%rbx)
je 0x1b991
movq %rbx, %rdi
callq 0x25d44
jmp 0x1b79c
movq 0xf8(%rbx), %rdi
cmpq %rdi, 0x118(%rbx)
je 0x1b9ce
movq %rbx, %rsi
callq 0x1c288
movq 0x118(%rbx), %rax
cmpq 0xf8(%rbx), %rax
je 0x1b79c
leaq 0xe8(%rbx), %rdi
callq 0x1d730
jmp 0x1b79c
movl 0xc0(%rbx), %eax
cmpl $0x1, %eax
je 0x1b9f0
cmpl $0xa, %eax
je 0x1b9f0
movb 0x140(%rbx), %al
testb %al, %al
je 0x1b9f0
decb %al
movb %al, 0x140(%rbx)
movq 0xd0(%rbx), %rax
cmpb $0x0, 0x20(%rax)
jne 0x1b7a0
incw 0x13a(%rbx)
movq %rbx, %rdi
callq 0x271e2
jmp 0x1b79c
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq (%r13), %rbx
cmpq %r13, %rbx
je 0x1bc15
leaq 0x256f0(%rip), %r14     # 0x41128
leaq 0x29241(%rip), %r15     # 0x44c80
movq 0xd0(%rbx), %rax
movq 0x30(%rax), %rcx
cmpq 0x38(%rax), %rcx
je 0x1bbec
movq %r14, %rdi
callq 0x2b340
movq %r14, %rdi
movl $0x3, %esi
callq 0x2b354
movzwl 0x291f0(%rip), %esi     # 0x44c60
movq %r14, %rdi
callq 0x2b368
movq 0xd0(%rbx), %rax
movb 0x6(%rax), %r13b
movb $0x1, %r12b
testb %r13b, %r13b
jne 0x1bab0
movl 0x2(%rax), %eax
movl %eax, -0x78(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x1f788
testb %al, %al
jne 0x1bab0
leaq 0x2761b(%rip), %rax     # 0x430c0
cmpq %rax, 0x160(%rbx)
setne %r12b
testb %r13b, %r13b
jne 0x1babe
leaq -0x78(%rbp), %rdi
callq 0x2bbf6
testb %r12b, %r12b
leaq 0x275f8(%rip), %r13     # 0x430c0
je 0x1bb54
movq 0xd0(%rbx), %rdi
movq %r15, %rsi
leaq -0x50(%rbp), %rdx
callq 0x1e336
movl %eax, %r12d
cmpq %r13, 0x160(%rbx)
je 0x1bb3e
movq $-0x2, %r13
cmpb $0x3f, 0x3(%r13,%r15)
je 0x1bb31
callq 0x41d0
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movabsq $0x2aaaaaaaaaaaaaaa, %rcx # imm = 0x2AAAAAAAAAAAAAAA
addq %rcx, %rax
movabsq $0x5555555555555554, %rcx # imm = 0x5555555555555554
cmpq %rcx, %rax
ja 0x1bb31
movb $0x26, 0x2(%r13,%r15)
addq $0x2, %r13
cmpq $0x420, %r13            # imm = 0x420
jb 0x1baf4
movzwl %r12w, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2b3dc
leaq 0x2756c(%rip), %r13     # 0x430c0
movq 0xd0(%rbx), %rax
movq 0x30(%rax), %r12
cmpq 0x38(%rax), %r12
je 0x1bbe2
movq (%r12), %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0xf816
addq $0x8, %r12
movq 0xd0(%rbx), %rax
jmp 0x1bb5f
addq $-0x20, %rdi
movl $0xf, %esi
callq 0xf4ed
movq 0xd0(%rbx), %rax
movq 0x30(%rax), %r12
cmpq 0x38(%rax), %r12
je 0x1bbbe
movq (%r12), %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0xf816
addq $0x8, %r12
movq 0xd0(%rbx), %rax
jmp 0x1bb9b
movq -0x48(%rbp), %rax
leaq -0x20(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
cmpq %rax, %rdi
je 0x1bbe2
movq (%rax), %rsi
incq %rsi
callq 0x43f0
movq -0x48(%rbp), %rdi
cmpq %rdi, -0x50(%rbp)
jne 0x1bb82
movq 0xd0(%rbx), %rdi
callq 0x1ed6c
cmpb $0x1, 0x15d(%rbx)
jne 0x1bc09
movq %rbx, %rdi
callq 0x1c2d7
movq (%rbx), %rbx
cmpq %r13, %rbx
jne 0x1ba3f
leaq 0x2a3bc(%rip), %rdi     # 0x45fd8
callq 0x1da0c
callq 0x20aa8
callq 0x20c05
leaq 0x2a38e(%rip), %rbx     # 0x45fc0
movq %rbx, %rdi
callq 0x1dbd2
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
movq $0x0, 0x10(%rbx)
cmpb $0x1, 0x29830(%rip)     # 0x45480
jne 0x1bc72
xorl %edi, %edi
callq 0x43b0
subq 0x29828(%rip), %rax     # 0x45488
cmpq $0x1e, %rax
jl 0x1bc72
callq 0x2a7a8
movb $0x0, 0x2980e(%rip)     # 0x45480
movzwl 0x28fe7(%rip), %eax     # 0x44c60
incl %eax
movw %ax, 0x28fde(%rip)      # 0x44c60
cmpw 0x2479f(%rip), %ax      # 0x40428
sete %bl
leaq -0x50(%rbp), %rdi
callq 0xfa0a
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1bced
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x1bced
jmp 0x1bcea
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2bbf6
jmp 0x1bced
jmp 0x1bd3d
jmp 0x1bd18
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2bbf6
jmp 0x1bd09
jmp 0x1bd06
jmp 0x1bd18
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
jne 0x1bd29
jmp 0x1bd49
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2bbf6
jmp 0x1bd40
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
jne 0x1bd29
jmp 0x1bd49
movq %rax, %rbx
jmp 0x1bd49
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1bd49
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x1bd49
jmp 0x1bd3d
jmp 0x1bd3d
jmp 0x1bd3d
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0xfa0a
movq %rbx, %rdi
callq 0x4750