// File: lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::move_player_to(std::_List_iterator<Player>, Coords const&, bool)
void move_player_to(const list<Player>::iterator p, const Coords &c,
	const bool do_flags)
{
	Coords opos = p->own_pc->getpos();
	// must move both the PC entity and the viewpoint:
	p->own_pc->setpos(c);
	p->own_vp->set_pos(c);
	if(p == pl_with_item)
		add_action_ind(c, A_TRAP);
	else // add_action inserts to event_set
		event_set.insert(c);

	// Check if ended up in some special tile: (note that some of
	// these are checked only when *walking* into them, but in
	// this function we don't know the "method of arrival")
	Tile* tile = Game::curmap->mod_tile(c);
	if(tile->flags & TF_KILLS) // chasm
	{
		if(p->warned_of_chasm == Config::int_settings[Config::IS_SAFE_CHASMS])
		{
			player_death(p, " fell into oblivion.", false);
			add_voice(c, "Aieeeee...!");	
			Game::curmap->mod_tile(opos)->flags &= ~(TF_OCCUPIED);
		}
		else
		{
			p->warned_of_chasm++;
			string msg = "You almost fall into a chasm!";
			Network::construct_msg(msg, C_WALL_LIT);
			Network::send_to_player(*p);
			// revert original coords:
			p->own_pc->setpos(opos);
			p->own_vp->set_pos(opos);
		}
		return; // either died or did not move
	}

	if(tile->flags & TF_TRAP)
	{
		list<Trap>::iterator tr_it = any_trap_at(c);
		// A trap is triggered always if not seen and sometimes if it's dark:
		if(!tr_it->is_seen_by(p->team) || p->own_vp->is_blind()
			|| (!(tile->flags & TF_LIT) && random()%100 < 15 && !is_dynlit(c)))
		{
			if(trigger_trap(p, tr_it, false))
			{
				// if returned true, PC died or teleported
				Game::curmap->mod_tile(opos)->flags &= ~(TF_OCCUPIED);
				return;
			}
		}
	}
	
	// If we made it here, the PC survived the checks.
	if(tile->flags & TF_DROWNS) // water slows down
	{
		p->wait_turns += 2;
		if(p->cl != C_ASSASSIN && p->cl != C_SCOUT)
			add_sound(c, S_SPLASH);
	}
	else if((tile->flags & TF_SLOWWALK) // slow non-trappers/scouts
		&& p->cl != C_TRAPPER && p->cl != C_SCOUT)
		p->wait_turns++;
	
	// The occupied flags don't need to be changed when switching places:
	if(do_flags)
	{
		Game::curmap->mod_tile(opos)->flags &= ~(TF_OCCUPIED);
		Game::curmap->mod_tile(c)->flags |= TF_OCCUPIED;
	}
	
	// Check if moved to another sector:
	e_Dir newsector = Game::curmap->coords_in_sector(c);
	if(p->sector != newsector)
	{
		p->sector = newsector;
		p->needs_state_upd = true;
	}

	// Whenever a PC moves, we check if they spot some hiding enemies.
	// The requirement for this is that this PC is facing directly at a hiding
	// enemy, whose position is lit, at a distance of 2.
	opos = c.in(p->facing).in(p->facing); // reusing opos
	list<PCEnt>::iterator pc_it = any_pc_at(opos);
	if(pc_it != PCs.end() && !pc_it->isvoid() && !pc_it->visible_to_team(p->team)
		&& ((Game::curmap->get_tile(opos).flags & TF_LIT) || is_dynlit(opos)))
		pc_it->set_invis_to_team(T_NO_TEAM); // seen!

	// Also, whenever a PC moves, we check if they are seen by enemy scouts:
	if(p->own_pc->visible_to_team(opp_team[p->team]))
	{
		Coords thc; // "their coords"
		char d = classes[C_SCOUT].losr;
		if(!(Game::curmap->get_tile(c).flags & TF_LIT))
			d = (d+5)/3; // not lit, shorter radius
		for(list<Player>::const_iterator pit = cur_players.begin();
			pit != cur_players.end(); ++pit)
		{
			// Search for opponent scouts who are alive...
			if(pit->team != p->team && pit->cl == C_SCOUT && pit->is_alive()
				&& Game::curmap->LOS_between(c, pit->own_pc->getpos(), d))
			{
				p->own_pc->set_seen_by_team(pit->team);
				return; // done
			}
		} // loop through current players
	}
	// If we end up here, was not seen by enemy scouts:
	p->own_pc->set_seen_by_team(T_NO_TEAM);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
leaq -0x8(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x1b050
movq 0x138(%rax), %rsi
leaq -0x18(%rbp), %rdi
callq 0x1b190
movq -0x140(%rbp), %rdi
callq 0x1b050
movq 0x138(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x49fd0
jmp 0x538e8
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0xc0(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x426b0
jmp 0x53903
leaq -0x30(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x18a20
leaq -0x30(%rbp), %rdi
leaq 0x3f85d(%rip), %rsi     # 0x93178
callq 0x3d5a0
testb $0x1, %al
jne 0x53926
jmp 0x53949
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x47f20
jmp 0x53936
jmp 0x5397c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x543f2
movq -0x10(%rbp), %rsi
leaq 0x3f7f4(%rip), %rdi     # 0x93148
callq 0x4a010
movb %dl, -0x149(%rbp)
movq %rax, -0x148(%rbp)
jmp 0x53968
movb -0x149(%rbp), %al
movq -0x148(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movb %al, -0x38(%rbp)
leaq 0x3e455(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x3d2d0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movzwl (%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x53c18
leaq -0x8(%rbp), %rdi
callq 0x1b050
movzbl 0x162(%rax), %eax
leaq 0x3c051(%rip), %rcx     # 0x8fa10
cmpl 0x28(%rcx), %eax
jne 0x53b0c
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x5930
movq -0x158(%rbp), %rdx
leaq 0x18bc0(%rip), %rsi     # 0x6c5ae
leaq -0x70(%rbp), %rdi
callq 0x18880
jmp 0x539f9
movq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
xorl %edx, %edx
callq 0x517d0
jmp 0x53a0a
leaq -0x70(%rbp), %rdi
callq 0x5a48
leaq -0x71(%rbp), %rdi
callq 0x5590
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0x99(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x5930
movq -0x160(%rbp), %rdx
leaq 0x18b7b(%rip), %rsi     # 0x6c5c3
leaq -0x98(%rbp), %rdi
callq 0x18880
jmp 0x53a56
movq -0x168(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x480f0
jmp 0x53a6b
leaq -0x98(%rbp), %rdi
callq 0x5a48
leaq -0x99(%rbp), %rdi
callq 0x5590
leaq 0x3e34e(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3d2d0
movzwl (%rax), %ecx
andl $-0x41, %ecx
movw %cx, (%rax)
jmp 0x53c09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x53ac7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5a48
leaq -0x71(%rbp), %rdi
callq 0x5590
jmp 0x543f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x53afb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x5a48
leaq -0x99(%rbp), %rdi
callq 0x5590
jmp 0x543f2
leaq -0x8(%rbp), %rdi
callq 0x1b050
movb 0x162(%rax), %cl
incb %cl
movb %cl, 0x162(%rax)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x5930
movq -0x170(%rbp), %rdx
leaq 0x18a8b(%rip), %rsi     # 0x6c5cf
leaq -0xc0(%rbp), %rdi
callq 0x18880
jmp 0x53b52
leaq -0xc1(%rbp), %rdi
callq 0x5590
leaq -0xc0(%rbp), %rdi
movl $0x2e, %esi
callq 0x1ab10
jmp 0x53b71
leaq -0x8(%rbp), %rdi
callq 0x28450
movq %rax, %rdi
leaq 0x3a714(%rip), %rsi     # 0x8e298
callq 0x1af60
jmp 0x53b8b
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0x138(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x49fd0
jmp 0x53ba6
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0xc0(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x426b0
jmp 0x53bc1
leaq -0xc0(%rbp), %rdi
callq 0x5a48
jmp 0x53c09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xc1(%rbp), %rdi
callq 0x5590
jmp 0x543f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x5a48
jmp 0x543f2
movl $0x1, -0xc8(%rbp)
jmp 0x543e0
movq -0x48(%rbp), %rax
movzwl (%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x53d73
movq -0x10(%rbp), %rdi
callq 0x494b0
movq %rax, -0x178(%rbp)
jmp 0x53c3f
movq -0x178(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3daa0
movq %rax, -0x188(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq -0x188(%rbp), %rdi
movzbl 0xac(%rax), %esi
callq 0x4d890
movb %al, -0x179(%rbp)
jmp 0x53c84
movb -0x179(%rbp), %al
testb $0x1, %al
jne 0x53c90
jmp 0x53d02
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0xc0(%rax), %rdi
callq 0x3d340
movb %al, -0x189(%rbp)
jmp 0x53cad
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x53d02
jmp 0x53cb9
movq -0x48(%rbp), %rax
movzwl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x53d71
callq 0x5270
movl $0x64, %ecx
cqto
idivq %rcx
cmpq $0xf, %rdx
jge 0x53d71
movq -0x10(%rbp), %rdi
callq 0x48d60
movb %al, -0x18a(%rbp)
jmp 0x53cf6
movb -0x18a(%rbp), %al
testb $0x1, %al
jne 0x53d71
jmp 0x53d02
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
xorl %edx, %edx
callq 0x50d80
movb %al, -0x18b(%rbp)
jmp 0x53d38
movb -0x18b(%rbp), %al
testb $0x1, %al
jne 0x53d44
jmp 0x53d6f
leaq 0x3e08d(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3d2d0
movzwl (%rax), %ecx
andl $-0x41, %ecx
movw %cx, (%rax)
movl $0x1, -0xc8(%rbp)
jmp 0x543e0
jmp 0x53d71
jmp 0x53d73
movq -0x48(%rbp), %rax
movzwl (%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x53dd2
leaq -0x8(%rbp), %rdi
callq 0x1b050
movsbl 0x131(%rax), %ecx
addl $0x2, %ecx
movb %cl, 0x131(%rax)
leaq -0x8(%rbp), %rdi
callq 0x1b050
cmpl $0x1, 0xb0(%rax)
je 0x53dd0
leaq -0x8(%rbp), %rdi
callq 0x1b050
cmpl $0x4, 0xb0(%rax)
je 0x53dd0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x48080
jmp 0x53dce
jmp 0x53dd0
jmp 0x53e1f
movq -0x48(%rbp), %rax
movzwl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x53e1d
leaq -0x8(%rbp), %rdi
callq 0x1b050
cmpl $0x9, 0xb0(%rax)
je 0x53e1d
leaq -0x8(%rbp), %rdi
callq 0x1b050
cmpl $0x4, 0xb0(%rax)
je 0x53e1d
leaq -0x8(%rbp), %rdi
callq 0x1b050
movb 0x131(%rax), %cl
addb $0x1, %cl
movb %cl, 0x131(%rax)
jmp 0x53e1f
testb $0x1, -0x11(%rbp)
je 0x53e5d
leaq 0x3dfac(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3d2d0
movzwl (%rax), %ecx
andl $-0x41, %ecx
movw %cx, (%rax)
leaq 0x3df90(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x3d2d0
movzwl (%rax), %ecx
orl $0x40, %ecx
movw %cx, (%rax)
leaq 0x3df74(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2c120
movl %eax, -0x190(%rbp)
jmp 0x53e78
movl -0x190(%rbp), %eax
movl %eax, -0xe4(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movl 0x15c(%rax), %eax
cmpl -0xe4(%rbp), %eax
je 0x53ecc
movl -0xe4(%rbp), %eax
movl %eax, -0x194(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movl -0x194(%rbp), %ecx
movl %ecx, 0x15c(%rax)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movb $0x1, 0x14d(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq -0x1a0(%rbp), %rsi
movl 0x158(%rax), %edx
leaq -0xec(%rbp), %rdi
callq 0x60550
jmp 0x53efb
leaq -0x8(%rbp), %rdi
callq 0x1b050
movl 0x158(%rax), %edx
leaq -0xe8(%rbp), %rdi
leaq -0xec(%rbp), %rsi
callq 0x60550
jmp 0x53f1f
movl -0xe8(%rbp), %eax
movl %eax, -0x18(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x60460
leaq -0xec(%rbp), %rdi
callq 0x60460
leaq -0x18(%rbp), %rdi
callq 0x49290
movq %rax, -0x1a8(%rbp)
jmp 0x53f52
movq -0x1a8(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq 0x3f0e9(%rip), %rdi     # 0x93050
callq 0x3d010
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x3cfe0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1a9(%rbp)
jne 0x53f9a
jmp 0x54059
leaq -0xf8(%rbp), %rdi
callq 0x3d040
movq %rax, %rdi
callq 0x3ce40
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1a9(%rbp)
jne 0x54059
leaq -0xf8(%rbp), %rdi
callq 0x3d040
movq %rax, -0x1b8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq -0x1b8(%rbp), %rdi
movl 0xac(%rax), %esi
callq 0x43050
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1a9(%rbp)
jne 0x54059
leaq 0x3ddd3(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3dcd0
movl %eax, -0x104(%rbp)
movzwl -0x104(%rbp), %ecx
andl $0x10, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x1b9(%rbp)
jne 0x5404d
leaq -0x18(%rbp), %rdi
callq 0x48d60
movb %al, -0x1ba(%rbp)
jmp 0x5403f
movb -0x1ba(%rbp), %al
movb %al, -0x1b9(%rbp)
jmp 0x5404d
movb -0x1b9(%rbp), %al
movb %al, -0x1a9(%rbp)
movb -0x1a9(%rbp), %al
testb $0x1, %al
jne 0x54065
jmp 0x5409d
leaq -0xf8(%rbp), %rdi
callq 0x3d040
movq %rax, %rdi
movl $0x3, %esi
callq 0x585c0
jmp 0x5409d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xec(%rbp), %rdi
callq 0x60460
jmp 0x543f2
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0x138(%rax), %rax
movq %rax, -0x1c8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq -0x1c8(%rbp), %rdi
movl 0xac(%rax), %eax
movl %eax, %ecx
leaq 0x162bd(%rip), %rax     # 0x6a390
movl (%rax,%rcx,4), %esi
callq 0x43050
testb $0x1, %al
jne 0x540e4
jmp 0x543ba
leaq -0x108(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x60430
jmp 0x540f6
movb $0xa, -0x109(%rbp)
leaq 0x3dcd4(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x3dcd0
movl %eax, -0x10e(%rbp)
movzwl -0x10e(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5412e
jmp 0x54146
movsbl -0x109(%rbp), %eax
addl $0x5, %eax
movl $0x3, %ecx
cltd
idivl %ecx
movb %al, -0x109(%rbp)
leaq 0x3c0e3(%rip), %rdi     # 0x90230
callq 0x1b360
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x18a20
leaq 0x3c0bd(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x130(%rbp)
leaq -0x128(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x18a20
leaq -0x118(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x24f10
testb $0x1, %al
jne 0x541ae
jmp 0x54388
leaq -0x118(%rbp), %rdi
callq 0x24f40
movl 0xac(%rax), %eax
movl %eax, -0x1d0(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b050
movl -0x1d0(%rbp), %ecx
movl 0xac(%rax), %edx
movb $0x0, -0x135(%rbp)
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x1c9(%rbp)
je 0x542d0
leaq -0x118(%rbp), %rdi
callq 0x24f40
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x4, 0xb0(%rcx)
movb %al, -0x1c9(%rbp)
jne 0x542d0
leaq -0x118(%rbp), %rdi
callq 0x24f40
movq %rax, %rdi
callq 0x21cd0
movb %al, -0x1d1(%rbp)
jmp 0x54232
movb -0x1d1(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1c9(%rbp)
jne 0x5424a
jmp 0x542d0
leaq 0x3db87(%rip), %rax     # 0x91dd8
movq (%rax), %rax
movq %rax, -0x1f0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x24f40
movq 0x138(%rax), %rsi
leaq -0x134(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x1b190
movq -0x1f0(%rbp), %rdi
movq -0x1e8(%rbp), %rsi
movq -0x1e0(%rbp), %rdx
movb $0x1, -0x135(%rbp)
movsbl -0x109(%rbp), %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x2c2b0
movb %al, -0x1d2(%rbp)
jmp 0x542c2
movb -0x1d2(%rbp), %al
movb %al, -0x1c9(%rbp)
jmp 0x542d0
movb -0x1c9(%rbp), %al
movb %al, -0x1f1(%rbp)
testb $0x1, -0x135(%rbp)
jne 0x542e7
jmp 0x542f3
leaq -0x134(%rbp), %rdi
callq 0x60460
movb -0x1f1(%rbp), %al
testb $0x1, %al
jne 0x542ff
jmp 0x54375
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0x138(%rax), %rax
movq %rax, -0x200(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x24f40
movq -0x200(%rbp), %rdi
movl 0xac(%rax), %esi
callq 0x58880
jmp 0x54336
movl $0x1, -0xc8(%rbp)
jmp 0x54392
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x543ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
testb $0x1, -0x135(%rbp)
jne 0x54367
jmp 0x54373
leaq -0x134(%rbp), %rdi
callq 0x60460
jmp 0x543ac
jmp 0x54377
leaq -0x118(%rbp), %rdi
callq 0x250a0
jmp 0x5416c
movl $0x0, -0xc8(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x60460
movl -0xc8(%rbp), %eax
testl %eax, %eax
jne 0x543e0
jmp 0x543aa
jmp 0x543ba
leaq -0x108(%rbp), %rdi
callq 0x60460
jmp 0x543f2
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq 0x138(%rax), %rdi
movl $0x3, %esi
callq 0x58880
jmp 0x543d6
movl $0x0, -0xc8(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x60460
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0x60460
movq -0x20(%rbp), %rdi
callq 0x5920
nopw %cs:(%rax,%rax)