LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tewalds[P]morat/hex/gtpgeneral.cpp
// Function: Morat::Hex::GTP::gtp_playgame(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
GTPResponse GTP::gtp_playgame(vecstr args){
	GTPResponse ret(true);

	for(unsigned int i = 0; ret.success && i < args.size(); i++)
		ret = play(args[i], hist->to_play());

	return ret;
}

// Assembly:
subq $0xf8, %rsp
movq %rdx, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x40(%rsp)
movb $0x0, 0xdf(%rsp)
leaq 0xb7(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x5770
movq 0x48(%rsp), %rdx
leaq 0xbc15(%rip), %rsi      # 0x4c8e9
leaq 0xb8(%rsp), %rdi
callq 0x5590
jmp 0x40ce3
movq 0x30(%rsp), %rdi
movl $0x1, %esi
leaq 0xb8(%rsp), %rdx
callq 0xd9a0
jmp 0x40cfc
leaq 0xb8(%rsp), %rdi
callq 0x5260
leaq 0xb7(%rsp), %rdi
callq 0x5450
movl $0x0, 0xa0(%rsp)
movq 0x30(%rsp), %rcx
xorl %eax, %eax
testb $0x1, (%rcx)
movb %al, 0x27(%rsp)
je 0x40d59
movq 0x28(%rsp), %rdi
movl 0xa0(%rsp), %eax
movq %rax, 0x18(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
setb %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x40d66
jmp 0x40e5b
movq 0x28(%rsp), %rdi
movl 0xa0(%rsp), %eax
movl %eax, %esi
callq 0x13ca0
movq 0x40(%rsp), %rdi
movq %rax, 0x8(%rsp)
addq $0x68, %rdi
callq 0x3ea90
movq %rax, 0x10(%rsp)
jmp 0x40d93
movq 0x10(%rsp), %rdi
callq 0x1a8a0
movb %al, 0x7(%rsp)
jmp 0x40da3
movq 0x8(%rsp), %rdx
movq 0x40(%rsp), %rsi
movb 0x7(%rsp), %al
movb %al, 0x57(%rsp)
movzbl 0x57(%rsp), %ecx
leaq 0x58(%rsp), %rdi
callq 0x405e0
jmp 0x40dc6
movq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x13e70
leaq 0x58(%rsp), %rdi
callq 0xb5f0
movl 0xa0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa0(%rsp)
jmp 0x40d21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x40e2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x5260
leaq 0xb7(%rsp), %rdi
callq 0x5450
jmp 0x40e84
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0xb5f0
jmp 0x40e84
movb $0x1, 0xdf(%rsp)
testb $0x1, 0xdf(%rsp)
jne 0x40e77
movq 0x30(%rsp), %rdi
callq 0xb5f0
movq 0x38(%rsp), %rax
addq $0xf8, %rsp
retq
movq 0xa8(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/hex/gtpgeneral.cpp
// Function: Morat::Hex::GTP::gtp_play(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
GTPResponse GTP::gtp_play(vecstr args){
	if(args.size() != 2)
		return GTPResponse(false, "Wrong number of arguments");

	switch(tolower(args[0][0])){
		case 'w': return play(args[1], Side::P1);
		case 'b': return play(args[1], Side::P2);
		default:  return GTPResponse(false, "Invalid player selection");
	}
}

// Assembly:
subq $0xb8, %rsp
movq %rdx, 0x20(%rsp)
movq %rdi, %rax
movq 0x20(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq %rax, %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdi, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
callq 0x13c80
cmpq $0x2, %rax
je 0x40f8b
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5770
movq 0x18(%rsp), %rdx
leaq 0xf69f(%rip), %rsi      # 0x505af
leaq 0x80(%rsp), %rdi
callq 0x5590
jmp 0x40f1f
movq 0x28(%rsp), %rdi
xorl %esi, %esi
leaq 0x80(%rsp), %rdx
callq 0xd9a0
jmp 0x40f35
leaq 0x80(%rsp), %rdi
callq 0x5260
leaq 0x7f(%rsp), %rdi
callq 0x5450
jmp 0x410bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0x40f7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x5260
leaq 0x7f(%rsp), %rdi
callq 0x5450
jmp 0x410ca
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsi, 0x8(%rsp)
callq 0x13ca0
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x5850
movsbl (%rax), %edi
callq 0x55f0
movl %eax, %ecx
movl %ecx, 0x14(%rsp)
subl $0x62, %eax
je 0x41003
jmp 0x40fc0
movl 0x14(%rsp), %eax
subl $0x77, %eax
jne 0x4103b
jmp 0x40fcb
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x13ca0
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, %rdx
leaq 0x2c4ce(%rip), %rax     # 0x6d4bc
movb (%rax), %al
movb %al, 0x6b(%rsp)
movzbl 0x6b(%rsp), %ecx
callq 0x405e0
jmp 0x410bd
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x13ca0
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, %rdx
leaq 0x2c497(%rip), %rax     # 0x6d4bd
movb (%rax), %al
movb %al, 0x6a(%rsp)
movzbl 0x6a(%rsp), %ecx
callq 0x405e0
jmp 0x410bd
leaq 0x47(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x5770
movq (%rsp), %rdx
leaq 0xf575(%rip), %rsi      # 0x505c9
leaq 0x48(%rsp), %rdi
callq 0x5590
jmp 0x41060
movq 0x28(%rsp), %rdi
xorl %esi, %esi
leaq 0x48(%rsp), %rdx
callq 0xd9a0
jmp 0x41073
leaq 0x48(%rsp), %rdi
callq 0x5260
leaq 0x47(%rsp), %rdi
callq 0x5450
jmp 0x410bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0x410b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5260
leaq 0x47(%rsp), %rdi
callq 0x5450
jmp 0x410ca
movq 0x30(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/hex/gtpgeneral.cpp
// Function: Morat::Hex::GTP::gtp_verbose(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
GTPResponse GTP::gtp_verbose(vecstr args){
	if(args.size() >= 1)
		verbose = from_str<int>(args[0]);
	else
		verbose = !verbose;
	return GTPResponse(true, "Verbose " + to_str(verbose));
}

// Assembly:
subq $0x98, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, %rax
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq %rax, %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdi, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x13c80
cmpq $0x1, %rax
jb 0x415d6
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x10220
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0xc8(%rax)
jmp 0x415f4
movq 0x28(%rsp), %rax
cmpl $0x0, 0xc8(%rax)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, 0xc8(%rax)
movq 0x28(%rsp), %rax
movl 0xc8(%rax), %esi
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1a430
movq 0x8(%rsp), %rdx
leaq 0xefd7(%rip), %rsi      # 0x505f1
leaq 0x60(%rsp), %rdi
callq 0x19f30
jmp 0x41626
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x60(%rsp), %rdx
callq 0xd9a0
jmp 0x4163c
leaq 0x60(%rsp), %rdi
callq 0x5260
leaq 0x40(%rsp), %rdi
callq 0x5260
movq 0x20(%rsp), %rax
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x41685
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x5260
leaq 0x40(%rsp), %rdi
callq 0x5260
movq 0x38(%rsp), %rdi
callq 0x5760
nopl (%rax)
// File: tewalds[P]morat/hex/gtpgeneral.cpp
// Function: Morat::Hex::GTP::gtp_colorboard(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
GTPResponse GTP::gtp_colorboard(vecstr args){
	if(args.size() >= 1)
		colorboard = from_str<int>(args[0]);
	else
		colorboard = !colorboard;
	return GTPResponse(true, "Color " + to_str(colorboard));
}

// Assembly:
subq $0x98, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, %rax
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq %rax, %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdi, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x13c80
cmpq $0x1, %rax
jb 0x4171f
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x10220
movl %eax, %ecx
movq 0x28(%rsp), %rax
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0xcd(%rax)
jmp 0x41736
movq 0x28(%rsp), %rax
movb 0xcd(%rax), %cl
xorb $-0x1, %cl
andb $0x1, %cl
movb %cl, 0xcd(%rax)
movq 0x28(%rsp), %rax
movzbl 0xcd(%rax), %esi
andl $0x1, %esi
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x3ede0
movq 0x8(%rsp), %rdx
leaq 0xee9a(%rip), %rsi      # 0x505fa
leaq 0x60(%rsp), %rdi
callq 0x19f30
jmp 0x4176c
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x60(%rsp), %rdx
callq 0xd9a0
jmp 0x41782
leaq 0x60(%rsp), %rdi
callq 0x5260
leaq 0x40(%rsp), %rdi
callq 0x5260
movq 0x20(%rsp), %rax
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x417cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x5260
leaq 0x40(%rsp), %rdi
callq 0x5260
movq 0x38(%rsp), %rdi
callq 0x5760
nop
// File: tewalds[P]morat/hex/gtpgeneral.cpp
// Function: Morat::Hex::GTP::gtp_extended(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
GTPResponse GTP::gtp_extended(vecstr args){
	if(args.size() >= 1)
		genmoveextended = from_str<bool>(args[0]);
	else
		genmoveextended = !genmoveextended;
	return GTPResponse(true, "extended " + to_str(genmoveextended));
}

// Assembly:
subq $0x98, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, %rax
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq %rax, %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdi, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x13c80
cmpq $0x1, %rax
jb 0x41859
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3ef10
movb %al, %cl
movq 0x28(%rsp), %rax
andb $0x1, %cl
movb %cl, 0xcc(%rax)
jmp 0x41870
movq 0x28(%rsp), %rax
movb 0xcc(%rax), %cl
xorb $-0x1, %cl
andb $0x1, %cl
movb %cl, 0xcc(%rax)
movq 0x28(%rsp), %rax
movzbl 0xcc(%rax), %esi
andl $0x1, %esi
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x3ede0
movq 0x8(%rsp), %rdx
leaq 0xed67(%rip), %rsi      # 0x50601
leaq 0x60(%rsp), %rdi
callq 0x19f30
jmp 0x418a6
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x60(%rsp), %rdx
callq 0xd9a0
jmp 0x418bc
leaq 0x60(%rsp), %rdi
callq 0x5260
leaq 0x40(%rsp), %rdi
callq 0x5260
movq 0x20(%rsp), %rax
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x41905
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x5260
leaq 0x40(%rsp), %rdi
callq 0x5260
movq 0x38(%rsp), %rdi
callq 0x5760
nopl (%rax)
// File: tewalds[P]morat/hex/agentpns.h
// Function: Morat::Hex::AgentPNS::AgentPNS(Morat::Hex::Board const&)
AgentPNS(const Board & b) : Agent(b), pool(this) {
		ab = 2;
		df = true;
		epsilon = 0.25;
		ties = Side::NONE;
		lbdist = false;
		numthreads = 1;
		pool.set_num_threads(numthreads);
		gclimit = 5;

		nodes = 0;
		reset();

		set_memlimit(1000*1024*1024);
	}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x38(%rsp), %rsi
callq 0x1b560
movq 0x18(%rsp), %rdi
leaq 0x2963a(%rip), %rax     # 0x6cb08
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x70, %rdi
movq %rdi, 0x20(%rsp)
callq 0x44620
jmp 0x434e5
movq 0x18(%rsp), %rsi
movq %rsi, %rdi
addq $0x1430, %rdi           # imm = 0x1430
movq %rdi, 0x10(%rsp)
callq 0x446b0
jmp 0x43500
movq 0x18(%rsp), %rdi
addq $0x1534, %rdi           # imm = 0x1534
callq 0xff20
jmp 0x43513
movq 0x18(%rsp), %rdi
addq $0x1540, %rdi           # imm = 0x1540
movq %rdi, 0x8(%rsp)
callq 0x300c0
jmp 0x4352b
movq 0x18(%rsp), %rax
movl $0x2, 0x1528(%rax)
movb $0x1, 0x152c(%rax)
movl $0x3e800000, 0x1530(%rax) # imm = 0x3E800000
leaq 0x29f69(%rip), %rcx     # 0x6d4bb
movb (%rcx), %cl
movb %cl, 0x1534(%rax)
movb $0x0, 0x1535(%rax)
movl $0x1, 0x1538(%rax)
movq %rax, %rdi
addq $0x1430, %rdi           # imm = 0x1430
movl 0x1538(%rax), %esi
callq 0x31f70
jmp 0x43582
movq 0x18(%rsp), %rdi
movl $0x5, 0x68(%rdi)
movq $0x0, 0x58(%rdi)
callq 0x34700
jmp 0x4359d
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
movl $0x3e800000, %esi       # imm = 0x3E800000
callq *%rax
jmp 0x435b2
addq $0x48, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x43613
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x43609
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x435ff
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x30100
movq 0x10(%rsp), %rdi
callq 0x32790
movq 0x20(%rsp), %rdi
callq 0x32800
movq 0x18(%rsp), %rdi
callq 0x1e390
movq 0x30(%rsp), %rdi
callq 0x5760
nopw (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/history.h
// Function: Morat::History<Morat::Hex::Board>::undo()
bool undo() {
		if(hist.size() <= 0)
			return false;

		hist.pop_back();

		board.clear();
		for(auto m : hist) {
			board.move(m);
		}
		return true;
	}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x1c5d0
cmpq $0x0, %rax
ja 0x43717
movb $0x0, 0x37(%rsp)
jmp 0x437a5
movq (%rsp), %rdi
callq 0x44fc0
movq (%rsp), %rdi
addq $0x18, %rdi
callq 0x10390
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1b430
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1b460
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1b490
testb $0x1, %al
jne 0x43769
jmp 0x437a0
leaq 0x18(%rsp), %rdi
callq 0x1b4d0
movq (%rsp), %rdi
movw (%rax), %ax
movw %ax, 0xe(%rsp)
addq $0x18, %rdi
leaq 0xe(%rsp), %rsi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x1c500
leaq 0x18(%rsp), %rdi
callq 0x1b4e0
jmp 0x43754
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
// File: tewalds[P]morat/hex/../lib/board_grid_hex.h
// Function: Morat::BoardGridHex<Morat::Hex::Board>::pattern_symmetry(unsigned long)
static Pattern pattern_symmetry(Pattern p) { //takes a pattern and returns the representative version
		Pattern m = p;                 //012345
		m = std::min(m, (p = pattern_rotate(p)));//501234
		m = std::min(m, (p = pattern_rotate(p)));//450123
		m = std::min(m, (p = pattern_rotate(p)));//345012
		m = std::min(m, (p = pattern_rotate(p)));//234501
		m = std::min(m, (p = pattern_rotate(p)));//123450
		m = std::min(m, (p = pattern_mirror(pattern_rotate(p))));//012345 -> 054321
		m = std::min(m, (p = pattern_rotate(p)));//105432
		m = std::min(m, (p = pattern_rotate(p)));//210543
		m = std::min(m, (p = pattern_rotate(p)));//321054
		m = std::min(m, (p = pattern_rotate(p)));//432105
		m = std::min(m, (p = pattern_rotate(p)));//543210
		return m;
	}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, %rdi
callq 0x45010
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44fe0
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10e30
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tewalds[P]morat/hex/../lib/lbdist.h
// Function: Morat::LBDistsBase<Morat::Hex::LBDists, Morat::Hex::Board>::to_s[abi:cxx11](Morat::Side)
std::string to_s(Side side = Side::NONE) {
	// Return a string representation of the whole board, with empty cells showing their distance numbers
		if (board == NULL)
			return "LBDistsBase has no board.....\n";
		return board->to_s(true, std::bind(&LBDistsBase::get_s, this, std::placeholders::_1, side));
	}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0x28(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x30(%rsp)
movq %rdi, 0xc0(%rsp)
movb %al, 0xbf(%rsp)
movq %rsi, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x9c58(%rax)
jne 0x43b46
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0xcc64(%rip), %rsi      # 0x5076b
callq 0x5590
jmp 0x43b0e
leaq 0xaf(%rsp), %rdi
callq 0x5450
jmp 0x43bf4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xaf(%rsp), %rdi
callq 0x5450
jmp 0x43c01
movq 0x38(%rsp), %rax
movq 0x9c58(%rax), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x1652(%rip), %rcx      # 0x451b0
movq %rcx, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movq %rax, 0x40(%rsp)
movq 0x29448(%rip), %rcx     # 0x6cfc0
leaq 0x58(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0x48(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0xbf(%rsp), %r8
callq 0x45160
movq 0x8(%rsp), %rsi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x452f0
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movl $0x1, %edx
callq 0x35fd0
jmp 0x43bc8
leaq 0x78(%rsp), %rdi
callq 0x373b0
jmp 0x43bf4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x373b0
jmp 0x43c01
movq 0x30(%rsp), %rax
addq $0xc8, %rsp
retq
movq 0xa0(%rsp), %rdi
callq 0x5760
nop
// File: tewalds[P]morat/hex/../lib/zobrist.h
// Function: Morat::Zobrist<2>::get() const
uint64_t get() const {
		uint64_t m = values[0];
		for(int i = 1; i < num; i++)
			if(m > values[i])
				m = values[i];
		return m;
	}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq (%rax), %rax
movq %rax, -0x10(%rsp)
movl $0x1, -0x14(%rsp)
cmpl $0x2, -0x14(%rsp)
jge 0x44ead
movq -0x20(%rsp), %rcx
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jbe 0x44e9e
movq -0x20(%rsp), %rax
movslq -0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rsp)
jmp 0x44ea0
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x44e6f
movq -0x10(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: tewalds[P]morat/hex/../lib/board_grid_hex.h
// Function: Morat::BoardGridHex<Morat::Hex::Board>::pattern_mirror(unsigned long)
static Pattern pattern_mirror(Pattern p) {
		// HGFEDC BA9876 543210 -> DEFGHC 6789AB 123450
		return ((p & (3ull <<  6))      ) | ((p & (3ull <<  0))     ) | // 0,3 stay in place
		       ((p & (3ull << 10)) >>  8) | ((p & (3ull <<  2)) << 8) | // 1,5 swap
		       ((p & (3ull <<  8)) >>  4) | ((p & (3ull <<  4)) << 4) | // 2,4 swap
		       ((p & (3ull << 22)) >> 10) | ((p & (3ull << 12)) <<10) | // 6,B swap
		       ((p & (3ull << 20)) >>  6) | ((p & (3ull << 14)) << 6) | // 7,A swap
		       ((p & (3ull << 18)) >>  2) | ((p & (3ull << 16)) << 2) | // 8,9 swap
		       ((p & (3ull << 30))      ) | ((p & (3ull << 24))     ) | // F,C stay in place
		       ((p & (3ull << 34)) >>  8) | ((p & (3ull << 26)) << 8) | // H,D swap
		       ((p & (3ull << 32)) >>  4) | ((p & (3ull << 28)) << 4);  // G,E swap
	}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
andq $0xc0, %rax
movq -0x8(%rsp), %rcx
andq $0x3, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0xc00, %rcx            # imm = 0xC00
shrq $0x8, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0xc, %rcx
shlq $0x8, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0x300, %rcx            # imm = 0x300
shrq $0x4, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0x30, %rcx
shlq $0x4, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0xc00000, %rcx         # imm = 0xC00000
shrq $0xa, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0x3000, %rcx           # imm = 0x3000
shlq $0xa, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0x300000, %rcx         # imm = 0x300000
shrq $0x6, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0xc000, %rcx           # imm = 0xC000
shlq $0x6, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0xc0000, %rcx          # imm = 0xC0000
shrq $0x2, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0x30000, %rcx          # imm = 0x30000
shlq $0x2, %rcx
orq %rcx, %rax
movabsq $0xc0000000, %rcx       # imm = 0xC0000000
andq -0x8(%rsp), %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0x3000000, %rcx        # imm = 0x3000000
orq %rcx, %rax
movabsq $0xc00000000, %rcx      # imm = 0xC00000000
andq -0x8(%rsp), %rcx
shrq $0x8, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0xc000000, %rcx        # imm = 0xC000000
shlq $0x8, %rcx
orq %rcx, %rax
movabsq $0x300000000, %rcx      # imm = 0x300000000
andq -0x8(%rsp), %rcx
shrq $0x4, %rcx
orq %rcx, %rax
movq -0x8(%rsp), %rcx
andq $0x30000000, %rcx       # imm = 0x30000000
shlq $0x4, %rcx
orq %rcx, %rax
retq
nopl (%rax,%rax)
// File: tewalds[P]morat/lib/fileio.cpp
// Function: Morat::eat_whitespace(_IO_FILE*)
void eat_whitespace(FILE * fd){
	int c = fgetc(fd);
	while(c == ' ' || c == '\n' || c == '\t')
		c = fgetc(fd);
	ungetc(c, fd);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x5690
movl %eax, 0xc(%rsp)
movb $0x1, %al
cmpl $0x20, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x4601d
movb $0x1, %al
cmpl $0xa, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x4601d
cmpl $0x9, 0xc(%rsp)
sete %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x46027
jmp 0x46037
movq 0x10(%rsp), %rdi
callq 0x5690
movl %eax, 0xc(%rsp)
jmp 0x45ff7
movl 0xc(%rsp), %edi
movq 0x10(%rsp), %rsi
callq 0x5090
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tewalds[P]morat/lib/fileio.cpp
// Function: Morat::eat_whitespace(std::istream&)
void eat_whitespace(std::istream & is){
	int c = is.peek();
	while(c == ' ' || c == '\n' || c == '\t'){
		is.get();
		c = is.peek();
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x5170
movl %eax, 0xc(%rsp)
movb $0x1, %al
cmpl $0x20, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x4608d
movb $0x1, %al
cmpl $0xa, 0xc(%rsp)
movb %al, 0xb(%rsp)
je 0x4608d
cmpl $0x9, 0xc(%rsp)
sete %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x46097
jmp 0x460b1
movq 0x10(%rsp), %rdi
callq 0x54d0
movq 0x10(%rsp), %rdi
callq 0x5170
movl %eax, 0xc(%rsp)
jmp 0x46067
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/lib/fileio.cpp
// Function: Morat::eat_char(_IO_FILE*, int)
bool eat_char(FILE * fd, int expect){
	int c = fgetc(fd);
	if (c == expect)
		return true;
	ungetc(c, fd);
	return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movq 0x8(%rsp), %rdi
callq 0x5690
movl %eax, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jne 0x460ea
movb $0x1, 0x17(%rsp)
jmp 0x460fc
movl (%rsp), %edi
movq 0x8(%rsp), %rsi
callq 0x5090
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tewalds[P]morat/lib/fileio.cpp
// Function: Morat::eat_char(std::istream&, int)
bool eat_char(std::istream & is, int expect){
	int c = is.peek();
	if (c == expect){
		is.get();
		return true;
	}
	return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movq 0x8(%rsp), %rdi
callq 0x5170
movl %eax, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jne 0x46144
movq 0x8(%rsp), %rdi
callq 0x54d0
movb $0x1, 0x17(%rsp)
jmp 0x46149
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/lib/fileio.cpp
// Function: Morat::read_until[abi:cxx11](_IO_FILE*, char, bool)
string read_until(FILE * fd, char until, bool include){
	string ret;
	char c = fgetc(fd);
	while(c != until){
		ret += c;
		c = fgetc(fd);
	}
	if(!include)
		ungetc(c, fd);
	return ret;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movb %cl, %al
movb %dl, %cl
movq %rdi, %rdx
movq %rdx, 0x18(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movb %cl, 0x37(%rsp)
andb $0x1, %al
movb %al, 0x36(%rsp)
movb $0x0, 0x35(%rsp)
callq 0x55a0
movq 0x38(%rsp), %rdi
callq 0x5690
movl %eax, 0x20(%rsp)
jmp 0x461a3
movl 0x20(%rsp), %eax
movb %al, 0x34(%rsp)
movsbl 0x34(%rsp), %eax
movsbl 0x37(%rsp), %ecx
cmpl %ecx, %eax
je 0x461fe
movq 0x10(%rsp), %rdi
movsbl 0x34(%rsp), %esi
callq 0x5270
jmp 0x461ca
movq 0x38(%rsp), %rdi
callq 0x5690
movl %eax, 0xc(%rsp)
jmp 0x461da
movl 0xc(%rsp), %eax
movb %al, 0x34(%rsp)
jmp 0x461ab
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x5260
jmp 0x46238
testb $0x1, 0x36(%rsp)
jne 0x46218
movsbl 0x34(%rsp), %edi
movq 0x38(%rsp), %rsi
callq 0x5090
jmp 0x46216
jmp 0x46218
movb $0x1, 0x35(%rsp)
testb $0x1, 0x35(%rsp)
jne 0x4622e
movq 0x10(%rsp), %rdi
callq 0x5260
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: tewalds[P]morat/lib/timecontrol.h
// Function: Morat::TimeControl::method_name[abi:cxx11]() const
std::string method_name() const {
		switch(method){
			case PERCENT: return "percent";
			case EVEN:    return "even";
			case STATS:   return "stats";
			default:      return "WTF? unknown time control method";
		}
	}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
testl %eax, %eax
je 0x478c9
jmp 0x478ac
movl 0x3c(%rsp), %eax
subl $0x1, %eax
je 0x4791c
jmp 0x478b7
movl 0x3c(%rsp), %eax
subl $0x2, %eax
je 0x4796f
jmp 0x479bc
leaq 0x57(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x94c7(%rip), %rsi      # 0x50db0
callq 0x5590
jmp 0x478f0
leaq 0x57(%rsp), %rdi
callq 0x5450
jmp 0x47a09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x57(%rsp), %rdi
callq 0x5450
jmp 0x47a13
leaq 0x43(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x947e(%rip), %rsi      # 0x50dba
callq 0x5590
jmp 0x47943
leaq 0x43(%rsp), %rdi
callq 0x5450
jmp 0x47a09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x43(%rsp), %rdi
callq 0x5450
jmp 0x47a13
leaq 0x42(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x9432(%rip), %rsi      # 0x50dc1
callq 0x5590
jmp 0x47996
leaq 0x42(%rsp), %rdi
callq 0x5450
jmp 0x47a09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x42(%rsp), %rdi
callq 0x5450
jmp 0x47a13
leaq 0x41(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x941a(%rip), %rsi      # 0x50df6
callq 0x5590
jmp 0x479e3
leaq 0x41(%rsp), %rdi
callq 0x5450
jmp 0x47a09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x41(%rsp), %rdi
callq 0x5450
jmp 0x47a13
movq 0x30(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x5760
nopl (%rax)
// File: tewalds[P]morat/lib/outcome.cpp
// Function: Morat::Side::to_s[abi:cxx11]() const
std::string Side::to_s() const {
	if(*this == UNDEF) return "never";
	if(*this == NONE)  return "none";
	if(*this == P1)    return "white";
	if(*this == P2)    return "black";
	if(*this == BOTH)  return "both";
	return "unknown";
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movq %rdi, 0x40(%rsp)
leaq 0x2595e(%rip), %rsi     # 0x6d4ba
callq 0x1f930
testb $0x1, %al
jne 0x47b67
jmp 0x47bba
leaq 0x67(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x5770
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
leaq 0x9290(%rip), %rsi      # 0x50e17
callq 0x5590
jmp 0x47b8e
leaq 0x67(%rsp), %rdi
callq 0x5450
jmp 0x47da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x67(%rsp), %rdi
callq 0x5450
jmp 0x47db1
movq 0x40(%rsp), %rdi
leaq 0x258f5(%rip), %rsi     # 0x6d4bb
callq 0x1f930
testb $0x1, %al
jne 0x47bd1
jmp 0x47c24
leaq 0x53(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5770
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x59b1(%rip), %rsi      # 0x4d5a2
callq 0x5590
jmp 0x47bf8
leaq 0x53(%rsp), %rdi
callq 0x5450
jmp 0x47da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x53(%rsp), %rdi
callq 0x5450
jmp 0x47db1
movq 0x40(%rsp), %rdi
leaq 0x2588c(%rip), %rsi     # 0x6d4bc
callq 0x1f930
testb $0x1, %al
jne 0x47c3b
jmp 0x47c8e
leaq 0x52(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5770
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x47f8(%rip), %rsi      # 0x4c453
callq 0x5590
jmp 0x47c62
leaq 0x52(%rsp), %rdi
callq 0x5450
jmp 0x47da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x52(%rsp), %rdi
callq 0x5450
jmp 0x47db1
movq 0x40(%rsp), %rdi
leaq 0x25823(%rip), %rsi     # 0x6d4bd
callq 0x1f930
testb $0x1, %al
jne 0x47ca5
jmp 0x47cf8
leaq 0x51(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5770
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x47c4(%rip), %rsi      # 0x4c489
callq 0x5590
jmp 0x47ccc
leaq 0x51(%rsp), %rdi
callq 0x5450
jmp 0x47da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x51(%rsp), %rdi
callq 0x5450
jmp 0x47db1
movq 0x40(%rsp), %rdi
leaq 0x257ba(%rip), %rsi     # 0x6d4be
callq 0x1f930
testb $0x1, %al
jne 0x47d0f
jmp 0x47d5c
leaq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5770
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x90ee(%rip), %rsi      # 0x50e1d
callq 0x5590
jmp 0x47d36
leaq 0x50(%rsp), %rdi
callq 0x5450
jmp 0x47da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x5450
jmp 0x47db1
leaq 0x4f(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x5770
movq 0x30(%rsp), %rdi
movq (%rsp), %rdx
leaq 0x5820(%rip), %rsi      # 0x4d59a
callq 0x5590
jmp 0x47d81
leaq 0x4f(%rsp), %rdi
callq 0x5450
jmp 0x47da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x4f(%rsp), %rdi
callq 0x5450
jmp 0x47db1
movq 0x38(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x5760
nopl (%rax,%rax)
// File: tewalds[P]morat/lib/outcome.cpp
// Function: Morat::Side::to_s_short[abi:cxx11]() const
std::string Side::to_s_short() const {
	if(*this == NONE)  return "N";
	if(*this == P1)    return "W";
	if(*this == P2)    return "B";
	return "U";
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x58(%rsp), %rdi
movq %rdi, 0x38(%rsp)
leaq 0x252cf(%rip), %rsi     # 0x6d4bb
callq 0x1f930
testb $0x1, %al
jne 0x481f7
jmp 0x4824a
leaq 0x57(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x8c0b(%rip), %rsi      # 0x50e22
callq 0x5590
jmp 0x4821e
leaq 0x57(%rsp), %rdi
callq 0x5450
jmp 0x48365
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x57(%rsp), %rdi
callq 0x5450
jmp 0x4836f
movq 0x38(%rsp), %rdi
leaq 0x25266(%rip), %rsi     # 0x6d4bc
callq 0x1f930
testb $0x1, %al
jne 0x48261
jmp 0x482b4
leaq 0x43(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x5f93(%rip), %rsi      # 0x4e214
callq 0x5590
jmp 0x48288
leaq 0x43(%rsp), %rdi
callq 0x5450
jmp 0x48365
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x43(%rsp), %rdi
callq 0x5450
jmp 0x4836f
movq 0x38(%rsp), %rdi
leaq 0x251fd(%rip), %rsi     # 0x6d4bd
callq 0x1f930
testb $0x1, %al
jne 0x482cb
jmp 0x48318
leaq 0x42(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x5f2b(%rip), %rsi      # 0x4e216
callq 0x5590
jmp 0x482f2
leaq 0x42(%rsp), %rdi
callq 0x5450
jmp 0x48365
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x42(%rsp), %rdi
callq 0x5450
jmp 0x4836f
leaq 0x41(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5770
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x8aec(%rip), %rsi      # 0x50e24
callq 0x5590
jmp 0x4833f
leaq 0x41(%rsp), %rdi
callq 0x5450
jmp 0x48365
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x41(%rsp), %rdi
callq 0x5450
jmp 0x4836f
movq 0x30(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x5760
nopl (%rax)
// File: tewalds[P]morat/lib/string.cpp
// Function: Morat::to_str[abi:cxx11](double, int)
string to_str(double a, int prec){
	double p = pow(10.0, prec);
	a = round(a*p)/p;

	stringstream out;
	out << a;
	return out.str();
}

// Assembly:
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x1c0(%rsp)
vmovsd %xmm0, 0x1b8(%rsp)
movl %esi, 0x1b4(%rsp)
movl 0x1b4(%rsp), %edi
vmovsd 0x8306(%rip), %xmm0     # 0x50ac0
callq 0x49050
vmovsd %xmm0, 0x1a8(%rsp)
vmovsd 0x1b8(%rsp), %xmm0
vmovsd 0x1a8(%rsp), %xmm1
vmulsd %xmm1, %xmm0, %xmm0
vmovaps %xmm0, %xmm3
vpbroadcastq 0x869d(%rip), %xmm4 # 0x50e88
vpbroadcastq 0x869c(%rip), %xmm2 # 0x50e90
vpternlogq $0xf8, %xmm4, %xmm3, %xmm2
vaddsd %xmm2, %xmm0, %xmm2
vroundsd $0xb, %xmm2, %xmm0, %xmm0
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x1b8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x52d0
leaq 0x30(%rsp), %rdi
vmovsd 0x1b8(%rsp), %xmm0
callq 0x57f0
jmp 0x48831
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x53d0
jmp 0x48841
leaq 0x20(%rsp), %rdi
callq 0x52f0
movq 0x8(%rsp), %rax
addq $0x1c8, %rsp            # imm = 0x1C8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x52f0
movq 0x18(%rsp), %rdi
callq 0x5760
nopw (%rax,%rax)
// File: tewalds[P]morat/lib/string.cpp
// Function: Morat::to_str_hex[abi:cxx11](unsigned long)
std::string to_str_hex(uint64_t a) {
	static const char hexlookup[] = "0123456789abcdef";
	char buf[19] = "0x";
	for (int i = 15; i >= 0; i--) {
		buf[i+2] = hexlookup[a & 15];
		a >>= 4;
	}
	buf[18] = '\0';
	return (char *)buf;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x861e(%rip), %rax      # 0x50ec0
movq %rax, 0x30(%rsp)
movq 0x861a(%rip), %rax      # 0x50ec8
movq %rax, 0x38(%rsp)
movw 0x8616(%rip), %ax       # 0x50ed0
movw %ax, 0x40(%rsp)
movb 0x860d(%rip), %al       # 0x50ed2
movb %al, 0x42(%rsp)
movl $0xf, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
jl 0x48913
movq 0x48(%rsp), %rcx
andq $0xf, %rcx
leaq 0x85b8(%rip), %rax      # 0x50ea0
movb (%rax,%rcx), %cl
movl 0x2c(%rsp), %eax
addl $0x2, %eax
cltq
movb %cl, 0x30(%rsp,%rax)
movq 0x48(%rsp), %rax
shrq $0x4, %rax
movq %rax, 0x48(%rsp)
movl 0x2c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x488d1
movb $0x0, 0x42(%rsp)
leaq 0x2b(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x5770
movq 0x8(%rsp), %rdi
movq (%rsp), %rdx
leaq 0x30(%rsp), %rsi
callq 0x5590
jmp 0x4893b
leaq 0x2b(%rsp), %rdi
callq 0x5450
movq 0x10(%rsp), %rax
addq $0x58, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x2b(%rsp), %rdi
callq 0x5450
movq 0x20(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/lib/string.cpp
// Function: Morat::explode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
vecstr explode(const string & str, const string & sep, int count){
	vecstr ret;
	string::size_type old = 0, pos = 0;
	while((pos = str.find(sep, old)) != string::npos && --count != 0){
		ret.push_back(str.substr(old, pos - old));
		old = pos + sep.length();
	}
	ret.push_back(str.substr(old));
	return ret;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movl %ecx, 0x8c(%rsp)
movb $0x0, 0x8b(%rsp)
callq 0x440d0
movq $0x0, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x5860
movq %rax, %rcx
movq %rcx, 0x78(%rsp)
xorl %eax, %eax
cmpq $-0x1, %rcx
movb %al, 0x17(%rsp)
je 0x48b41
movl 0x8c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x8c(%rsp)
cmpl $0x0, %eax
setne %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x48b4e
jmp 0x48bec
movq 0x98(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
subq %rdx, %rcx
leaq 0x58(%rsp), %rdi
callq 0x5410
jmp 0x48b72
movq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x49080
jmp 0x48b83
leaq 0x58(%rsp), %rdi
callq 0x5260
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rdi
callq 0x5650
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x80(%rsp)
jmp 0x48af5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x48c6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x5260
jmp 0x48c6f
movq 0x98(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x28(%rsp), %rdi
movq $-0x1, %rcx
callq 0x5410
jmp 0x48c0f
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x49080
jmp 0x48c20
leaq 0x28(%rsp), %rdi
callq 0x5260
movb $0x1, 0x8b(%rsp)
testb $0x1, 0x8b(%rsp)
jne 0x48c62
jmp 0x48c58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5260
jmp 0x48c6f
movq 0x18(%rsp), %rdi
callq 0xe140
movq 0x20(%rsp), %rax
addq $0xa8, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0xe140
movq 0x50(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/lib/string.cpp
// Function: Morat::implode(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string implode(const vecstr & vec, const string & sep){
	string ret;
	if(vec.size() == 0)
		return ret;
	ret += vec[0];
	for(unsigned int i = 1; i < vec.size(); i++){
		ret += sep;
		ret += vec[i];
	}
	return ret;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movb $0x0, 0x2f(%rsp)
callq 0x55a0
movq 0x38(%rsp), %rdi
callq 0x13c80
cmpq $0x0, %rax
jne 0x48cdc
movb $0x1, 0x2f(%rsp)
movl $0x1, 0x28(%rsp)
jmp 0x48d85
movq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x490b0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x5520
jmp 0x48cf9
movl $0x1, 0x18(%rsp)
movl 0x18(%rsp), %eax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
callq 0x13c80
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x48d78
movq 0x8(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x5520
jmp 0x48d30
movq 0x38(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, %esi
callq 0x490b0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x5520
jmp 0x48d4f
jmp 0x48d51
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x48d01
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x5260
jmp 0x48da0
movb $0x1, 0x2f(%rsp)
movl $0x1, 0x28(%rsp)
testb $0x1, 0x2f(%rsp)
jne 0x48d96
movq 0x8(%rsp), %rdi
callq 0x5260
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x5760
nopw (%rax,%rax)
// File: tewalds[P]morat/lib/string.cpp
// Function: Morat::parse_dict(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
dictstr parse_dict(const std::string & str, const std::string & sep1, const std::string & sep2) {
	dictstr ret;
	auto parts = explode(str, sep1);
	for(auto & p : parts){
		auto kv = explode(p, sep2, 2);
		ret[kv[0]] = (kv.size() == 2 ? kv[1] : "");
	}
	return ret;
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
movb $0x0, 0xb7(%rsp)
callq 0x45e50
movq 0xc8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
leaq 0x98(%rsp), %rdi
xorl %ecx, %ecx
callq 0x48aa0
jmp 0x48e12
leaq 0x98(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x13d30
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x141f0
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x141b0
testb $0x1, %al
jne 0x48e5e
jmp 0x48ff2
leaq 0x78(%rsp), %rdi
callq 0x3ea60
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rsi
movq 0xb8(%rsp), %rdx
leaq 0x50(%rsp), %rdi
movl $0x2, %ecx
callq 0x48aa0
jmp 0x48e8b
leaq 0x50(%rsp), %rdi
callq 0x13c80
movb $0x0, 0x2e(%rsp)
cmpq $0x2, %rax
jne 0x48ec0
leaq 0x50(%rsp), %rdi
movl $0x1, %esi
callq 0x13ca0
movq %rax, %rsi
leaq 0x30(%rsp), %rdi
callq 0x51b0
jmp 0x48ebe
jmp 0x48eee
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5770
movq 0x10(%rsp), %rdx
movb $0x1, 0x2e(%rsp)
leaq 0x3a09(%rip), %rsi      # 0x4c8e9
leaq 0x30(%rsp), %rdi
callq 0x5590
jmp 0x48eec
jmp 0x48eee
xorl %eax, %eax
movl %eax, %esi
leaq 0x50(%rsp), %rdi
callq 0x13ca0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x490d0
movq %rax, 0x8(%rsp)
jmp 0x48f10
movq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5500
leaq 0x30(%rsp), %rdi
callq 0x5260
testb $0x1, 0x2e(%rsp)
jne 0x48f32
jmp 0x48f3c
leaq 0x2f(%rsp), %rdi
callq 0x5450
leaq 0x50(%rsp), %rdi
callq 0xe140
leaq 0x78(%rsp), %rdi
callq 0x3ea70
jmp 0x48e46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x49039
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x49013
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x48fe6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x48fd1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x5260
testb $0x1, 0x2e(%rsp)
jne 0x48fda
jmp 0x48fe4
leaq 0x2f(%rsp), %rdi
callq 0x5450
jmp 0x48fe6
leaq 0x50(%rsp), %rdi
callq 0xe140
jmp 0x49013
movb $0x1, 0xb7(%rsp)
leaq 0x98(%rsp), %rdi
callq 0xe140
testb $0x1, 0xb7(%rsp)
jne 0x4902c
jmp 0x49022
leaq 0x98(%rsp), %rdi
callq 0xe140
jmp 0x49039
movq 0x18(%rsp), %rdi
callq 0x1a890
movq 0x20(%rsp), %rax
addq $0xd8, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x1a890
movq 0x90(%rsp), %rdi
callq 0x5760
// File: tewalds[P]morat/lib/alarm.cpp
// Function: Morat::Alarm::Handler::reset(int)
void Alarm::Handler::reset(int signum){
	Time now;

	double next = 0;
	for(std::vector<Entry>::iterator a = alarms.begin(); a != alarms.end(); ++a){
		double cur = a->timeout - now;
		if(cur <= 0 || signum == SIGUSR1){
			if(!a->called){
				a->fn();
				a->called = true;
			}
		}else{
			if(next == 0 || next > cur)
				next = cur;
		}
	}

	if(next > 0){
		struct itimerval timeout;
		timeout.it_interval.tv_usec = 0;
		timeout.it_interval.tv_sec = 0;
		timeout.it_value.tv_usec = (next - (int)next)*1000000;
		timeout.it_value.tv_sec = next;
		setitimer(ITIMER_REAL, &timeout, NULL);
	}
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x6780
movq 0x8(%rsp), %rdi
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x48(%rsp)
addq $0x8, %rdi
callq 0x4a190
movq %rax, 0x40(%rsp)
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x4a200
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4a1c0
testb $0x1, %al
jne 0x49d09
jmp 0x49db4
leaq 0x40(%rsp), %rdi
callq 0x4a230
movq %rax, %rdi
addq $0x28, %rdi
leaq 0x50(%rsp), %rsi
callq 0x1ad50
vmovsd %xmm0, 0x30(%rsp)
vpxor %xmm0, %xmm0, %xmm0
vucomisd 0x30(%rsp), %xmm0
jae 0x49d3d
cmpl $0xa, 0x5c(%rsp)
jne 0x49d73
leaq 0x40(%rsp), %rdi
callq 0x4a230
testb $0x1, 0x4(%rax)
jne 0x49d71
leaq 0x40(%rsp), %rdi
callq 0x4a230
movq %rax, %rdi
addq $0x8, %rdi
callq 0x24630
leaq 0x40(%rsp), %rdi
callq 0x4a230
movb $0x1, 0x4(%rax)
jmp 0x49da3
vmovsd 0x48(%rsp), %xmm0
vpxor %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jne 0x49d87
jp 0x49d87
jmp 0x49d95
vmovsd 0x48(%rsp), %xmm0
vucomisd 0x30(%rsp), %xmm0
jbe 0x49da1
vmovsd 0x30(%rsp), %xmm0
vmovsd %xmm0, 0x48(%rsp)
jmp 0x49da3
jmp 0x49da5
leaq 0x40(%rsp), %rdi
callq 0x4a2f0
jmp 0x49cde
vmovsd 0x48(%rsp), %xmm0
vpxor %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jbe 0x49e1c
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
vmovsd 0x48(%rsp), %xmm0
vcvttsd2si 0x48(%rsp), %eax
vcvtsi2sd %eax, %xmm1, %xmm1
vsubsd %xmm1, %xmm0, %xmm0
vmovsd 0x2216(%rip), %xmm1     # 0x4c008
vmulsd %xmm1, %xmm0, %xmm0
vcvttsd2si %xmm0, %rax
movq %rax, 0x28(%rsp)
vcvttsd2si 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
xorl %edi, %edi
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x5620
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tewalds[P]morat/lib/alarm.cpp
// Function: Morat::Alarm::Handler::add(Morat::Time, std::function<void ()>)
int Alarm::Handler::add(Time timeout, callback_t fn){
	Entry entry(nextid, fn, timeout);
	alarms.push_back(entry);

	nextid = (nextid + 1) & 0x3FFFFFFF; //sets a limit of 2^30 alarms, but keeps them in the positive range

	reset(SIGALRM);

	return entry.id;
}

// Assembly:
subq $0xa8, %rsp
vmovsd %xmm0, 0xa0(%rsp)
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
leaq 0x40(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x22090
movl 0x1c(%rsp), %esi
movq 0x20(%rsp), %rdx
movq 0xa0(%rsp), %rax
movq %rax, 0x38(%rsp)
vmovsd 0x38(%rsp), %xmm0
leaq 0x60(%rsp), %rdi
callq 0x4a0a0
jmp 0x49eda
leaq 0x40(%rsp), %rdi
callq 0x21f70
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
leaq 0x60(%rsp), %rsi
callq 0x4a100
jmp 0x49ef9
movq 0x10(%rsp), %rdi
movl (%rdi), %eax
incl %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, (%rdi)
movl $0xe, %esi
callq 0x49ca0
jmp 0x49f15
movl 0x60(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x4a170
movl 0xc(%rsp), %eax
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x21f70
jmp 0x49f65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x4a170
movq 0x30(%rsp), %rdi
callq 0x5760
nop
// File: tewalds[P]morat/lib/alarm.cpp
// Function: Morat::Alarm::Handler::cancel(int)
bool Alarm::Handler::cancel(int id){
	if(id < 0)
		return false;
	bool found = false;
	for(std::vector<Entry>::iterator a = alarms.begin(); a != alarms.end(); ){
		if(a->id == id){
			a->called = true;
			found = true;
		}
		if(a->called)
			a = alarms.erase(a);
		else
			++a;
	}
	return found;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x34(%rsp)
jge 0x49f98
movb $0x0, 0x47(%rsp)
jmp 0x4a061
movq 0x8(%rsp), %rdi
movb $0x0, 0x33(%rsp)
addq $0x8, %rdi
callq 0x4a190
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x4a200
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4a1c0
testb $0x1, %al
jne 0x49fd8
jmp 0x4a057
leaq 0x28(%rsp), %rdi
callq 0x4a230
movl (%rax), %eax
cmpl 0x34(%rsp), %eax
jne 0x49ffd
leaq 0x28(%rsp), %rdi
callq 0x4a230
movb $0x1, 0x4(%rax)
movb $0x1, 0x33(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x4a230
testb $0x1, 0x4(%rax)
je 0x4a048
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x4a2b0
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4a240
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x4a052
leaq 0x28(%rsp), %rdi
callq 0x4a2f0
jmp 0x49fb0
movb 0x33(%rsp), %al
andb $0x1, %al
movb %al, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax)