// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/server/chores.cpp
// Function: process_action(Axn const&, std::_List_iterator<Player>)
void process_action(const Axn &axn, const list<Player>::iterator pit)
{
	Coords c;
	// Stuff that happens whenever a PC acts:
	pit->acted_this_turn = true;
	pit->wants_to_move_to = MAX_D;

	switch(axn.xncode)
	{
	case XN_CLOSE_DOOR:
	{
		// Find an open door, starting the search from the facing direction:
		e_Dir d = pit->facing;
		Tile *t;
		do {
			c = pit->own_pc->getpos().in(d);
			t = Game::curmap->mod_tile(c);
			if(t->symbol == '\\' && !(t->flags & TF_OCCUPIED))
			{
				t->symbol = '+';
				t->flags &= ~(TF_WALKTHRU|TF_SEETHRU);
				update_lights_around(c);
				if(random()%2)
					add_sound(c, S_CREAK);
				else // a sound sets an event
					event_set.insert(c);
				pit->facing = d;
				break;
			}
			++d;
		} while(d != pit->facing);
		break;
	}
	case XN_TORCH_HANDLE:
	{
		c = pit->own_pc->getpos();
		if(pit->own_pc->torch_is_lit())
		{
			pit->own_pc->toggle_torch();
			event_set.insert(c);
		}
		else if(pit->torch_left) // wants to light it
		{
			// Check the three conditions: wizard, on a static torch, or
			// next to a teammate with a lit torch:
			if(pit->cl == C_WIZARD || any_noccent_at(c, NOE_TORCH) != noccents[NOE_TORCH].end())
			{
				pit->own_pc->toggle_torch();
				event_set.insert(c);
			}
			else // Check the teammates:
			{
				for(list<PCEnt>::const_iterator pcit = PCs.begin();
					pcit != PCs.end(); ++pcit)
				{
					if(pcit->getpos().dist_walk(c) == 1
						&& pcit->torch_is_lit()
						&& pcit->get_owner()->team == pit->team)
					{
						pit->own_pc->toggle_torch();
						event_set.insert(c);
						break;
					}
				}
			}
		} // trying to light a torch
		break;
	}
	case XN_TRAP_TRIGGER:
		if(Game::curmap->get_tile(pit->own_pc->getpos()).flags & TF_TRAP)
			trigger_trap(pit, any_trap_at(pit->own_pc->getpos()), true);
		break;
	case XN_SUICIDE:
	{
		// Check for "scared to death" possibility:
		// Go through the PCs looking for any visible enemy close enough
		list<PCEnt>::iterator it = PCs.begin();
		while(it != PCs.end())
		{
			// not void, visible, enemy (NOTE: pass the actual
			// distance to LOS_between; this way it will only check one
			// direction (whether 'pit' sees 'it', not if 'it' sees 'pit'))
			if(!it->isvoid() && it->visible_to_team(pit->team)
				&& it->get_owner()->team != pit->team
				&& Game::curmap->LOS_between(pit->own_pc->getpos(), it->getpos(),
					SCARED_TO_DEATH_DIST, it->getpos().dist_walk(pit->own_pc->getpos())))
			{
				player_death(pit, " was scared to death by "
					+ it->get_owner()->nick + '.', true);
				record_kill(it->get_owner(), WTK_SCARE);
				break;
			}
			++it;
		}
		if(it != PCs.end()) // was broken
			break;
		// If here, check for being poisoned with just 1 hp:
		if(pit->poisoner != cur_players.end() && pit->cl_props.hp == 1)
			player_poisoned(pit);
		else // a valid suicide
			player_death(pit, " suicided.", true);
		break;
	}
	case XN_MOVE:
		// If player is in water and action queue is nonempty, do not allow swimming
		if(pit->action_queue.empty() ||
			!(Game::curmap->mod_tile(pit->own_pc->getpos())->flags & TF_DROWNS))
			try_move(pit, (pit->facing = e_Dir(axn.var1)));
		break;
	case XN_SHOOT:
	{
		// The coords are already validated in network.cpp upon receiving!
		c.x = axn.var1; c.y = axn.var2;
		pit->facing = Coords(0,0).dir_of(c);
		pit->stats_i->arch_shots++;
		arrows.push_back(Arrow(c, pit));
		break;
	}
	case XN_FLASH:
		if(pit->limiter) // have flashbombs left
		{
			flash_at(pit->own_pc->getpos());
			pit->limiter--;
		}
		break;
	case XN_ZAP:
		limiter_upd(pit);

		pit->facing = e_Dir(axn.var1);
		zaps.push_back(Zap(pit, pit->facing));
		pit->stats_i->cm_shots++;
		break;
	case XN_CIRCLE_ATTACK:
		pit->facing = e_Dir(axn.var1);
		pit->doing_a_chore = 2;
		break;
	case XN_HEAL:
		if(axn.var1 != MAX_D)
		{
			c = pit->own_pc->getpos().in((pit->facing = e_Dir(axn.var1)));
			list<PCEnt>::iterator pc_it = any_pc_at(c);
			if(pc_it != PCs.end())
			{
				list<Player>::iterator nit = pc_it->get_owner();
				if(nit->team == pit->team) // teammate => heal
					heal_PC(nit);
				else // enemy => poison
				{
					nit->poisoner = pit;
					add_action_ind(c, A_POISON);
				}
			}
		}
		else // healing self
			heal_PC(pit);
		break;
	case XN_BLINK:
	{
		limiter_upd(pit);

		// Determine a point to blink to, if any:
		Coords opos = pit->own_pc->getpos();
		vector<Coords> optimals;
		Coords cg = opos; // "good" coords
		char line, ind;
		for(line = 0; line < MAX_BLK_DIST*8; ++line)
		{
			for(ind = 0; ind < 2*MAX_BLK_DIST; ind += 2)
			{
				c.x = loslookup[MAX_BLK_DIST-2][line*2*MAX_BLK_DIST+ind]
					+ opos.x;
				c.y = loslookup[MAX_BLK_DIST-2][line*2*MAX_BLK_DIST+ind+1]
					+ opos.y;
				// the point must be visible:
				if(!(Game::curmap->get_tile(c).flags & TF_SEETHRU))
					break;
				//else
				cg = c;
			}
			// Note that points outside of the map cannot be reached; the edge
			// wall prevents them from being visible!
			// Endpoint must be walkable and not occupied:
			if((Game::curmap->get_tile(cg).flags & TF_WALKTHRU)
				&& !(Game::curmap->get_tile(cg).flags & TF_OCCUPIED))
			{
				// Trying to get as far as possible:
				if(optimals.empty())
					optimals.push_back(cg); // no previous record
				else if(cg.dist_walk(opos) > optimals.front().dist_walk(opos))
				{
					optimals.clear(); // a new record!
					optimals.push_back(cg);
				}
				else if(cg.dist_walk(opos) == optimals.front().dist_walk(opos))
					optimals.push_back(cg); // repeat old record
			}
		}
		if(optimals.empty())
			break; // cannot blink!
		c = optimals[randor0(optimals.size())];

		// Do the transfer:
		event_set.insert(opos);
		move_player_to(pit, c, true);
		pit->action_queue.clear(); /* Rarely does one plan her actions
			beyond a blink. */
		break;
	}
	case XN_MINE:
	{
		pit->facing = e_Dir(axn.var1);
		c = pit->own_pc->getpos().in(e_Dir(axn.var1));
		char rv;
		if(!(rv = cant_dig_in(c, e_Dir(axn.var1))))
		{
			pit->doing_a_chore = DIG_TURNS;
			add_sound(c, S_RUMBLE);
		}
		else if(rv == -1) // illusory wall
		{
			string msg = "That is no real wall!";
			Network::construct_msg(msg, C_WALL_LIT);
			Network::send_to_player(*pit);
		}
		// else there is nothing to dig
		break;
	}
	case XN_DISGUISE:
	{
		c = pit->own_pc->getpos();
		if(Game::curmap->get_tile(c).flags & TF_NOCCENT)
		{
			// check that there's an enemy corpse
			list<NOccEnt>::iterator c_it = any_noccent_at(c, NOE_CORPSE);
			if(c_it != noccents[NOE_CORPSE].end()
				&& c_it->get_colour() != team_colour[pit->team])
			{
				pit->doing_a_chore = DISGUISE_TURNS;
				add_action_ind(c, A_DISGUISE);
			}
		}
		break;
	}
	case XN_SET_TRAP:
	{
		// A trap can be set/disarmed where there is no noccent:
		if(!(Game::curmap->get_tile(pit->own_pc->getpos()).flags
			& TF_NOCCENT))
		{
			pit->doing_a_chore = TRAP_TURNS;
			add_action_ind(pit->own_pc->getpos(), A_TRAP);
		}
		break;
	}
	case XN_MM:
	{
		limiter_upd(pit);

		e_Dir d;
		unsigned short flgs;
		for(char ch = 0; ch < 4; ++ch)
		{
			d = e_Dir((pit->facing + 2*ch)%MAX_D);
			c = pit->own_pc->getpos().in(d);
			flgs = Game::curmap->mod_tile(c)->flags;
			if(flgs & TF_WALKTHRU && !(flgs & TF_OCCUPIED))
			{
				MMs.push_back(MM(pit, d));
				event_set.insert(c);
			}
			// else cannot conjure a MM there
		}
		break;
	}
	case XN_MINDS_EYE:
		if(!(pit->limiter = !pit->limiter)) // turning mind's eye off
		{
			pit->own_vp->set_pos(pit->own_pc->getpos());
			pit->cl_props.dv = classes[pit->cl].dv;
		}
		else // turning mind's eye on
		{
			pit->cl_props.dv = 11;
			while(pit->own_vp->is_blind())
				pit->own_vp->reduce_blind();
		}
		pit->needs_state_upd = true;
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
movb $0x1, 0x138(%rbx)
movq %rbx, -0x38(%rbp)
movl $0x8, 0x13c(%rbx)
movzbl (%r14), %eax
cmpq $0xf, %rax
ja 0x242e7
leaq 0x123d7(%rip), %rcx     # 0x35110
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rcx
movl 0x168(%rcx), %eax
leaq -0x80(%rbp), %r14
movl %eax, (%r14)
leaq -0xa8(%rbp), %r15
leaq -0x40(%rbp), %r12
leaq 0x21f03(%rip), %rbx     # 0x44c68
movq 0x148(%rcx), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x80(%rbp), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2bc76
movl -0xa8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq %r15, %rdi
callq 0x2bbf6
movq %r12, %rdi
callq 0x2bbf6
movq (%rbx), %rax
movswq -0x2a(%rbp), %rcx
movq 0x8(%rax), %rdx
leaq (%rcx,%rcx,2), %rcx
movswq -0x2c(%rbp), %rax
movq (%rdx,%rcx,8), %rcx
cmpb $0x5c, 0x2(%rcx,%rax,4)
jne 0x22dc6
movzwl (%rcx,%rax,4), %edx
testb $0x40, %dl
je 0x238bc
movq %r14, %rdi
callq 0x2bb9c
movl -0x80(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x168(%rcx), %eax
jne 0x22d65
jmp 0x242e7
leaq 0x21e7f(%rip), %rax     # 0x44c68
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x148(%rcx), %rcx
movl 0x8(%rcx), %ecx
leaq -0x80(%rbp), %rdi
movl %ecx, (%rdi)
movswq 0x2(%rdi), %rdx
movq 0x8(%rax), %rax
leaq (%rdx,%rdx,2), %rdx
movswq %cx, %rcx
movq (%rax,%rdx,8), %rax
movb (%rax,%rcx,4), %bl
callq 0x2bbf6
testb $0x20, %bl
jne 0x242e7
movq -0x38(%rbp), %rax
movb $0x6, 0x142(%rax)
movq 0x148(%rax), %rax
movl 0x8(%rax), %eax
leaq -0x80(%rbp), %rdi
movl %eax, (%rdi)
movl $0x1, %esi
callq 0x20a4f
jmp 0x23058
movsbl 0x1(%r14), %edx
movq -0x38(%rbp), %rax
movl %edx, 0x168(%rax)
movq 0x148(%rax), %rax
movl 0x8(%rax), %eax
leaq -0xa8(%rbp), %rsi
movl %eax, (%rsi)
leaq -0x80(%rbp), %rdi
callq 0x2bc76
leaq -0x80(%rbp), %rdi
movl (%rdi), %eax
leaq -0x2c(%rbp), %r15
movl %eax, (%r15)
callq 0x2bbf6
leaq -0xa8(%rbp), %rdi
callq 0x2bbf6
movsbl 0x1(%r14), %esi
movq %r15, %rdi
callq 0x25738
cmpb $-0x1, %al
je 0x238f6
movzbl %al, %eax
testl %eax, %eax
jne 0x242e7
movq -0x38(%rbp), %rax
movb $0x5, 0x142(%rax)
leaq -0x2c(%rbp), %rdi
movl $0x5, %esi
callq 0x20b4f
jmp 0x242e7
movq -0x38(%rbp), %rsi
movq 0xf8(%rsi), %rax
movq 0x118(%rsi), %rcx
cmpq %rax, %rcx
je 0x237de
leaq 0x21d6f(%rip), %rdx     # 0x44c68
movq (%rdx), %rdx
movq 0x148(%rsi), %rsi
movl 0x8(%rsi), %esi
movl %esi, -0x84(%rbp)
movswq -0x82(%rbp), %rdi
movq 0x8(%rdx), %rdx
leaq (%rdi,%rdi,2), %rdi
movswq %si, %rsi
movq (%rdx,%rdi,8), %rdx
testb $0x4, 0x1(%rdx,%rsi,4)
sete %bl
jmp 0x237e0
movsbl 0x1(%r14), %edx
cmpl $0x8, %edx
jne 0x236fd
movq -0x38(%rbp), %rdi
callq 0x250e3
jmp 0x242e7
movq -0x38(%rbp), %rax
movq 0x148(%rax), %rax
movl 0x8(%rax), %eax
leaq -0x80(%rbp), %rdi
movl %eax, (%rdi)
movl %eax, -0x2c(%rbp)
callq 0x2bbf6
leaq 0x21cf8(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x2a(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x2c(%rbp), %rdx
movq (%rax,%rcx,8), %rax
testb $0x20, (%rax,%rdx,4)
je 0x242e7
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
callq 0x2149b
cmpq 0x1d023(%rip), %rax     # 0x3ffc8
je 0x242e7
movsbl 0x1d(%rax), %eax
movq -0x38(%rbp), %rcx
movl 0xbc(%rcx), %ecx
leaq 0x121d8(%rip), %rdx     # 0x35198
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x242e7
movq -0x38(%rbp), %rax
movb $0x7, 0x142(%rax)
leaq -0x2c(%rbp), %rdi
movl $0x3, %esi
callq 0x20a4f
jmp 0x242e7
leaq 0x21c77(%rip), %rax     # 0x44c68
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x148(%rcx), %rcx
movl 0x8(%rcx), %ecx
leaq -0x80(%rbp), %rdi
movl %ecx, (%rdi)
movswq 0x2(%rdi), %rdx
movq 0x8(%rax), %rax
leaq (%rdx,%rdx,2), %rdx
movswq %cx, %rcx
movq (%rax,%rdx,8), %rax
movl (%rax,%rcx,4), %ebx
callq 0x2bbf6
btl $0xb, %ebx
jae 0x242e7
movq -0x38(%rbp), %rbx
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
leaq -0x80(%rbp), %rdi
movl %eax, (%rdi)
callq 0x21528
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x246f7
leaq -0x80(%rbp), %rdi
jmp 0x242e2
movq -0x38(%rbp), %rbx
cmpb $0x0, 0x140(%rbx)
sete 0x140(%rbx)
je 0x23899
movq 0xd0(%rbx), %rdi
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
leaq -0x80(%rbp), %rsi
movl %eax, (%rsi)
callq 0x1ecfc
leaq -0x80(%rbp), %rdi
callq 0x2bbf6
movl 0xc0(%rbx), %eax
leaq (%rax,%rax,2), %rcx
leaq (%rax,%rcx,4), %rax
leaq 0x120ed(%rip), %rcx     # 0x351a0
movb 0x8(%rcx,%rax), %al
movb %al, 0x158(%rbx)
movq -0x38(%rbp), %rax
movb $0x1, 0x15d(%rax)
jmp 0x242e7
leaq 0x22e0c(%rip), %r12     # 0x45ee0
leaq -0x84(%rbp), %rbx
leaq -0x40(%rbp), %r13
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x23a29
cmpb $0x0, 0x1e(%r15)
jne 0x23111
movq -0x38(%rbp), %rax
movl 0xbc(%rax), %eax
cmpl %eax, 0x28(%r15)
je 0x23111
movq 0x20(%r15), %rcx
cmpl %eax, 0xbc(%rcx)
jne 0x23149
xorl %eax, %eax
xorl %r14d, %r14d
testb %al, %al
je 0x2313f
movq %rbx, %rdi
callq 0x2bbf6
leaq -0x88(%rbp), %rdi
callq 0x2bbf6
leaq -0x3c(%rbp), %rdi
callq 0x2bbf6
movq %r13, %rdi
callq 0x2bbf6
testb %r14b, %r14b
je 0x230e2
jmp 0x2377a
leaq 0x21b18(%rip), %rax     # 0x44c68
movq (%rax), %r14
movq -0x38(%rbp), %rax
movq 0x148(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movl 0x18(%r15), %ecx
movl %ecx, -0x3c(%rbp)
movl %ecx, -0x88(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq 0x2bc42
movswl %ax, %r8d
movq %r14, %rdi
movq %r13, %rsi
leaq -0x3c(%rbp), %rdx
movl $0x3, %ecx
callq 0x174a8
movl %eax, %r14d
movb $0x1, %al
jmp 0x23116
movq -0x38(%rbp), %rsi
movb 0x140(%rsi), %al
cmpb $0x9, %al
jg 0x231be
incb %al
movb %al, 0x140(%rsi)
movb 0x140(%rsi), %al
addb %al, %al
addb %al, 0x141(%rsi)
movsbl 0x1(%r14), %edx
movl %edx, 0x168(%rsi)
leaq -0x80(%rbp), %rdi
callq 0x2287a
leaq 0x22ce1(%rip), %rdi     # 0x45ec8
leaq -0x80(%rbp), %rdx
movq %rdi, %rsi
callq 0x27f64
leaq -0x80(%rbp), %rdi
callq 0x21f6c
movq -0x38(%rbp), %rax
movq 0x90(%rax), %rax
incq 0x130(%rax)
jmp 0x242e7
movq -0x38(%rbp), %rbx
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
leaq -0x80(%rbp), %rdi
movl %eax, (%rdi)
movl %eax, -0x2c(%rbp)
callq 0x2bbf6
movq 0x148(%rbx), %rdi
cmpb $0x1, 0x20(%rdi)
je 0x23285
cmpw $0x0, 0x170(%rbx)
je 0x242e7
movq -0x38(%rbp), %rax
cmpl $0x8, 0xc0(%rax)
je 0x2327a
leaq -0x2c(%rbp), %rdi
movl $0x6, %esi
callq 0x2149b
movl $0x90, %ecx
addq 0x1cd57(%rip), %rcx     # 0x3ffc8
cmpq %rcx, %rax
je 0x23c32
movq -0x38(%rbp), %rax
movq 0x148(%rax), %rdi
callq 0x2213a
leaq 0x22d47(%rip), %rdi     # 0x45fd8
leaq -0x2c(%rbp), %rsi
callq 0x21b9c
jmp 0x242e7
movsbl 0x1(%r14), %eax
movw %ax, -0x2c(%rbp)
movsbl 0x2(%r14), %eax
movw %ax, -0x2a(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2bbe8
movl -0x2c(%rbp), %eax
leaq -0xb0(%rbp), %rsi
movl %eax, (%rsi)
leaq -0x80(%rbp), %rdi
callq 0x2bd30
movq -0x38(%rbp), %rbx
movl %eax, 0x168(%rbx)
leaq -0xb0(%rbp), %rdi
callq 0x2bbf6
leaq -0x80(%rbp), %rdi
callq 0x2bbf6
movq 0x90(%rbx), %rax
incq 0x120(%rax)
movl -0x2c(%rbp), %eax
leaq -0xac(%rbp), %rsi
movl %eax, (%rsi)
leaq -0x80(%rbp), %rdi
movq %rbx, %rdx
callq 0x22150
leaq 0x22b79(%rip), %rbx     # 0x45e98
leaq -0x80(%rbp), %rsi
movq %rbx, %rdi
callq 0x27e16
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4060
incq 0x10(%rbx)
leaq 0x1c937(%rip), %rax     # 0x3fc78
addq $0x10, %rax
leaq -0x68(%rbp), %rdi
movq %rax, -0x18(%rdi)
callq 0x1dbd2
leaq -0x80(%rbp), %rdi
callq 0x21f6c
leaq -0xac(%rbp), %rdi
jmp 0x242e2
movq -0x38(%rbp), %rcx
movb 0x140(%rcx), %al
cmpb $0x9, %al
jg 0x2337d
incb %al
movb %al, 0x140(%rcx)
movb 0x140(%rcx), %al
addb %al, %al
addb %al, 0x141(%rcx)
xorl %ebx, %ebx
leaq -0x80(%rbp), %r14
leaq -0xa8(%rbp), %r15
leaq 0x22b11(%rip), %r12     # 0x45eb0
movq -0x38(%rbp), %rcx
movl 0x168(%rcx), %eax
movl %ebx, %r13d
addl %eax, %r13d
leal 0x7(%rbx,%rax), %eax
cmovnsl %r13d, %eax
andl $-0x8, %eax
subl %eax, %r13d
movq 0x148(%rcx), %rax
movl 0x8(%rax), %eax
movl %eax, -0xa8(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x2bc76
movl -0x80(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq %r14, %rdi
callq 0x2bbf6
movq %r15, %rdi
callq 0x2bbf6
leaq 0x21870(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x2a(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x2c(%rbp), %rdx
movq (%rax,%rcx,8), %rax
movzwl (%rax,%rdx,4), %eax
andl $0x41, %eax
cmpw $0x1, %ax
jne 0x23453
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movl %r13d, %edx
callq 0x22540
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x27fea
movq %r14, %rdi
callq 0x21f6c
leaq 0x22b8e(%rip), %rdi     # 0x45fd8
leaq -0x2c(%rbp), %rsi
callq 0x21b9c
addl $0x2, %ebx
cmpl $0x8, %ebx
jne 0x2339f
jmp 0x242e7
movq -0x38(%rbp), %rax
cmpb $0x0, 0x140(%rax)
je 0x242e7
movq -0x38(%rbp), %rbx
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
leaq -0x80(%rbp), %rdi
movl %eax, (%rdi)
callq 0x24ff7
leaq -0x80(%rbp), %rdi
callq 0x2bbf6
decb 0x140(%rbx)
jmp 0x242e7
movsbl 0x1(%r14), %eax
movq -0x38(%rbp), %rcx
movl %eax, 0x168(%rcx)
movb $0x2, 0x142(%rcx)
jmp 0x242e7
movq -0x38(%rbp), %rcx
movb 0x140(%rcx), %al
cmpb $0x9, %al
jg 0x234d3
incb %al
movb %al, 0x140(%rcx)
movb 0x140(%rcx), %al
addb %al, %al
addb %al, 0x141(%rcx)
movq 0x148(%rcx), %rax
movl 0x8(%rax), %eax
leaq -0xa8(%rbp), %rbx
movl %eax, (%rbx)
xorps %xmm0, %xmm0
leaq -0x80(%rbp), %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
leaq -0x40(%rbp), %r12
movl %eax, (%r12)
xorl %r15d, %r15d
leaq 0x11db8(%rip), %r14     # 0x352d0
movslq %r15d, %rax
shlq $0x3, %rax
movzwl -0xa8(%rbp), %ecx
movzwl -0xa6(%rbp), %edx
leaq 0x21734(%rip), %rsi     # 0x44c68
movq (%rsi), %rsi
xorl %edi, %edi
movslq %edi, %r8
addq %rax, %r8
movsbl (%r14,%r8), %r9d
addl %ecx, %r9d
movw %r9w, -0x2c(%rbp)
movsbl 0x1(%r14,%r8), %r8d
addl %edx, %r8d
movw %r8w, -0x2a(%rbp)
movswq %r8w, %r8
movq 0x8(%rsi), %r10
leaq (%r8,%r8,2), %r8
movswq %r9w, %r9
movq (%r10,%r8,8), %r8
testb $0x4, (%r8,%r9,4)
je 0x2358a
movl -0x2c(%rbp), %r8d
movl %r8d, -0x40(%rbp)
addb $0x2, %dil
movsbl %dil, %edi
cmpl $0x8, %edi
jl 0x23539
leaq 0x216d7(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x3e(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x40(%rbp), %rdx
movq (%rax,%rcx,8), %rax
movl (%rax,%rdx,4), %eax
andl $0x41, %eax
cmpl $0x1, %eax
jne 0x23675
movq -0x78(%rbp), %rsi
cmpq %rsi, -0x80(%rbp)
je 0x2364c
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2bc42
movl %eax, %r13d
movq -0x80(%rbp), %rdi
movq %rbx, %rsi
callq 0x2bc42
cmpw %ax, %r13w
jle 0x23628
movq -0x80(%rbp), %rbx
movq -0x78(%rbp), %r12
cmpq %rbx, %r12
je 0x2360c
movq %rbx, %r13
movq %r13, %rdi
callq 0x2bbf6
addq $0x4, %r13
cmpq %r12, %r13
jne 0x235f7
movq %rbx, -0x78(%rbp)
movq -0x78(%rbp), %rsi
cmpq -0x70(%rbp), %rsi
je 0x2365e
movl -0x40(%rbp), %eax
movl %eax, (%rsi)
leaq -0xa8(%rbp), %rbx
leaq -0x40(%rbp), %r12
jmp 0x23657
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2bc42
movl %eax, %r13d
movq -0x80(%rbp), %rdi
movq %rbx, %rsi
callq 0x2bc42
cmpw %ax, %r13w
jne 0x23675
movq -0x78(%rbp), %rsi
cmpq -0x70(%rbp), %rsi
je 0x23669
movl -0x40(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, -0x78(%rbp)
jmp 0x23675
leaq -0xa8(%rbp), %rbx
leaq -0x40(%rbp), %r12
leaq -0x80(%rbp), %rdi
movq %r12, %rdx
callq 0x18c8e
incl %r15d
cmpl $0x20, %r15d
jne 0x23518
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rax
cmpq %rax, %rcx
je 0x236df
subl %ecx, %eax
shrl $0x2, %eax
movswl %ax, %edi
callq 0x2bdf8
movswq %ax, %rax
movq -0x80(%rbp), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, -0x2c(%rbp)
leaq 0x22927(%rip), %rdi     # 0x45fd8
leaq -0xa8(%rbp), %rsi
callq 0x21b9c
leaq -0x2c(%rbp), %rsi
movq -0x38(%rbp), %rdi
movl $0x1, %edx
callq 0x251a1
movq -0x38(%rbp), %rdi
addq $0xe8, %rdi
callq 0x1d788
leaq -0x40(%rbp), %rdi
callq 0x2bbf6
leaq -0x80(%rbp), %rdi
callq 0x1889c
leaq -0xa8(%rbp), %rdi
jmp 0x242e2
movq -0x38(%rbp), %rcx
movq 0x148(%rcx), %rax
movl 0x8(%rax), %eax
leaq -0xa8(%rbp), %rsi
movl %eax, (%rsi)
movl %edx, 0x168(%rcx)
leaq -0x80(%rbp), %rdi
callq 0x2bc76
leaq -0x80(%rbp), %rdi
movl (%rdi), %eax
leaq -0x2c(%rbp), %r14
movl %eax, (%r14)
callq 0x2bbf6
leaq -0xa8(%rbp), %rdi
callq 0x2bbf6
movq %r14, %rdi
callq 0x21415
cmpq 0x1c860(%rip), %rax     # 0x3ffb0
je 0x242e7
movq 0x20(%rax), %rdi
movl 0xbc(%rdi), %eax
movq -0x38(%rbp), %rcx
cmpl 0xbc(%rcx), %eax
jne 0x23abf
callq 0x250e3
jmp 0x242e7
movl $0x98, %edx
addq 0x20(%r15), %rdx
leaq 0x11c8a(%rip), %rsi     # 0x35414
leaq -0xa8(%rbp), %rdi
callq 0x11dd6
leaq -0xa8(%rbp), %rdi
movq 0x8(%rdi), %rsi
movl $0x1, %ecx
xorl %edx, %edx
movl $0x2e, %r8d
callq 0x47b0
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x239aa
movq %rdx, -0x80(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x70(%rbp)
jmp 0x239b1
movb $0x1, %bl
cmpq %rax, %rcx
je 0x237f1
leaq -0x84(%rbp), %rdi
callq 0x2bbf6
testb %bl, %bl
je 0x242e7
movsbl 0x1(%r14), %r15d
movq -0x38(%rbp), %rax
movl %r15d, 0x168(%rax)
movq 0x148(%rax), %rax
movl 0x8(%rax), %eax
leaq -0x40(%rbp), %rsi
movl %eax, (%rsi)
leaq -0x3c(%rbp), %rdi
movl %r15d, %edx
callq 0x2bc76
leaq 0x2143c(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x3c(%rbp), %r12
movswq -0x3a(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %r13
movzwl (%r13,%r12,4), %eax
testb $0x1, %al
jne 0x2393c
cmpb $0x2b, 0x2(%r13,%r12,4)
jne 0x242d5
movb $0x5c, 0x2(%r13,%r12,4)
orl $0x5, %eax
movw %ax, (%r13,%r12,4)
leaq -0x3c(%rbp), %rdi
callq 0x24643
callq 0x41d0
testb $0x1, %al
jne 0x23c1f
leaq 0x2274d(%rip), %rdi     # 0x45fd8
leaq -0x3c(%rbp), %rsi
callq 0x21b9c
jmp 0x242d5
movb $0xb, 0x158(%rbx)
movq -0x38(%rbp), %rax
movq 0xd0(%rax), %rdi
cmpb $0x0, 0x20(%rdi)
je 0x230bd
callq 0x1ed6c
jmp 0x238a0
movb $0x2b, 0x2(%rcx,%rax,4)
andl $0xffba, %edx           # imm = 0xFFBA
movw %dx, (%rcx,%rax,4)
leaq -0x2c(%rbp), %rdi
callq 0x24643
callq 0x41d0
testb $0x1, %al
jne 0x23a9f
leaq 0x226f0(%rip), %rdi     # 0x45fd8
leaq -0x2c(%rbp), %rsi
callq 0x21b9c
jmp 0x23aad
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x11b33(%rip), %rsi     # 0x35438
leaq 0x11b41(%rip), %rdx     # 0x3544d
leaq -0x80(%rbp), %rdi
callq 0xdfec
leaq -0x80(%rbp), %rdi
movl $0x2e, %esi
callq 0xf4ed
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
leaq 0x1d7f6(%rip), %rsi     # 0x41128
callq 0xf816
jmp 0x23a81
testb $0x40, %al
jne 0x23ad9
leaq 0x208d9(%rip), %rbx     # 0x44224
cmpl $0x2, (%rbx)
jne 0x23b32
xorl %eax, %eax
movq -0x38(%rbp), %rcx
cmpl $0x0, 0xbc(%rcx)
jne 0x23b34
leaq 0x2269a(%rip), %rcx     # 0x46008
movq (%rcx), %rcx
movl $0x0, %r14d
cmpq 0x1c63a(%rip), %rcx     # 0x3ffb8
jne 0x23b37
leaq 0x2268d(%rip), %rax     # 0x46018
movl 0x8(%rax), %eax
leaq -0xa8(%rbp), %rsi
movl %eax, (%rsi)
leaq -0x3c(%rbp), %rdi
callq 0x2bddc
movl %eax, %r14d
movb $0x1, %al
jmp 0x23b37
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x80(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x38(%rbp), %rdi
movl $0x1, %edx
callq 0x24c43
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x239ef
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23a0e
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x43f0
movq 0x20(%r15), %rdi
movl $0xa, %esi
callq 0x24e7d
cmpq 0x1c58d(%rip), %r15     # 0x3ffb0
jne 0x242e7
movq -0x38(%rbp), %rdi
movq 0x160(%rdi), %rax
cmpq 0x1c57d(%rip), %rax     # 0x3ffb8
je 0x23a50
cmpb $0x1, 0x153(%rdi)
jne 0x23a50
callq 0x24ed9
jmp 0x242e7
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x119ce(%rip), %rsi     # 0x3542d
leaq 0x119d1(%rip), %rdx     # 0x35437
leaq -0x80(%rbp), %rdi
callq 0xdfec
leaq -0x80(%rbp), %rsi
movq -0x38(%rbp), %rdi
movl $0x1, %edx
callq 0x24c43
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x242e7
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x242e7
leaq -0x2c(%rbp), %rdi
movl $0x1, %esi
callq 0x20b4f
movl -0x80(%rbp), %eax
movq -0x38(%rbp), %rcx
movl %eax, 0x168(%rcx)
jmp 0x242e7
movq %rcx, 0x160(%rdi)
leaq -0x2c(%rbp), %rdi
movl $0x2, %esi
callq 0x20a4f
jmp 0x242e7
leaq -0x3c(%rbp), %rdi
callq 0x21415
cmpq 0x1c4c7(%rip), %rax     # 0x3ffb0
je 0x23cbd
movq 0x20(%rax), %r14
movq -0x38(%rbp), %rdi
movl 0xbc(%rdi), %eax
cmpl %eax, 0xbc(%r14)
jne 0x23d92
movl 0x13c(%r14), %ebx
movl %r15d, %edi
callq 0x2bbcc
cmpl %eax, %ebx
jne 0x23e8a
movq %r14, %rdi
movq -0x38(%rbp), %rsi
callq 0x25c4d
jmp 0x242d5
xorl %eax, %eax
xorl %r14d, %r14d
testb %al, %al
je 0x23b47
leaq -0xa8(%rbp), %rdi
callq 0x2bbf6
testb %r14b, %r14b
je 0x23bd0
leaq 0x224b1(%rip), %rax     # 0x46008
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x224ab(%rip), %rax     # 0x46010
movb $0x1, (%rax)
leaq 0x1f551(%rip), %rdi     # 0x430c0
callq 0x19f7b
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x11a56(%rip), %rsi     # 0x355d9
leaq 0x11a76(%rip), %rdx     # 0x35600
leaq -0x80(%rbp), %rdi
callq 0xdfec
leaq -0x80(%rbp), %rdi
movl $0x3c, %esi
callq 0xf4ed
leaq 0x1d580(%rip), %rsi     # 0x41128
movl $0xffff, %edi           # imm = 0xFFFF
callq 0xe383
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x24261
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x24261
testb $0x20, (%r13,%r12,4)
je 0x24261
leaq -0x3c(%rbp), %rdi
movl $0x5, %esi
callq 0x2149b
movq %rax, %r14
leaq 0x221cc(%rip), %r15     # 0x45dc0
leaq 0x78(%r15), %rax
cmpq %rax, %r14
je 0x23ee7
movzbl 0x1f(%r14), %eax
cmpl $0x3, %eax
jne 0x23f94
movq -0x38(%rbp), %rax
leaq 0xbc(%rax), %rbx
jmp 0x241ca
leaq -0x3c(%rbp), %rdi
movl $0x1, %esi
callq 0x20b4f
jmp 0x242d5
leaq 0x222a7(%rip), %r13     # 0x45ee0
movq (%r13), %r12
cmpq %r13, %r12
je 0x242e7
leaq -0x80(%rbp), %r14
leaq -0x2c(%rbp), %r15
movl 0x18(%r12), %eax
movl %eax, -0x80(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2bc42
cmpw $0x1, %ax
jne 0x23ca7
cmpb $0x1, 0x30(%r12)
jne 0x23ca7
movq 0x20(%r12), %rax
movl 0xbc(%rax), %eax
movl %eax, -0xb4(%rbp)
movq -0x38(%rbp), %rax
movq %r15, %rbx
movl 0xbc(%rax), %r15d
movq %r14, %rdi
callq 0x2bbf6
cmpl %r15d, -0xb4(%rbp)
movq %rbx, %r15
jne 0x23caf
jmp 0x24064
movq %r14, %rdi
callq 0x2bbf6
movq (%r12), %r12
cmpq %r13, %r12
jne 0x23c4e
jmp 0x242e7
leaq -0x3c(%rbp), %rdi
callq 0x215ae
movq %rax, %r14
cmpq 0x1c308(%rip), %rax     # 0x3ffd8
je 0x23e9a
movq -0x38(%rbp), %rax
cmpb $0x0, 0x15c(%rax)
je 0x242d5
leaq -0x80(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
movl %r15d, %edx
callq 0x2bc76
testb $0x2, (%r13,%r12,4)
jne 0x24256
leaq 0x20f5e(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x7e(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x80(%rbp), %rbx
movq (%rax,%rcx,8), %r15
movzwl (%r15,%rbx,4), %eax
movl %eax, %ecx
andl $0x41, %ecx
cmpl $0x1, %ecx
jne 0x24256
cmpb $0x5c, 0x2(%r15,%rbx,4)
je 0x24256
testb $0x20, %al
je 0x23d68
leaq -0x80(%rbp), %rdi
movl $0x5, %esi
callq 0x2149b
leaq 0x22065(%rip), %rcx     # 0x45dc0
addq $0x78, %rcx
cmpq %rcx, %rax
jne 0x24256
movzwl (%r15,%rbx,4), %eax
btl $0x9, %eax
jb 0x243af
btl $0xa, %eax
jb 0x243c6
movl -0x80(%rbp), %eax
movl %eax, 0x18(%r14)
orb $0x40, (%r15,%rbx,4)
jmp 0x243be
movb $0x1, %bl
cmpl $0x1, 0xc0(%rdi)
jne 0x23dc3
movq 0x148(%rdi), %rcx
leaq 0x11485(%rip), %rdx     # 0x35230
movl 0x18(%rcx), %ecx
movb $0x2, %bl
cmpl (%rdx,%rax,4), %ecx
je 0x23dc3
movq 0xd0(%r14), %rax
cmpb $0x1, 0x20(%rax)
sbbb $0x0, %bl
movsbl 0x154(%rdi), %esi
movsbl 0x156(%rdi), %ecx
movb 0x157(%rdi), %al
mulb %bl
movsbl %al, %r8d
movsbl %bl, %edx
movq %r14, %rdi
callq 0x26743
testb %al, %al
je 0x241a6
cmpb $0x0, 0x153(%r14)
jg 0x241a6
movq -0x38(%rbp), %rax
leaq 0x98(%rax), %rdx
cmpb $0x2, %bl
jne 0x24127
leaq 0x1179b(%rip), %rsi     # 0x355b4
leaq -0xa8(%rbp), %rdi
callq 0x11dd6
leaq -0x80(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movl $0x2e, %edx
callq 0x27cca
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x24c43
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23e64
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23e83
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x43f0
movb $0x7, %al
jmp 0x2419a
movq -0x38(%rbp), %rax
movl %r15d, 0x13c(%rax)
jmp 0x242d5
movq -0x38(%rbp), %rax
movq 0x148(%rax), %rax
leaq -0x3c(%rbp), %rdi
movl (%rdi), %ecx
movl %ecx, 0x8(%rax)
callq 0x21634
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x26d2e
movq -0x38(%rbp), %rax
cmpb $0x0, 0x153(%rax)
jle 0x24089
movq 0x148(%rax), %rax
movl -0x40(%rbp), %ecx
movl %ecx, 0x8(%rax)
jmp 0x23944
leaq -0x3c(%rbp), %rdi
movl $0x2, %esi
callq 0x2149b
leaq 0x30(%r15), %rcx
cmpq %rcx, %rax
je 0x241d4
movswl 0x58(%r15), %edi
callq 0x2bdf8
leaq 0x48(%r15), %rbx
incb %al
movq (%rbx), %rbx
decb %al
testb %al, %al
jg 0x23f12
leaq -0x80(%rbp), %r14
addq $0x48, %r15
movq %rbx, %r12
leaq 0x20d3b(%rip), %rax     # 0x44c68
movq (%rax), %rax
movl 0x18(%r12), %ecx
movl %ecx, -0x80(%rbp)
movswq -0x7e(%rbp), %rdx
movq 0x8(%rax), %rax
leaq (%rdx,%rdx,2), %rdx
movswq %cx, %rcx
movq (%rax,%rdx,8), %rax
movzwl (%rax,%rcx,4), %r13d
movq %r14, %rdi
callq 0x2bbf6
testb $0x40, %r13b
je 0x2410e
movq (%r12), %r12
cmpq %r15, %r12
jne 0x23f78
leaq 0x21e4c(%rip), %rax     # 0x45dc0
movq 0x48(%rax), %r12
cmpq %rbx, %r12
jne 0x23f26
leaq -0x3c(%rbp), %rsi
movq -0x38(%rbp), %rdi
movl $0x1, %edx
callq 0x251a1
jmp 0x242d5
movq -0x38(%rbp), %rdx
movl 0xbc(%rdx), %ecx
cmpl %eax, %ecx
jne 0x240b3
leaq 0x2205b(%rip), %rbx     # 0x46008
cmpq %rdx, (%rbx)
jne 0x241d4
leaq 0x21f43(%rip), %rdi     # 0x45f00
movq (%rdi), %rax
cmpq 0x10(%rax), %r14
jne 0x241d4
addq $0x18, %rdi
callq 0x1d8ba
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1161f(%rip), %rsi     # 0x35601
leaq 0x11640(%rip), %rdx     # 0x35629
leaq -0x80(%rbp), %rdi
callq 0xdfec
leaq -0x80(%rbp), %rdi
movl $0x3c, %esi
callq 0xf4ed
leaq 0x1d121(%rip), %rsi     # 0x41128
movl $0xffff, %edi           # imm = 0xFFFF
callq 0xe383
leaq 0x1f0a8(%rip), %rax     # 0x430c0
movq %rax, (%rbx)
leaq -0x88(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x2bbe8
leaq -0x88(%rbp), %rdi
movl (%rdi), %eax
leaq 0x21fda(%rip), %rcx     # 0x46018
movl %eax, 0x8(%rcx)
callq 0x2bbf6
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x241d4
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x241d4
movq -0x38(%rbp), %rax
movq 0x148(%rax), %rdi
callq 0x2213a
leaq 0x21f5d(%rip), %rdi     # 0x45fd8
leaq -0x2c(%rbp), %rsi
callq 0x21b9c
jmp 0x242e7
leaq 0x20bd8(%rip), %rax     # 0x44c68
movq (%rax), %rax
movswq -0x3e(%rbp), %rcx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movswq -0x40(%rbp), %rdx
movq (%rax,%rcx,8), %rax
andw $-0x41, (%rax,%rdx,4)
jmp 0x242d5
movl (%rbx), %edx
testl %edx, %edx
je 0x240e2
cmpl $0x1, %edx
jne 0x240cb
testl %ecx, %ecx
je 0x240e2
cmpl $0x1, %edx
je 0x241d4
leaq (%rax,%rax,2), %rcx
leaq 0x21e2a(%rip), %rdx     # 0x45f00
cmpq $0x2, 0x10(%rdx,%rcx,8)
jb 0x241d4
movl %eax, %eax
leaq (%rax,%rax,2), %rax
leaq 0x21e11(%rip), %rcx     # 0x45f00
leaq (%rcx,%rax,8), %rdi
movq (%rdi), %rsi
cmpq %rdi, %rsi
je 0x241ba
cmpq %r14, 0x10(%rsi)
je 0x241ba
movq (%rsi), %rsi
jmp 0x240f6
movl 0x18(%r12), %eax
leaq -0x80(%rbp), %rsi
movl %eax, (%rsi)
movq -0x38(%rbp), %rdi
callq 0x27c15
jmp 0x24256
leaq 0x1149b(%rip), %rsi     # 0x355c9
leaq -0xa8(%rbp), %rdi
callq 0x11dd6
leaq -0x80(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movl $0x2e, %edx
callq 0x27cca
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x24c43
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24179
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24198
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x43f0
xorl %eax, %eax
movzbl %al, %esi
movq -0x38(%rbp), %rdi
callq 0x24e7d
movq -0x38(%rbp), %rax
movq 0x148(%rax), %rax
movb $0x0, 0x21(%rax)
jmp 0x242d5
movq -0x38(%rbp), %rax
leaq 0xbc(%rax), %rbx
callq 0x27de8
movl (%rbx), %esi
movq %r14, %rdi
callq 0x27996
leaq -0x3c(%rbp), %rdi
movl $0x4, %esi
callq 0x2149b
movq %rax, %r14
leaq 0x60(%r15), %rbx
cmpq %rbx, %rax
je 0x24261
movq %r14, %r12
movq (%r12), %r12
cmpq %rbx, %r12
jne 0x241fe
movq 0x60(%r15), %r12
cmpq %r14, %r12
je 0x24398
leaq 0x20a5a(%rip), %rax     # 0x44c68
movq (%rax), %rax
movl 0x18(%r12), %ecx
movl %ecx, -0x80(%rbp)
movswq -0x7e(%rbp), %rdx
movq 0x8(%rax), %rax
leaq (%rdx,%rdx,2), %rdx
movswq %cx, %rcx
movq (%rax,%rdx,8), %rax
movzwl (%rax,%rcx,4), %r13d
leaq -0x80(%rbp), %rdi
callq 0x2bbf6
testb $0x40, %r13b
jne 0x241f1
movl 0x18(%r12), %eax
leaq -0x80(%rbp), %rsi
movl %eax, (%rsi)
movq -0x38(%rbp), %rdi
callq 0x27c15
leaq -0x80(%rbp), %rdi
callq 0x2bbf6
jmp 0x242d5
movzwl (%r13,%r12,4), %eax
testb $0x10, %al
jne 0x2429c
movq -0x38(%rbp), %rcx
movl 0xc0(%rcx), %ecx
cmpl $0x1, %ecx
sete %dl
shrb $0x3, %al
testb %dl, %al
jne 0x2428f
cmpl $0x9, %ecx
jne 0x2429c
cmpb $0x54, 0x2(%r13,%r12,4)
jne 0x2429c
leaq -0x3c(%rbp), %rdi
callq 0x21230
testb %al, %al
je 0x24302
xorl %r13d, %r13d
movq -0x38(%rbp), %rdi
movq 0x148(%rdi), %rax
movl $0x3, %ecx
testb %r13b, %r13b
je 0x242c4
movl 0xbc(%rdi), %ecx
leaq 0x10f6f(%rip), %rdx     # 0x35230
movl (%rdx,%rcx,4), %ecx
movl %ecx, 0x18(%rax)
leaq -0x3c(%rbp), %rsi
movl $0x1, %edx
callq 0x251a1
leaq -0x3c(%rbp), %rdi
callq 0x2bbf6
leaq -0x40(%rbp), %rdi
callq 0x2bbf6
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1edb7(%rip), %r15     # 0x430c0
leaq -0x80(%rbp), %r14
movq %r15, %rbx
movq (%rbx), %rbx
cmpq %r15, %rbx
sete %r13b
je 0x2429f
movl 0xbc(%rbx), %eax
movq -0x38(%rbp), %rcx
cmpl 0xbc(%rcx), %eax
je 0x24348
leaq 0x10(%rbx), %rdi
callq 0x125e6
testb %al, %al
je 0x24348
movq 0xd0(%rbx), %rax
cmpb $0x0, 0x20(%rax)
je 0x24363
xorl %eax, %eax
xorl %r12d, %r12d
testb %al, %al
je 0x24359
movq %r14, %rdi
callq 0x2bbf6
testb %r12b, %r12b
je 0x24310
jmp 0x2429f
leaq 0x208fe(%rip), %rax     # 0x44c68
movq (%rax), %rdi
movq 0x148(%rbx), %rax
movl 0x8(%rax), %eax
movl %eax, -0x80(%rbp)
movq %r14, %rsi
leaq -0x3c(%rbp), %rdx
movl $0x3, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x174a8
movl %eax, %r12d
movb $0x1, %al
jmp 0x2434d
leaq -0x3c(%rbp), %rsi
movq -0x38(%rbp), %rdi
movl $0x1, %edx
callq 0x251a1
jmp 0x242d5
leaq 0x21aca(%rip), %rdi     # 0x45e80
movq %r14, %rsi
callq 0x1d6c0
andb $-0x41, (%r13,%r12,4)
jmp 0x243ee
leaq 0x21ab3(%rip), %rdi     # 0x45e80
movq %r14, %rsi
callq 0x1d6c0
andb $-0x41, (%r13,%r12,4)
movl $0x1c2e0005, (%r15,%rbx,4) # imm = 0x1C2E0005
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x20b4f
movq -0x38(%rbp), %rax
incb 0x141(%rax)
leaq -0x80(%rbp), %rdi
callq 0x2bbf6
jmp 0x23944
jmp 0x24475
jmp 0x2449c
jmp 0x244c8
jmp 0x24475
jmp 0x2449c
jmp 0x24422
jmp 0x24440
jmp 0x244c8
movq %rax, %rbx
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24443
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x24443
movq %rax, %rbx
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x245df
movq -0x98(%rbp), %rsi
jmp 0x244b0
jmp 0x244c8
jmp 0x244c8
jmp 0x24475
jmp 0x244c8
jmp 0x24475
jmp 0x244c8
jmp 0x244c8
jmp 0x244c8
jmp 0x245fe
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
jmp 0x245da
jmp 0x244c8
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
jmp 0x245da
jmp 0x244c8
jmp 0x244c8
jmp 0x244c8
jmp 0x244c8
jmp 0x244c8
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x245df
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x245df
jmp 0x244c8
jmp 0x244c8
jmp 0x245fe
jmp 0x244c8
movq %rax, %rbx
jmp 0x245df
jmp 0x245fe
jmp 0x245fe
jmp 0x2453a
jmp 0x245fe
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x244fe
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x244fe
movq %rax, %rbx
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24632
movq -0x98(%rbp), %rsi
jmp 0x2454e
jmp 0x245fe
jmp 0x245fe
jmp 0x24603
jmp 0x2460c
jmp 0x245af
jmp 0x245af
jmp 0x245af
jmp 0x245fe
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x24632
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x43f0
jmp 0x24632
jmp 0x245fe
jmp 0x245fe
jmp 0x245af
movq %rax, %rbx
leaq 0x1b707(%rip), %rax     # 0x3fc78
addq $0x10, %rax
leaq -0x68(%rbp), %rdi
movq %rax, -0x18(%rdi)
callq 0x1dbd2
leaq -0x80(%rbp), %rdi
callq 0x21f6c
jmp 0x24590
movq %rax, %rbx
leaq -0xac(%rbp), %rdi
jmp 0x2462d
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x2bbf6
jmp 0x245b2
jmp 0x245ec
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
jmp 0x2462d
jmp 0x245fe
jmp 0x245fe
jmp 0x2460c
jmp 0x245fe
jmp 0x24611
jmp 0x245fe
movq %rax, %rbx
leaq -0x84(%rbp), %rdi
callq 0x2bbf6
leaq -0x88(%rbp), %rdi
callq 0x2bbf6
leaq -0x3c(%rbp), %rdi
callq 0x2bbf6
jmp 0x24606
jmp 0x245fe
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x21f6c
jmp 0x24632
jmp 0x245fe
jmp 0x245fe
movq %rax, %rbx
jmp 0x24632
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
jmp 0x2462d
movq %rax, %rbx
jmp 0x24626
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2bbf6
leaq -0x80(%rbp), %rdi
callq 0x1889c
leaq -0xa8(%rbp), %rdi
callq 0x2bbf6
leaq -0x2c(%rbp), %rdi
callq 0x2bbf6
movq %rbx, %rdi
callq 0x4750