LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::test_hit(std::_List_iterator<Player>, char, char, char, char)
bool test_hit(const list<Player>::iterator def, const char tohit,
	char numdies, const char ddie, const char dadd)
{
	Coords loc = def->own_pc->getpos();
	char P = def->cl_props.dv - tohit;
	char R = random()%20;
	if(R >= P || R == 19) // hit
	{
		char dam = dadd;
		while(numdies--)
			dam += 1 + random()%ddie;
		if(R != 19 && R/P < 2) // not critical hit; apply PV
			dam -= def->cl_props.pv;
		def->cl_props.hp -= max(0, int(dam));
		def->needs_state_upd = true;
		add_action_ind(loc, A_HIT);
		return true;
	}
	add_action_ind(loc, A_MISS);
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movb %sil, -0x11(%rbp)
movb %dl, -0x12(%rbp)
movb %cl, -0x13(%rbp)
movb %al, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x1b050
movq 0x138(%rax), %rsi
leaq -0x18(%rbp), %rdi
callq 0x1b190
leaq -0x10(%rbp), %rdi
callq 0x1b050
movsbl 0x148(%rax), %eax
movsbl -0x11(%rbp), %ecx
subl %ecx, %eax
movb %al, -0x19(%rbp)
callq 0x5270
movl $0x14, %ecx
cqto
idivq %rcx
movb %dl, %al
movb %al, -0x1a(%rbp)
movsbl -0x1a(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x5619b
movsbl -0x1a(%rbp), %eax
cmpl $0x13, %eax
jne 0x5628f
movb -0x14(%rbp), %al
movb %al, -0x1b(%rbp)
movb -0x12(%rbp), %al
movb %al, %cl
addb $-0x1, %cl
movb %cl, -0x12(%rbp)
cmpb $0x0, %al
je 0x561d0
callq 0x5270
movsbq -0x13(%rbp), %rcx
cqto
idivq %rcx
addq $0x1, %rdx
movsbq -0x1b(%rbp), %rax
addq %rdx, %rax
movb %al, -0x1b(%rbp)
jmp 0x561a1
movsbl -0x1a(%rbp), %eax
cmpl $0x13, %eax
je 0x56202
movsbl -0x1a(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cltd
idivl %ecx
cmpl $0x2, %eax
jge 0x56202
leaq -0x10(%rbp), %rdi
callq 0x1b050
movsbl 0x149(%rax), %ecx
movsbl -0x1b(%rbp), %eax
subl %ecx, %eax
movb %al, -0x1b(%rbp)
movl $0x0, -0x20(%rbp)
movsbl -0x1b(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x2eb30
movq %rax, -0x40(%rbp)
jmp 0x56223
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x1b050
movl -0x4c(%rbp), %edx
movq -0x48(%rbp), %rdi
movzbl 0x143(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x143(%rax)
callq 0x1b050
movb $0x1, 0x14d(%rax)
leaq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x47f20
jmp 0x5626b
movb $0x1, -0x1(%rbp)
movl $0x1, -0x38(%rbp)
jmp 0x562aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x60460
jmp 0x562be
leaq -0x18(%rbp), %rdi
movl $0x5, %esi
callq 0x47f20
jmp 0x5629f
movb $0x0, -0x1(%rbp)
movl $0x1, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x60460
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5920
nopw (%rax,%rax)
// File: lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::finish_wall_dig(Coords const&)
void finish_wall_dig(const Coords &c)
{
	update_lights_around(c);
	// Need to update BYWALL for neighbours:
	e_Dir dir = D_N;
	Coords cn;
	do {
		cn = c.in(dir);
		Game::curmap->upd_by_wall_flag(cn);
	} while(++dir != D_N);
	event_set.insert(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x50c40
movl $0x0, -0xc(%rbp)
leaq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x60430
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %edx
leaq -0x14(%rbp), %rdi
callq 0x60550
jmp 0x5632b
movl -0x14(%rbp), %eax
movl %eax, -0x10(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x60460
leaq 0x3ba97(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0x2b890
jmp 0x5634f
jmp 0x56351
leaq -0xc(%rbp), %rdi
callq 0x60390
movq %rax, -0x40(%rbp)
jmp 0x56360
movq -0x40(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x56319
movq -0x8(%rbp), %rsi
leaq 0x3cdd4(%rip), %rdi     # 0x93148
callq 0x4a010
movb %dl, -0x49(%rbp)
movq %rax, -0x48(%rbp)
jmp 0x56382
movb -0x49(%rbp), %al
movq -0x48(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movb %al, -0x30(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x60460
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x60460
movq -0x20(%rbp), %rdi
callq 0x5920
nopl (%rax)
// File: lotuskip[P]yuxtapa/server/chores.cpp
// Function: arrow_fall(OwnedEnt const*, Coords const&)
void arrow_fall(const OwnedEnt* arr, const Coords &c)
{
	Tile* tar = Game::curmap->mod_tile(c);
	// Arrow falling on a trap might trigger the trap:
	if((tar->flags & TF_TRAP) && random()%100 < CHANCE_ARROW_TRIG_TRAP)
	{
		list<Trap>::iterator tr_it = any_trap_at(c);
		// Functionality is somewhat different from trigger_trap(...), but we
		// also repeat some functionality here...
		switch(tr_it->get_m())
		{
		case TRAP_WATER:
		case TRAP_ACID:
			add_sound(c, S_SPLASH);
			break;
		case TRAP_LIGHT:
			flash_at(c);
			break;
		case TRAP_BOOBY:
			add_sound(c, S_CREAK);
			// Boobytraps are always destroyed:
			traps.erase(tr_it);
			tar->flags &= ~(TF_TRAP);
			break;
		//case TRAP_TELE: // (detected by nothing happening!)
		case TRAP_FIREB:
			fireball_trigger(c, arr->get_owner(), tr_it->is_seen_by(arr->get_owner()->team));
			break;
		}
	} // trap found there
	else
		add_action_ind(c, A_MISS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x3a701(%rip), %rax     # 0x91dd8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x3d2d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x57814
callq 0x5270
movl $0x64, %ecx
cqto
idivq %rcx
cmpq $0x3c, %rdx
jge 0x57814
movq -0x10(%rbp), %rdi
callq 0x494b0
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3daa0
movq %rax, %rdi
callq 0x3d8b0
movzbl %al, %ecx
movq %rcx, -0x48(%rbp)
subb $0x5, %al
ja 0x57812
movq -0x48(%rbp), %rax
leaq 0x12b93(%rip), %rcx     # 0x6a2e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x48080
jmp 0x57812
movq -0x10(%rbp), %rdi
callq 0x53530
jmp 0x57812
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x48080
leaq -0x28(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3db40
movq -0x28(%rbp), %rsi
leaq 0x3b83e(%rip), %rdi     # 0x92fd8
callq 0x3daf0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
movw %cx, (%rax)
jmp 0x57812
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3d0f0
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3daa0
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3d0f0
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1b050
movq -0x58(%rbp), %rdi
movl 0xac(%rax), %eax
movzbl %al, %esi
callq 0x4d890
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %rsi
movzbl %al, %edx
andl $0x1, %edx
callq 0x57830
jmp 0x57822
movq -0x10(%rbp), %rdi
movl $0x5, %esi
callq 0x47f20
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: lotuskip[P]yuxtapa/server/chores.cpp
// Function: (anonymous namespace)::conditional_blind(Coords const&)
void conditional_blind(const Coords &c)
{
	list<PCEnt>::iterator pc_it = any_pc_at(c);
	// Must be valid PC, not assassin, and not a mind's eye using planewalker:
	if(pc_it != PCs.end() && pc_it->get_owner()->cl != C_ASSASSIN
		&& (pc_it->get_owner()->cl != C_PLANEWALKER || !pc_it->get_owner()->limiter))
	{
		pc_it->get_owner()->turns_without_axn = 0; // being blinded stops "idling"
		pc_it->get_owner()->own_vp->blind();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x49290
movq %rax, -0x10(%rbp)
leaq 0x3aeb0(%rip), %rdi     # 0x93050
callq 0x3d010
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x3cfe0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x41(%rbp)
jne 0x581c7
jmp 0x58258
leaq -0x10(%rbp), %rdi
callq 0x3d040
movq %rax, %rdi
callq 0x3d0f0
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1b050
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x1, 0xb0(%rcx)
movb %al, -0x41(%rbp)
je 0x58258
leaq -0x10(%rbp), %rdi
callq 0x3d040
movq %rax, %rdi
callq 0x3d0f0
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1b050
movq %rax, %rcx
movb $0x1, %al
cmpl $0xa, 0xb0(%rcx)
movb %al, -0x42(%rbp)
jne 0x58252
leaq -0x10(%rbp), %rdi
callq 0x3d040
movq %rax, %rdi
callq 0x3d0f0
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x1b050
cmpb $0x0, 0x130(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x58261
jmp 0x582b2
leaq -0x10(%rbp), %rdi
callq 0x3d040
movq %rax, %rdi
callq 0x3d0f0
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1b050
movw $0x0, 0x12a(%rax)
leaq -0x10(%rbp), %rdi
callq 0x3d040
movq %rax, %rdi
callq 0x3d0f0
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1b050
movq 0xc0(%rax), %rdi
callq 0x42700
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: lotuskip[P]yuxtapa/server/cmds.cpp
// Function: (anonymous namespace)::id_pl_by_nick_part(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
list<Player>::iterator id_pl_by_nick_part(const string &s)
{
	list<Player>::iterator foundit = cur_players.end();
	bool found_several = false;
	for(list<Player>::iterator pit = cur_players.begin();
		pit != cur_players.end(); ++pit)
	{
		if(pit->nick == s) // exact match overrules any partial
			return pit;
		// else check for a partial match:
		if(pit->nick.find(s) != string::npos)
		{
			if(foundit != cur_players.end()) // already found one!
				found_several = true;
			foundit = pit;
		}
	}
	if(found_several) // could not match uniquely
		return cur_players.end();
	return foundit;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x336dd(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
leaq 0x336c9(%rip), %rdi     # 0x90230
callq 0x1b360
movq %rax, -0x8(%rbp)
leaq 0x336b9(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x28(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1b100
testb $0x1, %al
jne 0x5cb96
jmp 0x5cc22
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq %rax, %rdi
addq $0x88, %rdi
movq -0x10(%rbp), %rsi
callq 0x18960
testb $0x1, %al
jne 0x5cbb8
jmp 0x5cbbd
jmp 0x5cc42
leaq -0x8(%rbp), %rdi
callq 0x1b050
movq %rax, %rdi
addq $0x88, %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x5a30
cmpq $-0x1, %rax
je 0x5cc12
leaq 0x33646(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1b100
testb $0x1, %al
jne 0x5cc06
jmp 0x5cc0a
movb $0x1, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x5cc14
leaq -0x8(%rbp), %rdi
callq 0x1b3c0
jmp 0x5cb70
testb $0x1, -0x19(%rbp)
je 0x5cc3a
leaq 0x33601(%rip), %rdi     # 0x90230
callq 0x189f0
movq %rax, -0x8(%rbp)
jmp 0x5cc42
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: lotuskip[P]yuxtapa/server/cmds.cpp
// Function: spawn_bot()
bool spawn_bot()
{
	using namespace Config;
	pid_t pid;
	int i;
	if((pid = vfork()) < 0)
	{
		timed_log("!spawnbot -- error in fork!");
		return true;
	}
	if(!pid)
	{
		// This is the forked bot.
		execl(get_botexe().c_str(), get_botexe().c_str(), NULL);
		_exit(0);
	}
	// Server code continues:
	// It might be that the bot executable doesn't exists, in which
	// case the forked child just exited; check:
	if(waitpid(pid, &i, WNOHANG) == pid && WIFEXITED(i))
	{
		timed_log("!spawnbot -- could not find/run \'mrbrown\' executable!");
		Network::to_chat("Cannot spawn bots! Check configuration.");
		return true;
	}
	// else bot is running and network will handle its connection attempt
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
callq 0x5790
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
jge 0x5d16c
leaq -0x31(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x5930
movq -0xa0(%rbp), %rdx
leaq 0xf918(%rip), %rsi      # 0x6ca22
leaq -0x30(%rbp), %rdi
callq 0x18880
jmp 0x5d115
leaq -0x30(%rbp), %rdi
callq 0x28f60
jmp 0x5d120
leaq -0x30(%rbp), %rdi
callq 0x5a48
leaq -0x31(%rbp), %rdi
callq 0x5590
movb $0x1, -0x1(%rbp)
jmp 0x5d2df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5d15e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5a48
leaq -0x31(%rbp), %rdi
callq 0x5590
jmp 0x5d2ed
cmpl $0x0, -0x8(%rbp)
jne 0x5d1af
callq 0x1efb0
movq %rax, %rdi
callq 0x5200
movq %rax, -0xa8(%rbp)
callq 0x1efb0
movq %rax, %rdi
callq 0x5200
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x5670
xorl %edi, %edi
callq 0x5880
movl -0x8(%rbp), %edi
leaq -0xc(%rbp), %rsi
movl $0x1, %edx
callq 0x53e0
cmpl -0x8(%rbp), %eax
jne 0x5d2db
movl -0xc(%rbp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0x5d2db
leaq -0x69(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x5930
movq -0xb0(%rbp), %rdx
leaq 0xf848(%rip), %rsi      # 0x6ca3e
leaq -0x68(%rbp), %rdi
callq 0x18880
jmp 0x5d201
leaq -0x68(%rbp), %rdi
callq 0x28f60
jmp 0x5d20c
leaq -0x68(%rbp), %rdi
callq 0x5a48
leaq -0x69(%rbp), %rdi
callq 0x5590
leaq -0x91(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x5930
movq -0xb8(%rbp), %rdx
leaq 0xf835(%rip), %rsi      # 0x6ca74
leaq -0x90(%rbp), %rdi
callq 0x18880
jmp 0x5d24d
leaq -0x90(%rbp), %rdi
callq 0x1acd0
jmp 0x5d25b
leaq -0x90(%rbp), %rdi
callq 0x5a48
leaq -0x91(%rbp), %rdi
callq 0x5590
movb $0x1, -0x1(%rbp)
jmp 0x5d2df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5d29c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5a48
leaq -0x69(%rbp), %rdi
callq 0x5590
jmp 0x5d2ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5d2cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5a48
leaq -0x91(%rbp), %rdi
callq 0x5590
jmp 0x5d2ed
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x5920
nopw %cs:(%rax,%rax)
// File: lotuskip[P]yuxtapa/server/cmds.cpp
// Function: drop_a_bot()
bool drop_a_bot()
{
	list<Player>::iterator bit = cur_players.begin();
	if(next_bot(bit))
	{
		Game::remove_player(bit, " dropped.");
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
leaq 0x32f21(%rip), %rdi     # 0x90230
callq 0x1b360
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x247c0
testb $0x1, %al
jne 0x5d32a
jmp 0x5d3b6
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x5930
movq -0x60(%rbp), %rdx
leaq 0x6db3(%rip), %rsi      # 0x640fd
leaq -0x38(%rbp), %rdi
callq 0x18880
jmp 0x5d355
movq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3a100
movq %rax, -0x68(%rbp)
jmp 0x5d368
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5a48
leaq -0x39(%rbp), %rdi
callq 0x5590
movb $0x1, -0x1(%rbp)
jmp 0x5d3ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5d3ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5a48
leaq -0x39(%rbp), %rdi
callq 0x5590
jmp 0x5d3c5
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x5920
nop
// File: lotuskip[P]yuxtapa/server/cmds.cpp
// Function: (anonymous namespace)::total_kills(std::_List_iterator<PlayerStats>)
unsigned long total_kills(const list<PlayerStats>::iterator st)
{
	unsigned long res = 0;
	for(char i = 0; i < MAX_WAY_TO_KILL; ++i)
		res += st->kills[i];
	if(res > st->tks)
		res -= st->tks;
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0xb, %eax
jge 0x5d816
leaq -0x8(%rbp), %rdi
callq 0x1b390
movsbq -0x11(%rbp), %rcx
movq 0x38(%rax,%rcx,8), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movb -0x11(%rbp), %al
addb $0x1, %al
movb %al, -0x11(%rbp)
jmp 0x5d7e8
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x1b390
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq 0x90(%rcx), %rax
jbe 0x5d852
leaq -0x8(%rbp), %rdi
callq 0x1b390
movq 0x90(%rax), %rcx
movq -0x10(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/caller.h
// Function: ococo::caller_t<unsigned short, 3, 4>::~caller_t()
caller_t<T, counter_size, refbase_size>::~caller_t() {
    hts_itr_destroy(iter);
    bam_destroy1(b);
    bam_hdr_destroy(header);

    if (stats != nullptr) {
        delete stats;
    }

    if (return_code == EXIT_SUCCESS && correctly_initialized == true) {
        ococo::info("Ococo successfully finished. Bye.\n");
        ococo::info("%.3f sec; CPU: %.3f sec\n", realtime() - t_real, cputime());
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x8(%rax), %rdi
callq 0x18740
jmp 0x6acf
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1b610
jmp 0x6ade
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1aa50
jmp 0x6aed
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x6b23
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x6b21
movq -0x18(%rbp), %rdi
callq 0xa2b0
movq -0x18(%rbp), %rdi
movl $0x38, %esi
callq 0x45a0
jmp 0x6b23
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x6b98
movq -0x10(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x6b98
leaq 0x71ebb(%rip), %rdi     # 0x789ff
xorl %eax, %eax
callq 0xf5e0
jmp 0x6b4d
callq 0xf6f0
movsd %xmm0, -0x20(%rbp)
jmp 0x6b59
movsd -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd 0x30(%rax), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0xf730
movsd %xmm0, -0x28(%rbp)
jmp 0x6b7c
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
leaq 0x71e95(%rip), %rdi     # 0x78a22
movb $0x2, %al
callq 0xf5e0
jmp 0x6b96
jmp 0x6b98
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x9fe0
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::check_allocation() const
bool stats_t<T, counter_size, refbase_size>::check_allocation() const {
    if (seq_active == nullptr || seq_len == nullptr || seq_stats == nullptr ||
        seq_name == nullptr || seq_comment == nullptr) {
        return false;
    }

    for (int i = 0; i < n_seqs; i++) {
        if (seq_stats[i] == nullptr) {
            return false;
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x9483
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x9483
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x9483
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x9483
movq -0x20(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x9489
movb $0x0, -0x1(%rbp)
jmp 0x94c5
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl (%rcx), %eax
jge 0x94c1
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x94b4
movb $0x0, -0x1(%rbp)
jmp 0x94c5
jmp 0x94b6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9490
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::compress_position_stats(ococo::pos_stats_uncompr_t const&)
T stats_t<T, counter_size, refbase_size>::compress_position_stats(
    const pos_stats_uncompr_t &psu) {
    T psc = 0;

    for (int32_t i = 0; i < 4; i++) {
        psc <<= counter_size;
        psc |= psu.counters[i] & right_full_mask<T, counter_size>();
    }

    psc <<= refbase_size;
    psc |= psu.nt16;

    return psc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movw $0x0, -0xa(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0x9f4b
movzwl -0xa(%rbp), %eax
shll $0x3, %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
callq 0x9f80
movl -0x14(%rbp), %ecx
movzwl %ax, %eax
andl %eax, %ecx
movzwl -0xa(%rbp), %eax
orl %ecx, %eax
movw %ax, -0xa(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x9f09
movzwl -0xa(%rbp), %eax
shll $0x4, %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
movzwl -0xa(%rbp), %eax
orl %ecx, %eax
movw %ax, -0xa(%rbp)
movw -0xa(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::~stats_t()
stats_t<T, counter_size, refbase_size>::~stats_t() {
    if (seq_stats != nullptr) {
        for (int32_t seqid = 0; seqid < n_seqs; seqid++) {
            delete[] seq_stats[seqid];
        }
    }
    delete[] seq_active;
    delete[] seq_len;
    delete[] seq_name;
    delete[] seq_comment;
    delete[] seq_stats;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x28(%rax)
je 0xa312
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl (%rcx), %eax
jge 0xa310
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xa303
movq -0x20(%rbp), %rdi
callq 0x4750
jmp 0xa305
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa2d5
jmp 0xa312
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xa32d
movq -0x28(%rbp), %rdi
callq 0x4750
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0xa348
movq -0x30(%rbp), %rdi
callq 0x4750
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xa3bb
movq -0x38(%rbp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rcx), %rdx
movq %rdx, -0x48(%rbp)
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x40(%rbp)
je 0xa3a6
movq -0x40(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x58(%rbp)
callq 0x4340
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x40(%rbp)
jne 0xa384
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
shlq $0x5, %rsi
addq $0x8, %rsi
callq 0x4b30
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0xa42e
movq -0x60(%rbp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rcx), %rdx
movq %rdx, -0x70(%rbp)
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x68(%rbp)
je 0xa419
movq -0x68(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x80(%rbp)
callq 0x4340
movq -0x60(%rbp), %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x68(%rbp)
jne 0xa3f7
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
shlq $0x5, %rsi
addq $0x8, %rsi
callq 0x4b30
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0xa44f
movq -0x88(%rbp), %rdi
callq 0x4750
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: karel-brinda[P]ococo/src/caller.h
// Function: ococo::caller_t<unsigned short, 3, 4>::check_read(int, int, int)
bool caller_t<T, counter_size, refbase_size>::check_read(int32_t seqid,
                                                         int32_t flags,
                                                         int32_t mapq) {
    if ((flags & BAM_FUNMAP) != 0) {
        return false;
    }

    if (!stats->seq_active[seqid]) {
        return false;
    }

    if (mapq < stats->params->min_mapq) {
        return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xa48a
movb $0x0, -0x1(%rbp)
jmp 0xa4c7
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rcx
testb $0x1, (%rax,%rcx)
jne 0xa4a6
movb $0x0, -0x1(%rbp)
jmp 0xa4c7
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
movq 0x20(%rcx), %rcx
movq 0x30(%rcx), %rcx
cmpl 0x1b0(%rcx), %eax
jge 0xa4c3
movb $0x0, -0x1(%rbp)
jmp 0xa4c7
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::increment(unsigned short, unsigned char)
T stats_t<T, counter_size, refbase_size>::increment(T psc, nt4_t nt4) {
    assert(0 <= nt4 && nt4 < 4);

    pos_stats_uncompr_t psu;
    decompress_position_stats(psc, psu);

    if (psu.counters[nt4] == right_full_mask<uint16_t, counter_size>()) {
        psu.counters[0] >>= 1;
        psu.counters[1] >>= 1;
        psu.counters[2] >>= 1;
        psu.counters[3] >>= 1;
    }

    psu.counters[nt4]++;

    return compress_position_stats(psu);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movw %di, %cx
movw %cx, -0x2(%rbp)
movb %al, -0x3(%rbp)
movzbl -0x3(%rbp), %edx
xorl %eax, %eax
xorl %ecx, %ecx
cmpl %edx, %ecx
movb %al, -0x1d(%rbp)
jg 0xa501
movzbl -0x3(%rbp), %eax
cmpl $0x4, %eax
setl %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0xa50a
jmp 0xa50c
jmp 0xa52b
leaq 0x6e5af(%rip), %rdi     # 0x78ac2
leaq 0x6de78(%rip), %rsi     # 0x78392
movl $0x273, %edx            # imm = 0x273
leaq 0x6e5b0(%rip), %rcx     # 0x78ad6
callq 0x4360
leaq -0x1c(%rbp), %rsi
movzwl -0x2(%rbp), %edi
callq 0xac80
movzbl -0x3(%rbp), %eax
movl -0x18(%rbp,%rax,4), %eax
movl %eax, -0x24(%rbp)
callq 0x9f80
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jne 0xa575
movl -0x18(%rbp), %eax
sarl %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
sarl %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
sarl %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
sarl %eax
movl %eax, -0xc(%rbp)
movzbl -0x3(%rbp), %eax
movl -0x18(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp,%rax,4)
leaq -0x1c(%rbp), %rdi
callq 0x9ef0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::call_consensus_position(_IO_FILE*, _IO_FILE*, int, long)
int stats_t<T, counter_size, refbase_size>::call_consensus_position(
    FILE *vcf_file, FILE *pileup_file, int32_t seqid, int64_t pos) {
    pos_stats_uncompr_t psu;
    decompress_position_stats(seq_stats[seqid][pos], psu);

    char old_base_nt256;
    get_nucl_nt256(seqid, pos, old_base_nt256);
    // const char new_base_nt256=cons_call_maj(psu);
    const char new_base_nt256 =
        (params->cons_alg[params->strategy])(psu, *params);

    if (old_base_nt256 != new_base_nt256) {
        if (vcf_file != nullptr) {
            print_vcf_substitution(vcf_file, seqid, pos, old_base_nt256,
                                   new_base_nt256, psu);
        }
        params->n_upd += 1;

        set_nucl_nt256(seqid, pos, new_base_nt256);
    }

    if (params->verbose) {
        if (old_base_nt256 == new_base_nt256) {
            if (vcf_file != nullptr) {
                print_vcf_substitution(vcf_file, seqid, pos, old_base_nt256,
                                       new_base_nt256, psu);
            }
        }
    }

    if (pileup_file != nullptr) {
        print_pileup_line(pileup_file, seqid, pos, psu);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x28(%rbp), %rcx
leaq -0x40(%rbp), %rsi
movzwl (%rax,%rcx,2), %edi
callq 0xac80
movq -0x50(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
leaq -0x41(%rbp), %rcx
callq 0xad40
movq -0x50(%rbp), %rcx
movq 0x30(%rcx), %rax
movq 0x30(%rcx), %rdx
movl 0x1ac(%rdx), %edx
movq 0x210(%rax,%rdx,8), %rax
movq 0x30(%rcx), %rsi
leaq -0x40(%rbp), %rdi
callq *%rax
movb %al, -0x42(%rbp)
movsbl -0x41(%rbp), %eax
movsbl -0x42(%rbp), %ecx
cmpl %ecx, %eax
je 0xa681
cmpq $0x0, -0x10(%rbp)
je 0xa657
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
movb -0x41(%rbp), %r8b
leaq -0x40(%rbp), %rax
movsbl %r8b, %r8d
movsbl -0x42(%rbp), %r9d
movq %rax, (%rsp)
callq 0xadb0
movq -0x50(%rbp), %rdi
movq 0x30(%rdi), %rax
movq 0x208(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x208(%rax)
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
leaq -0x42(%rbp), %rcx
callq 0xaf70
movq -0x50(%rbp), %rax
movq 0x30(%rax), %rax
testb $0x1, 0xd8(%rax)
je 0xa6d2
movsbl -0x41(%rbp), %eax
movsbl -0x42(%rbp), %ecx
cmpl %ecx, %eax
jne 0xa6d0
cmpq $0x0, -0x10(%rbp)
je 0xa6ce
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
movb -0x41(%rbp), %r8b
leaq -0x40(%rbp), %rax
movsbl %r8b, %r8d
movsbl -0x42(%rbp), %r9d
movq %rax, (%rsp)
callq 0xadb0
jmp 0xa6d0
jmp 0xa6d2
cmpq $0x0, -0x18(%rbp)
je 0xa6f1
movq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
leaq -0x40(%rbp), %r8
callq 0xb020
xorl %eax, %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::call_consensus(_IO_FILE*, _IO_FILE*)
int stats_t<T, counter_size, refbase_size>::call_consensus(FILE *vcf_file,
                                                           FILE *pileup_file) {
    assert(check_allocation());

    for (int32_t seqid = 0; seqid < n_seqs; seqid++) {
        for (int64_t pos = 0; pos < seq_len[seqid]; pos++) {
            call_consensus_position(vcf_file, pileup_file, seqid, pos);
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x9440
testb $0x1, %al
jne 0xa727
jmp 0xa729
jmp 0xa748
leaq 0x6dc4f(%rip), %rdi     # 0x7837f
leaq 0x6dc5b(%rip), %rsi     # 0x78392
movl $0x17d, %edx            # imm = 0x17D
leaq 0x6e64e(%rip), %rcx     # 0x78d91
callq 0x4360
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl (%rcx), %eax
jge 0xa7ab
movq $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x10(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jge 0xa79e
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
callq 0xa5a0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa762
jmp 0xa7a0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa74f
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::decompress_position_stats(unsigned short, ococo::pos_stats_uncompr_t&)
void stats_t<T, counter_size, refbase_size>::decompress_position_stats(
    T psc, pos_stats_uncompr_t &psu) {
    psu.nt16 = psc & right_full_mask<T, refbase_size>();
    psc >>= refbase_size;

    psu.sum = 0;
    for (int32_t i = 3; i >= 0; i--) {
        psu.counters[i] = psc & right_full_mask<T, counter_size>();
        psu.sum += psu.counters[i];
        psc >>= counter_size;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movq %rsi, -0x10(%rbp)
movzwl -0x2(%rbp), %eax
movl %eax, -0x18(%rbp)
callq 0xad30
movw %ax, %cx
movl -0x18(%rbp), %eax
movzwl %cx, %ecx
andl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movzwl -0x2(%rbp), %eax
sarl $0x4, %eax
movw %ax, -0x2(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x14(%rax)
movl $0x3, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xad21
movzwl -0x2(%rbp), %eax
movl %eax, -0x1c(%rbp)
callq 0x9f80
movl -0x1c(%rbp), %edx
movzwl %ax, %eax
andl %eax, %edx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl %edx, 0x4(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x4(%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movzwl -0x2(%rbp), %eax
sarl $0x3, %eax
movw %ax, -0x2(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xaccf
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::get_nucl_nt256(int, long, char&) const
inline int stats_t<T, counter_size, refbase_size>::get_nucl_nt256(
    int32_t seqid, int64_t pos, char &nt256) const {
    nt256 =
        nt16_nt256[seq_stats[seqid][pos] & right_full_mask<T, refbase_size>()];
    if (nt256 == '=') {
        nt256 = 'N';
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
callq 0xad30
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
andl %ecx, %eax
movslq %eax, %rcx
leaq 0x6ed34(%rip), %rax     # 0x79ac0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0xada8
movq -0x20(%rbp), %rax
movb $0x4e, (%rax)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
// File: karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::set_nucl_nt256(int, long, char const&)
inline int stats_t<T, counter_size, refbase_size>::set_nucl_nt256(
    int32_t seqid, int64_t pos, const char &nt256) {
    nt16_t nt16 = nt256_nt16[static_cast<int>(nt256)];
    T n_psc     = seq_stats[seqid][pos];
    n_psc >>= refbase_size;
    n_psc <<= refbase_size;
    n_psc |= nt16 & right_full_mask<T, refbase_size>();
    seq_stats[seqid][pos] = n_psc;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rdx
leaq 0x6ea10(%rip), %rcx     # 0x799b0
movb (%rcx,%rdx), %cl
movb %cl, -0x21(%rbp)
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x24(%rbp)
movzwl -0x24(%rbp), %eax
sarl $0x4, %eax
movw %ax, -0x24(%rbp)
movzwl -0x24(%rbp), %eax
shll $0x4, %eax
movw %ax, -0x24(%rbp)
movzbl -0x21(%rbp), %eax
movl %eax, -0x34(%rbp)
callq 0xad30
movl -0x34(%rbp), %edx
movw %ax, %cx
movq -0x30(%rbp), %rax
movzwl %cx, %ecx
andl %ecx, %edx
movzwl -0x24(%rbp), %ecx
orl %edx, %ecx
movw %cx, -0x24(%rbp)
movw -0x24(%rbp), %dx
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::print_version()
void ococo::print_version() {
    // clang-format off
    std::cerr <<
           "\n"
           "Program: ococo (Online consensus caller, call cons. from an unsorted SAM/BAM stream)\n"
           "Version: " << OCOCO_VERSION  << "\n"
           "Contact: Karel Brinda <kbrinda@hsph.harvard.edu>\n";
    // clang-format on
    std::cerr << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x7ac95(%rip), %rdi     # 0x89ff0
leaq 0x6a896(%rip), %rsi     # 0x79bf8
callq 0x4580
movq %rax, %rdi
movq 0x7b267(%rip), %rsi     # 0x8a5d8
callq 0x4580
movq %rax, %rdi
leaq 0x6a8d8(%rip), %rsi     # 0x79c58
callq 0x4580
movq 0x7ac64(%rip), %rdi     # 0x89ff0
movq 0x7ac1d(%rip), %rsi     # 0x89fb0
callq 0x45b0
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::fatal_error(char const*, ...)
void ococo::fatal_error(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "[ococo:fatal-error]: ");
    vfprintf(stderr, format, args);
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xf3d5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x7abac(%rip), %rax     # 0x89fd0
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
leaq 0x6a856(%rip), %rsi     # 0x79c8b
xorl %eax, %eax
callq 0x4830
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x47b0
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::error(char const*, ...)
void ococo::error(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "[ococo:error]: ");
    vfprintf(stderr, format, args);
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xf495
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x7aaec(%rip), %rax     # 0x89fd0
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
leaq 0x6a7ac(%rip), %rsi     # 0x79ca1
xorl %eax, %eax
callq 0x4830
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x47b0
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::warning(char const*, ...)
void ococo::warning(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "[ococo:warning]: ");
    vfprintf(stderr, format, args);
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xf555
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x7aa2c(%rip), %rax     # 0x89fd0
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
leaq 0x6a6fc(%rip), %rsi     # 0x79cb1
xorl %eax, %eax
callq 0x4830
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x47b0
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::info(char const*, ...)
void ococo::info(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "[ococo]: ");
    vfprintf(stderr, format, args);
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xf615
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x7a96c(%rip), %rax     # 0x89fd0
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
leaq 0x6a64e(%rip), %rsi     # 0x79cc3
xorl %eax, %eax
callq 0x4830
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x47b0
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/misc.cpp
// Function: ococo::file_exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool ococo::file_exists(const std::string &fn) {
    FILE *file;

    file = fopen(fn.c_str(), "r");
    if (file) {
        fclose(file);
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4200
movq %rax, %rdi
leaq 0x6c330(%rip), %rsi     # 0x7b9ef
callq 0x4690
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xf6de
movq -0x18(%rbp), %rdi
callq 0x4590
movb $0x1, -0x1(%rbp)
jmp 0xf6e2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/src/params.cpp
// Function: ococo::params_t::init_default_values()
void ococo::params_t::init_default_values() {
    verbose               = false;
    counters_str          = "ococo32";
    counter_configuration = OCOCO32;
    mode                  = BATCH;
    mode_str              = "batch";
    strategy              = MAJORITY;
    strategy_str          = "majority";
    min_mapq              = default_q;
    min_baseq             = default_Q;
    init_ref_weight       = default_w;
    min_coverage          = default_c;
    majority_threshold    = default_M;

    cons_alg[strategy_t::NO_UPDATES]     = &cons_call_no_updates;
    cons_alg[strategy_t::STOCHASTIC]     = &cons_call_stoch;
    cons_alg[strategy_t::STOCHASTIC_AMB] = &cons_call_stoch_amb;
    cons_alg[strategy_t::MAJORITY]       = &cons_call_maj;
    cons_alg[strategy_t::MAJORITY_AMB]   = &cons_call_maj_amb;

    vcf_file       = nullptr;
    pileup_file    = nullptr;
    fasta_out_file = nullptr;
    sam_file       = nullptr;
    log_file       = nullptr;

    n_upd = 0;

    correctly_initialized = true;
    return_code           = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movb $0x0, 0xd8(%rdi)
addq $0x30, %rdi
leaq 0x6a74a(%rip), %rsi     # 0x79f00
callq 0x47c0
movq -0x10(%rbp), %rdi
movl $0x1, 0x28(%rdi)
movl $0x0, 0x1a8(%rdi)
addq $0x1e8, %rdi            # imm = 0x1E8
leaq 0x6a72a(%rip), %rsi     # 0x79f08
callq 0x47c0
movq -0x10(%rbp), %rdi
movl $0x3, 0x1ac(%rdi)
addq $0x1c8, %rdi            # imm = 0x1C8
leaq 0x6a70f(%rip), %rsi     # 0x79f0e
callq 0x47c0
movq -0x10(%rbp), %rax
movl $0x1, 0x1b0(%rax)
movl $0xd, 0x1b4(%rax)
movl $0x0, 0x1b8(%rax)
movl $0x2, 0x1bc(%rax)
movsd 0x6a4a0(%rip), %xmm0    # 0x79cd8
movsd %xmm0, 0x1c0(%rax)
leaq 0xe99(%rip), %rcx       # 0x106e0
movq %rcx, 0x210(%rax)
leaq 0xebb(%rip), %rcx       # 0x10710
movq %rcx, 0x218(%rax)
leaq 0x100d(%rip), %rcx      # 0x10870
movq %rcx, 0x220(%rax)
leaq 0x110f(%rip), %rcx      # 0x10980
movq %rcx, 0x228(%rax)
leaq 0x1241(%rip), %rcx      # 0x10ac0
movq %rcx, 0x230(%rax)
movq $0x0, 0x180(%rax)
movq $0x0, 0x188(%rax)
movq $0x0, 0x190(%rax)
movq $0x0, 0x198(%rax)
movq $0x0, 0x1a0(%rax)
movq $0x0, 0x208(%rax)
movb $0x1, (%rax)
movl $0x0, 0x4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: karel-brinda[P]ococo/src/consensus.h
// Function: ococo::cons_call_stoch(ococo::pos_stats_uncompr_t const&, ococo::params_t const&)
inline char cons_call_stoch(const pos_stats_uncompr_t &psu,
                            const params_t &params) {
    if (psu.sum == 0) {
        return nt16_nt256[psu.nt16];
    }

    if (psu.nt16 != nt256_nt16[static_cast<uint32_t>('N')]) {
        if (psu.sum < params.min_coverage + params.init_ref_weight) {
            return nt16_nt256[psu.nt16];
        }
    }

    const int32_t prefsum[] = {
        psu.counters[0], psu.counters[0] + psu.counters[1],
        psu.counters[0] + psu.counters[1] + psu.counters[2],
        psu.counters[0] + psu.counters[1] + psu.counters[2] + psu.counters[3]};

    assert(prefsum[3] == psu.sum);

    const int32_t rn = rand() % psu.sum;
    for (int32_t i = 0; i < 4; i++) {
        if (rn < prefsum[i]) {
            return nt4_nt256[i];
        }
    }

    return 'n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x10745
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x69696(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10860
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movzbl 0x696eb(%rip), %ecx     # 0x79e3e
cmpl %ecx, %eax
je 0x10793
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
movl 0x1bc(%rcx), %ecx
movq -0x18(%rbp), %rdx
addl 0x1b8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x10791
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x6964a(%rip), %rax     # 0x79dd0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10860
jmp 0x10793
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x8(%rcx), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x8(%rcx), %eax
movq -0x10(%rbp), %rcx
addl 0xc(%rcx), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x8(%rcx), %eax
movq -0x10(%rbp), %rcx
addl 0xc(%rcx), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jne 0x107f3
jmp 0x10812
leaq 0x6a23d(%rip), %rdi     # 0x7aa37
leaq 0x6a24c(%rip), %rsi     # 0x7aa4d
movl $0x21, %edx
leaq 0x6a250(%rip), %rcx     # 0x7aa5d
callq 0x4360
callq 0x4130
movq -0x10(%rbp), %rcx
cltd
idivl 0x14(%rcx)
movl %edx, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
cmpl $0x4, -0x38(%rbp)
jge 0x1085c
movl -0x34(%rbp), %eax
movslq -0x38(%rbp), %rcx
cmpl -0x30(%rbp,%rcx,4), %eax
jge 0x1084f
movslq -0x38(%rbp), %rcx
leaq 0x696a9(%rip), %rax     # 0x79ef0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x10860
jmp 0x10851
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x10829
movb $0x6e, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)