// File: /workspace/github_cpp_makefile_star2_O3/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 $0x48, %rsp
callq 0x258a6
leaq 0x2aba5(%rip), %r12     # 0x45e98
movq (%r12), %rbx
cmpq %r12, %rbx
je 0x1b30c
leaq 0x10(%rbx), %rdi
movq 0x10(%rbx), %rax
callq *0x10(%rax)
movq (%rbx), %rbx
jmp 0x1b2f7
leaq 0x2ab9d(%rip), %r15     # 0x45eb0
movq (%r15), %rbx
cmpq %r15, %rbx
je 0x1b32b
leaq 0x10(%rbx), %rdi
movq 0x10(%rbx), %rax
callq *0x10(%rax)
movq (%rbx), %rbx
jmp 0x1b316
leaq 0x2ab96(%rip), %r14     # 0x45ec8
movq (%r14), %rbx
cmpq %r14, %rbx
je 0x1b34a
leaq 0x10(%rbx), %rdi
movq 0x10(%rbx), %rax
callq *0x10(%rax)
movq (%rbx), %rbx
jmp 0x1b335
leaq 0x2aa6f(%rip), %rbx     # 0x45dc0
movq (%rbx), %r13
cmpq %rbx, %r13
je 0x1b36a
leaq 0x10(%r13), %rdi
movq 0x10(%r13), %rax
callq *0x10(%rax)
movq (%r13), %r13
jmp 0x1b354
movzwl 0x298ef(%rip), %eax     # 0x44c60
imull $0xffffcccd, %eax, %eax # imm = 0xFFFFCCCD
rorw $0x3, %ax
movzwl %ax, %eax
cmpl $0x667, %eax            # imm = 0x667
setae %al
leaq 0x27d33(%rip), %rdx     # 0x430c0
movq (%rdx), %r13
cmpq %rdx, %r13
sete %cl
orb %al, %cl
jne 0x1b3d9
cmpq %rdx, 0x160(%r13)
je 0x1b3c9
movb 0x153(%r13), %al
decb %al
movb %al, 0x153(%r13)
testb %al, %al
jle 0x1b3c1
movb $0x1, 0x15d(%r13)
jmp 0x1b3c9
movq %r13, %rdi
callq 0x24c63
movq (%r13), %r13
leaq 0x27cec(%rip), %rdx     # 0x430c0
cmpq %rdx, %r13
jne 0x1b39a
movq (%r12), %rax
cmpq %r12, %rax
je 0x1b3fa
cmpb $0x1, 0x1e(%rax)
jne 0x1b3f5
movq %r12, %rdi
movq %rax, %rsi
callq 0x1d4c0
jmp 0x1b3dd
movq (%rax), %rax
jmp 0x1b3dd
movq (%r15), %rax
cmpq %r15, %rax
je 0x1b41a
cmpb $0x1, 0x1e(%rax)
jne 0x1b415
movq %r15, %rdi
movq %rax, %rsi
callq 0x1d4f8
jmp 0x1b3fd
movq (%rax), %rax
jmp 0x1b3fd
movq (%r14), %rax
cmpq %r14, %rax
je 0x1b43a
cmpb $0x1, 0x1e(%rax)
jne 0x1b435
movq %r14, %rdi
movq %rax, %rsi
callq 0x1d530
jmp 0x1b41d
movq (%rax), %rax
jmp 0x1b41d
leaq 0x2aa9f(%rip), %r14     # 0x45ee0
movq (%r14), %r15
cmpq %r14, %r15
je 0x1b516
leaq -0x50(%rbp), %r12
leaq -0x70(%rbp), %r13
cmpb $0x1, 0x1e(%r15)
jne 0x1b46f
movq %r14, %rdi
movq %r15, %rsi
callq 0x1d568
movq %rax, %r15
jmp 0x1b50d
cmpb $0x1, 0x30(%r15)
jne 0x1b50a
movq 0x20(%r15), %rdi
addq $0x10, %rdi
callq 0x12554
testb %al, %al
je 0x1b50a
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r12, %rdi
leaq 0x13ae0(%rip), %rsi     # 0x2ef7d
leaq 0x13af7(%rip), %rdx     # 0x2ef9b
callq 0xe01c
movq %r12, %rdi
movl $0x36, %esi
callq 0xf3f0
movq 0x20(%r15), %rdi
addq $0x10, %rdi
leaq 0x25c63(%rip), %rsi     # 0x41128
callq 0xf719
leaq 0x10(%r15), %rdi
callq 0x21eca
movl 0x18(%r15), %eax
movl %eax, -0x70(%rbp)
leaq 0x2aaf7(%rip), %rdi     # 0x45fd8
movq %r13, %rsi
callq 0xfa8a
movq %r13, %rdi
callq 0x2b7a6
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1b50a
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
movq (%r15), %r15
cmpq %r14, %r15
jne 0x1b455
leaq 0x2a963(%rip), %r14     # 0x45e80
movq (%r14), %rax
cmpq %r14, %rax
leaq 0x27b96(%rip), %r13     # 0x430c0
je 0x1b547
cmpb $0x1, 0x1e(%rax)
jne 0x1b53f
movq %r14, %rdi
movq %rax, %rsi
callq 0x1d5a0
jmp 0x1b542
movq (%rax), %rax
cmpq %r14, %rax
jne 0x1b52c
movq (%rbx), %rax
cmpq %rbx, %rax
je 0x1b567
cmpb $0x1, 0x1e(%rax)
jne 0x1b562
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1d5d8
jmp 0x1b54a
movq (%rax), %rax
jmp 0x1b54a
movzwl 0x296f2(%rip), %ecx     # 0x44c60
movzbl 0x296ff(%rip), %esi     # 0x44c74
movl %ecx, %eax
xorl %edx, %edx
divw %si
testw %dx, %dx
je 0x1b596
movzwl %si, %esi
movl %esi, %eax
shrl %eax
addl %ecx, %eax
xorl %edx, %edx
divl %esi
testl %edx, %edx
jne 0x1b5aa
xorl %edi, %edi
jmp 0x1b59b
movl $0x1, %edi
callq 0x1bbcb
movb $0x1, %bl
testb %al, %al
jne 0x1bb27
movq (%r13), %rbx
cmpq %r13, %rbx
je 0x1ba98
leaq -0x40(%rbp), %r14
leaq -0x50(%rbp), %rdx
leaq -0x70(%rbp), %rcx
movq %rcx, %r12
movzwl 0x29693(%rip), %eax     # 0x44c60
movzwl 0xb8(%rbx), %ecx
subl %ecx, %eax
cmpl $0x15, %eax
jl 0x1b624
movq %r14, -0x50(%rbp)
movq %rdx, %rdi
leaq 0x139b3(%rip), %rsi     # 0x2ef9c
movq %rdx, %r15
leaq 0x139b2(%rip), %rdx     # 0x2efa5
callq 0xe01c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1bea2
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1b7c4
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x1b7c4
leaq 0x10(%rbx), %r13
movq %r13, %rdi
callq 0x12496
testb %al, %al
je 0x1b7bd
cmpb $0x0, 0x141(%rbx)
jne 0x1b7a4
movq 0x2961c(%rip), %rax     # 0x44c68
movq 0x148(%rbx), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, -0x50(%rbp)
movswq %cx, %rdx
shrl $0x10, %ecx
movswq %cx, %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rax
movzwl (%rax,%rdx,4), %r15d
leaq -0x50(%rbp), %rdi
callq 0x2b7a6
btl $0xa, %r15d
leaq -0x40(%rbp), %r14
jae 0x1b7a4
movq %r14, -0x50(%rbp)
leaq -0x50(%rbp), %r15
movq %r15, %rdi
leaq 0x13907(%rip), %rsi     # 0x2efa6
leaq 0x13911(%rip), %rdx     # 0x2efb7
callq 0xe01c
movq %r15, %rdi
movl $0x31, %esi
callq 0xf3f0
movq %r13, %rdi
leaq 0x25a66(%rip), %rsi     # 0x41128
callq 0xf719
callq 0x41d0
movl 0xc0(%rbx), %ecx
leaq (%rcx,%rcx,2), %rdx
leaq (%rcx,%rdx,4), %rcx
leaq 0x136ff(%rip), %rdx     # 0x2ede0
movb 0x3(%rdx,%rcx), %cl
movl %ecx, %edx
shrb $0x7, %dl
addb %cl, %dl
movl %edx, %esi
andb $-0x2, %sil
subb %sil, %cl
sarb %dl
addb %cl, %dl
movsbq %dl, %rcx
cqto
idivq %rcx
movb 0x153(%rbx), %r13b
subb %dl, %r13b
movb %r13b, 0x153(%rbx)
testb %r13b, %r13b
jle 0x1b743
movb $0x1, 0x15d(%rbx)
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
movl %eax, -0x70(%rbp)
movq %r12, %r15
movq %r12, %rdi
xorl %esi, %esi
callq 0x209ed
movq %r15, %rdi
callq 0x2b7a6
jmp 0x1b78a
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %r12, %r15
movq %r12, %rdi
leaq 0x13860(%rip), %rsi     # 0x2efb8
leaq 0x13862(%rip), %rdx     # 0x2efc1
callq 0xe01c
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x249ec
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x1b78a
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x43f0
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1b79f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
testb %r13b, %r13b
jle 0x1b7bd
cmpb $0x0, 0x138(%rbx)
je 0x1b7dc
movb $0x0, 0x138(%rbx)
movw $0x0, 0x13a(%rbx)
leaq 0x278fc(%rip), %r13     # 0x430c0
movq %r12, %rcx
leaq -0x50(%rbp), %rdx
movq (%rbx), %rbx
cmpq %r13, %rbx
jne 0x1b5c3
jmp 0x1b89b
movb 0x141(%rbx), %al
testb %al, %al
leaq 0x278d5(%rip), %r13     # 0x430c0
leaq -0x50(%rbp), %rdx
je 0x1b7fe
movq %r12, %rcx
decb %al
movb %al, 0x141(%rbx)
jmp 0x1b7cb
cmpb $0x0, 0x142(%rbx)
je 0x1b818
movq %rbx, %rdi
callq 0x25ae5
leaq -0x50(%rbp), %rdx
movq %r12, %rcx
jmp 0x1b7cb
movq 0xf8(%rbx), %rdi
cmpq %rdi, 0x118(%rbx)
je 0x1b851
movq %rbx, %rsi
callq 0x1c138
movq 0x118(%rbx), %rax
cmpq 0xf8(%rbx), %rax
je 0x1b7c4
leaq 0xe8(%rbx), %rdi
callq 0x1d610
jmp 0x1b7c4
movl 0xc0(%rbx), %eax
cmpl $0x1, %eax
movq %r12, %rcx
je 0x1b876
cmpl $0xa, %eax
je 0x1b876
movb 0x140(%rbx), %al
testb %al, %al
je 0x1b876
decb %al
movb %al, 0x140(%rbx)
movq 0xd0(%rbx), %rax
cmpb $0x0, 0x20(%rax)
jne 0x1b7cb
incw 0x13a(%rbx)
movq %rbx, %rdi
callq 0x26fdc
jmp 0x1b80f
movq (%r13), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
cmpq %r13, %rbx
je 0x1baa7
leaq 0x2586a(%rip), %r14     # 0x41128
leaq 0x293bb(%rip), %r15     # 0x44c80
movq 0xd0(%rbx), %rdi
movq 0x30(%rdi), %rax
cmpq 0x38(%rdi), %rax
je 0x1ba74
movq %r14, %rdi
callq 0x2af20
movq %r14, %rdi
movl $0x3, %esi
callq 0x2af34
movzwl 0x2936a(%rip), %esi     # 0x44c60
movq %r14, %rdi
callq 0x2af48
movq 0xd0(%rbx), %rax
cmpb $0x0, 0x6(%rax)
jne 0x1b942
movl 0x2(%rax), %eax
movl %eax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1f5f4
testb %al, %al
je 0x1b929
leaq -0x70(%rbp), %rdi
callq 0x2b7a6
jmp 0x1b942
movq 0x160(%rbx), %r12
leaq -0x70(%rbp), %rdi
callq 0x2b7a6
cmpq %r13, %r12
je 0x1b9c8
movq 0xd0(%rbx), %rdi
movq %r15, %rsi
leaq -0x50(%rbp), %rdx
callq 0x1e194
movl %eax, %r12d
cmpq %r13, 0x160(%rbx)
je 0x1b9b2
movq $-0x2, %r13
cmpb $0x3f, 0x3(%r13,%r15)
je 0x1b9a5
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 0x1b9a5
movb $0x26, 0x2(%r13,%r15)
addq $0x2, %r13
cmpq $0x420, %r13            # imm = 0x420
jb 0x1b968
movzwl %r12w, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2afc0
leaq 0x276f8(%rip), %r13     # 0x430c0
movq 0xd0(%rbx), %rdi
movq 0x30(%rdi), %r12
cmpq 0x38(%rdi), %r12
je 0x1b9f6
movq (%r12), %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0xf719
addq $0x8, %r12
movq 0xd0(%rbx), %rdi
jmp 0x1b9d3
movq -0x48(%rbp), %rax
cmpq %rax, -0x50(%rbp)
je 0x1ba74
addq $-0x20, %rax
movq %rax, %rdi
movl $0xf, %esi
callq 0xf3f0
movq 0xd0(%rbx), %rax
movq 0x30(%rax), %r12
cmpq 0x38(%rax), %r12
je 0x1ba3f
movq (%r12), %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0xf719
addq $0x8, %r12
movq 0xd0(%rbx), %rax
jmp 0x1ba1c
movq -0x48(%rbp), %rcx
leaq -0x20(%rcx), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rcx), %rdi
addq $-0x10, %rcx
cmpq %rcx, %rdi
je 0x1ba67
movq (%rcx), %rsi
incq %rsi
callq 0x43f0
movq -0x48(%rbp), %rax
cmpq %rax, -0x50(%rbp)
jne 0x1ba00
movq 0xd0(%rbx), %rdi
callq 0x1ebd2
cmpb $0x1, 0x15d(%rbx)
jne 0x1ba8a
movq %rbx, %rdi
callq 0x1c187
movq (%rbx), %rbx
cmpq %r13, %rbx
jne 0x1b8c5
jmp 0x1baa7
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
leaq 0x2a52a(%rip), %rdi     # 0x45fd8
callq 0x1d85c
callq 0x20946
callq 0x20aa3
leaq 0x2a4fc(%rip), %rbx     # 0x45fc0
movq %rbx, %rdi
callq 0x1da22
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
movq $0x0, 0x10(%rbx)
cmpb $0x1, 0x2999e(%rip)     # 0x45480
jne 0x1bb04
xorl %edi, %edi
callq 0x43b0
subq 0x29996(%rip), %rax     # 0x45488
cmpq $0x1e, %rax
jl 0x1bb04
callq 0x2a3cf
movb $0x0, 0x2997c(%rip)     # 0x45480
movzwl 0x29155(%rip), %eax     # 0x44c60
incl %eax
movw %ax, 0x2914c(%rip)      # 0x44c60
cmpw 0x24905(%rip), %ax      # 0x40420
sete %bl
leaq -0x50(%rbp), %rdi
callq 0xf90c
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x1bb83
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x1bb83
jmp 0x1bb80
jmp 0x1bb60
jmp 0x1bb92
jmp 0x1bb80
jmp 0x1bbb7
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2b7a6
jmp 0x1bb83
jmp 0x1bb80
jmp 0x1bb92
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2b7a6
jmp 0x1bbba
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
jne 0x1bba3
jmp 0x1bbc3
movq %rax, %rbx
jmp 0x1bbc3
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1bbc3
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x1bbc3
jmp 0x1bbb7
jmp 0x1bbb7
jmp 0x1bbb7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0xf90c
movq %rbx, %rdi
callq 0x4740