LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/base.cpp
// Function: Base::viewtick()
void Base::viewtick()
{
	wmove(windows[STAT_WIN], 4, 53);
	change_colour(windows[STAT_WIN], C_WALL_LIT);
	waddstr(windows[STAT_WIN], anim_syms[animind].c_str());
	wrefresh(windows[STAT_WIN]);
	if(++animind == anim_syms.size())
		animind = 0;
	return_cursor(cursor_in_view);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10cfe(%rip), %rdi     # 0x17970
movl $0x4, %esi
movl $0x35, %edx
callq 0x4230
movq 0x10ce8(%rip), %rdi     # 0x17970
movl $0x2e, %esi
callq 0x6930
movq 0x10cd7(%rip), %rdi     # 0x17970
movzbl 0x10cf2(%rip), %eax     # 0x17992
movq 0x10c99(%rip), %rcx     # 0x17940
shll $0x5, %eax
movq (%rcx,%rax), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4690
movq 0x10cb1(%rip), %rdi     # 0x17970
callq 0x4430
movb 0x10cc8(%rip), %al      # 0x17992
incb %al
movb %al, 0x10cc0(%rip)      # 0x17992
movzbl %al, %eax
movq 0x10c6c(%rip), %rcx     # 0x17948
subq 0x10c5d(%rip), %rcx     # 0x17940
sarq $0x5, %rcx
cmpq %rax, %rcx
jne 0x6cf3
movb $0x0, 0x10c9f(%rip)     # 0x17992
movzbl 0x10c96(%rip), %edi     # 0x17990
xorl $0x1, %edi
popq %rbp
jmp 0x69c1
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/base.cpp
// Function: Base::print_walk(bool)
void Base::print_walk(const bool w)
{
	wmove(windows[STAT_WIN], 4, 55);
	change_colour(windows[STAT_WIN], C_WALL_LIT);
	waddch(windows[STAT_WIN], walk_syms[w]);
	wrefresh(windows[STAT_WIN]);
	return_cursor(cursor_in_view);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x10c5e(%rip), %rdi     # 0x17970
movl $0x4, %esi
movl $0x37, %edx
callq 0x4230
movq 0x10c48(%rip), %rdi     # 0x17970
movl $0x2e, %esi
callq 0x6930
movq 0x10c37(%rip), %rdi     # 0x17970
movl %ebx, %eax
leaq 0x957b(%rip), %rcx      # 0x102bd
movsbl (%rax,%rcx), %esi
callq 0x45c0
movq 0x10c1e(%rip), %rdi     # 0x17970
callq 0x4430
movzbl 0x10c32(%rip), %edi     # 0x17990
xorl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x69c1
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/class_cpv.cpp
// Function: ClassCPV::move(e_Dir)
void ClassCPV::move(const e_Dir d)
{
	if(clientstate == CS_NORMAL) // regular movement
		Network::send_action(XN_MOVE, d);
	else if(clientstate == CS_AIMING) // moving the aimer
	{
		aimer = aimer.in(d);
		if(aimer.x > VIEWSIZE/2) aimer.x--;
		else if(aimer.x < -VIEWSIZE/2) aimer.x++;
		if(aimer.y > VIEWSIZE/2) aimer.y--;
		else if(aimer.y < -VIEWSIZE/2) aimer.y++;
		redraw_view();
	}
	else if(clientstate == CS_DIR) // waiting for dir input (and now got it!)
	{
		if(myclass == C_FIGHTER)
			Network::send_action(XN_CIRCLE_ATTACK, d);
		else if(myclass == C_HEALER)
			Network::send_action(XN_HEAL, d);
		else if(myclass == C_MINER)
			Network::send_action(XN_MINE, d);
		else if(myclass == C_COMBAT_MAGE)
			Network::send_action(XN_ZAP, d);
		clientstate = CS_NORMAL;
	}	
	// else ignore
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x1083d(%rip), %rbx     # 0x17e80
movl (%rbx), %eax
cmpl $0x7, %eax
je 0x76e8
cmpl $0x6, %eax
je 0x7670
testl %eax, %eax
jne 0x7728
movzbl %dl, %esi
movl $0x4, %edi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xc928
leaq 0x106c9(%rip), %rsi     # 0x17d40
leaq -0xc(%rbp), %rbx
movq %rbx, %rdi
callq 0xfc82
movl (%rbx), %eax
movl %eax, 0x106b5(%rip)     # 0x17d40
movq %rbx, %rdi
callq 0xfc02
movzwl 0x106a6(%rip), %eax     # 0x17d40
movw $0xffff, %cx            # imm = 0xFFFF
cmpw $0xb, %ax
jg 0x76ae
movw $0x1, %cx
cmpw $-0xc, %ax
jg 0x76ba
movswl %cx, %ecx
addl %eax, %ecx
movw %cx, 0x10686(%rip)      # 0x17d40
movzwl 0x10681(%rip), %eax     # 0x17d42
movw $0xffff, %cx            # imm = 0xFFFF
cmpw $0xb, %ax
jg 0x76d5
movw $0x1, %cx
cmpw $-0xc, %ax
jg 0x76e1
movswl %cx, %ecx
addl %eax, %ecx
movw %cx, 0x10661(%rip)      # 0x17d42
callq 0xebd3
jmp 0x7728
movl 0xfcca(%rip), %ecx      # 0x173b8
addl $-0x2, %ecx
cmpl $0x5, %ecx
ja 0x7722
movl $0x39, %eax
btl %ecx, %eax
jae 0x7722
shll $0x3, %ecx
movabsq $0xc0b0a0a0a07, %rdi    # imm = 0xC0B0A0A0A07
shrq %cl, %rdi
movl $0xff, %eax
andl %eax, %edx
andl %eax, %edi
movl %edx, %esi
xorl %edx, %edx
callq 0xc928
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/class_cpv.cpp
// Function: ClassCPV::five()
void ClassCPV::five()
{
	if(clientstate == CS_AIMING)
	{
		if(aimer.x || aimer.y)
		{
			aimer.x = aimer.y = 0;
			redraw_view();
		}
	}	
	else if(clientstate == CS_DIR && myclass == C_HEALER) 
	{
		Network::send_action(XN_HEAL, MAX_D); // heal self
		clientstate = CS_NORMAL;
	}
	// else ignore
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x10744(%rip), %rbx     # 0x17e80
movl (%rbx), %eax
cmpl $0x6, %eax
jne 0x7768
movzwl 0x105f8(%rip), %eax     # 0x17d42
orw 0x105ef(%rip), %ax      # 0x17d40
je 0x778d
movl $0x0, 0x105e3(%rip)     # 0x17d40
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xebd3
cmpl $0x7, %eax
jne 0x778d
cmpl $0x7, 0xfc44(%rip)      # 0x173b8
jne 0x778d
movl $0xc, %edi
movl $0x8, %esi
xorl %edx, %edx
callq 0xc928
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/class_cpv.cpp
// Function: ClassCPV::state_change(unsigned char, unsigned char)
void ClassCPV::state_change(const unsigned char cl, const unsigned char t)
{
	myteam = e_Team(t);
	hp = 0; // we are dead until further notice (the further notice being a status update)

	// print PC info:
	if((myclass = e_Class(cl)) == NO_CLASS) // spectator
		Base::print_str("Spectator  ", team_colour[T_SPEC], PC_INFO_X, 3, STAT_WIN, false);
	else // actual class 
	{
		Base::print_str(pcview_classname[myclass].c_str(), team_colour[myteam],
			PC_INFO_X, 3, STAT_WIN, false);
		dam_die = classes[myclass].dam_die;
		dv = classes[myclass].dv;
		pv = classes[myclass].pv;
	}
	// Clear the rest:
	for(char y = 4; y < 7; ++y)
		Base::print_str("          ", team_colour[T_SPEC], PC_INFO_X, y, STAT_WIN, false);
	Base::print_str("    ", team_colour[T_SPEC], 52, 3, STAT_WIN, false); // map area

	// class/team change requires any class-specific action to end:
	if(clientstate >= CS_AIMING)
	{
		clientstate = CS_NORMAL;
		redraw_view();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, 0xfad8(%rip)      # 0x173bc
movb $0x0, 0x10459(%rip)     # 0x17d44
movl %edi, 0xfac7(%rip)      # 0x173b8
cmpl $0xb, %edi
jne 0x7919
leaq 0x8b66(%rip), %rdi      # 0x10463
movl $0x27, %esi
movl $0x25, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x68af
jmp 0x7984
movzbl %dil, %eax
shll $0x5, %eax
leaq 0x102b9(%rip), %rcx     # 0x17be0
movq (%rax,%rcx), %rdi
movzbl %sil, %eax
leaq 0x8a16(%rip), %rcx      # 0x1034c
movzbl (%rax,%rcx), %esi
movl $0x25, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x68af
movl 0xfa63(%rip), %eax      # 0x173b8
leaq (%rax,%rax,2), %rcx
leaq (%rax,%rcx,4), %rax
leaq 0x89ec(%rip), %rcx      # 0x10350
movb 0x6(%rcx,%rax), %dl
movb 0x8(%rcx,%rax), %sil
movb %dl, 0x103d2(%rip)      # 0x17d45
movb %sil, 0x103cc(%rip)     # 0x17d46
movb 0x9(%rcx,%rax), %al
movb %al, 0x103c3(%rip)      # 0x17d47
movb $0x4, %bl
leaq 0x8ae2(%rip), %r14      # 0x1046f
movsbl %bl, %ebx
movq %r14, %rdi
movl $0x27, %esi
movl $0x25, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x68af
incb %bl
cmpb $0x7, %bl
jne 0x798d
leaq 0x8abd(%rip), %rdi      # 0x10475
movl $0x27, %esi
movl $0x34, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x68af
leaq 0x104a7(%rip), %rax     # 0x17e80
cmpl $0x5, (%rax)
jle 0x79ed
movl $0x0, (%rax)
popq %rbx
popq %r14
popq %rbp
jmp 0xebd3
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/input.cpp
// Function: (anonymous namespace)::init_type()
void init_type()
{
	typed_str.clear();
	viewn_str.clear();
	Base::type_cursor((type_pos = str_syms = 0));
	printb_pos = 0;
	prev_str_it = prev_strs.end();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
movq %rbx, 0xeb28(%rip)      # 0x17ea8
movq 0xeb19(%rip), %rax      # 0x17ea0
movb %bl, (%rax)
movq %rbx, 0xeb38(%rip)      # 0x17ec8
movq 0xeb29(%rip), %rax      # 0x17ec0
movb %bl, (%rax)
movw %bx, 0xeb52(%rip)       # 0x17ef2
movw %bx, 0xeb39(%rip)       # 0x17ee0
xorl %edi, %edi
callq 0x6c36
movw %bx, 0xeb3b(%rip)       # 0x17ef0
movq 0xead4(%rip), %rax      # 0x17e90
movq %rax, 0xeb25(%rip)      # 0x17ee8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/input.cpp
// Function: (anonymous namespace)::typing_done()
void typing_done()
{
	if(!viewn_str.empty())
	{
		if(prev_strs.empty() || viewn_str != prev_strs.back())
		{
			prev_strs.push_back(viewn_str);
			if(prev_strs.size() > 1000)
				prev_strs.erase(prev_strs.begin());
		}
		Config::do_aliasing(viewn_str);
		Network::send_line(viewn_str, clientstate == CS_TYPE_CHAT);
	}
	Base::print_str("", 0, 0, MSG_WIN_Y-1, MSG_WIN, true);
	Base::def_cursor();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xeaf1(%rip), %rdx      # 0x17ec8
testq %rdx, %rdx
je 0x9466
movq 0xeaa9(%rip), %rax      # 0x17e90
cmpq %rax, 0xea9a(%rip)      # 0x17e88
je 0x940a
cmpq -0x18(%rax), %rdx
jne 0x940a
movq -0x20(%rax), %rsi
movq 0xeabf(%rip), %rdi      # 0x17ec0
callq 0x43b0
testl %eax, %eax
je 0x9442
leaq 0xea77(%rip), %rdi      # 0x17e88
leaq 0xeaa8(%rip), %rsi      # 0x17ec0
callq 0x95c4
movq 0xea6c(%rip), %rax      # 0x17e90
movq 0xea5d(%rip), %rsi      # 0x17e88
subq %rsi, %rax
cmpq $0x7d01, %rax           # imm = 0x7D01
jb 0x9442
leaq 0xea4b(%rip), %rdi      # 0x17e88
callq 0x9808
leaq 0xea77(%rip), %rbx      # 0x17ec0
movq %rbx, %rdi
callq 0xe127
xorl %esi, %esi
cmpl $0x1, 0xea26(%rip)      # 0x17e80
sete %sil
movq %rbx, %rdi
callq 0xca58
leaq 0x700c(%rip), %rdi      # 0x10479
xorl %esi, %esi
xorl %edx, %edx
movl $0xe, %ecx
movl $0x2, %r8d
movl $0x1, %r9d
callq 0x68af
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6c08
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/input.cpp
// Function: (anonymous namespace)::loop_up()
void loop_up()
{
	if(prev_str_it == prev_strs.begin())
	{
		set_viewn_str(typed_str);
		prev_str_it = prev_strs.end();
	}
	else
	{
		while(prev_str_it != prev_strs.begin())
		{
			if((*(--prev_str_it)).find(typed_str) == 0)
			{
				set_viewn_str(*prev_str_it);
				return;
			}
		}
		// if here, no matches found; recursive call to reset:
		loop_up();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xea49(%rip), %rax      # 0x17ee8
cmpq 0xe9e2(%rip), %rax      # 0x17e88
je 0x9526
movq 0xea39(%rip), %rdi      # 0x17ee8
cmpq 0xe9d2(%rip), %rdi      # 0x17e88
je 0x9498
addq $-0x20, %rdi
movq %rdi, 0xea25(%rip)      # 0x17ee8
movq 0xe9d6(%rip), %rsi      # 0x17ea0
movq 0xe9d7(%rip), %rcx      # 0x17ea8
xorl %edx, %edx
callq 0x4660
testq %rax, %rax
jne 0x94a8
movq 0xea04(%rip), %rsi      # 0x17ee8
leaq 0xe9d5(%rip), %rbx      # 0x17ec0
movq %rbx, %rdi
callq 0x4200
movq %rbx, %rdi
callq 0xf89c
movw %ax, 0xe9f0(%rip)       # 0x17ef2
movw %ax, 0xe9d7(%rip)       # 0x17ee0
cmpw $0x39, %ax
movl $0x38, %ecx
cmovgel %eax, %ecx
addl $-0x38, %ecx
movw %cx, 0xe9d1(%rip)       # 0x17ef0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xe993(%rip), %rbx      # 0x17ec0
leaq 0xe96c(%rip), %rsi      # 0x17ea0
movq %rbx, %rdi
callq 0x4200
movq %rbx, %rdi
callq 0xf89c
movw %ax, 0xe9a7(%rip)       # 0x17ef2
movw %ax, 0xe98e(%rip)       # 0x17ee0
cmpw $0x39, %ax
movl $0x38, %ecx
cmovgel %eax, %ecx
addl $-0x38, %ecx
movw %cx, 0xe988(%rip)       # 0x17ef0
movq 0xe921(%rip), %rax      # 0x17e90
movq %rax, 0xe972(%rip)      # 0x17ee8
jmp 0x951f
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/msg.cpp
// Function: add_msg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char)
void add_msg(const string &s, const unsigned char cp)
{
	/* First check if this new message is identical with the previous (this
	 * happens especially if someone keeps shouting something */
	if(check_repeat_msg(s, cp))
		return;

	// The rest goes for non-repeating messages:

	if(bottom_idx == MSG_WIN_Y-1) // screen buffer full
	{
		// check if STAY_TIME has passed:
		if(reference.update() - last_add < STAY_TIME)
		{
			// time not passed, put the message in queue to be displayed later
			msgavail.push_back(MsgBufferLine(s,cp));
			return;
		}
		else
			move_msgs();
	}
	msgbuffer[bottom_idx].text = s;
	msgbuffer[bottom_idx].cpair = cp;
	++bottom_idx;
	redraw_msgs();
	last_add.update();
	last_move.update(); // also delay moving
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movq %rdi, %r14
callq 0x9d23
testb %al, %al
je 0x9c39
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpb $0xe, 0xe3d8(%rip)      # 0x18018
jne 0x9ca5
leaq 0xe3d7(%rip), %rdi      # 0x18020
callq 0xf2e8
leaq 0xe3a3(%rip), %rsi      # 0x17ff8
movq %rax, %rdi
callq 0xf302
cmpl $0x2ed, %eax            # imm = 0x2ED
ja 0x9ca0
movzbl %bl, %edx
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa040
leaq 0xe2cb(%rip), %rdi      # 0x17f48
movq %rbx, %rsi
callq 0x9dc0
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9c30
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43a0
jmp 0x9c30
callq 0xa081
movsbq 0xe36b(%rip), %rdi      # 0x18018
callq 0xa1ca
movq %rax, %rdi
movq %r14, %rsi
callq 0x4200
movsbq 0xe353(%rip), %r14      # 0x18018
movq %r14, %rdi
callq 0xa1ca
movb %bl, 0x20(%rax)
leal 0x1(%r14), %eax
movb %al, 0xe33e(%rip)       # 0x18018
callq 0xa254
leaq 0xe312(%rip), %rdi      # 0x17ff8
callq 0xf2e8
leaq 0xe2f6(%rip), %rdi      # 0x17fe8
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xf2e8
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9d1b
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43a0
movq %rbx, %rdi
callq 0x4670
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/msg.cpp
// Function: (anonymous namespace)::check_repeat_msg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char)
bool check_repeat_msg(const string &s, const unsigned char cp)
{
	if(bottom_idx && s == msgbuffer[bottom_idx-1].text
		&& cp == msgbuffer[bottom_idx-1].cpair)
	{
		if(msgbuffer[bottom_idx-1].repeat != '+' - '1' // this value is -1
			&& ++(msgbuffer[bottom_idx-1].repeat) > 8)
			msgbuffer[bottom_idx-1].repeat = '+' - '1';
		redraw_msgs();
		last_move.update(); /* only update this! Then the next 
			message can be printed without unnecessary delay */
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movsbq 0xe2e2(%rip), %rbx      # 0x18018
testq %rbx, %rbx
je 0x9db4
movl %esi, %r15d
movq %rdi, %r12
decq %rbx
movq %rbx, %rdi
callq 0xa1ca
movq 0x8(%r12), %rdx
cmpq 0x8(%rax), %rdx
jne 0x9db4
movq %rax, %r14
testq %rdx, %rdx
je 0x9d7b
movq (%r14), %rsi
movq (%r12), %rdi
callq 0x43b0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x9db6
cmpb %r15b, 0x20(%r14)
je 0x9d81
jmp 0x9db6
cmpb %r15b, 0x20(%r14)
jne 0x9db4
movb 0x21(%r14), %al
cmpb $-0x6, %al
je 0x9d9f
incb %al
movb %al, 0x21(%r14)
cmpb $0x9, %al
jl 0x9d9f
movq %rbx, %rdi
callq 0xa1ca
movb $-0x6, 0x21(%rax)
callq 0xa254
leaq 0xe23d(%rip), %rdi      # 0x17fe8
callq 0xf2e8
movb $0x1, %al
jmp 0x9db6
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/msg.cpp
// Function: (anonymous namespace)::move_msgs()
void move_msgs()
{
	if(bottom_idx)
	{
		msgbuffer.pop_front();
		msgbuffer.push_back(MsgBufferLine());
		--bottom_idx;
		last_move.update();
		for(char y = 0; y < bottom_idx/2; ++y)
			msgbuffer[y].dimmen();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpb $0x0, 0xdf83(%rip)      # 0x18018
je 0xa185
leaq 0xde56(%rip), %rdi      # 0x17ef8
callq 0xa4b8
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x63c3(%rip), %rdx      # 0x10479
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x8912
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x731c
leaq -0x60(%rbp), %rsi
movw $0x0, 0x20(%rsi)
leaq 0xde07(%rip), %rdi      # 0x17ef8
callq 0x9dc0
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0xa10b
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43a0
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xa120
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43a0
decb 0xdef2(%rip)            # 0x18018
leaq 0xdebb(%rip), %rdi      # 0x17fe8
callq 0xf2e8
movzbl 0xdede(%rip), %r14d     # 0x18018
cmpb $0x2, %r14b
jl 0xa185
shrl %r14d
xorl %ebx, %ebx
movl $0x8, %r15d
movq %rbx, %rdi
callq 0xa1ca
movzbl 0x20(%rax), %ecx
testb $-0x9, %cl
je 0xa17d
leal -0x9(%rcx), %edx
leal -0x8(%rcx), %esi
leal -0x14(%rcx), %edi
cmpb $0x2b, %cl
movzbl %dil, %ecx
cmovbl %r15d, %ecx
cmpb $0x7, %dl
movzbl %sil, %edx
cmovael %ecx, %edx
movb %dl, 0x20(%rax)
incq %rbx
cmpq %rbx, %r14
jne 0xa14b
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0xa1ad
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43a0
jmp 0xa1ad
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xa1c2
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43a0
movq %rbx, %rdi
callq 0x4670
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/msg.cpp
// Function: (anonymous namespace)::redraw_msgs()
void redraw_msgs()
{
	string tmp_str;
	for(char y = 0; y < MSG_WIN_Y-1; ++y)
	{
		if(msgbuffer[y].repeat)
		{
			tmp_str = msgbuffer[y].text;
			if(num_syms(tmp_str) > MSG_WIN_X-4) // 4: len(" [?]")
				del_syms(tmp_str, MSG_WIN_X-4);
			tmp_str += " [";
			tmp_str += char(msgbuffer[y].repeat + '1');
			tmp_str += ']';
			Base::print_str(tmp_str.c_str(), msgbuffer[y].cpair,
				0, y, MSG_WIN, true);
		}
		else
			Base::print_str(msgbuffer[y].text.c_str(), msgbuffer[y].cpair,
				0, y, MSG_WIN, true);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
xorl %ebx, %ebx
leaq -0x40(%rbp), %r14
leaq 0x63bd(%rip), %r15      # 0x10644
movq %rbx, %rdi
callq 0xa1ca
cmpb $0x0, 0x21(%rax)
je 0xa2f8
movq %r14, %rdi
movq %rax, %rsi
callq 0x4200
movq %r14, %rdi
callq 0xf89c
cmpw $0x36, %ax
jl 0xa2bb
movq %r14, %rdi
movl $0x35, %esi
callq 0xf97f
movq %r14, %rdi
movq %r15, %rsi
callq 0x46f0
movq %rbx, %rdi
callq 0xa1ca
movb 0x21(%rax), %al
addb $0x31, %al
movsbl %al, %esi
movq %r14, %rdi
callq 0x4310
movq %r14, %rdi
movl $0x5d, %esi
callq 0x4310
movq %rbx, %rdi
callq 0xa1ca
movq %r14, %rcx
jmp 0xa2fb
movq %rax, %rcx
movq (%rcx), %rdi
movzbl 0x20(%rax), %esi
movsbl %bl, %ecx
xorl %edx, %edx
movl $0x2, %r8d
movl $0x1, %r9d
callq 0x68af
incq %rbx
cmpq $0xe, %rbx
jne 0xa287
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xa33a
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43a0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xa35f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43a0
movq %rbx, %rdi
callq 0x4670
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/msg.cpp
// Function: upd_msgs()
void upd_msgs()
{
	// add messages in avail, if any:
	if(!msgavail.empty() && reference.update() - last_add >= STAY_TIME)
	{
		if(check_repeat_msg(msgavail.front().text, msgavail.front().cpair))
			msgavail.pop_front();
		else
		{
			move_msgs();
			msgbuffer[bottom_idx] = msgavail.front();
			msgavail.pop_front();
			++bottom_idx;
			last_add.update();
			redraw_msgs();
		}
	}
	else if(reference.update() - last_move >= MOVE_FREQ)
	{
		move_msgs();
		redraw_msgs();
	}

	// clock check:
	if(reference.update() - last_second >= 1000)
	{
		if(maptime)
			--maptime;
		if(spawntime)
			--spawntime;
		redraw_clocks();
		last_second.update();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xdc00(%rip), %rax      # 0x17f78
cmpq 0xdbd9(%rip), %rax      # 0x17f58
je 0xa3c8
leaq 0xdc98(%rip), %rdi      # 0x18020
callq 0xf2e8
leaq 0xdc64(%rip), %rsi      # 0x17ff8
movq %rax, %rdi
callq 0xf302
cmpl $0x2ee, %eax            # imm = 0x2EE
jb 0xa3c8
movq 0xdbae(%rip), %rdi      # 0x17f58
movzbl 0x20(%rdi), %esi
callq 0x9d23
testb %al, %al
je 0xa3f1
leaq 0xdb8a(%rip), %rdi      # 0x17f48
callq 0xa4b8
jmp 0xa448
leaq 0xdc51(%rip), %rdi      # 0x18020
callq 0xf2e8
leaq 0xdc0d(%rip), %rsi      # 0x17fe8
movq %rax, %rdi
callq 0xf302
cmpl $0xdac, %eax            # imm = 0xDAC
jb 0xa448
callq 0xa081
jmp 0xa443
callq 0xa081
leaq 0xdb4b(%rip), %rbx      # 0x17f48
movq 0xdb54(%rip), %r14      # 0x17f58
movsbq 0xdc0c(%rip), %rdi      # 0x18018
callq 0xa1ca
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x4200
movzwl 0x20(%r14), %eax
movw %ax, 0x20(%r15)
movq %rbx, %rdi
callq 0xa4b8
incb 0xdbe1(%rip)            # 0x18018
leaq 0xdbba(%rip), %rdi      # 0x17ff8
callq 0xf2e8
callq 0xa254
leaq 0xdbd1(%rip), %rdi      # 0x18020
callq 0xf2e8
leaq 0xdbad(%rip), %rsi      # 0x18008
movq %rax, %rdi
callq 0xf302
cmpl $0x3e8, %eax            # imm = 0x3E8
jb 0xa4ac
movzwl 0xdbbf(%rip), %eax      # 0x18030
testw %ax, %ax
je 0xa47f
decl %eax
movw %ax, 0xdbb1(%rip)       # 0x18030
movb 0xdbad(%rip), %al       # 0x18032
testb %al, %al
je 0xa491
decb %al
movb %al, 0xdba1(%rip)       # 0x18032
callq 0xa53b
leaq 0xdb6b(%rip), %rdi      # 0x18008
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xf2e8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/msg.cpp
// Function: (anonymous namespace)::redraw_clocks()
void redraw_clocks()
{
	unsigned short mins = maptime/60;
	unsigned short secs = maptime%60;
	string timestr = "";
	if(mins < 10)
		timestr += ' ';
	timestr += lex_cast(mins);
	timestr += ':';
	if(secs < 10)
		timestr += '0';
	timestr += lex_cast(secs);
	Base::print_str(timestr.c_str(), 7, 51, 6, STAT_WIN, true);

	timestr.clear();
	if(spawntime < 10)
		timestr += ' ';
	timestr += lex_cast(spawntime);
	Base::print_str(timestr.c_str(), 7, 54, 7, STAT_WIN, true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movzwl 0xdade(%rip), %r12d     # 0x18030
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x5f18(%rip), %rdx      # 0x10479
leaq -0x60(%rbp), %rdi
movq %rdx, %rsi
callq 0x8912
cmpl $0x257, %r12d           # imm = 0x257
ja 0xa584
leaq -0x60(%rbp), %rdi
movl $0x20, %esi
callq 0x4310
imull $0x8889, %r12d, %ebx    # imm = 0x8889
shrl $0x15, %ebx
leaq -0x40(%rbp), %rdi
movl %ebx, %esi
callq 0xfe83
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x4120
leaq -0x30(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0xa5c3
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43a0
leaq -0x60(%rbp), %rdi
movl $0x3a, %esi
callq 0x4310
imull $0x3c, %ebx, %eax
subl %eax, %r12d
cmpw $0x9, %r12w
ja 0xa5ec
leaq -0x60(%rbp), %rdi
movl $0x30, %esi
callq 0x4310
movzwl %r12w, %esi
leaq -0x40(%rbp), %rdi
callq 0xfe83
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x4120
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xa61f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43a0
movq -0x60(%rbp), %rdi
movl $0x7, %esi
movl $0x33, %edx
movl $0x6, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x68af
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rax
movb $0x0, (%rax)
cmpb $0x9, 0xd9dc(%rip)      # 0x18032
ja 0xa666
leaq -0x60(%rbp), %rdi
movl $0x20, %esi
callq 0x4310
movzbl 0xd9c5(%rip), %esi      # 0x18032
leaq -0x40(%rbp), %rdi
callq 0xfe83
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x4120
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xa69c
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43a0
movq -0x60(%rbp), %rdi
movl $0x7, %esi
movl $0x36, %edx
movl $0x7, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x68af
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0xa6d2
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43a0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa6e3
jmp 0xa713
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
jne 0xa703
jmp 0xa716
jmp 0xa713
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa716
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43a0
jmp 0xa716
jmp 0xa713
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0xa72b
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43a0
movq %rbx, %rdi
callq 0x4670
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/msg.cpp
// Function: (anonymous namespace)::redraw_chat()
void redraw_chat()
{
	char num = min(int(Base::num_chat_lines_to_show()), int(num_chat_lines - chat_top));
	for(char i = 0; i < num; ++i)
	{
		Base::incr_print_start(0, i, CHAT_WIN);
		Base::incr_print(chatbuffer[chat_top+i].speaker.c_str(), 3, CHAT_WIN);
		Base::incr_print(team_ind[chatbuffer[chat_top+i].team],
			team_colour[chatbuffer[chat_top+i].team], CHAT_WIN);
		Base::incr_print(chatbuffer[chat_top+i].text.c_str(), 7, CHAT_WIN);
		Base::incr_print_end(CHAT_WIN, true);
	}
	// if necessary, print indicators of there being more messages:
	if(chat_top)
		Base::less_chat_ind();
	if(chat_top + num < num_chat_lines)
		Base::more_chat_ind();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x6b6b
movzbl %al, %eax
movswl 0xd0a8(%rip), %ecx      # 0x18034
movswl 0xd0a3(%rip), %edx      # 0x18036
subl %edx, %ecx
cmpl %eax, %ecx
cmovgel %eax, %ecx
movsbl %cl, %r14d
testl %r14d, %r14d
jle 0xb058
xorl %r13d, %r13d
leaq 0xbd7f(%rip), %r15      # 0x16d30
leaq 0x56c4(%rip), %r12      # 0x1067c
xorl %ebx, %ebx
movsbl %bl, %ebx
xorl %edi, %edi
movl %ebx, %esi
movl $0x1, %edx
callq 0x6a12
movswq 0xd063(%rip), %rdi      # 0x18036
movslq %r13d, %r13
addq %r13, %rdi
callq 0xb29c
movq 0x20(%rax), %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0x6a2d
movswq 0xd03d(%rip), %rdi      # 0x18036
addq %r13, %rdi
callq 0xb29c
movzbl 0x40(%rax), %eax
movq (%r15,%rax,8), %rdi
movzbl (%rax,%r12), %esi
movl $0x1, %edx
callq 0x6a2d
movswq 0xd016(%rip), %rdi      # 0x18036
addq %r13, %rdi
callq 0xb29c
movq (%rax), %rdi
movl $0x7, %esi
movl $0x1, %edx
callq 0x6a2d
movl $0x1, %edi
movl $0x1, %esi
callq 0x6a68
incb %bl
movsbl %bl, %r13d
cmpl %r13d, %r14d
jg 0xafba
cmpw $0x0, 0xcfd6(%rip)      # 0x18036
je 0xb067
callq 0x6b0a
movswl 0xcfc8(%rip), %eax      # 0x18036
addl %eax, %r14d
movswl 0xcfbc(%rip), %eax      # 0x18034
addq $0x8, %rsp
cmpl %eax, %r14d
jge 0xb090
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6aa1
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/msg.cpp
// Function: clocksync(unsigned short, unsigned char)
void clocksync(const unsigned short t, const unsigned char spawn)
{
	maptime = t;
	spawntime = spawn;
	redraw_clocks();
	last_second.update();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %di, 0xcf2e(%rip)       # 0x18030
movb %sil, 0xcf29(%rip)      # 0x18032
callq 0xa53b
leaq 0xcef3(%rip), %rdi      # 0x18008
popq %rbp
jmp 0xf2e8
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/network.cpp
// Function: Network::disconnect()
void Network::disconnect()
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_QUIT);
	send_buffer.add(cur_id);
	do_send();
	freeaddrinfo(servinfo);
	close(s_me);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xc453(%rip), %rbx      # 0x18978
movq %rbx, %rdi
callq 0xf34c
movq %rbx, %rdi
movl $0x2, %esi
callq 0xf360
movzwl 0xcd17(%rip), %esi      # 0x19258
movq %rbx, %rdi
callq 0xf374
movl 0xccf1(%rip), %edi      # 0x19240
movswq 0xc429(%rip), %rdx      # 0x18980
movq 0xccda(%rip), %rax      # 0x19238
movq 0x18(%rax), %r8
movl 0x10(%rax), %r9d
leaq 0xc415(%rip), %rsi      # 0x18982
xorl %ecx, %ecx
callq 0x4060
movq 0xccb5(%rip), %rdi      # 0x19230
callq 0x44e0
movl 0xccba(%rip), %edi      # 0x19240
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4710
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/network.cpp
// Function: Network::send_action(unsigned char, unsigned char, unsigned char)
void Network::send_action(const unsigned char xncode, const unsigned char var1, const unsigned char var2)
{
	if(Config::act_per_turn())
	{
		if(axn_counter)
			return;
	}
	else if(reftimer.update() - last_sent_axn < 50) // every 50 ms at most?
		return;
	// If here, may send:
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_TAKE_ACTION);
	send_buffer.add(cur_id);
	send_buffer.add(curturn);
	send_buffer.add(axn_counter);
	send_buffer.add(xncode);
	if(xncode == XN_MOVE || xncode == XN_SHOOT || xncode == XN_ZAP
		|| xncode == XN_CIRCLE_ATTACK || xncode == XN_HEAL || xncode == XN_MINE)
	{
		send_buffer.add(static_cast<unsigned char>(var1));
		if(xncode == XN_SHOOT)
			send_buffer.add(static_cast<unsigned char>(var2));
	}
	do_send();
	++axn_counter;
	last_sent_axn.update();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movl %edi, %r14d
callq 0xe0ba
testb %al, %al
je 0xc95f
cmpb $0x0, 0xc90e(%rip)      # 0x1925c
je 0xc97f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc8fa(%rip), %rdi      # 0x19260
callq 0xf2e8
leaq 0xc8d6(%rip), %rsi      # 0x19248
movq %rax, %rdi
callq 0xf302
cmpl $0x32, %eax
jb 0xc950
leaq 0xbff2(%rip), %r12      # 0x18978
movq %r12, %rdi
callq 0xf34c
movq %r12, %rdi
movl $0x7, %esi
callq 0xf360
movzwl 0xc8b6(%rip), %esi      # 0x19258
movq %r12, %rdi
callq 0xf374
movzwl 0xc8a9(%rip), %esi      # 0x1925a
movq %r12, %rdi
callq 0xf374
movzbl 0xc89c(%rip), %esi      # 0x1925c
movq %r12, %rdi
callq 0xf360
movzbl %r14b, %r13d
movq %r12, %rdi
movl %r13d, %esi
callq 0xf360
cmpb $0xc, %r13b
ja 0xca0d
movl $0x1cb0, %eax           # imm = 0x1CB0
btl %r13d, %eax
jae 0xca0d
movzbl %r15b, %esi
leaq 0xbf85(%rip), %rdi      # 0x18978
callq 0xf360
cmpb $0x5, %r14b
jne 0xca0d
movzbl %bl, %esi
leaq 0xbf70(%rip), %rdi      # 0x18978
callq 0xf360
movl 0xc82d(%rip), %edi      # 0x19240
movswq 0xbf65(%rip), %rdx      # 0x18980
movq 0xc816(%rip), %rax      # 0x19238
movq 0x18(%rax), %r8
movl 0x10(%rax), %r9d
leaq 0xbf51(%rip), %rsi      # 0x18982
xorl %ecx, %ecx
callq 0x4060
incb 0xc81e(%rip)            # 0x1925c
leaq 0xc803(%rip), %rdi      # 0x19248
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf2e8
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/network.cpp
// Function: Network::send_line(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void Network::send_line(const string &s, const bool chat)
{
	send_buffer.clear();
	if(chat)
		send_buffer.add((unsigned char)MID_SAY_CHAT);
	else
		send_buffer.add((unsigned char)MID_SAY_ALOUD);
	send_buffer.add(cur_id);
	if(s.size() <= MAXIMUM_STR_LEN)	
		send_buffer.add(s);
	else
		send_buffer.add(s.substr(0, low_bound(s, MAXIMUM_STR_LEN)));
	do_send();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0xbf06(%rip), %r15      # 0x18978
movq %r15, %rdi
callq 0xf34c
xorb $0x1, %r14b
movzbl %r14b, %eax
leal 0x4(,%rax,2), %esi
movq %r15, %rdi
callq 0xf360
movzwl 0xc7c0(%rip), %esi      # 0x19258
movq %r15, %rdi
callq 0xf374
cmpq $0x15e, 0x8(%rbx)       # imm = 0x15E
ja 0xcabb
leaq 0xbec7(%rip), %rdi      # 0x18978
movq %rbx, %rsi
callq 0xf39e
jmp 0xcb05
movq %rbx, %rdi
movl $0x15e, %esi            # imm = 0x15E
callq 0xfa68
movswq %ax, %rcx
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x43c0
leaq 0xbe94(%rip), %rdi      # 0x18978
movq %r14, %rsi
callq 0xf39e
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb05
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43a0
movl 0xc735(%rip), %edi      # 0x19240
movswq 0xbe6d(%rip), %rdx      # 0x18980
movq 0xc71e(%rip), %rax      # 0x19238
movq 0x18(%rax), %r8
movl 0x10(%rax), %r9d
leaq 0xbe59(%rip), %rsi      # 0x18982
xorl %ecx, %ecx
callq 0x4060
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb57
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43a0
movq %rbx, %rdi
callq 0x4670
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/network.cpp
// Function: Network::send_spawn(unsigned char)
void Network::send_spawn(const unsigned char newclass)
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_SPAWN_AXN);
	send_buffer.add(cur_id);
	send_buffer.add(newclass);
	do_send();	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0xbe09(%rip), %r14      # 0x18978
movq %r14, %rdi
callq 0xf34c
movq %r14, %rdi
movl $0x8, %esi
callq 0xf360
movzwl 0xc6cd(%rip), %esi      # 0x19258
movq %r14, %rdi
callq 0xf374
movq %r14, %rdi
movl %ebx, %esi
callq 0xf360
movl 0xc69d(%rip), %edi      # 0x19240
movswq 0xbdd5(%rip), %rdx      # 0x18980
movq 0xc686(%rip), %rax      # 0x19238
movq 0x18(%rax), %r8
movl 0x10(%rax), %r9d
leaq 0xbdc1(%rip), %rsi      # 0x18982
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %rbp
jmp 0x4060
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/network.cpp
// Function: Network::send_switch()
void Network::send_switch()
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_TEAM_SWITCH);
	send_buffer.add(cur_id);
	do_send();	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xbd9f(%rip), %rbx      # 0x18978
movq %rbx, %rdi
callq 0xf34c
movq %rbx, %rdi
movl $0x9, %esi
callq 0xf360
movzwl 0xc663(%rip), %esi      # 0x19258
movq %rbx, %rdi
callq 0xf374
movl 0xc63d(%rip), %edi      # 0x19240
movswq 0xbd75(%rip), %rdx      # 0x18980
movq 0xc626(%rip), %rax      # 0x19238
movq 0x18(%rax), %r8
movl 0x10(%rax), %r9d
leaq 0xbd61(%rip), %rsi      # 0x18982
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4060
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/network.cpp
// Function: Network::send_teami_req()
void Network::send_teami_req()
{
	send_buffer.clear();
	send_buffer.add((unsigned char)MID_TEAM_INFO);
	send_buffer.add(cur_id);
	do_send();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xbd3d(%rip), %rbx      # 0x18978
movq %rbx, %rdi
callq 0xf34c
movq %rbx, %rdi
movl $0x5, %esi
callq 0xf360
movzwl 0xc601(%rip), %esi      # 0x19258
movq %rbx, %rdi
callq 0xf374
movl 0xc5db(%rip), %edi      # 0x19240
movswq 0xbd13(%rip), %rdx      # 0x18980
movq 0xc5c4(%rip), %rax      # 0x19238
movq 0x18(%rax), %r8
movl 0x10(%rax), %r9d
leaq 0xbcff(%rip), %rsi      # 0x18982
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4060
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/settings.cpp
// Function: Config::save_msg_memory()
void Config::save_msg_memory()
{
	ofstream cmfile((confdir_str + "chatmemory").c_str());
	if(stored_msgs)
	{
		if(!cmfile)
			cerr << "Warning: failed to save chat memory." << endl;
		else
		{
			while(prev_strs.size() > (unsigned int)stored_msgs)
				prev_strs.erase(prev_strs.begin());
			while(!prev_strs.empty())
			{
				cmfile << prev_strs.front() << endl;
				prev_strs.erase(prev_strs.begin());
			}
		}
	}
	// else opening the file causes it to be emptied
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0xb69a(%rip), %rsi      # 0x19540
movq 0xb69b(%rip), %rdx      # 0x19548
addq %rsi, %rdx
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x731c
leaq 0x2cbf(%rip), %rsi      # 0x10b82
movq %rbx, %rdi
callq 0x46f0
movq -0x38(%rbp), %rsi
leaq -0x238(%rbp), %rdi
movl $0x10, %edx
callq 0x43f0
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xdef5
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43a0
cmpw $0x0, 0x94cf(%rip)      # 0x173cc
je 0xdf5e
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x218(%rbp,%rax)
je 0xdfa2
movq 0x90d1(%rip), %rbx      # 0x16ff0
leaq 0x2c67(%rip), %rsi      # 0x10b8d
movl $0x24, %edx
movq %rbx, %rdi
callq 0x4420
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq 0x909f(%rip), %rdi      # 0x16ff0
callq 0x4040
movq %rax, %rdi
callq 0x4250
movq 0x9053(%rip), %rax      # 0x16fb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x230(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x238(%rbp,%rcx)
callq 0x4300
leaq -0x140(%rbp), %rdi
callq 0x4140
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9edf(%rip), %rbx      # 0x17e88
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
movswq 0x940d(%rip), %rcx      # 0x173cc
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0xdfd0
movq %rbx, %rdi
callq 0x9808
jmp 0xdfa9
leaq -0x238(%rbp), %r14
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
je 0xdf5e
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x4420
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4250
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x9808
jmp 0xdfd7
jmp 0xe02c
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xe05b
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x43a0
jmp 0xe05b
jmp 0xe04c
jmp 0xe04c
jmp 0xe04c
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x4550
movq %rbx, %rdi
callq 0x4670
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/settings.cpp
// Function: Config::do_aliasing(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Config::do_aliasing(string &s)
{
	size_t i;
	for(map<string,string>::iterator it = aliases.begin(); it != aliases.end(); ++it)
	{
		if((i = s.find(it->first)) != string::npos)
		{
			s.replace(i, it->first.size(), it->second);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xb440(%rip), %r14      # 0x19578
leaq 0xb429(%rip), %r15      # 0x19568
cmpq %r15, %r14
je 0xe16f
movq %rdi, %rbx
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4660
cmpq $-0x1, %rax
jne 0xe17a
movq %r14, %rdi
callq 0x4270
movq %rax, %r14
cmpq %r15, %rax
jne 0xe147
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%r14), %rdx
movq 0x40(%r14), %rcx
movq 0x48(%r14), %r8
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4410
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/view.cpp
// Function: (anonymous namespace)::draw_titles()
void draw_titles()
{
	char len;
	char *pos = &(viewbuffer[VIEWSIZE*VIEWSIZE*2+1]);
	char x, y;
	char syms;
	for(char num = viewbuffer[VIEWSIZE*VIEWSIZE*2]; num > 0; --num)
	{
		y = *(pos+1); // pos&pos+1 are x/y pair, string begins at pos+2.
		len = strlen(pos+2);
		// If we are alive, don't draw any title coming to the center (that
		// would be our OWN title)
		if(*pos != VIEWSIZE/2 || y != VIEWSIZE/2 || !ClassCPV::im_alive())
		{
			// x-position might need shifting so the string doesn't go over the edge:
			syms = num_syms(string(pos+2));
			x = *pos - syms/2;
			if(x < 0)
				x = 0;
			else if(x + syms > VIEWSIZE)
				x = VIEWSIZE - syms;
			Base::print_str(pos+2, TITLE_CPAIR, x, y, VIEW_WIN);
		}
		pos += len+3; // lenght of string + '\0' + 2 chars
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movb 0xb034(%rip), %r13b     # 0x19ae2
testb %r13b, %r13b
jle 0xeba4
leaq -0x50(%rbp), %r12
incb %r13b
leaq 0xb01e(%rip), %rbx      # 0x19ae3
movb 0x1(%rbx), %r15b
leaq 0x2(%rbx), %rdi
movq %rdi, -0x40(%rbp)
callq 0x41b0
movq %rax, %r14
movb (%rbx), %al
xorb $0xb, %al
movb %r15b, -0x29(%rbp)
xorb $0xb, %r15b
orb %al, %r15b
jne 0xeaf7
callq 0x7861
testb %al, %al
jne 0xeb8c
movq %r14, -0x38(%rbp)
movq %r12, -0x60(%rbp)
movq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x41b0
leaq (%rax,%r15), %rdx
leaq -0x60(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x8912
movq %r14, %rdi
callq 0xf89c
movl %eax, %r14d
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xeb3e
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43a0
movzwl %r14w, %ecx
movb (%rbx), %al
movsbl %cl, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
shrl %edx
subb %dl, %al
js 0xeb65
movzbl %al, %edx
addl %edx, %ecx
cmpl $0x18, %ecx
jl 0xeb67
movb $0x17, %al
subb %r14b, %al
jmp 0xeb67
xorl %eax, %eax
movsbl %al, %edx
movsbl -0x29(%rbp), %ecx
movq %r15, %rdi
movl $0x6a, %esi
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x68af
leaq -0x50(%rbp), %r12
movq -0x38(%rbp), %r14
movsbq %r14b, %rax
addq %rax, %rbx
addq $0x3, %rbx
decb %r13b
cmpb $0x1, %r13b
jg 0xeac5
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xebcb
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x43a0
movq %rbx, %rdi
callq 0x4670
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/client/view.cpp
// Function: diff_titles()
void diff_titles()
{
	// cf. "draw_titles()"
	char *pos = &(viewbuffer[VIEWSIZE*VIEWSIZE*2+1]);
	string s = "";
	for(char num = viewbuffer[VIEWSIZE*VIEWSIZE*2]; num > 0; --num)
	{
		if(*pos != VIEWSIZE/2 || *(pos+1) != VIEWSIZE/2 || !ClassCPV::im_alive())
		{
			s += (pos+2);
			s += ", ";
		}
		pos += strlen(pos+2)+3;
	}
	if(!s.empty())
		s.erase(s.size()-2);
	s.insert(0, "Titles: ");
	add_to_chat(s, "", T_NO_TEAM);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x154e(%rip), %rdx      # 0x10479
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x8912
movb 0xaba4(%rip), %r12b     # 0x19ae2
testb %r12b, %r12b
jle 0xef9f
incb %r12b
leaq 0xab96(%rip), %r13      # 0x19ae3
leaq -0x48(%rbp), %rbx
leaq 0x1c5b(%rip), %r14      # 0x10bb3
cmpb $0xb, (%r13)
jne 0xef6f
cmpb $0xb, 0x1(%r13)
jne 0xef6f
callq 0x7861
testb %al, %al
jne 0xef86
leaq 0x2(%r13), %rsi
movq %rbx, %rdi
callq 0x46f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x46f0
leaq 0x2(%r13), %rdi
callq 0x41b0
addq %rax, %r13
addq $0x3, %r13
decb %r12b
cmpb $0x1, %r12b
jg 0xef58
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0xefc2
leaq -0x2(%rcx), %rdx
cmpq $0x1, %rcx
je 0xf042
movq %rdx, -0x40(%rbp)
movq -0x48(%rbp), %rax
movb $0x0, (%rax,%rdx)
leaq 0x1bed(%rip), %rcx      # 0x10bb6
leaq -0x48(%rbp), %rdi
movl $0x8, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x4410
leaq -0x58(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x148e(%rip), %rdx      # 0x10479
leaq -0x68(%rbp), %rdi
movq %rdx, %rsi
callq 0x8912
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x3, %edx
callq 0xa733
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0xf01e
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43a0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0xf033
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b94(%rip), %rdi      # 0x10bdd
leaq 0x1b79(%rip), %rsi      # 0x10bc9
xorl %eax, %eax
callq 0x4570
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0xf078
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43a0
jmp 0xf078
jmp 0xf075
jmp 0xf075
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0xf08d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43a0
movq %rbx, %rdi
callq 0x4670
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/common/netutils.cpp
// Function: SerialBuffer::add(unsigned short)
void SerialBuffer::add(const unsigned short sh)
{
	// make sure we write big-endian:
	unsigned short conv = htons(sh);
	// break it up to chars (this, IMO, is clean if inefficient):
	unsigned char b = conv & 0xFF;
	add(b);
	add((b = (conv >> 8) & 0xFF));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
rolw $0x8, %ax
movq (%rdi), %rcx
movb %al, (%rcx)
movq (%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rdi)
incw 0x8(%rdi)
movb %ah, 0x1(%rcx)
incq (%rdi)
incw 0x8(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/common/netutils.cpp
// Function: SerialBuffer::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void SerialBuffer::add(const string &str)
{
	copy(str.begin(), str.end(), pos);
	pos += str.size();
	*pos = '\0';
	++pos;
	num += str.size()+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0xf3bf
movq (%r14), %rsi
movq (%rbx), %rdi
callq 0x4630
movq 0x8(%r14), %rax
movq (%rbx), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, (%rbx)
movb $0x0, (%rcx,%rax)
incq (%rbx)
movzwl 0x8(%r14), %eax
addw 0x8(%rbx), %ax
incl %eax
movw %ax, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/common/netutils.cpp
// Function: SerialBuffer::write_compressed(char*, unsigned short)
void SerialBuffer::write_compressed(char *buffer, const unsigned short len)
{
	uLongf res_size = BUFFER_SIZE; // actually this is not how much room there is, but
	// we'll never run out of room here anyway.

	// leave room in the beginning for the size short
	compress((Bytef*)(pos+2), &res_size, (Bytef*)buffer, len);
	add((unsigned short)res_size); //NOTE: pos has not been moved, so this writes right before the compressed data
	pos += res_size;
	num += res_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq -0x18(%rbp), %r14
movq $0x800, (%r14)          # imm = 0x800
movq (%rdi), %rdi
addq $0x2, %rdi
movl %edx, %ecx
movq %r14, %rsi
movq %rax, %rdx
callq 0x40c0
movzwl (%r14), %eax
rolw $0x8, %ax
movq (%rbx), %rcx
movb %al, (%rcx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
incw 0x8(%rbx)
movb %ah, 0x1(%rcx)
movq (%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
movl 0x8(%rbx), %ecx
leal 0x1(%rcx), %edx
movw %dx, 0x8(%rbx)
movq (%r14), %rdx
leaq 0x1(%rax,%rdx), %rax
movq %rax, (%rbx)
leal (%rcx,%rdx), %eax
incl %eax
movw %ax, 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lotuskip[P]yuxtapa/common/netutils.cpp
// Function: SerialBuffer::read_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void SerialBuffer::read_str(string &target)
{
	// If we trusted the other end blindly, we could just do:
#if 0
	target.assign(pos);
	pos += target.size()+1;
#endif
	/* But alas, there are mean people out there who would abuse such a hole.
	 * Hence we enforce a maximum length of a string and read carefully
	 * one byte at a time (there might not be any '\0' in the buffer to end the
	 * string!) */
	target.clear();
	// Read (A) at most the maximum string length, (B) at most as much as there
	// is buffer left!
	short bs_read = 0;
	while(bs_read < MAXIMUM_STR_LEN && pos != arr+BUFFER_SIZE)
	{
		if(*pos == '\0')
		{
			++pos;
			break;
		}
		target += *pos;
		++pos;
		++bs_read;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, 0x8(%rsi)
movq (%rsi), %rax
movb $0x0, (%rax)
leaq 0x80a(%rdi), %r15
movw $0x15e, %r12w           # imm = 0x15E
movq (%rbx), %rax
cmpq %r15, %rax
je 0xf4e7
movb (%rax), %cl
testb %cl, %cl
je 0xf4e1
movsbl %cl, %esi
movq %r14, %rdi
callq 0x4310
incq (%rbx)
decw %r12w
jne 0xf4bd
jmp 0xf4e7
incq %rax
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq