LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/population.cpp
// Function: Population::speciate()
void Population::speciate(){

	vector<Individual*>::iterator curInd;
	vector<Species*>::iterator spePtr;

	bool accepted;

	for(curInd=individuals.begin(); curInd!=individuals.end(); ++curInd){
		// cout << "spe1" << endl;

		accepted = false;
		if(species.size()==0){
			Species *new_species = new Species(*curInd);
			// cout << "spe2" << endl;

			species.push_back(new_species);
		}
		else{
			// cout << "spe3" << endl;

			for(spePtr=species.begin(); spePtr!=species.end(); ++spePtr){
				// cout << "spe4" << endl;

				accepted = (*spePtr)->add_member(*curInd);
				// cout << "spe5" << endl;

				if(accepted) break;
			}
			if(!accepted){
				// cout << "spe6" << endl;

				Species *new_species = new Species(*curInd);
				species.push_back(new_species);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x50(%rdi), %r14
leaq -0x30(%rbp), %r12
cmpq 0x8(%rbx), %r15
je 0x21ee
movq 0x50(%rbx), %r13
cmpq %r13, 0x58(%rbx)
je 0x2172
cmpq 0x58(%rbx), %r13
je 0x21a5
movq (%r13), %rdi
movq (%r15), %rsi
callq 0x4352
addq $0x8, %r13
testb %al, %al
je 0x2156
jmp 0x21e5
pushq $0x48
popq %rdi
callq 0x10f0
movq %rax, %r13
movq (%r15), %rsi
movq %rax, %rdi
movsd 0x4ecd(%rip), %xmm0     # 0x7058
movaps %xmm0, %xmm1
movsd 0x4eca(%rip), %xmm2     # 0x7060
movsd 0x4eca(%rip), %xmm3     # 0x7068
callq 0x3cfe
jmp 0x21d6
pushq $0x48
popq %rdi
callq 0x10f0
movq %rax, %r13
movq (%r15), %rsi
movq %rax, %rdi
movsd 0x4e9a(%rip), %xmm0     # 0x7058
movaps %xmm0, %xmm1
movsd 0x4e97(%rip), %xmm2     # 0x7060
movsd 0x4e97(%rip), %xmm3     # 0x7068
callq 0x3cfe
movq %r13, -0x30(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x24d6
addq $0x8, %r15
jmp 0x2142
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x21ff
movq %rax, %rbx
pushq $0x48
popq %rsi
movq %r13, %rdi
callq 0x1100
movq %rbx, %rdi
callq 0x1180
nop
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/species.cpp
// Function: Species::get_avg_fitness() const
double Species::get_avg_fitness() const {

	vector<Individual*>::const_iterator indPtr;

	double avg_fitness = 0.;

	for(indPtr=members.begin(); indPtr!=members.end(); indPtr++){

		avg_fitness += (*indPtr)->adjusted_fitness;
	}

	return avg_fitness;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0x4350
movq (%rax), %rdx
addsd 0x8(%rdx), %xmm0
addq $0x8, %rax
jmp 0x433d
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/species.cpp
// Function: Species::calc_n_offspring()
int Species::calc_n_offspring(){
	vector<Individual*>::iterator indPtr;

	n_offspring = 0;

	double double_offspring = 0.;

	for(indPtr=members.begin(); indPtr!=members.end(); indPtr++){

		double_offspring += (*indPtr)->est_n_offspring;
	}

	n_offspring = (int) floor(double_offspring);

	return n_offspring;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0x43af
movq (%rax), %rdx
addsd 0x10(%rdx), %xmm0
addq $0x8, %rax
jmp 0x439c
callq 0x1160
cvttsd2si %xmm0, %eax
movl %eax, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/species.cpp
// Function: Species::~Species()
Species::~Species(){

	vector<Individual*>::iterator indPtr;

	rep = NULL;

	for(indPtr=members.begin(); indPtr!=members.end(); indPtr++){

	 	*indPtr = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $0x0, 0x18(%rdi)
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
je 0x4608
andq $0x0, (%rax)
addq $0x8, %rax
jmp 0x45f8
popq %rbp
jmp 0x2508
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/individual.cpp
// Function: Individual::Individual(int*, int*, int*, int*)
Individual::Individual(int *isize, int *osize, int *gen, int *innnum){ //, vector<Node*> *allnodes, vector<Connection*> *allconnections){

	in_size = new int;
	in_size = isize;
	out_size = new int;
	out_size = osize;

	
	generation = new int;
	generation = gen;

	innov_num = new int;
	innov_num = innnum;


	fitness = 0.;

	// all_nodes = allnodes;
	// all_connections = allconnections;


	Node *new_node;

	for(int i=0; i<*in_size; i++){
		new_node = new Node(INPUT, i, *generation);
		
		// all_nodes->push_back(new_node);
		
		inputs.push_back(new_node);
		nodes.push_back(new_node);
	}

	for(int i=0; i<*out_size; i++){
		new_node = new Node(OUTPUT, *in_size+i, *generation);
		// all_nodes->push_back(new_node);

		outputs.push_back(new_node);
		nodes.push_back(new_node);

	}

	// mutate_add_connection();

	// mutate_add_connection();
	// mutate_add_node();

	// mutate_add_connection();
	// mutate_add_node();
	// mutate_add_connection();
	// mutate_add_node();



}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
leaq 0x18(%rdi), %rbx
leaq 0x30(%rdi), %rax
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movq %rsi, 0x80(%rdi)
movq %rdx, 0x88(%rdi)
movq %rcx, 0x90(%rdi)
movq %r8, 0x78(%rdi)
andq $0x0, (%rdi)
leaq 0x48(%rdi), %rax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
leaq -0x30(%rbp), %r13
cmpl (%rsi), %r14d
jge 0x5420
pushq $0x48
popq %rdi
callq 0x10f0
movq %rax, %r12
movq 0x90(%r15), %rax
movl (%rax), %ecx
movq %r12, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x610a
movq %r12, -0x30(%rbp)
movq -0x40(%rbp), %rdi
movq %r13, %rsi
callq 0x226c
movq %rbx, %rdi
movq %r13, %rsi
callq 0x226c
incl %r14d
movq 0x80(%r15), %rsi
jmp 0x53d3
xorl %r14d, %r14d
leaq -0x30(%rbp), %r12
movq 0x88(%r15), %rax
cmpl (%rax), %r14d
jge 0x547e
pushq $0x48
popq %rdi
callq 0x10f0
movq %rax, %r13
movq 0x80(%r15), %rax
movq 0x90(%r15), %rcx
movl (%rax), %edx
addl %r14d, %edx
movl (%rcx), %ecx
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0x610a
movq %r13, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x226c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x226c
incl %r14d
jmp 0x5427
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
pushq $0x48
popq %rsi
movq %r13, %rdi
jmp 0x54a1
movq %rax, %r14
pushq $0x48
popq %rsi
movq %r12, %rdi
callq 0x1100
jmp 0x54ad
jmp 0x54aa
movq %rax, %r14
addq $0x60, %r15
movq %r15, %rdi
callq 0x2584
movq -0x38(%rbp), %rdi
callq 0x2546
movq -0x40(%rbp), %rdi
callq 0x2546
movq %rbx, %rdi
callq 0x2546
movq %r14, %rdi
callq 0x1180
nop
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/individual.cpp
// Function: Individual::activate(std::vector<double, std::allocator<double>>)
bool Individual::activate(vector<double> input){

	if(input.size() != inputs.size()){
		cout << "invalid input size" << endl;
		return false;
	}

	for(int i=0; i<inputs.size(); i++){
		inputs[i]->firing = input[i];
		inputs[i]->activated = true;
	}

	// messy, but it looks like it's the way to go 
	// (see FAQ: https://www.cs.ucf.edu/~kstanley/neat.html#FAQ1)
	int max_loops = 20; 
	int loops = 0;
	bool outputs_activated = false;
	while(!outputs_activated || loops<max_loops){
		outputs_activated = true;
		for(int i=*in_size; i<nodes.size(); i++){
			nodes[i]->activate();
			
			if(nodes[i]->node_type==OUTPUT && !nodes[i]->activated){
				outputs_activated = false;
			}
		}
		loops++;

	}

	if(!outputs_activated) {
		cout<<"activation pb" << endl;
		return false;
	}
	else return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rax
movq 0x8(%rsi), %r8
subq %rax, %r8
movq 0x30(%rdi), %rcx
movq 0x38(%rdi), %r15
subq %rcx, %r15
cmpq %r15, %r8
movq %r8, -0x30(%rbp)
jne 0x57dc
movq %rdi, %rbx
movq %r15, %rdx
sarq $0x3, %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x580d
movsd (%rax,%rsi,8), %xmm0
movq (%rcx,%rsi,8), %rdi
movsd %xmm0, 0x10(%rdi)
movb $0x1, 0xc(%rdi)
incq %rsi
jmp 0x57c0
movq 0x57f5(%rip), %rdi      # 0xafd8
leaq 0x1a1e(%rip), %rsi      # 0x7208
callq 0x10e0
movq %rax, %rdi
callq 0x1070
cmpq %r15, -0x30(%rbp)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpl $0x14, %r12d
setae %al
testb %al, %r13b
jne 0x57f7
movq 0x18(%rbx), %rax
movq 0x80(%rbx), %rcx
movslq (%rcx), %r14
movb $0x1, %r13b
movq 0x20(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x585f
movq (%rax,%r14,8), %rdi
callq 0x6142
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rcx
cmpl $0x1, (%rcx)
jne 0x585a
andb 0xc(%rcx), %r13b
incq %r14
jmp 0x5830
incl %r12d
jmp 0x5813
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/individual.cpp
// Function: Individual::get_outputs()
vector<double> Individual::get_outputs(){
	
	vector<double> out;

	vector<Node*>::iterator nodePtr;
	for(nodePtr=outputs.begin(); nodePtr != outputs.end(); ++nodePtr){

		out.push_back((*nodePtr)->firing);

	}
	return out;


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x48(%rsi), %r15
cmpq 0x50(%r14), %r15
je 0x589e
movq (%r15), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x5e9c
addq $0x8, %r15
jmp 0x5883
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2914
movq %r14, %rdi
callq 0x1180
nop
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/individual.cpp
// Function: Individual::mutate(std::vector<Node*, std::allocator<Node*>>*, std::vector<Connection*, std::allocator<Connection*>>*)
void Individual::mutate(vector<Node*> *all_nodes, vector<Connection*> *all_connections){

	if(randdouble(0.,1.)<0.8){
		// cout << "mu1" <<endl;
		mutate_weights();
	}
	if(randdouble(0.,1.)<0.03){
		// cout << "mu2" <<endl;

		mutate_add_node(all_nodes, all_connections);
	}
	if(randdouble(0.,1.)<0.05){
		// cout << "mu3" <<endl;

		mutate_add_connection(all_nodes, all_connections);
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movsd 0x1755(%rip), %xmm1     # 0x7058
xorpd %xmm0, %xmm0
callq 0x5ec5
movsd 0x18cc(%rip), %xmm1     # 0x71e0
ucomisd %xmm0, %xmm1
jbe 0x5922
movq %r14, %rdi
callq 0x598c
movsd 0x172e(%rip), %xmm1     # 0x7058
xorpd %xmm0, %xmm0
callq 0x5ec5
movsd 0x18ad(%rip), %xmm1     # 0x71e8
ucomisd %xmm0, %xmm1
jbe 0x594c
movq %r14, %rdi
movq %r15, %rsi
callq 0x59d6
movsd 0x1704(%rip), %xmm1     # 0x7058
xorpd %xmm0, %xmm0
callq 0x5ec5
movsd 0x188b(%rip), %xmm1     # 0x71f0
ucomisd %xmm0, %xmm1
jbe 0x5980
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5c24
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/individual.cpp
// Function: Individual::mutate_weights()
void Individual::mutate_weights(){
	vector<Connection*>::iterator conPtr;

	for(conPtr=connections.begin(); conPtr != connections.end(); ++conPtr){

		// uniform perturbation
		if(randdouble(0.,1.)>0.1){
			(*conPtr)->perturb_weight();
		}
		// assign new random value
		else{
			(*conPtr)->reset_weight();
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %r14
cmpq 0x68(%rbx), %r14
je 0x59d0
xorpd %xmm0, %xmm0
movsd 0x16ac(%rip), %xmm1     # 0x7058
callq 0x5ec5
ucomisd 0x1847(%rip), %xmm0     # 0x7200
movq (%r14), %rdi
jbe 0x59c5
callq 0x630a
jmp 0x59ca
callq 0x62e0
addq $0x8, %r14
jmp 0x599a
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/individual.cpp
// Function: Individual::~Individual()
Individual::~Individual(){

	vector<Node*>::iterator curNode;
	vector<Connection*>::iterator curCon;

	for(curNode=nodes.begin(); curNode!=nodes.end(); ++curNode){
		delete *curNode;
	}

	for(curCon=connections.begin(); curCon!=connections.end(); ++curCon){
		delete *curCon;
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x18(%rdi), %rax
movq %rax, -0x30(%rbp)
movq 0x18(%rdi), %r13
pushq $0x48
popq %r15
cmpq 0x20(%r14), %r13
je 0x5e23
movq (%r13), %r12
testq %r12, %r12
je 0x5e12
movq %r12, %rdi
callq 0x61ec
movq %r12, %rdi
movq %r15, %rsi
callq 0x1100
addq $0x8, %r13
jmp 0x5dfb
leaq 0x60(%r14), %r15
movq 0x60(%r14), %rbx
pushq $0x28
popq %r12
cmpq 0x68(%r14), %rbx
je 0x5e56
movq (%rbx), %r13
testq %r13, %r13
je 0x5e45
movq %r13, %rdi
callq 0x635a
movq %r13, %rdi
movq %r12, %rsi
callq 0x1100
addq $0x8, %rbx
jmp 0x5e2f
movq %r15, %rdi
callq 0x2584
leaq 0x48(%r14), %rdi
callq 0x2546
addq $0x30, %r14
movq %r14, %rdi
callq 0x2546
movq -0x30(%rbp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2546
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/node.cpp
// Function: Node::activate()
bool Node::activate(){

	firing = 0.;

	vector<Connection*>::iterator conPtr;

	bool any_active_input_con = false;
	bool any_active_input_node = false;
	for(conPtr=in_connections.begin(); conPtr != in_connections.end(); ++conPtr){

		if((*conPtr)->is_active){
			any_active_input_con = true;
			if(((*conPtr)->in_node->activated)){
				any_active_input_node = true;
			// 	return false;
			}
		}
	}
	if(!any_active_input_con){
		// cout << "node not activated" <<endl;
		return false; 
	}

	for(conPtr=in_connections.begin(); conPtr != in_connections.end(); ++conPtr){

		firing += (*conPtr)->in_node->firing * (*conPtr)->weight;
	}
	
	if(any_active_input_node){
		firing = sigmoid(firing);
		activated = true;

	}


	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rdx
xorl %ecx, %ecx
movq %rax, %rsi
xorl %r14d, %r14d
cmpq %rdx, %rsi
je 0x617e
movq (%rsi), %rdi
cmpb $0x1, 0x18(%rdi)
jne 0x6178
movq (%rdi), %rdi
orb 0xc(%rdi), %cl
movb $0x1, %r14b
addq $0x8, %rsi
jmp 0x6161
testb $0x1, %r14b
je 0x61bf
xorpd %xmm0, %xmm0
cmpq %rdx, %rax
je 0x61ac
movq (%rax), %rsi
movq (%rsi), %rdi
movsd 0x10(%rdi), %xmm1
mulsd 0x10(%rsi), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rbx)
addq $0x8, %rax
jmp 0x6188
testb $0x1, %cl
je 0x61bf
callq 0x60cc
movsd %xmm0, 0x10(%rbx)
movb $0x1, 0xc(%rbx)
andb $0x1, %r14b
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/samuel500[P]NEAT/connection.cpp
// Function: Connection::Connection(Node*, Node*, int, int)
Connection::Connection(Node *inode, Node *onode, int hist_marking, int creation_gen): hist_marking(hist_marking), creation_gen(creation_gen){

	in_node = new Node;
	in_node = inode;

	out_node = new Node;
	out_node = onode;

	is_active = true;

	in_node->out_connections.push_back(this);
	out_node->in_connections.push_back(this);

	weight = randdouble(-1., 1.);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl %ecx, 0x1c(%rdi)
movl %r8d, 0x20(%rdi)
pushq $0x48
popq %rdi
callq 0x10f0
movq %rax, %r15
movq %rax, %rdi
callq 0x60f4
movq %r12, (%rbx)
pushq $0x48
popq %rdi
callq 0x10f0
movq %rax, %r15
movq %rax, %rdi
callq 0x60f4
movq %r14, 0x8(%rbx)
movb $0x1, 0x18(%rbx)
movq (%rbx), %rdi
addq $0x30, %rdi
leaq -0x28(%rbp), %r14
movq %rbx, (%r14)
movq %r14, %rsi
callq 0x6366
movq 0x8(%rbx), %rdi
addq $0x18, %rdi
movq %rbx, (%r14)
leaq -0x28(%rbp), %rsi
callq 0x6366
movsd 0xfa8(%rip), %xmm0      # 0x7240
movsd 0xdb8(%rip), %xmm1      # 0x7058
callq 0x5ec5
movsd %xmm0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x62b9
movq %rax, %rbx
pushq $0x48
popq %rsi
movq %r15, %rdi
callq 0x1100
movq %rbx, %rdi
callq 0x1180
nop
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/cross_socket.cpp
// Function: Socket::Socket()
Socket::Socket() {
    my_socket = socket(AF_INET, SOCK_STREAM, 0);
    if (my_socket == INVALID_SOCKET) {
        error_code = ErrorCode::CREATE_ERROR;
        return;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc194(%rip), %rax      # 0xf890
movq %rax, (%rdi)
andl $0x0, 0x34(%rdi)
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x3090
movl %eax, 0x8(%rbx)
cmpl $-0x1, %eax
jne 0x371f
movl $0x1, 0x34(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/cross_socket.cpp
// Function: ServerSocket::Accept()
int ServerSocket::Accept() {
#ifdef _WIN32
    your_socket = accept(my_socket, (struct sockaddr*)&your_address, (int *)&your_address_size);
#else
    your_socket = accept(my_socket, (struct sockaddr*)&your_address, &your_address_size);
#endif
    if (your_socket == INVALID_SOCKET) {
        error_code = ErrorCode::ACCEPT_ERROR;
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %edi
leaq 0x20(%rbx), %rsi
leaq 0x30(%rbx), %rdx
callq 0x30d0
movl %eax, %ecx
movl %eax, 0x1c(%rbx)
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x37fd
movl $0x4, 0x34(%rbx)
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/cross_socket.cpp
// Function: ServerSocket::Recv[abi:cxx11]()
std::string ServerSocket::Recv() {
    char buffer[BUFF_SIZE + 5];
    if (recv(your_socket, buffer, BUFF_SIZE, 0) < 0) {
        throw -1;
    }
    return std::string(buffer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rdi, %rbx
movl 0x1c(%rsi), %edi
leaq -0x2010(%rbp), %rsi
movl $0x2000, %edx           # imm = 0x2000
xorl %ecx, %ecx
callq 0x30e0
testq %rax, %rax
js 0x388e
leaq -0x2010(%rbp), %rsi
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x3100
movq %rbx, %rax
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x3160
orl $-0x1, (%rax)
movq 0xc700(%rip), %rsi      # 0xffa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/cross_socket.cpp
// Function: ClientSocket::Connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
int ClientSocket::Connect(std::string ip_address, int port) {
#ifdef _WIN32
#else
    struct hostent* host_info;
    struct in_addr addr;
    if ((host_info = gethostbyname(ip_address.c_str())) == 0) {
        error_code = ErrorCode::CONNECT_ERROR;
        return -2;
    }
    memcpy(&addr, host_info->h_addr_list[0], host_info->h_length);
    ip_address = std::string(inet_ntoa(addr));
#endif
    memset(&your_address, 0, sizeof(your_address));
    your_address.sin_family = AF_INET;
    your_address.sin_port = htons(port);
    your_address.sin_addr.s_addr = inet_addr(ip_address.c_str());

    if (connect(my_socket, (struct sockaddr*)&your_address, sizeof(your_address)) == SOCKET_ERROR) {
        error_code = ErrorCode::CONNECT_ERROR;
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x32f0
testq %rax, %rax
je 0x39a0
movq 0x18(%rax), %rcx
movq (%rcx), %rsi
movslq 0x14(%rax), %rdx
leaq -0x28(%rbp), %r12
movq %r12, %rdi
callq 0x31f0
movl (%r12), %edi
callq 0x3130
leaq -0x48(%rbp), %r12
leaq -0x21(%rbp), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x3100
movq %r14, %rdi
movq %r12, %rsi
callq 0x3320
movq %r12, %rdi
callq 0x3140
leaq 0x20(%rbx), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movw $0x2, 0x20(%rbx)
rolw $0x8, %r15w
movw %r15w, 0x22(%rbx)
movq (%r14), %rdi
callq 0x32a0
movl %eax, 0x24(%rbx)
movl 0x8(%rbx), %edi
pushq $0x10
popq %rdx
movq %r12, %rsi
callq 0x3200
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x39aa
pushq $-0x1
jmp 0x39a2
pushq $-0x2
popq %rax
movl $0x5, 0x34(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/cross_socket.cpp
// Function: ClientSocket::Recv[abi:cxx11]()
std::string ClientSocket::Recv() {
    char buffer[BUFF_SIZE + 5];
    if (recv(my_socket, buffer, BUFF_SIZE, 0) < 0) {
        throw -1;
    }
    return std::string(buffer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rdi, %rbx
movl 0x8(%rsi), %edi
leaq -0x2010(%rbp), %rsi
movl $0x2000, %edx           # imm = 0x2000
xorl %ecx, %ecx
callq 0x30e0
testq %rax, %rax
js 0x3a42
leaq -0x2010(%rbp), %rsi
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x3100
movq %rbx, %rax
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x3160
orl $-0x1, (%rax)
movq 0xc54c(%rip), %rsi      # 0xffa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/cross_library.cpp
// Function: kbhit()
bool kbhit() {
    struct termios oldt, newt;
    int ch;
    int oldf;
    
    tcgetattr(STDIN_FILENO, &oldt);
    newt = oldt;
    newt.c_lflag &= ~(ICANON | ECHO);
    tcsetattr(STDIN_FILENO, TCSANOW, &newt);
    oldf = fcntl(STDIN_FILENO, F_GETFL, 0);
    fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK);
    
    ch = getchar();
    
    tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
    fcntl(STDIN_FILENO, F_SETFL, oldf);
    
    if (ch != EOF) {
        ungetc(ch, stdin);
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
leaq -0x9c(%rbp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x32c0
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x2c(%rbx), %xmm3
leaq -0x60(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm1, 0x10(%rdx)
movaps %xmm2, 0x20(%rdx)
movups %xmm3, 0x2c(%rdx)
andb $-0xb, 0xc(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x3330
pushq $0x3
popq %rsi
xorl %edi, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x31a0
movl %eax, %r15d
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
pushq $0x4
popq %r12
xorl %edi, %edi
movl %r12d, %esi
xorl %eax, %eax
callq 0x31a0
callq 0x3390
movl %eax, %r14d
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3330
xorl %edi, %edi
movl %r12d, %esi
movl %r15d, %edx
xorl %eax, %eax
callq 0x31a0
cmpl $-0x1, %r14d
je 0x3b32
movq 0xc491(%rip), %rax      # 0xffb8
movq (%rax), %rsi
movl %r14d, %edi
callq 0x3060
cmpl $-0x1, %r14d
setne %al
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/cross_library.cpp
// Function: getch()
int getch() {
    struct termios oldattr, newattr;
    int ch;

    tcgetattr( STDIN_FILENO, &oldattr );
    newattr = oldattr;
    newattr.c_lflag &= ~( ICANON | ECHO );
    tcsetattr( STDIN_FILENO, TCSANOW, &newattr );

    ch = getchar();

    tcsetattr( STDIN_FILENO, TCSANOW, &oldattr );

    return ch;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
leaq -0x8c(%rbp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x32c0
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x2c(%rbx), %xmm3
leaq -0x50(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm1, 0x10(%rdx)
movaps %xmm2, 0x20(%rdx)
movups %xmm3, 0x2c(%rdx)
andb $-0xb, 0xc(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x3330
callq 0x3390
movl %eax, %r14d
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3330
movl %r14d, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: Game::DrawPlayerInformation(PlayerInformation const&, int, int)
void Game::DrawPlayerInformation(const PlayerInformation &info, int offset_x, int offset_y) {
    std::cout << Console::white;
    std::cout << Console::GotoXY(X(9 + offset_x), Y(5 + offset_y)) << std::right << std::setw(6) << info.chain_number;
    std::cout << Console::GotoXY(X(9 + offset_x), Y(7 + offset_y)) << std::right << std::setw(6) << info.max_chain_number;
    std::cout << Console::GotoXY(X(9 + offset_x), Y(9 + offset_y)) << std::right << std::setw(6) << info.score;
    std::cout << Console::GotoXY(X(9 + offset_x), Y(12 + offset_y)) << std::right << std::setw(6) << info.obstacle_number_taken;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r12d
movq %rdi, %rbx
movq 0xc008(%rip), %r13      # 0xffc8
leaq 0xc2f5(%rip), %rsi      # 0x102bc
movq %r13, %rdi
callq 0x3c12
leal 0x12(,%r12,2), %r15d
leal 0x5(%r14), %eax
leaq -0x30(%rbp), %r12
movl %r15d, (%r12)
movl %eax, 0x4(%r12)
movq %r13, %rdi
movq %r12, %rsi
callq 0x3c46
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
movl 0x18(%rax,%rdx), %esi
andl %r13d, %esi
movl $0x80, %edi
orl %edi, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
pushq $0x6
popq %rdx
movq %rdx, 0x10(%rax,%rcx)
movl 0x4(%rbx), %esi
movq %rax, %rdi
callq 0x3460
leal 0x7(%r14), %eax
movl %r15d, (%r12)
movl %eax, 0x4(%r12)
movq 0xbf8b(%rip), %rdi      # 0xffc8
movq %r12, %rsi
callq 0x3c46
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl %r13d, %esi
movl $0x80, %edi
orl %edi, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
pushq $0x6
popq %rdx
movq %rdx, 0x10(%rax,%rcx)
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x3460
leal 0x9(%r14), %eax
movl %r15d, (%r12)
movl %eax, 0x4(%r12)
movq 0xbf3f(%rip), %rdi      # 0xffc8
movq %r12, %rsi
callq 0x3c46
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl %r13d, %esi
movl $0x80, %edi
orl %edi, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
pushq $0x6
popq %rdx
movq %rdx, 0x10(%rax,%rcx)
movl (%rbx), %esi
movq %rax, %rdi
callq 0x3460
addl $0xc, %r14d
movl %r15d, (%r12)
movl %r14d, 0x4(%r12)
leaq -0x30(%rbp), %rsi
movq 0xbef0(%rip), %rdi      # 0xffc8
callq 0x3c46
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
andl 0x18(%rax,%rdx), %r13d
movl $0x80, %esi
orl %esi, %r13d
movl %r13d, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
pushq $0x6
popq %rdx
movq %rdx, 0x10(%rax,%rcx)
movl 0xc(%rbx), %esi
movq %rax, %rdi
callq 0x3460
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: Game::Draw(std::shared_ptr<Board> const&, std::shared_ptr<BiPuyo> const&, PlayerInformation const&, int, int)
void Game::Draw(const std::shared_ptr<Board> &board, const std::shared_ptr<BiPuyo> &bipuyo, const PlayerInformation &info, int offset_x, int offset_y) {
    Game::DrawFrame(offset_x, offset_y);
    Game::DrawBoard(board, offset_x, offset_y);
    Game::DrawNextBiPuyo(bipuyo, offset_x, offset_y);
    Game::DrawPlayerInformation(info, offset_x, offset_y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl %ecx, %edi
movl %r8d, %esi
callq 0x3c98
movq %r13, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x3f7c
movq %r12, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x3f8e
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3fa2
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: SingleGame::GameInit()
bool SingleGame::GameInit() {
    Console::ScreenClear();
    std::cout << Console::GotoXY(X(0), Y(0));
    
    // prepare game
    my_bipuyo_generator = std::make_shared<BiPuyoGenerator>(); // single game doesn't need sync seed
    my_board = std::make_shared<Board>();
    my_board->SetNextBiPuyo(my_bipuyo_generator->GenerateBipuyo());
    my_next_bipuyo = my_bipuyo_generator->GenerateBipuyo();
    
    std::cout << "Loading..." << std::endl;
    Console::Sleep(500);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
callq 0x3bca
leaq -0x30(%rbp), %rsi
andq $0x0, (%rsi)
movq 0xbe2a(%rip), %rbx      # 0xffc8
movq %rbx, %rdi
callq 0x3c46
leaq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x5c9b
leaq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x8876
leaq -0x28(%rbp), %rdi
callq 0x6896
movq %r15, %rdi
callq 0x5cb7
leaq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0x8a9a
leaq -0x28(%rbp), %rdi
callq 0x6896
movq 0x20(%r14), %r15
movq 0x10(%r14), %rsi
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x5d00
movq %r15, %rdi
movq %r12, %rsi
callq 0x5cd4
leaq -0x28(%rbp), %rdi
callq 0x6896
movq 0x10(%r14), %rsi
leaq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x5d00
addq $0x30, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x81ec
leaq -0x28(%rbp), %rdi
callq 0x6896
leaq 0x5f55(%rip), %rsi      # 0xa190
movq %rbx, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3150
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x3bba
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: SingleGame::GameResult()
void SingleGame::GameResult() {
    while (kbhit()) getch();
    Console::ScreenClear();
    std::cout << Console::white << Console::GotoXY(0, 0)
        << "게임 끝" << std::endl
        << "점수: " << my_info.score << std::endl
        << "최대 연쇄: " << my_info.max_chain_number << std::endl
        << "메인으로 돌아가려면 아무키나 누르세요" << std::endl;
    getch();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3a7c
testb %al, %al
je 0x43e3
callq 0x3b49
jmp 0x43d3
callq 0x3bca
movq 0xbbd9(%rip), %rdi      # 0xffc8
leaq 0xbec6(%rip), %rsi      # 0x102bc
callq 0x3c12
leaq -0x10(%rbp), %rsi
andq $0x0, (%rsi)
movq %rax, %rdi
callq 0x3c46
leaq 0x5d89(%rip), %rsi      # 0xa19b
movq %rax, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3150
leaq 0x5de5(%rip), %rsi      # 0xa20e
movq %rax, %rdi
callq 0x3280
movl 0x40(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x5dcf(%rip), %rsi      # 0xa21a
movq %rax, %rdi
callq 0x3280
movl 0x48(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x5d39(%rip), %rsi      # 0xa1a6
movq %rax, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3150
callq 0x3b49
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: VSGame::GameInit()
bool VSGame::GameInit() {
    Console::ScreenClear();
    std::cout << Console::GotoXY(X(0), Y(0));

    // prepare game
    int seed = time(NULL);
    my_bipuyo_generator = std::make_shared<BiPuyoGenerator>(seed);
    my_board = std::make_shared<Board>();
    my_board->SetNextBiPuyo(my_bipuyo_generator->GenerateBipuyo());
    my_next_bipuyo = my_bipuyo_generator->GenerateBipuyo();
    other_bipuyo_generator = std::make_shared<BiPuyoGenerator>(seed);
    other_board = std::make_shared<Board>();
    other_board->SetNextBiPuyo(other_bipuyo_generator->GenerateBipuyo());
    other_next_bipuyo = other_bipuyo_generator->GenerateBipuyo();

    std::cout << "Loading..." << std::endl;
    Console::Sleep(500);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
callq 0x3bca
leaq -0x38(%rbp), %rsi
andq $0x0, (%rsi)
movq 0xbaf8(%rip), %rbx      # 0xffc8
movq %rbx, %rdi
callq 0x3c46
xorl %edi, %edi
callq 0x3230
leaq -0x3c(%rbp), %r15
movl %eax, (%r15)
leaq -0x38(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5fb9
leaq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x8876
leaq -0x30(%rbp), %rdi
callq 0x6896
movq %r12, %rdi
callq 0x5cb7
leaq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0x8a9a
leaq -0x30(%rbp), %rdi
callq 0x6896
movq 0x20(%r14), %r12
movq 0x10(%r14), %rsi
leaq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x5d00
movq %r12, %rdi
movq %r13, %rsi
callq 0x5cd4
leaq -0x30(%rbp), %rdi
callq 0x6896
movq 0x10(%r14), %rsi
leaq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x5d00
leaq 0x30(%r14), %rdi
movq %r12, %rsi
callq 0x81ec
leaq -0x30(%rbp), %rdi
callq 0x6896
movq %r12, %rdi
movq %r15, %rsi
callq 0x5fb9
leaq 0x50(%r14), %rdi
movq %r12, %rsi
callq 0x8876
leaq -0x30(%rbp), %rdi
callq 0x6896
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x5cb7
leaq 0x60(%r14), %rdi
movq %r15, %rsi
callq 0x8a9a
leaq -0x30(%rbp), %rdi
callq 0x6896
movq 0x60(%r14), %r15
movq 0x50(%r14), %rsi
movq %r12, %rdi
callq 0x5d00
movq %r15, %rdi
movq %r12, %rsi
callq 0x5cd4
leaq -0x30(%rbp), %rdi
callq 0x6896
movq 0x50(%r14), %rsi
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x5d00
addq $0x70, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x81ec
leaq -0x30(%rbp), %rdi
callq 0x6896
leaq 0x5b88(%rip), %rsi      # 0xa190
movq %rbx, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3150
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x3bba
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: VSGame::GameResult()
void VSGame::GameResult() {
    while (kbhit()) getch();
    Console::ScreenClear();
    std::cout << Console::white << Console::GotoXY(0, 0);
    if (my_board->IsGameOver()) {
        std::cout << "1p가 이겼습니다." << std::endl;
    }
    else {
        std::cout << "2p가 이겼습니다." << std::endl;
    }
    std::cout
        << "1p 점수: " << my_info.score << std::endl
        << "1p 최대 연쇄: " << my_info.max_chain_number << std::endl
        << "2p 점수: " << other_info.score << std::endl
        << "2p 최대 연쇄: " << other_info.max_chain_number << std::endl
        << "메인으로 돌아가려면 아무키나 누르세요" << std::endl;
    getch();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x3a7c
testb %al, %al
je 0x4880
callq 0x3b49
jmp 0x4870
callq 0x3bca
movq 0xb73c(%rip), %r14      # 0xffc8
leaq 0xba29(%rip), %rsi      # 0x102bc
movq %r14, %rdi
callq 0x3c12
leaq -0x18(%rbp), %rsi
andq $0x0, (%rsi)
movq %rax, %rdi
callq 0x3c46
movq 0x20(%rbx), %rax
cmpl $0x6, 0x68(%rax)
leaq 0x5923(%rip), %rax      # 0xa1dd
leaq 0x5933(%rip), %rsi      # 0xa1f4
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3150
leaq 0x592f(%rip), %rsi      # 0xa20b
movq %r14, %rdi
callq 0x3280
movl 0x40(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x5919(%rip), %rsi      # 0xa217
movq %rax, %rdi
callq 0x3280
movl 0x48(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x590a(%rip), %rsi      # 0xa22a
movq %rax, %rdi
callq 0x3280
movl 0x80(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x58f1(%rip), %rsi      # 0xa236
movq %rax, %rdi
callq 0x3280
movl 0x88(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x583c(%rip), %rsi      # 0xa1a6
movq %rax, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3150
callq 0x3b49
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: VSGame::Draw()
void VSGame::Draw() {
    /*
        0                   1                   2 
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
    00  ┌──  ───┐┌───┐  ┌──  ───┐┌───┐ 
     1  │            ││ NEXT │  │            ││ NEXT │ 
     2  │            ││      │  │            ││      │ 
     3  │            ││      │  │            ││      │ 
     4  │            ││      │  │            ││      │ 
     5  │            ││ Chain│  │            ││ Chain│ 
     6  │            ││      │  │            ││      │ 
     7  │            ││MaxChn│  │            ││MaxChn│ 
     8  │            ││      │  │            ││      │ 
     9  │            ││ Score│  │            ││ Score│ 
    10  │            ││      │  │            ││      │ 
     1  │            ││BGM   │  │            ││BGM   │ 
     2  │            ││ObsNum│  │            ││ObsNum│ 
     3  │            ││      │  │            ││      │ 
     4  └──────┘└───┘  └──────┘└───┘ 
    */
    Game::Draw(my_board, my_next_bipuyo, my_info);
    for (int i = 0; i <= 14; i++) {
        std::cout << Console::GotoXY(X(13), Y(i)) << "  ";
    }
    Game::Draw(other_board, other_next_bipuyo, other_info, 14);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x20, %rdi
leaq 0x30(%rbx), %rsi
leaq 0x40(%rbx), %rdx
xorl %r13d, %r13d
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x411c
movq 0xb60f(%rip), %r14      # 0xffc8
leaq -0x30(%rbp), %r15
leaq 0x5c5d(%rip), %r12      # 0xa621
cmpl $0xf, %r13d
je 0x49f0
movl $0x1a, -0x30(%rbp)
movl %r13d, -0x2c(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c46
movq %rax, %rdi
movq %r12, %rsi
callq 0x3280
incl %r13d
jmp 0x49c4
leaq 0x60(%rbx), %rdi
leaq 0x70(%rbx), %rsi
subq $-0x80, %rbx
pushq $0xe
popq %rcx
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x411c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: VSRemoteGame::Serialize[abi:cxx11]()
std::string VSRemoteGame::Serialize() {
    std::ostringstream data;
    data
        << "G{"
            << "P{" << my_info.Serialize() << "}"
            << "M{" << my_board->Serialize() << "}"
            << "B{" << my_next_bipuyo->Serialize() << "}"
            << "O{" << obstacle_to_send << "}"
        << "}";
    return data.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1f0(%rbp), %r15
movq %r15, %rdi
callq 0x3360
leaq 0x51ff(%rip), %rsi      # 0xa693
movq %r15, %rdi
callq 0x3280
leaq 0x51f3(%rip), %rsi      # 0xa696
movq %rax, %rdi
callq 0x3280
movq %rax, %r15
leaq 0x40(%r14), %rsi
leaq -0x78(%rbp), %rdi
callq 0x6162
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x3220
leaq 0x51cb(%rip), %rsi      # 0xa699
movq %rax, %rdi
callq 0x3280
leaq 0x51be(%rip), %rsi      # 0xa69b
movq %rax, %rdi
callq 0x3280
movq %rax, %r15
movq 0x20(%r14), %rsi
leaq -0x58(%rbp), %rdi
callq 0x6226
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x3220
leaq 0x5191(%rip), %rsi      # 0xa699
movq %rax, %rdi
callq 0x3280
leaq 0x5187(%rip), %rsi      # 0xa69e
movq %rax, %rdi
callq 0x3280
movq %rax, %r15
movq 0x30(%r14), %rsi
leaq -0x38(%rbp), %rdi
callq 0x634c
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
callq 0x3220
leaq 0x5157(%rip), %rsi      # 0xa699
movq %rax, %rdi
callq 0x3280
leaq 0x5150(%rip), %rsi      # 0xa6a1
movq %rax, %rdi
callq 0x3280
movl 0xa0(%r14), %esi
movq %rax, %rdi
callq 0x3460
leaq 0x512a(%rip), %rsi      # 0xa699
movq %rax, %rdi
callq 0x3280
leaq 0x511b(%rip), %rsi      # 0xa699
movq %rax, %rdi
callq 0x3280
leaq -0x38(%rbp), %rdi
callq 0x3140
leaq -0x58(%rbp), %rdi
callq 0x3140
leaq -0x78(%rbp), %rdi
callq 0x3140
leaq -0x1e8(%rbp), %rsi
movq %rbx, %rdi
callq 0x3400
leaq -0x1f0(%rbp), %rdi
callq 0x3080
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x55d3
jmp 0x55dd
jmp 0x55d8
movq %rax, %rbx
jmp 0x55ee
movq %rax, %rbx
jmp 0x5600
movq %rax, %rbx
jmp 0x55f7
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3140
leaq -0x58(%rbp), %rdi
callq 0x3140
leaq -0x78(%rbp), %rdi
callq 0x3140
leaq -0x1f0(%rbp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x3470
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/game.cpp
// Function: VSRemoteGame::GameResult()
void VSRemoteGame::GameResult() {
    while (kbhit()) getch();
    Console::ScreenClear();
    std::cout << Console::white << Console::GotoXY(0, 0);
    if (my_board->IsGameOver()) {
        std::cout << "졌습니다..." << std::endl;
    }
    else {
        std::cout << "이겼습니다!" << std::endl;
    }
    std::cout
        << "내 점수: " << my_info.score << std::endl
        << "내 최대 연쇄: " << my_info.max_chain_number << std::endl
        << "상대 점수: " << other_info.score << std::endl
        << "상대 최대 연쇄: " << other_info.max_chain_number << std::endl
        << "메인으로 돌아가려면 아무키나 누르세요" << std::endl;
    getch();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x3a7c
testb %al, %al
je 0x59a0
callq 0x3b49
jmp 0x5990
callq 0x3bca
movq 0xa61c(%rip), %r14      # 0xffc8
leaq 0xa909(%rip), %rsi      # 0x102bc
movq %r14, %rdi
callq 0x3c12
leaq -0x18(%rbp), %rsi
andq $0x0, (%rsi)
movq %rax, %rdi
callq 0x3c46
movq 0x20(%rbx), %rax
cmpl $0x6, 0x68(%rax)
leaq 0x4c50(%rip), %rax      # 0xa62a
leaq 0x4c59(%rip), %rsi      # 0xa63a
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3150
leaq 0x4c4f(%rip), %rsi      # 0xa64b
movq %r14, %rdi
callq 0x3280
movl 0x40(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x4c3a(%rip), %rsi      # 0xa658
movq %rax, %rdi
callq 0x3280
movl 0x48(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x4c2c(%rip), %rsi      # 0xa66c
movq %rax, %rdi
callq 0x3280
movl 0x80(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x4c17(%rip), %rsi      # 0xa67c
movq %rax, %rdi
callq 0x3280
movl 0x88(%rbx), %esi
movq %rax, %rdi
callq 0x3460
movq %rax, %rdi
callq 0x3150
leaq 0x471c(%rip), %rsi      # 0xa1a6
movq %rax, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3150
callq 0x3b49
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/./board.h
// Function: Board::Draw(int, int)
void Draw(int offset_x, int offset_y) {
        int sub_x = 0, sub_y = 0;
        if (bipuyo) {
            bipuyo->Draw(bipuyo_x, bipuyo_y, offset_x, offset_y - 1);
            bipuyo->GetDirection(sub_x, sub_y);
        }
        for (int i = 1; i < MAP_HEIGHT; i++) {
            for (int j = 0; j < MAP_WIDTH; j++) {
                if (bipuyo) {
                    if (j == bipuyo_x + sub_x && i == bipuyo_y + sub_y) continue;
                    if (j == bipuyo_x && i == bipuyo_y) continue;
                }
                std::cout << Console::GotoXY(X(offset_x + j), Y(offset_y + i - 1));
                map[i][j].Draw();
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
je 0x5b13
movl 0x60(%r15), %esi
movl 0x64(%r15), %edx
decl %ebx
movl %r14d, %ecx
movl %ebx, %r8d
callq 0x678c
movq 0x50(%r15), %rax
movl 0x4(%rax), %eax
cmpl $0x3, %eax
je 0x5b2b
movq $0x0, -0x38(%rbp)
cmpl $0x2, %eax
je 0x5b27
cmpl $0x1, %eax
jne 0x5b3c
movq $0x0, -0x30(%rbp)
pushq $0x1
jmp 0x5b35
decl %ebx
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
jmp 0x5b43
pushq $0x1
jmp 0x5b3e
movq $0x0, -0x30(%rbp)
pushq $-0x1
popq %rax
movq %rax, -0x38(%rbp)
jmp 0x5b43
pushq $-0x1
popq %rax
movq %rax, -0x30(%rbp)
addl %r14d, %r14d
leaq 0x6(%r15), %rax
movq %rax, -0x48(%rbp)
pushq $0x1
popq %r13
movq %rbx, -0x58(%rbp)
movl %r14d, -0x3c(%rbp)
cmpq $0xd, %r13
je 0x5be5
addl %r13d, %ebx
xorl %r12d, %r12d
cmpq $0x6, %r12
je 0x5bd0
cmpq $0x0, 0x50(%r15)
je 0x5ba3
movl 0x60(%r15), %eax
movl 0x64(%r15), %ecx
movq -0x38(%rbp), %rdx
addl %eax, %edx
xorq %r12, %rdx
movq -0x30(%rbp), %rsi
addl %ecx, %esi
movl %esi, %esi
xorq %r13, %rsi
orq %rdx, %rsi
je 0x5bc7
xorq %r12, %rax
xorq %r13, %rcx
orq %rax, %rcx
je 0x5bc7
movl %r14d, -0x50(%rbp)
movl %ebx, -0x4c(%rbp)
movq 0xa417(%rip), %rdi      # 0xffc8
leaq -0x50(%rbp), %rsi
callq 0x3c46
movq -0x48(%rbp), %rax
leaq (%rax,%r12), %rdi
callq 0x6850
incq %r12
addl $0x2, %r14d
jmp 0x5b6a
incq %r13
addq $0x6, -0x48(%rbp)
movq -0x58(%rbp), %rbx
movl -0x3c(%rbp), %r14d
jmp 0x5b5a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/./puyo.h
// Function: BiPuyo::Draw(int, int)
void Draw(int offset_x, int offset_y) {
        int x, y;
        GetDirection(x, y);
        std::cout << Console::GotoXY(X(offset_x), Y(offset_y));
        main.Draw();
        std::cout << Console::GotoXY(X(offset_x + x), Y(offset_y + y));
        sub.Draw();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movl 0x4(%rdi), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
ja 0x5c2c
pushq $0x2
popq %r13
subl %eax, %r13d
movl %ecx, %eax
leaq 0x448a(%rip), %rcx      # 0xa0b0
movl (%rcx,%rax,4), %r14d
jmp 0x5c33
pushq $-0x1
popq %r14
xorl %r13d, %r13d
leal (%r15,%r15), %eax
leaq -0x34(%rbp), %r12
movl %eax, (%r12)
movl %edx, 0x4(%r12)
movq 0xa37d(%rip), %rdi      # 0xffc8
movq %r12, %rsi
movl %edx, -0x2c(%rbp)
callq 0x3c46
movq %rbx, %rdi
callq 0x6850
addl %r15d, %r13d
addl %r13d, %r13d
addl -0x2c(%rbp), %r14d
movl %r13d, (%r12)
movl %r14d, 0x4(%r12)
leaq -0x34(%rbp), %rsi
movq 0xa34c(%rip), %rdi      # 0xffc8
callq 0x3c46
incq %rbx
movq %rbx, %rdi
callq 0x6850
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/./board.h
// Function: Board::SetNextBiPuyo(std::shared_ptr<BiPuyo> const&)
void SetNextBiPuyo(const std::shared_ptr<BiPuyo>& next) {
        bipuyo = next;
        bipuyo_x = 2;
        bipuyo_y = 1;
        state = State::IDLE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x50, %rdi
callq 0x6934
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x60(%rbx)
andl $0x0, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/./board.h
// Function: Board::MoveLeft()
void MoveLeft() {
        int sub_x = 0, sub_y = 0;
        if (bipuyo) {
            bipuyo->GetDirection(sub_x, sub_y);
        }
        if (move_t == 0) {
            move_t = 1;
            if (bipuyo_x != 0 && bipuyo_x + sub_x != 0 && map[bipuyo_y][bipuyo_x - 1].IsBlank() && map[bipuyo_y + sub_y][bipuyo_x + sub_x - 1].IsBlank()) {
                bipuyo_x--;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x50(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x5d7d
movl 0x4(%rcx), %ecx
leal -0x1(%rcx), %edx
cmpl $0x2, %edx
ja 0x5d81
movl $0x2, %eax
subl %ecx, %eax
movl %edx, %ecx
leaq 0x4338(%rip), %rdx      # 0xa0b0
movl (%rdx,%rcx,4), %edx
jmp 0x5d86
xorl %edx, %edx
jmp 0x5d86
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpl $0x0, 0x90(%rdi)
je 0x5d91
popq %rbp
retq
movl $0x1, 0x90(%rdi)
movslq 0x60(%rdi), %rcx
testq %rcx, %rcx
je 0x5d8f
movl %eax, %esi
negl %esi
cmpl %esi, %ecx
je 0x5d8f
movslq 0x64(%rdi), %rsi
imulq $0x6, %rsi, %r8
addq %rdi, %r8
cmpb $0x0, -0x1(%rcx,%r8)
jne 0x5d8f
movslq %edx, %rdx
addq %rdx, %rsi
addl %ecx, %eax
decl %eax
cltq
imulq $0x6, %rsi, %rdx
addq %rdi, %rdx
cmpb $0x0, (%rax,%rdx)
jne 0x5d8f
decq %rcx
movl %ecx, 0x60(%rdi)
jmp 0x5d8f
// File: /workspace/github_cpp_makefile_star2_O2/Leeingnyo[P]newPuyoC/./board.h
// Function: Board::MoveRight()
void MoveRight() {
        int sub_x = 0, sub_y = 0;
        if (bipuyo) {
            bipuyo->GetDirection(sub_x, sub_y);
        }
        if (move_t == 0) {
            move_t = 1;
            if (bipuyo_x != (MAP_WIDTH - 1) && bipuyo_x + sub_x != (MAP_WIDTH - 1) && map[bipuyo_y][bipuyo_x + 1].IsBlank() && map[bipuyo_y + sub_y][bipuyo_x + sub_x + 1].IsBlank()) {
                bipuyo_x++;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x50(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x5e0f
movl 0x4(%rcx), %ecx
leal -0x1(%rcx), %edx
cmpl $0x2, %edx
ja 0x5e13
movl $0x2, %eax
subl %ecx, %eax
movl %edx, %ecx
leaq 0x42a6(%rip), %rdx      # 0xa0b0
movl (%rdx,%rcx,4), %ecx
jmp 0x5e18
xorl %ecx, %ecx
jmp 0x5e18
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, 0x90(%rdi)
jne 0x5e6b
movl $0x1, 0x90(%rdi)
movslq 0x60(%rdi), %rdx
cmpq $0x5, %rdx
je 0x5e6b
addl %edx, %eax
cmpl $0x5, %eax
je 0x5e6b
movslq 0x64(%rdi), %rsi
imulq $0x6, %rsi, %r8
addq %rdi, %r8
cmpb $0x0, 0x1(%rdx,%r8)
jne 0x5e6b
movslq %ecx, %rcx
addq %rcx, %rsi
cltq
imulq $0x6, %rsi, %rcx
addq %rdi, %rcx
cmpb $0x0, 0x1(%rax,%rcx)
jne 0x5e6b
incq %rdx
movl %edx, 0x60(%rdi)
popq %rbp
retq
nop