LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tplinderoth[P]introDist/Dxyz.cpp
// Function: printWindow(std::ostream&, double const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int const&, unsigned int const&, double const&, double const&, double*)
void printWindow (std::ostream &outstream, const double &dxyz, const std::string &seqid, const unsigned int &startpos, const unsigned int &endpos,
		const double &nseq, const double &nsites, double* dxy_comp) {
	outstream << seqid << "\t" << startpos << "\t" << endpos << "\t" << dxy_comp[0] << "\t" << dxy_comp[1] << "\t";
	if (dxyz != -9) {
		outstream << dxyz << "\t";
	} else {
		outstream << "NA\t";
	}
	outstream << nseq << "\t" << nsites << "\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r13
movq %rcx, %rbp
movq %rsi, (%rsp)
movq %rdi, %r14
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %r15
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
callq 0x6390
movq %rax, %rbx
leaq 0x6ec5(%rip), %r12      # 0xf496
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x6390
movl (%rbp), %esi
movq %rbx, %rdi
callq 0x6210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x6390
movl (%r13), %esi
movq %rbx, %rdi
callq 0x6210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x6390
movsd (%r15), %xmm0
movq %rbx, %rdi
callq 0x6510
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x6390
movsd 0x8(%r15), %xmm0
movq %rbx, %rdi
callq 0x6510
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x6390
movq (%rsp), %rax
movsd (%rax), %xmm0
ucomisd 0x69ac(%rip), %xmm0     # 0xf018
jne 0x8670
jnp 0x8689
movq %r14, %rdi
callq 0x6510
leaq 0x6e17(%rip), %rsi      # 0xf496
movl $0x1, %edx
movq %rax, %rdi
jmp 0x8698
leaq 0x6e04(%rip), %rsi      # 0xf494
movl $0x3, %edx
movq %r14, %rdi
callq 0x6390
movq 0x8(%rsp), %rax
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x6510
movq %rax, %rbx
leaq 0x6dde(%rip), %rsi      # 0xf496
movl $0x1, %edx
movq %rax, %rdi
callq 0x6390
movq 0x10(%rsp), %rax
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x6510
leaq 0x69ae(%rip), %rsi      # 0xf08b
movl $0x1, %edx
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6390
// File: /workspace/github_cpp_makefile_star2_O1/tplinderoth[P]introDist/Dxyz.cpp
// Function: slideWindow(Matrix<double>&, unsigned int, unsigned int, unsigned int)
unsigned int slideWindow (Matrix<double> &win, const unsigned int winsize, const unsigned int step, unsigned int nsites) {
	/*
	 * Advances window along chromosome
	 * returns the number of sites shifted to the beginning of the window
	 */

	unsigned int nshift = 0;
	if (nsites == winsize) {
		// advance existing window
		nshift = winsize - step;
		for (unsigned int i=0; i<nshift; ++i) {
			int k=step+i;
			for (unsigned int j=0; j<win.ncol(); ++j) {
				win(i,j) = win(k,j);
			}
		}
	}

	return nshift;
}

// Assembly:
xorl %eax, %eax
cmpl %esi, %ecx
jne 0x8774
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebx
subl %edx, %ebx
je 0x8764
movq %rdi, %r15
xorl %r12d, %r12d
cmpl $0x0, 0x4(%r15)
je 0x875c
leal (%r12,%r14), %ebp
xorl %r13d, %r13d
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x8b0a
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x8b0a
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
incl %r13d
cmpl 0x4(%r15), %r13d
jb 0x8726
incl %r12d
cmpl %ebx, %r12d
jne 0x8718
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tplinderoth[P]introDist/Dxyz.cpp
// Function: getMaf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
double getMaf (const std::string &info) {
	// returns MAF based on the AF INFO subfield
	static char f [30];
	f[0] = '\0';
	int j=0;
	for (unsigned int i=0; i<info.size(); ++i) {
		if (i+2 < info.size() && info[i]=='A' && info[i+1]=='F' && info[i+2]=='=') {
			i += 3;
			while (i < info.size() && info[i] != ';' && info[i] != ',') {
				f[j] = info[i];
				++j;
				++i;
			}
			f[j] = '\0';
			break;
		}
	}

	if (!f[0]) {
		return -1.0;
	}

	double freq = atof(f);
	return (freq < 0.5 ? freq : 1.0-freq);
}

// Assembly:
pushq %rax
movb $0x0, 0xebd3(%rip)      # 0x17350
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x87b9
movq (%rdi), %rdx
movl $0x4, %eax
xorl %esi, %esi
leal -0x2(%rax), %r8d
cmpq %r8, %rcx
jbe 0x87af
cmpb $0x41, (%rdx,%rsi)
jne 0x87af
leal -0x3(%rax), %esi
cmpb $0x46, (%rdx,%rsi)
jne 0x87af
cmpb $0x3d, (%rdx,%r8)
je 0x87ff
leal -0x3(%rax), %esi
incl %eax
cmpq %rsi, %rcx
ja 0x8790
cmpb $0x0, 0xeb90(%rip)      # 0x17350
je 0x87f5
leaq 0xeb87(%rip), %rdi      # 0x17350
callq 0x63d0
movapd %xmm0, %xmm1
movsd 0x6846(%rip), %xmm2     # 0xf020
cmpltsd 0x6825(%rip), %xmm0     # 0xf008
subsd %xmm1, %xmm2
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
jmp 0x87fd
movsd 0x682b(%rip), %xmm0     # 0xf028
popq %rax
retq
leal -0x1(%rax), %esi
leaq 0xeb47(%rip), %rcx      # 0x17350
cmpq %rsi, 0x8(%rdi)
jbe 0x8838
xorl %edx, %edx
movq (%rdi), %r8
movzbl (%r8,%rsi), %esi
cmpl $0x2c, %esi
je 0x8834
cmpl $0x3b, %esi
je 0x8834
movb %sil, (%rdx,%rcx)
incq %rdx
movl %eax, %esi
incl %eax
cmpq %rsi, 0x8(%rdi)
ja 0x8811
movl %edx, %eax
jmp 0x883a
xorl %eax, %eax
movb $0x0, (%rax,%rcx)
jmp 0x87b9
// File: /workspace/github_cpp_makefile_star2_O1/tplinderoth[P]introDist/Dxyz.cpp
// Function: altCount(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, unsigned int&)
unsigned int altCount (const std::vector<int> &alleles, const std::vector<int> &idx, unsigned int &nseq) {
	static std::vector<int>::const_iterator idxiter;
	nseq = 0;
	unsigned int altcount = 0;
	for (idxiter = idx.begin(); idxiter != idx.end(); ++idxiter) {
		if (alleles[*idxiter] == -9) continue;
		if (alleles[*idxiter] == 1) ++altcount;
		++nseq;
	}

	return altcount;
}

// Assembly:
movl $0x0, (%rdx)
movq (%rsi), %rcx
movq 0x8(%rsi), %rsi
cmpq %rsi, %rcx
je 0x8889
movl (%rdx), %r8d
movq (%rdi), %rdi
xorl %eax, %eax
movslq (%rcx), %r9
movl (%rdi,%r9,4), %r9d
cmpl $-0x9, %r9d
je 0x887e
xorl %r10d, %r10d
cmpl $0x1, %r9d
sete %r10b
addl %r10d, %eax
incl %r8d
movl %r8d, (%rdx)
addq $0x4, %rcx
cmpq %rsi, %rcx
jne 0x885d
jmp 0x888b
xorl %eax, %eax
movq %rcx, 0xeaee(%rip)      # 0x17380
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tplinderoth[P]introDist/./Dxyz.h
// Function: Matrix<double>::Matrix(unsigned long, unsigned long)
Matrix (size_t n1, size_t n2)
		:   _nrow(0),
			_ncol(0),
			data(NULL)
	{
		if (n1 > 0 && n2 > 0) {
			_nrow = n1;
			_ncol = n2;
			data = new T* [n1];
			for (unsigned int i = 0; i < n1; ++i) {
				data[i] = new T [n2];
			}
		} else {
			std::cerr << "Unable to initialize matrix with " << n1 << "rows and " << n2 << " columns\n";
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
orb %al, %cl
jne 0x8a6d
movq %rdi, %r15
movl %ebx, (%rdi)
movl %r14d, 0x4(%rdi)
movq %rbx, %rax
shrq $0x3d, %rax
leaq (,%rbx,8), %rcx
xorl %r13d, %r13d
negq %rax
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x6030
movq %rax, 0x8(%r15)
movq %r14, %rax
shrq $0x3d, %rax
shlq $0x3, %r14
negq %rax
movl $0x0, %r12d
sbbq %r12, %r12
orq %r14, %r12
movl $0x1, %ebp
movq %r12, %rdi
callq 0x6030
movq 0x8(%r15), %rcx
movq %rax, (%rcx,%r13,8)
movl %ebp, %r13d
incl %ebp
cmpq %rbx, %r13
jb 0x8a44
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xe574(%rip), %r15      # 0x16fe8
leaq 0x77c7(%rip), %rsi      # 0x10242
movl $0x21, %edx
movq %r15, %rdi
callq 0x6390
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6210
movq %rax, %rbx
leaq 0x77c7(%rip), %rsi      # 0x10264
movl $0x9, %edx
movq %rax, %rdi
callq 0x6390
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6210
leaq 0x77b2(%rip), %rsi      # 0x1026e
movl $0x9, %edx
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6390
nop
// File: /workspace/github_cpp_makefile_star2_O1/tplinderoth[P]introDist/./Dxyz.h
// Function: Matrix<double>::~Matrix()
~Matrix () {
		for (unsigned int i = 0; i < _nrow; ++i) {
			delete [] data[i];
		}
		delete [] data;
		data = NULL;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x8b8f
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x8b85
callq 0x6400
incq %r14
movl (%rbx), %eax
cmpq %rax, %r14
jb 0x8b73
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8b9d
callq 0x6400
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/main.cpp
// Function: main
int main(int argc, char** argv)
{
   if (argc != 2)
   {
      std::cerr << "usage: " << argv[0] << " <file.class>\n";
      return 1;
   }

	ClassFile cf(argv[1]);
	cf.generate();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xe0, %rsp
movq %rsi, %rbx
cmpl $0x2, %edi
jne 0x2741
movq 0x8(%rbx), %rsi
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x2100
leaq -0xe8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2a10
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2725
callq 0x2200
leaq -0xe8(%rbp), %rdi
callq 0x40fe
leaq -0xe8(%rbp), %rdi
callq 0x406a
xorl %eax, %eax
jmp 0x27b5
movq 0x208a8(%rip), %r14     # 0x22ff0
leaq 0x198b5(%rip), %rsi     # 0x1c004
movl $0x7, %edx
movq %r14, %rdi
callq 0x2280
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2780
movq %rbx, %rdi
callq 0x2120
movq 0x2087d(%rip), %rdi     # 0x22ff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x2798
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2370
movq 0x20851(%rip), %rdi     # 0x22ff0
leaq 0x19866(%rip), %rsi     # 0x1c00c
movl $0xe, %edx
callq 0x2280
movl $0x1, %eax
addq $0xe0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x406a
jmp 0x27ec
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27ec
callq 0x2200
jmp 0x27ec
movq %rax, %rbx
movq %rbx, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/ClassFile.cpp
// Function: ClassFile::parseInterface[abi:cxx11]()
std::string ClassFile::parseInterface()
{
	std::uint16_t name_index;
	std::string interfaceName;
	
	stream >> name_index;
	CPinfo *data = &constant_pool[name_index];
	if(data->tag == CONSTANT_Class)
	{
		interfaceName = getName(data->ClassInfo.name_index);
	}
	else
	{
		cerr << "ERROR: index " << name_index << " in not a class" << endl;
	}
	
	return interfaceName;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq -0x38(%rbp), %rax
movw $0x0, (%rax)
movq 0xa8(%rsi), %rdi
movl $0x2, %edx
movq %rax, %rsi
callq 0x22d0
movzwl -0x38(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %r14d
leaq 0x1fb99(%rip), %rax     # 0x23218
movq (%rax), %rax
leaq (%r14,%r14,2), %rcx
cmpb $0x7, (%rax,%rcx,8)
jne 0x36bf
leaq (%rax,%rcx,8), %rax
movzwl 0x8(%rax), %esi
leaq -0x38(%rbp), %rdi
callq 0x1a932
leaq -0x38(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22c0
movq (%r14), %rdi
leaq -0x28(%rbp), %rax
cmpq %rax, %rdi
je 0x3724
callq 0x2200
jmp 0x3724
movq 0x1f92a(%rip), %rdi     # 0x22ff0
leaq 0x18a9c(%rip), %rsi     # 0x1c169
movl $0xd, %edx
callq 0x2280
movq 0x1f912(%rip), %rdi     # 0x22ff0
movq %r14, %rsi
callq 0x2170
movq %rax, %r14
leaq 0x18a87(%rip), %rsi     # 0x1c177
movl $0xf, %edx
movq %rax, %rdi
callq 0x2280
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3736
jmp 0x3736
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3746
callq 0x2200
movq %r14, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/ClassFile.cpp
// Function: ClassFile::parseAttribute[abi:cxx11]()
std::tuple<std::string, std::string> ClassFile::parseAttribute()
{
	std::uint16_t attribute_name_index;
	stream >> attribute_name_index;
	
	std::string name = getName(attribute_name_index);
	
	std::uint32_t length;
	stream >> length;
	if(length > 512)
	{
		cerr << "attribute " << name << " has more than 512 bytes of data" << endl;
		exit(1);
	}
	
	char tmp[512] = {0};
	stream.readRawData(tmp, length);
	std::string data(tmp, length);
	
	return std::make_tuple(name, data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x260(%rbp), %r15
movw $0x0, (%r15)
movq 0xa8(%rsi), %rdi
movl $0x2, %edx
movq %r15, %rsi
callq 0x22d0
movzwl (%r15), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq -0x40(%rbp), %rdi
callq 0x1a932
movl $0x0, (%r15)
movq 0xa8(%r14), %rdi
leaq -0x260(%rbp), %rsi
movl $0x4, %edx
callq 0x22d0
movl -0x260(%rbp), %r15d
bswapl %r15d
cmpl $0x201, %r15d           # imm = 0x201
jae 0x3fe0
leaq -0x260(%rbp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x2160
movl %r15d, %r15d
movq 0xa8(%r14), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x22d0
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
leaq (%r15,%rbp), %rdx
addq $-0x260, %rdx           # imm = 0xFDA0
leaq -0x60(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x509e
leaq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x44ec
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x3fbb
callq 0x2200
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fcd
callq 0x2200
movq %rbx, %rax
addq $0x240, %rsp            # imm = 0x240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x1f009(%rip), %rdi     # 0x22ff0
leaq 0x180f0(%rip), %rsi     # 0x1c0de
movl $0xa, %edx
callq 0x2280
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x1efe9(%rip), %rdi     # 0x22ff0
callq 0x2280
movq %rax, %rbx
leaq 0x180d3(%rip), %rsi     # 0x1c0e9
movl $0x20, %edx
movq %rax, %rdi
callq 0x2280
movq %rbx, %rdi
callq 0x2130
movl $0x1, %edi
callq 0x22a0
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x404f
callq 0x2200
jmp 0x404f
jmp 0x404c
jmp 0x404c
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4061
callq 0x2200
movq %rbx, %rdi
callq 0x23b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/ClassFile.cpp
// Function: ClassFile::generate()
void ClassFile::generate()
{
	std::ofstream file("output.java");
	if(!file.is_open())
		return;
	
	output.generate(file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0x18073(%rip), %rsi     # 0x1c187
leaq -0x208(%rbp), %rdi
movl $0x10, %edx
callq 0x2260
leaq -0x198(%rbp), %rdi
callq 0x2090
testb %al, %al
je 0x4144
leaq -0x208(%rbp), %rsi
movq %rbx, %rdi
callq 0x55e0
movq 0x1ee7d(%rip), %rax     # 0x22fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x200(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x208(%rbp,%rcx)
callq 0x21d0
leaq -0x110(%rbp), %rdi
callq 0x20e0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x208(%rbp), %rdi
callq 0x2300
movq %rbx, %rdi
callq 0x23b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/FieldOutput.cpp
// Function: FieldOutput::generate(std::basic_ofstream<char, std::char_traits<char>>&)
void FieldOutput::generate(std::ofstream & file)
{
	if(isPublic)
		W("public ");
	if(isProtected)
		W("protected ");
	if(isPrivate)
		W("private ");
	if(isStatic)
		W("static ");
	if(isFinal)
		W("final ");
	if(isTransient)
		W("transient ");
	if(isVolatile)
		W("volatile ");
	
	W(type);
	W(" ");
	W(name);
	W(";\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x58(%rdi)
jne 0x1a753
leaq 0x1a91(%rip), %rsi      # 0x1c1d7
movl $0x7, %edx
movq %rbx, %rdi
callq 0x2280
cmpb $0x1, 0x59(%r14)
jne 0x1a76e
leaq 0x1ee0(%rip), %rsi      # 0x1c641
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2280
cmpb $0x1, 0x5a(%r14)
jne 0x1a789
leaq 0x1ed0(%rip), %rsi      # 0x1c64c
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2280
cmpb $0x1, 0x5d(%r14)
jne 0x1a7a4
leaq 0x1ebe(%rip), %rsi      # 0x1c655
movl $0x7, %edx
movq %rbx, %rdi
callq 0x2280
cmpb $0x1, 0x5c(%r14)
jne 0x1a7bf
leaq 0x1a37(%rip), %rsi      # 0x1c1e9
movl $0x6, %edx
movq %rbx, %rdi
callq 0x2280
cmpb $0x1, 0x5e(%r14)
jne 0x1a7da
leaq 0x24ac(%rip), %rsi      # 0x1cc79
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2280
cmpb $0x1, 0x5b(%r14)
jne 0x1a7f5
leaq 0x249c(%rip), %rsi      # 0x1cc84
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2280
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq %rbx, %rdi
callq 0x2280
leaq 0x1f54(%rip), %rsi      # 0x1c760
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2280
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2280
leaq 0x1fef(%rip), %rsi      # 0x1c81e
movl $0x2, %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/Helpers.cpp
// Function: letterFromType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
char letterFromType(std::string type)
{
	if(type == "int")
		return 'i';
	else if(type == "long")
		return 'l';
	else if(type == "float")
		return 'f';
	else if(type == "double")
		return 'd';
	else
		return 'a';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1ee7(%rip), %rsi      # 0x1c737
callq 0x20c0
testl %eax, %eax
je 0x1a89d
leaq 0x1edb(%rip), %rsi      # 0x1c73b
movq %rbx, %rdi
callq 0x20c0
testl %eax, %eax
je 0x1a8a1
leaq 0x1ecd(%rip), %rsi      # 0x1c740
movq %rbx, %rdi
callq 0x20c0
testl %eax, %eax
je 0x1a8a5
leaq 0x1ec0(%rip), %rsi      # 0x1c746
movq %rbx, %rdi
callq 0x20c0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leal (%rcx,%rcx,2), %eax
addl $0x61, %eax
jmp 0x1a8a7
movb $0x69, %al
jmp 0x1a8a7
movb $0x6c, %al
jmp 0x1a8a7
movb $0x66, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/Helpers.cpp
// Function: typeFromInt[abi:cxx11](int)
std::string typeFromInt(int typeInt)
{
	std::string ret = "*ERROR*";
	switch(typeInt)
	{
		case T_BOOLEAN:
			ret = "boolean";
			break;
		case T_CHAR:
			ret = "char";
			break;
		case T_FLOAT:
			ret = "float";
			break;
		case T_DOUBLE:
			ret = "double";
			break;
		case T_BYTE:
			ret = "byte";
			break;
		case T_SHORT:
			ret = "short";
			break;
		case T_INT:
			ret = "int";
			break;
		case T_LONG:
			ret = "long";
			break;
		default:
			;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x248c(%rip), %rsi      # 0x1cd58
leaq 0x248c(%rip), %rdx      # 0x1cd5f
callq 0x509e
addl $-0x4, %r14d
cmpl $0x8, %r14d
jae 0x1a90c
movl %r14d, %eax
leaq 0x240c(%rip), %rdx      # 0x1ccf8
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0x241e(%rip), %rdx      # 0x1cd18
movq (%rdx,%rax,8), %r8
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2320
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1a92a
callq 0x2200
movq %r14, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/Helpers.cpp
// Function: getName[abi:cxx11](unsigned short)
std::string getName(std::uint16_t index)
{
	std::string ret_string("*ERROR*");
	
	CPinfo *data = &constant_pool[index];
	if(data->tag == CONSTANT_Utf8)
	{
		ret_string = std::string(data->UTF8Info.bytes);
	}
	
	return ret_string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x2405(%rip), %rsi      # 0x1cd58
leaq 0x2405(%rip), %rdx      # 0x1cd5f
callq 0x509e
movl %r14d, %ecx
movq 0x88af(%rip), %rax      # 0x23218
leaq (%rcx,%rcx,2), %rcx
cmpb $0x1, (%rax,%rcx,8)
jne 0x1a9a8
leaq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rsi
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x2100
leaq -0x40(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22c0
movq (%r14), %rdi
leaq -0x30(%rbp), %rax
cmpq %rax, %rdi
je 0x1a9a8
callq 0x2200
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1a9c6
callq 0x2200
movq %r14, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/Helpers.cpp
// Function: checkClassName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string checkClassName(std::string classname)
{
	std::replace(classname.begin(), classname.end(), '/', '.');
	size_t start_pos = classname.find("java.lang.");
	if(start_pos != std::string::npos)
	{
		classname.replace(start_pos, 10, std::string());
	}
	return classname;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x1aa01
movq (%r14), %rcx
xorl %edx, %edx
cmpb $0x2f, (%rcx,%rdx)
jne 0x1a9f9
movb $0x2e, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x1a9ef
leaq 0x2370(%rip), %rsi      # 0x1cd78
movl $0xa, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x23a0
cmpq $-0x1, %rax
je 0x1aa55
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movl $0xa, %edx
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x2270
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x1aa55
callq 0x2200
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x1aa74
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x1aa7a
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x1aab1
callq 0x2200
movq %rbx, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O1/minirop[P]JDecomqiler/src/Helpers.cpp
// Function: removeArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string removeArray(std::string className)
{
	size_t start_pos;
	while((start_pos = className.find("[]")) != std::string::npos)
	{
		className.replace(start_pos, 2, "_arr");
	}
	
	return className;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1c63(%rip), %rsi      # 0x1c734
movl $0x2, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x23a0
cmpq $-0x1, %rax
je 0x1ab25
leaq 0x2296(%rip), %r15      # 0x1cd83
leaq 0x1c40(%rip), %r12      # 0x1c734
movl $0x2, %edx
movl $0x4, %r8d
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rcx
callq 0x2270
movl $0x2, %ecx
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x23a0
cmpq $-0x1, %rax
jne 0x1aaf4
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rbx), %rdx
leaq 0x10(%rbx), %rax
cmpq %rax, %rdx
je 0x1ab44
movq %rdx, (%r14)
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
jmp 0x1ab4a
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/log.cpp
// Function: error(char const*, ...)
void error(const char* format, ...) {
    pthread_mutex_lock(&logfile_mutex);
    va_list args;
    va_start(args,format);
    vfprintf(stderr,format,args);
    va_end(args);
    pthread_mutex_unlock(&logfile_mutex);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x2393
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0xf9b2e(%rip), %r14     # 0xfbec8
movq %r14, %rdi
callq 0x2290
movq %rsp, %rdx
movq %r15, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x3fbff(%rip), %rax     # 0x41fc8
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x2230
movq %r14, %rdi
callq 0x20e0
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/apply.cpp
// Function: remove_captured_piece(position*, unsigned long long)
piece_t remove_captured_piece(position* p,move m) {
    assert(is_capture(m));
    piece_t captured;
    if (is_epcapture(m)) {
        // remove pawn
        if (p->player==WHITE) { // black WAS on move
            captured = remove_piece(p,north(p->ep_sq));
            assert(captured==PAWN);
        } else {
            captured = remove_piece(p,south(p->ep_sq));
            assert(captured==-PAWN);
        }
    } else {
        captured = remove_piece(p,get_to_sq(m));
    }

    assert(captured != NO_PIECE);
    return captured;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x77df
testb %al, %al
je 0x2d76
movq %r14, %rdi
callq 0x77e9
testb %al, %al
je 0x2d3b
movl 0x13c(%rbx), %edi
cmpl $0x1, 0x138(%rbx)
jne 0x2d4f
callq 0xcc11
movq %rbx, %rdi
movl %eax, %esi
callq 0xa7d2
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x1, %ecx
je 0x2d6a
leaq 0x2632d(%rip), %rdi     # 0x29050
leaq 0x262e8(%rip), %rsi     # 0x29012
leaq 0x262ef(%rip), %rcx     # 0x29020
movl $0x16, %edx
callq 0x20d0
movq %r14, %rdi
callq 0x77b7
movq %rbx, %rdi
movl %eax, %esi
callq 0xa7d2
jmp 0x2d6a
callq 0xcc4a
movq %rbx, %rdi
movl %eax, %esi
callq 0xa7d2
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $-0x1, %ecx
jne 0x2db4
testl %eax, %eax
je 0x2d95
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x26287(%rip), %rdi     # 0x29004
leaq 0x2628e(%rip), %rsi     # 0x29012
leaq 0x26295(%rip), %rcx     # 0x29020
movl $0x10, %edx
callq 0x20d0
leaq 0x262d3(%rip), %rdi     # 0x2906f
leaq 0x2626f(%rip), %rsi     # 0x29012
leaq 0x26276(%rip), %rcx     # 0x29020
movl $0x1f, %edx
callq 0x20d0
leaq 0x262a4(%rip), %rdi     # 0x2905f
leaq 0x26250(%rip), %rsi     # 0x29012
leaq 0x26257(%rip), %rcx     # 0x29020
movl $0x19, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/apply.cpp
// Function: apply_null_move(position*)
square_t apply_null_move(position *p) {
    square_t ep_sq = p->ep_sq;

    // clear current values
    p->hash_key ^= zkeys.ptm[p->player];
    p->hash_key ^= zkeys.ep[p->ep_sq];

    // change player and reset EP square
    p->player = opposite_player(p->player);
    p->ep_sq = NO_SQUARE;

    // set current values
    p->hash_key ^= zkeys.ep[p->ep_sq];
    p->hash_key ^= zkeys.ptm[p->player];

    return ep_sq;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x138(%rdi), %edi
movl 0x13c(%rbx), %r14d
leaq 0xf4fbe(%rip), %r15     # 0xf8598
movq 0x1b8(%rbx), %rax
xorq 0x1c00(%r15,%rdi,8), %rax
movq %rax, 0x1b8(%rbx)
xorq 0x1c90(%r15,%r14,8), %rax
movq %rax, 0x1b8(%rbx)
callq 0xdfc4
movl %eax, 0x138(%rbx)
movl $0x40, 0x13c(%rbx)
movq 0x1b8(%rbx), %rcx
xorq 0x1e90(%r15), %rcx
movq %rcx, 0x1b8(%rbx)
movl %eax, %eax
xorq 0x1c00(%r15,%rax,8), %rcx
movq %rcx, 0x1b8(%rbx)
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/apply.cpp
// Function: undo_null_move(position*, square_t)
void undo_null_move(position *p,square_t ep_sq) {
    // clear current values
    p->hash_key ^= zkeys.ptm[p->player];
    p->hash_key ^= zkeys.ep[p->ep_sq];

    // change player and reset EP square
    p->player = opposite_player(p->player);
    p->ep_sq = ep_sq;

    // set current values
    p->hash_key ^= zkeys.ep[p->ep_sq];
    p->hash_key ^= zkeys.ptm[p->player];
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl 0x138(%rdi), %edi
movl 0x13c(%rbx), %eax
leaq 0xf4f39(%rip), %r14     # 0xf8598
movq 0x1b8(%rbx), %rcx
xorq 0x1c00(%r14,%rdi,8), %rcx
movq %rcx, 0x1b8(%rbx)
xorq 0x1c90(%r14,%rax,8), %rcx
movq %rcx, 0x1b8(%rbx)
callq 0xdfc4
movl %eax, 0x138(%rbx)
movl %ebp, 0x13c(%rbx)
movl %ebp, %ecx
movq 0x1b8(%rbx), %rdx
xorq 0x1c90(%r14,%rcx,8), %rdx
movq %rdx, 0x1b8(%rbx)
movl %eax, %eax
xorq 0x1c00(%r14,%rax,8), %rdx
movq %rdx, 0x1b8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/attack.cpp
// Function: attacked_by_knight(position*, square_t, color_t)
bool attacked_by_knight(position *p,square_t sq,color_t player) {
    assert(p);
    assert(sq >= A8 && sq <= H1);
    assert(player==WHITE || player==BLACK);

    return bb_knight_moves[sq] & (player==WHITE ? p->white_knights : p->black_knights);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x36f6
cmpl $0x40, %esi
jae 0x3715
cmpl $0x2, %edx
jae 0x3734
xorl %eax, %eax
cmpl $0x1, %edx
setne %al
movl %esi, %ecx
leaq 0xf6fcb(%rip), %rdx     # 0xfa6b0
movq 0x168(%rdi,%rax,8), %rax
testq %rax, (%rdx,%rcx,8)
setne %al
popq %rcx
retq
leaq 0x31b7f(%rip), %rdi     # 0x3527c
leaq 0x25ac4(%rip), %rsi     # 0x291c8
leaq 0x25acc(%rip), %rcx     # 0x291d7
movl $0xf, %edx
callq 0x20d0
leaq 0x25af2(%rip), %rdi     # 0x2920e
leaq 0x25aa5(%rip), %rsi     # 0x291c8
leaq 0x25aad(%rip), %rcx     # 0x291d7
movl $0x10, %edx
callq 0x20d0
leaq 0x25ae8(%rip), %rdi     # 0x29223
leaq 0x25a86(%rip), %rsi     # 0x291c8
leaq 0x25a8e(%rip), %rcx     # 0x291d7
movl $0x11, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/attack.cpp
// Function: attacked_by_king(position*, square_t, color_t)
bool attacked_by_king(position *p,square_t sq,color_t player) {
    assert(p);
    assert(sq >= A8 && sq <= H1);
    assert(player==WHITE || player==BLACK);

    return bb_king_moves[sq] & bb_squares[player==WHITE ? p->white_king : p->black_king];
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x378f
cmpl $0x40, %esi
jae 0x37ae
cmpl $0x2, %edx
jae 0x37cd
xorl %eax, %eax
cmpl $0x1, %edx
setne %al
movl %esi, %ecx
leaq 0xf713c(%rip), %rdx     # 0xfa8b0
movl 0x14c(%rdi,%rax,4), %eax
leaq 0xf6d2e(%rip), %rsi     # 0xfa4b0
movq (%rsi,%rax,8), %rax
testq %rax, (%rdx,%rcx,8)
setne %al
popq %rcx
retq
leaq 0x31ae6(%rip), %rdi     # 0x3527c
leaq 0x25a2b(%rip), %rsi     # 0x291c8
leaq 0x25a9e(%rip), %rcx     # 0x29242
movl $0x17, %edx
callq 0x20d0
leaq 0x25a59(%rip), %rdi     # 0x2920e
leaq 0x25a0c(%rip), %rsi     # 0x291c8
leaq 0x25a7f(%rip), %rcx     # 0x29242
movl $0x18, %edx
callq 0x20d0
leaq 0x25a4f(%rip), %rdi     # 0x29223
leaq 0x259ed(%rip), %rsi     # 0x291c8
leaq 0x25a60(%rip), %rcx     # 0x29242
movl $0x19, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/attack.cpp
// Function: attacked_by_pawn(position*, square_t, color_t)
bool attacked_by_pawn(position *p,square_t sq,color_t player) {
    assert(p);
    assert(sq >= A8 && sq <= H1);
    assert(player==WHITE || player==BLACK);

    if (player==WHITE) {
        if (((p->white_pawns & ~bb_files[FILE_A]) >> 9) & bb_squares[sq]) return true;
        if (((p->white_pawns & ~bb_files[FILE_H]) >> 7) & bb_squares[sq]) return true;
    } else {
        if (((p->black_pawns & ~bb_files[FILE_A]) << 7) & bb_squares[sq]) return true;
        if (((p->black_pawns & ~bb_files[FILE_H]) << 9) & bb_squares[sq]) return true;
    }

    return false;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x38d2
cmpl $0x40, %esi
jae 0x38f1
cmpl $0x2, %edx
jae 0x3910
leaq 0xf6bc7(%rip), %r8      # 0xfa430
movq (%r8), %r9
notq %r9
movl %esi, %eax
leaq 0xf6c38(%rip), %rcx     # 0xfa4b0
movq (%rcx,%rax,8), %rcx
cmpl $0x1, %edx
jne 0x38a6
movq 0x158(%rdi), %rdx
andq %rdx, %r9
shrq $0x9, %r9
movb $0x1, %al
testq %rcx, %r9
jne 0x38d0
movq 0x38(%r8), %rsi
notq %rsi
andq %rsi, %rdx
shrq $0x7, %rdx
jmp 0x38c9
movq 0x160(%rdi), %rdx
andq %rdx, %r9
shlq $0x7, %r9
movb $0x1, %al
testq %rcx, %r9
jne 0x38d0
movq 0x38(%r8), %rsi
notq %rsi
andq %rsi, %rdx
shlq $0x9, %rdx
testq %rcx, %rdx
jne 0x38d0
xorl %eax, %eax
popq %rcx
retq
leaq 0x319a3(%rip), %rdi     # 0x3527c
leaq 0x258e8(%rip), %rsi     # 0x291c8
leaq 0x25990(%rip), %rcx     # 0x29277
movl $0x2f, %edx
callq 0x20d0
leaq 0x25916(%rip), %rdi     # 0x2920e
leaq 0x258c9(%rip), %rsi     # 0x291c8
leaq 0x25971(%rip), %rcx     # 0x29277
movl $0x30, %edx
callq 0x20d0
leaq 0x2590c(%rip), %rdi     # 0x29223
leaq 0x258aa(%rip), %rsi     # 0x291c8
leaq 0x25952(%rip), %rcx     # 0x29277
movl $0x31, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/attack.cpp
// Function: attacked(position*, square_t, color_t)
bool attacked(position *p,square_t sq,color_t player) {

    if (attacked_by_pawn(p,sq,player)) return true;
    if (attacked_by_knight(p,sq,player)) return true;
    if (attacked_by_king(p,sq,player)) return true;
    if (attacked_by_rook(p,sq,player)) return true;
    if (attacked_by_bishop(p,sq,player)) return true;
    if (attacked_by_queen(p,sq,player)) return true;

    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
callq 0x3846
movb $0x1, %bpl
testb %al, %al
jne 0x39d2
movq %r14, %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x36c4
testb %al, %al
jne 0x39d2
movq %r14, %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x3753
testb %al, %al
jne 0x39d2
xorl %eax, %eax
cmpl $0x1, %r15d
setne %al
movq 0x188(%r14,%rax,8), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x677c
testq %rax, %rax
jne 0x39d2
xorl %eax, %eax
cmpl $0x1, %r15d
setne %al
movq 0x178(%r14,%rax,8), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x665c
testq %rax, %rax
jne 0x39d2
xorl %eax, %eax
cmpl $0x1, %r15d
setne %al
movq 0x198(%r14,%rax,8), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x674a
testq %rax, %rax
setne %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/attack.cpp
// Function: get_attackers(position*, square_t, color_t)
uint64 get_attackers(position *p,square_t sq,color_t player) {
    uint64 attackers = 0;

    attackers = bb_knight_moves[sq] & (player==WHITE ? p->white_knights : p->black_knights);
    attackers |= bb_king_moves[sq] & (player==WHITE ? bb_squares[p->white_king] : bb_squares[p->black_king]);

    if (player==WHITE) {
        attackers |= ((bb_squares[sq] & ~bb_files[FILE_A]) << 7) & p->white_pawns;
        attackers |= ((bb_squares[sq] & ~bb_files[FILE_H]) << 9) & p->white_pawns;
    } else {
        attackers |= ((bb_squares[sq] & ~bb_files[FILE_A]) >> 9) & p->black_pawns;
        attackers |= ((bb_squares[sq] & ~bb_files[FILE_H]) >> 7) & p->black_pawns;
    }

    attackers |= get_bishop_moves(p,sq,player==WHITE ? p->white_bishops : p->black_bishops);
    attackers |= get_rook_moves(p,sq,player==WHITE ? p->white_rooks : p->black_rooks);
    attackers |= get_queen_moves(p,sq,player==WHITE ? p->white_queens : p->black_queens);

    return attackers;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl %esi, %ecx
leaq 0xf6cb7(%rip), %rax     # 0xfa6b0
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
leaq 0xf6aa7(%rip), %r9      # 0xfa4b0
movq (%r9,%rcx,8), %rdi
leaq 0xf6a1c(%rip), %r8      # 0xfa430
movq (%r8), %rax
movq 0x38(%r8), %r13
notq %rax
andq %rdi, %rax
notq %r13
andq %rdi, %r13
xorl %edi, %edi
leaq 0xf6e80(%rip), %r8      # 0xfa8b0
movq (%r8,%rcx,8), %rcx
movq %rcx, 0x18(%rsp)
cmpl $0x1, %edx
setne %dil
movq 0x168(%r14,%rdi,8), %rcx
movq %rcx, 0x10(%rsp)
movl 0x14c(%r14,%rdi,4), %ecx
movq (%r9,%rcx,8), %rbp
jne 0x3a7f
shlq $0x7, %rax
shlq $0x9, %r13
orq %rax, %r13
andq 0x158(%r14), %r13
movl $0x178, %eax            # imm = 0x178
movl $0x188, %r12d           # imm = 0x188
movl $0x198, %ecx            # imm = 0x198
jmp 0x3aa1
shrq $0x9, %rax
shrq $0x7, %r13
orq %rax, %r13
andq 0x160(%r14), %r13
movl $0x180, %eax            # imm = 0x180
movl $0x190, %r12d           # imm = 0x190
movl $0x1a0, %ecx            # imm = 0x1A0
movq %rcx, 0x8(%rsp)
movq (%r14,%rax), %rdx
movq %r14, %rdi
movl %esi, %ebx
callq 0x665c
movq %rax, %r15
movq (%r14,%r12), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x677c
movq %rax, %r12
movq 0x8(%rsp), %rax
movq (%r14,%rax), %rdx
movq 0x10(%rsp), %rax
andq 0x20(%rsp), %rax
andq 0x18(%rsp), %rbp
orq %rax, %rbp
orq %r15, %rbp
orq %rbp, %r12
movq %r14, %rdi
movl %ebx, %esi
callq 0x674a
orq %r12, %rax
orq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/bitboards.cpp
// Function: get_lsb_slow(unsigned long long)
uint32 get_lsb_slow(uint64 val) {
    assert(val > 0);

    for (int i=0;i<64;i++) {
        if (val & bb_squares[i]) {
            return i;
        }
    }

    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x3b3b
xorl %eax, %eax
leaq 0xf6987(%rip), %rcx     # 0xfa4b0
testq %rdi, (%rcx,%rax,8)
jne 0x3b3a
incq %rax
cmpq $0x40, %rax
jne 0x3b29
xorl %eax, %eax
retq
pushq %rax
leaq 0x2577d(%rip), %rdi     # 0x292c0
leaq 0x2577e(%rip), %rsi     # 0x292c8
leaq 0x25789(%rip), %rcx     # 0x292da
movl $0x1c, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/bitboards.cpp
// Function: get_lsb(unsigned long long)
uint32 get_lsb(uint64 val) {
    assert(val > 0);

    if (val & 65535) {
        return lsb[(uint32)(val & 65535)];
    }

    val >>= 16;
    if (val & 65535) {
        return lsb[(uint32)(val & 65535)] + 16;
    }

    val >>= 16;
    if (val & 65535) {
        return lsb[(uint32)(val & 65535)] + 32;
    }

    val >>= 16;
    return lsb[(uint32)val] + 48;
}

// Assembly:
testq %rdi, %rdi
je 0x3bba
movq %rdi, %rax
andq $0xffff, %rax           # imm = 0xFFFF
je 0x3b76
leaq 0x3e92e(%rip), %rcx     # 0x424a0
movl (%rcx,%rax,4), %eax
retq
movl %edi, %eax
shrl $0x10, %eax
je 0x3b8b
leaq 0x3e91c(%rip), %rcx     # 0x424a0
movl (%rcx,%rax,4), %eax
addl $0x10, %eax
retq
movq %rdi, %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
je 0x3ba8
leaq 0x3e8ff(%rip), %rcx     # 0x424a0
movl (%rcx,%rax,4), %eax
addl $0x20, %eax
retq
shrq $0x30, %rdi
leaq 0x3e8ed(%rip), %rax     # 0x424a0
movl (%rax,%rdi,4), %eax
addl $0x30, %eax
retq
pushq %rax
leaq 0x256fe(%rip), %rdi     # 0x292c0
leaq 0x256ff(%rip), %rsi     # 0x292c8
leaq 0x25726(%rip), %rcx     # 0x292f6
movl $0x28, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/bitboards.cpp
// Function: get_msb_slow(unsigned long long)
uint32 get_msb_slow(uint64 val) {
    assert(val > 0);

    for (int i=63;i>=0;i--) {
        if (val & bb_squares[i]) {
            return i;
        }
    }

    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x3c05
movl $0x3f, %ecx
leaq 0xf68c5(%rip), %rax     # 0xfa4b0
movl %ecx, %edx
testq %rdi, (%rax,%rdx,8)
jne 0x3bfd
addl $-0x1, %ecx
jb 0x3beb
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
retq
pushq %rax
leaq 0x256b3(%rip), %rdi     # 0x292c0
leaq 0x256b4(%rip), %rsi     # 0x292c8
leaq 0x256f2(%rip), %rcx     # 0x2930d
movl $0x3d, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/bitboards.cpp
// Function: get_msb(unsigned long long)
uint32 get_msb(uint64 val) {
    assert(val > 0);

    if ((val >> 48) & 65535) {
        return msb[(uint32)((val>>48)&65535)] + 48;
    }

    if ((val >> 32) & 65535) {
        return msb[(uint32)((val>>32)&65535)] + 32;
    }

    if ((val >> 16) & 65535) {
        return msb[(uint32)((val>>16)&65535)] + 16;
    }

    return msb[(uint32)val];
}

// Assembly:
testq %rdi, %rdi
je 0x3c7e
movq %rdi, %rax
shrq $0x30, %rax
jne 0x3c50
movq %rdi, %rax
shrq $0x20, %rax
jne 0x3c5e
cmpq $0x10000, %rdi          # imm = 0x10000
jae 0x3c6c
leaq 0x7e854(%rip), %rax     # 0x824a0
movl (%rax,%rdi,4), %eax
retq
leaq 0x7e849(%rip), %rcx     # 0x824a0
movl (%rcx,%rax,4), %eax
addl $0x30, %eax
retq
leaq 0x7e83b(%rip), %rcx     # 0x824a0
movl (%rcx,%rax,4), %eax
addl $0x20, %eax
retq
shrq $0x10, %rdi
leaq 0x7e829(%rip), %rax     # 0x824a0
movl (%rax,%rdi,4), %eax
addl $0x10, %eax
retq
pushq %rax
leaq 0x2563a(%rip), %rdi     # 0x292c0
leaq 0x2563b(%rip), %rsi     # 0x292c8
leaq 0x25695(%rip), %rcx     # 0x29329
movl $0x49, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/bitboards.cpp
// Function: isolate_lsb_bit(unsigned long long, unsigned int)
uint64 isolate_lsb_bit(uint64 mask,uint32 bit_pos) {

    uint32 n=0;
    for (int i=0;i<64;i++) {
        if (bb_squares[i] & mask) {
            if (n==bit_pos) {
                return bb_squares[i];
            }
            n++;
        }
    }

    return 0;
}

// Assembly:
xorl %ecx, %ecx
leaq 0xf6809(%rip), %rdx     # 0xfa4b0
xorl %r8d, %r8d
movq (%rdx,%rcx,8), %rax
testq %rdi, %rax
je 0x3cbb
cmpl %esi, %r8d
je 0x3cc6
incl %r8d
incq %rcx
cmpq $0x40, %rcx
jne 0x3caa
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/bitboards.cpp
// Function: init_knight_moves()
void init_knight_moves() {

    for (int i=0;i<64;i++) {
        square_t sq = (square_t)i;
        bb_knight_moves[sq] = 0;
        rank_t r = get_rank(sq);
        file_t f = get_file(sq);
        if (f > FILE_A) {
            if (r > RANK_7) {
                bb_knight_moves[sq] |= bb_squares[north(northwest(sq))];
            }
            if (r < RANK_2) {
                bb_knight_moves[sq] |= bb_squares[south(southwest(sq))];
            }
        }
        if (f > FILE_B) {
            if (r > RANK_8) {
                bb_knight_moves[sq] |= bb_squares[northwest(west(sq))];
            }
            if (r < RANK_1) {
                bb_knight_moves[sq] |= bb_squares[southwest(west(sq))];
            }
        }
        if (f < FILE_G) {
            if (r > RANK_8) {
                bb_knight_moves[sq] |= bb_squares[northeast(east(sq))];
            }
            if (r < RANK_1) {
                bb_knight_moves[sq] |= bb_squares[southeast(east(sq))];
            }
        }
        if (f < FILE_H) {
            if (r > RANK_7) {
                bb_knight_moves[sq] |= bb_squares[north(northeast(sq))];
            }
            if (r < RANK_2) {
                bb_knight_moves[sq] |= bb_squares[south(southeast(sq))];
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
leaq 0xf69d8(%rip), %r15     # 0xfa6b0
leaq 0xf67d1(%rip), %r12     # 0xfa4b0
movq $0x0, (%r15,%rbx,8)
movl %ebx, %edi
callq 0xca75
movl %eax, %ebp
movl %ebx, %edi
callq 0xca4a
movl %eax, %r14d
testl %eax, %eax
jle 0x3d38
cmpl $0x2, %ebp
jl 0x3d1b
movl %ebx, %edi
callq 0xcdc7
movl %eax, %edi
callq 0xcc11
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x5, %ebp
jg 0x3d38
movl %ebx, %edi
callq 0xcd87
movl %eax, %edi
callq 0xcc4a
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x2, %r14d
jl 0x3d77
testl %ebp, %ebp
jle 0x3d5a
movl %ebx, %edi
callq 0xccc6
movl %eax, %edi
callq 0xcdc7
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x6, %ebp
jg 0x3d77
movl %ebx, %edi
callq 0xccc6
movl %eax, %edi
callq 0xcd87
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x5, %r14d
jg 0x3db6
testl %ebp, %ebp
jle 0x3d99
movl %ebx, %edi
callq 0xcc89
movl %eax, %edi
callq 0xccfc
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x6, %ebp
jg 0x3db6
movl %ebx, %edi
callq 0xcc89
movl %eax, %edi
callq 0xcd3f
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x6, %r14d
jg 0x3df6
cmpl $0x2, %ebp
jl 0x3dd9
movl %ebx, %edi
callq 0xccfc
movl %eax, %edi
callq 0xcc11
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x5, %ebp
jg 0x3df6
movl %ebx, %edi
callq 0xcd3f
movl %eax, %edi
callq 0xcc4a
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
incq %rbx
cmpq $0x40, %rbx
jne 0x3cdf
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jswaff[P]prophet3/src/bitboards.cpp
// Function: init_king_moves()
void init_king_moves() {
    for (int i=0;i<64;i++) {
        square_t sq = (square_t)i;
        bb_king_moves[sq] = 0;
        rank_t r = get_rank(sq);
        file_t f = get_file(sq);
        if (r > RANK_8) {
            if (f > FILE_A) {
                bb_king_moves[sq] |= bb_squares[northwest(sq)];
            }
            bb_king_moves[sq] |= bb_squares[north(sq)];
            if (f < FILE_H) {
                bb_king_moves[sq] |= bb_squares[northeast(sq)];
            }
        }
        if (f < FILE_H) {
            bb_king_moves[sq] |= bb_squares[east(sq)];
        }
        if (r < RANK_1) {
            if (f < FILE_H) {
                bb_king_moves[sq] |= bb_squares[southeast(sq)];
            }
            bb_king_moves[sq] |= bb_squares[south(sq)];
            if (f > FILE_A) {
                bb_king_moves[sq] |= bb_squares[southwest(sq)];
            }
        }
        if (f > FILE_A) {
            bb_king_moves[sq] |= bb_squares[west(sq)];
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
leaq 0xf6a93(%rip), %r15     # 0xfa8b0
leaq 0xf668c(%rip), %r12     # 0xfa4b0
movq $0x0, (%r15,%rbx,8)
movl %ebx, %edi
callq 0xca75
movl %eax, %r14d
movl %ebx, %edi
callq 0xca4a
movl %eax, %ebp
testl %r14d, %r14d
jle 0x3e80
testl %ebp, %ebp
jle 0x3e59
movl %ebx, %edi
callq 0xcdc7
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
movl %ebx, %edi
callq 0xcc11
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x6, %ebp
jg 0x3e80
movl %ebx, %edi
callq 0xccfc
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x6, %ebp
jg 0x3e96
movl %ebx, %edi
callq 0xcc89
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
cmpl $0x6, %r14d
jg 0x3ed8
cmpl $0x6, %ebp
jg 0x3eb2
movl %ebx, %edi
callq 0xcd3f
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
movl %ebx, %edi
callq 0xcc4a
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
testl %ebp, %ebp
jle 0x3ed8
movl %ebx, %edi
callq 0xcd87
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
testl %ebp, %ebp
jle 0x3eed
movl %ebx, %edi
callq 0xccc6
movl %eax, %eax
movq (%r12,%rax,8), %rax
orq %rax, (%r15,%rbx,8)
incq %rbx
cmpq $0x40, %rbx
jne 0x3e24
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq