LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/z_order.cpp
// Function: nda::test_for_each_in_z_order_1d_body()
TEST(for_each_in_z_order_1d) {
  // A 1-d z order traversal is useless, but it should work.
  dense_array<int, 1> a({12}, 0);
  size_t total_size = 0;
  for_all_indices_in_z_order(a.shape().extent(), [&](index_t x) {
    total_size++;
    a(x) = pattern<int>(std::make_tuple(x));
  });
  // The total number of items in the inner splits should be equal to the size
  // of the array (no overlap among inner splits).
  ASSERT_EQ(total_size, a.size());
  check_pattern(a);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
leaq 0x70(%rsp), %rbx
pushq $0xc
popq %rsi
movq %rbx, %rdi
callq 0x106be
leaq 0x18(%rsp), %r14
andl $0x0, (%r14)
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x10a16
leaq 0x8(%rsp), %rax
andq $0x0, (%rax)
movq 0x28(%r15), %rcx
movq %rax, (%rbx)
movq %r15, 0x8(%rbx)
movq %rbx, 0x10(%rsp)
movq %rcx, (%r14)
leaq 0x20(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x8bcf0
movq (%rax), %rdi
callq 0x8bce1
sarq %rax
cmpq $0x2, %rax
pushq $0x1
popq %rdx
cmovgeq %rax, %rdx
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rcx
xorl %esi, %esi
callq 0x8b63c
movq 0x8(%rsp), %rbx
movq 0x60(%rsp), %r14
leaq 0x21913(%rip), %rsi     # 0xac07a
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorl %eax, %eax
testq %r14, %r14
cmovgq %r14, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x70(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x2ea9(%rip), %rsi      # 0x8d647
leaq 0x70(%rsp), %rdi
callq 0x106fe
leaq 0x21d2a(%rip), %rsi     # 0xac4d9
movq %rax, %rdi
callq 0x107d8
leaq 0x6e34(%rip), %rsi      # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x11052
leaq 0x2e6d(%rip), %rsi      # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x2189f(%rip), %rsi     # 0xac088
movq %rax, %rdi
callq 0x118ac
leaq 0x6dfa(%rip), %rsi      # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x60(%rsp), %rcx
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x1aa7d(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x70(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0x70(%rsp), %rsi
andq $0x0, (%rsi)
leaq 0x38(%rsp), %rdi
callq 0x8bc59
leaq 0x38(%rsp), %rdi
callq 0x1090e
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
jmp 0x8a86f
jmp 0x8a86f
movq %rax, %rbx
jmp 0x8a892
jmp 0x8a87b
movq %rax, %rbx
jmp 0x8a888
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0x38(%rsp), %rdi
callq 0x1090e
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/z_order.h
// Function: void nda::internal::for_each_index_in_z_order_impl<2ul, void nda::for_all_indices_in_z_order<std::tuple<long, long>, nda::test_for_each_in_z_order_2d_body()::$_0>(std::tuple<long, long> const&, nda::test_for_each_in_z_order_2d_body()::$_0 const&)::'lambda'(std::tuple<long, long> const&)>(std::array<long, 2ul> const&, std::array<long, 2ul>, long, long, nda::test_for_each_in_z_order_2d_body()::$_0 const&)
NDARRAY_UNIQUE void for_each_index_in_z_order_impl(const std::array<index_t, Rank>& end,
    std::array<index_t, Rank> z, index_t dim, index_t step, const Fn& fn) {
  if (dim == 0 && step == 1) {
    // We're at the innermost step of the traversal, call fn for the two neighboring points we have.
    fn(z);
    z[0] += 1;
    if (z[0] < end[0]) {
      fn(z);
    }
  } else if (dim == 0) {
    // We're on the innermost dimension, but not the innermost step.
    // Move to the next step for the outermost dimension.
    for_each_index_in_z_order_impl(end, z, Rank - 1, step >> 1, fn);
    z[0] += step;
    if (z[0] < end[0]) {
      for_each_index_in_z_order_impl(end, z, Rank - 1, step >> 1, fn);
    }
  } else {
    // Move to the next dimension for the same step.
    for_each_index_in_z_order_impl(end, z, dim - 1, step, fn);
    z[dim] += step;
    if (z[dim] < end[dim]) {
      for_each_index_in_z_order_impl(end, z, dim - 1, step, fn);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r13
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
sete %al
cmpq $0x1, %r13
setne %cl
movl %eax, %edx
notb %dl
orb %cl, %dl
testb $0x1, %dl
je 0x8b761
testb $0x1, %al
jne 0x8b735
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq %rbx, %r9
callq 0x8b6d9
addq %r13, %r12
movb $0x1, %al
cmpq 0x8(%r15), %r12
jl 0x8b6fc
jmp 0x8b792
movq %r13, %rbp
sarq %rbp
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
pushq $0x1
popq %rcx
movq %rbp, %r8
movq %rbx, %r9
callq 0x8b6d9
addq %r13, %r14
xorl %eax, %eax
movq %rbp, %r13
cmpq (%r15), %r14
jl 0x8b6fc
jmp 0x8b792
leaq 0x8(%rsp), %r13
movq %r14, (%r13)
movq %r12, 0x8(%r13)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x8b7a2
incq %r14
movq %r14, (%r13)
cmpq (%r15), %r14
jge 0x8b792
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8b7a2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/z_order.h
// Function: nda::internal::next_power_of_two(long)
inline index_t next_power_of_two(index_t x) { 
  index_t result = 1;
  while (result < x) {
    result <<= 1;
  }
  return result;
}

// Assembly:
pushq $0x1
popq %rcx
movq %rcx, %rax
addq %rcx, %rcx
cmpq %rdi, %rax
jl 0x8bce4
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/board.h
// Function: Morat::Havannah::Board::size(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool size(std::string s) {
		if (!valid_size(s))
			return false;
		size_r_ = from_str<int>(s);
		size_r_m1_ = size_r_ - 1;
		size_ = size_r_ * 2 - 1;
		neighbor_list_ = gen_neighbor_list();
		num_cells_ = vec_size() - size_r_ * size_r_m1_;
		cells_.resize(vec_size());
		clear();
		return true;
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
movq %rsi, %r14
callq 0x94f2
movl %eax, %ebp
testb %al, %al
je 0x94d2
movq %r14, %rdi
callq 0x9503
movb %al, 0x1(%rbx)
leal -0x1(%rax), %ecx
addb %al, %al
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
decb %al
movb %cl, 0x2(%rbx)
movb %al, (%rbx)
callq 0x19198
leaq 0x88(%rbx), %rdi
movq %r14, %rsi
callq 0x96ce
leaq 0x8(%rsp), %rdi
callq 0x9702
movsbl (%rbx), %esi
movsbl 0x1(%rbx), %eax
movsbl 0x2(%rbx), %ecx
leaq 0x10(%rbx), %rdi
imull %esi, %esi
imull %eax, %ecx
movl %esi, %eax
subl %ecx, %eax
movw %ax, 0x4(%rbx)
callq 0x955a
movq %rbx, %rdi
callq 0x958e
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/board.h
// Function: Morat::Havannah::Board::clear()
void clear() {
		last_move_ = M_NONE;
		num_moves_ = 0;
		to_play_ = Side::P1;
		outcome_ = Outcome::UNKNOWN;
		win_type_ = -1;
		check_rings = true;
		perm_rings = 0;
		hash.clear();

		for(int y = 0; y < size_; y++){
			for(int x = 0; x < size_; x++){
				MoveValid pos = move_valid(x, y);
				Side s = (on_board(x, y) ? Side::NONE : Side::UNDEF);
				cells_[pos.xy] = Cell(s, pos.xy, 1, (1 << iscorner(x, y)), (1 << isedge(x, y)), init_pattern(pos));
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x2045f(%rip), %rax     # 0x29a02
movl $0x78fd0000, 0x6(%rdi)  # imm = 0x78FD0000
movq %rdi, %rbx
movb (%rax), %al
movb %al, 0xa(%rdi)
leaq 0x2044d(%rip), %rax     # 0x29a06
movb (%rax), %al
movb %al, 0xb(%rdi)
movb $-0x1, 0xc(%rdi)
movb $0x1, 0x98(%rdi)
andl $0x0, 0x9c(%rdi)
addq $0x28, %rdi
callq 0x94de
movb (%rbx), %al
xorl %r12d, %r12d
pushq $0x1
popq %r14
movsbl %al, %ecx
cmpl %ecx, %r12d
jge 0x96bf
xorl %r15d, %r15d
movsbl %al, %ecx
cmpl %ecx, %r15d
jge 0x96b7
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x991c
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x992a
leaq 0x203dc(%rip), %rcx     # 0x29a00
testb %al, %al
je 0x962f
leaq 0x203d2(%rip), %rcx     # 0x29a01
movb (%rcx), %al
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
movb %al, 0xf(%rsp)
movzwl 0x12(%rsp), %eax
movw %ax, 0x16(%rsp)
callq 0x192b2
shlxl %eax, %r14d, %r13d
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x19322
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
shlxl %eax, %r14d, %ebp
callq 0x995e
movswq 0x12(%rsp), %rcx
movq 0x10(%rbx), %rdx
movb 0xf(%rsp), %sil
movzwl 0x16(%rsp), %edi
incl %r15d
shlq $0x4, %rcx
movb %sil, (%rdx,%rcx)
movb $0x1, 0x1(%rdx,%rcx)
movw %di, 0x2(%rdx,%rcx)
movb %r13b, 0x4(%rdx,%rcx)
movb %bpl, 0x5(%rdx,%rcx)
andw $0x0, 0x6(%rdx,%rcx)
movq %rax, 0x8(%rdx,%rcx)
movb (%rbx), %al
jmp 0x95f1
incl %r12d
jmp 0x95e2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/agentmcts.cpp
// Function: Morat::Havannah::AgentMCTS::AgentMCTS(Morat::Havannah::Board const&)
AgentMCTS::AgentMCTS(const Board & b) : Agent(b), pool(this) {
	nodes = 0;
	runs = 0;
	gclimit = 5;

	profile     = false;
	ponder      = false;
//#ifdef SINGLE_THREAD ... make sure only 1 thread
	numthreads  = 1;
	pool.set_num_threads(numthreads);
	maxmem      = 1000*1024*1024;

	msrave      = -2;
	msexplore   = 0;

	explore     = 0;
	parentexplore = false;
	ravefactor  = 500;
	decrrave    = 200;
	knowledge   = true;
	userave     = 1;
	useexplore  = 1;
	fpurgency   = 1;
	rollouts    = 1;
	dynwiden    = 0;
	logdynwiden = (dynwiden ? std::log(dynwiden) : 0);

	shortrave   = false;
	keeptree    = true;
	minimax     = 2;
	detectdraw  = false;
	visitexpand = 1;
	gcsolved    = 100000;
	longestloss = false;

	localreply  = 0;
	locality    = 0;
	connect     = 20;
	size        = 0;
	bridge      = 25;
	dists       = 0;

	weightedrandom = false;
	checkringdepth = 1000;
	ringperm       = 0;
	rolloutpattern = false;
	lastgoodreply  = false;
	instantwin     = 0;

	for(int i = 0; i < 4096; i++)
		gammas[i] = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0xdb6c
leaq 0x32bb8(%rip), %rax     # 0x3e8a0
leaq 0x4140(%rbx), %r14
movq %rax, (%rbx)
movq %r14, %rdi
callq 0xdb80
leaq 0x4190(%rbx), %r15
movq %r15, %rdi
callq 0xdbae
leaq 0x5550(%rbx), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0xdc0c
andq $0x0, 0x4170(%rbx)
andq $0x0, 0x4180(%rbx)
xorl %eax, %eax
movl $0x5, 0x4178(%rbx)
movb %al, 0xc0(%rbx)
movb %al, 0xb0(%rbx)
movl $0x1, 0xb4(%rbx)
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0xdc7a
vbroadcastss 0x194f3(%rip), %xmm1 # 0x25254
vmovss 0x194e7(%rip), %xmm0    # 0x25250
vmovsd 0x194ff(%rip), %xmm2    # 0x25270
movq $0x3e800000, 0xb8(%rbx) # imm = 0x3E800000
xorl %eax, %eax
movabsq $0x13f800000, %rcx      # imm = 0x13F800000
vmovlps %xmm0, 0xc4(%rbx)
movb %al, 0xcc(%rbx)
vmovsd %xmm2, 0xd0(%rbx)
movl $0x43480000, 0xd8(%rbx) # imm = 0x43480000
movb $0x1, 0xdc(%rbx)
vmovaps 0x194c9(%rip), %xmm2    # 0x25280
vmovlps %xmm1, 0xe0(%rbx)
vmovaps 0x194c9(%rip), %xmm1    # 0x25290
movq %rcx, 0xe8(%rbx)
movabsq $0x186a000000001, %rcx  # imm = 0x186A000000001
andq $0x0, 0xf0(%rbx)
movw $0x100, 0xf8(%rbx)      # imm = 0x100
movl $0x2, 0xfc(%rbx)
movb %al, 0x100(%rbx)
movq %rcx, 0x104(%rbx)
movb %al, 0x10c(%rbx)
vmovups %xmm2, 0x110(%rbx)
vmovups %xmm1, 0x120(%rbx)
andl $0x0, 0x130(%rbx)
movb %al, 0x134(%rbx)
andq $0x0, 0x138(%rbx)
cmpq $0x1000, %rax           # imm = 0x1000
je 0xbe43
movl $0x3f800000, 0x140(%rbx,%rax,4) # imm = 0x3F800000
incq %rax
jmp 0xbe2b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r13, %rdi
movq %rax, %r12
callq 0xdde6
jmp 0xbe5d
movq %rax, %r12
movq %r15, %rdi
callq 0xde24
jmp 0xbe6a
movq %rax, %r12
movq %r14, %rdi
callq 0xde6c
jmp 0xbe77
movq %rax, %r12
movq %rbx, %rdi
callq 0xee68
movq %r12, %rdi
callq 0x5650
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/agentmctsthread.cpp
// Function: Morat::Havannah::AgentMCTS::AgentThread::add_knowledge(Morat::Havannah::Board const&, Morat::Havannah::AgentMCTS::Node*, Morat::Havannah::AgentMCTS::Node*)
void AgentMCTS::AgentThread::add_knowledge(const Board & board, Node * node, Node * child){
	if(agent->localreply){ //boost for moves near the previous move
		int dist = board.dist(node->move, child->move);
		if(dist < 4)
			child->know += agent->localreply * (4 - dist);
	}

	if(agent->locality) //boost for moves near previous stones
		child->know += agent->locality * board.local(child->move, board.to_play());

	Board::Cell cell;
	if(agent->connect || agent->size)
		cell = board.test_cell(child->move);

	if(agent->connect) //boost for moves that connect to edges/corners
		child->know += agent->connect * (cell.numcorners() + cell.numedges());

	if(agent->size) //boost for size of the group
		child->know += agent->size * cell.size;

	if(agent->bridge && test_bridge_probe(board, node->move, child->move)) //boost for maintaining a virtual connection
		child->know += agent->bridge;

	if(agent->dists)
		child->know += abs(agent->dists) * std::max(0, board.lines() - dists.get(child->move, board.to_play()));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq 0x40(%rdi), %rcx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
cmpl $0x0, 0x110(%rcx)
je 0x12799
leaq 0x24(%r12), %rsi
leaq 0x24(%rbx), %rdx
movq %r15, %rdi
callq 0x12fc4
movq 0x40(%r14), %rcx
cmpl $0x3, %eax
jg 0x12799
pushq $0x4
popq %rdx
subl %eax, %edx
imull 0x110(%rcx), %edx
addw %dx, 0x20(%rbx)
movl 0x114(%rcx), %ebp
testl %ebp, %ebp
je 0x127bf
movzbl 0xa(%r15), %edx
leaq 0x24(%rbx), %rsi
movq %r15, %rdi
callq 0x13010
imull %ebp, %eax
addw %ax, 0x20(%rbx)
movq 0x40(%r14), %rcx
cmpl $0x0, 0x118(%rcx)
jne 0x127d1
cmpl $0x0, 0x11c(%rcx)
je 0x1281f
leaq 0x24(%rbx), %rsi
movq %r15, %rdi
callq 0x13024
movq 0x40(%r14), %rcx
movzbl %ah, %edx
movl 0x118(%rcx), %esi
testl %esi, %esi
je 0x12821
movl $0x828, %edi            # imm = 0x828
movl $0x820, %r8d            # imm = 0x820
bextrq %rdi, %rax, %rdi
bextrq %r8, %rax, %rax
leaq 0x14166(%rip), %r8      # 0x26970
movzbl (%rax,%r8), %eax
movzbl (%rdi,%r8), %edi
addl %eax, %edi
imull %esi, %edi
addw %di, 0x20(%rbx)
jmp 0x12821
xorl %edx, %edx
movl 0x11c(%rcx), %eax
testl %eax, %eax
je 0x12832
imull %edx, %eax
addw %ax, 0x20(%rbx)
cmpl $0x0, 0x120(%rcx)
je 0x12861
addq $0x24, %r12
leaq 0x24(%rbx), %rcx
movq %r15, %rsi
movq %r12, %rdx
callq 0x128ac
movq 0x40(%r14), %rcx
testb %al, %al
je 0x12861
movzwl 0x120(%rcx), %eax
addw %ax, 0x20(%rbx)
movl 0x124(%rcx), %eax
testl %eax, %eax
je 0x128a2
movzbl 0xa(%r15), %edx
movl 0x24(%rbx), %esi
movsbl (%r15), %r12d
movl %eax, %ebp
negl %ebp
cmovsl %eax, %ebp
addq $0x28e8, %r14           # imm = 0x28E8
movq %r14, %rdi
callq 0x1313e
subl %eax, %r12d
movl %r12d, %eax
sarl $0x1f, %eax
andnl %r12d, %eax, %eax
imull %ebp, %eax
addw %ax, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/lbdist.h
// Function: Morat::Havannah::LBDists::isdraw()
Outcome isdraw() {
		Outcome outcome = Outcome::DRAW;  // assume neither side can win
		for(int y = 0; y < board->lines(); y++) {
			for(int x = board->line_start(y); x < board->line_end(y); x++) {
				MoveValid pos(x, y, board->xy(x, y));

				if(board->encirclable(pos, Side::P1) || get(pos.xy, Side::P1) < maxdist-5)
					outcome |= Outcome::P1; // P1 can win
				if(board->encirclable(pos, Side::P2) || get(pos.xy, Side::P2) < maxdist-5)
					outcome |= Outcome::P2; // P2 can win

				if(outcome == Outcome::DRAW2) // both can win
					return Outcome::UNKNOWN;  // so nothing is known
			}
		}
		return -outcome; // this isn't certainty, so negate
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x16d11(%rip), %rax     # 0x29a09
movq %rdi, %r14
movq 0xcb28(%rdi), %rdi
movl $0x0, 0x4(%rsp)
xorl %r12d, %r12d
movb (%rax), %bl
movsbl (%rdi), %eax
cmpl %eax, %r12d
jge 0x12e24
movsbl 0x1(%rdi), %eax
xorl %r13d, %r13d
cmpl %eax, %r12d
jl 0x12d31
movsbl 0x2(%rdi), %eax
movl %r12d, %r13d
subl %eax, %r13d
movl %r13d, %ebp
shll $0x8, %ebp
addl 0x4(%rsp), %ebp
movq 0xcb28(%r14), %rdi
movsbl 0x1(%rdi), %eax
cmpl %eax, %r12d
jge 0x12d50
addl %r12d, %eax
jmp 0x12d53
movsbl (%rdi), %eax
cmpl %eax, %r13d
jge 0x12dfe
leaq 0x16c9f(%rip), %rax     # 0x29a02
movsbl (%rdi), %r15d
movl %ebp, %esi
movzbl (%rax), %edx
imull %r12d, %r15d
addl %r13d, %r15d
callq 0x136e0
testb %al, %al
jne 0x12d99
leaq 0x16c7f(%rip), %rax     # 0x29a02
movswl %r15w, %esi
movq %r14, %rdi
movzbl (%rax), %edx
callq 0x13790
cmpl $0x3e2, %eax            # imm = 0x3E2
jg 0x12da2
leaq 0x16c6a(%rip), %rax     # 0x29a0a
orb (%rax), %bl
leaq 0x16c5a(%rip), %rax     # 0x29a03
movq 0xcb28(%r14), %rdi
movl %ebp, %esi
movzbl (%rax), %edx
callq 0x136e0
testb %al, %al
jne 0x12ddb
leaq 0x16c3e(%rip), %rax     # 0x29a03
movswl %r15w, %esi
movq %r14, %rdi
movzbl (%rax), %edx
callq 0x13790
cmpl $0x3e2, %eax            # imm = 0x3E2
jg 0x12de4
leaq 0x16c29(%rip), %rax     # 0x29a0b
orb (%rax), %bl
leaq 0x16c21(%rip), %rax     # 0x29a0c
incl %r13d
addl $0x100, %ebp            # imm = 0x100
cmpb (%rax), %bl
jne 0x12d3b
jmp 0x12e0a
incl 0x4(%rsp)
incl %r12d
jmp 0x12d0f
leaq 0x16bf5(%rip), %rax     # 0x29a06
movb (%rax), %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addb $-0x3, %bl
jmp 0x12e13
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/board.h
// Function: Morat::Havannah::Board::test_outcome(Morat::MoveValid const&, Morat::Side) const
Outcome test_outcome(const MoveValid & pos, Side turn) const {
		if(test_local(pos, turn)){
			Cell testcell = cells_[find_group(pos.xy)];
			int numgroups = 0;
			auto it = neighbors_small(pos);
			for (const MoveValid *i = it.begin(), *e = it.end(); i < e; i++) {
				if(i->on_board() && turn == get(i->xy)){
					const Cell * g = & cells_[find_group(i->xy)];
					testcell.corner |= g->corner;
					testcell.edge   |= g->edge;
					testcell.size   += g->size;
					i++; //skip the next one
					numgroups++;
				}
			}

			if(testcell.numcorners() >= 2 || testcell.numedges() >= 3 || (check_rings && numgroups >= 2 && testcell.size >= 6 && checkring_o1(pos, turn)))
				return +turn;
		}

		if(num_moves_+1 == num_cells_)
			return Outcome::DRAW;

		return Outcome::UNKNOWN;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
callq 0x1389a
testb %al, %al
je 0x12f44
movswl 0x2(%r15), %esi
movq %r14, %rdi
callq 0xf5c2
movslq %eax, %rcx
movq 0x10(%r14), %rax
movswq 0x2(%r15), %rsi
movq 0x88(%r14), %rdx
movq %r15, 0x10(%rsp)
xorl %r15d, %r15d
xorl %r12d, %r12d
shlq $0x4, %rcx
vmovd 0x4(%rax,%rcx), %xmm0
movb 0x1(%rax,%rcx), %bpl
imulq $0x48, %rsi, %rcx
leaq 0x2(%rdx,%rcx), %r13
cmpq $0x18, %r15
jge 0x12efb
movswq (%r13,%r15), %rsi
cmpq $-0x1, %rsi
je 0x12ef5
movq %rsi, %rcx
shlq $0x4, %rcx
cmpb %bl, (%rax,%rcx)
jne 0x12ef5
movq %r14, %rdi
vmovdqa %xmm0, (%rsp)
callq 0xf5c2
movslq %eax, %rcx
movq 0x10(%r14), %rax
vmovaps (%rsp), %xmm1
addq $0x4, %r15
incl %r12d
shlq $0x4, %rcx
vmovss 0x4(%rax,%rcx), %xmm0
addb 0x1(%rax,%rcx), %bpl
vorps %xmm1, %xmm0, %xmm1
vmovaps %xmm1, (%rsp)
vmovdqa (%rsp), %xmm0
addq $0x4, %r15
jmp 0x12e9a
vpextrb $0x0, %xmm0, %ecx
leaq 0x13a68(%rip), %rax     # 0x26970
cmpb $0x1, (%rcx,%rax)
ja 0x12f66
vpextrb $0x1, %xmm0, %ecx
cmpb $0x2, (%rcx,%rax)
ja 0x12f66
cmpb $0x1, 0x98(%r14)
movq 0x10(%rsp), %rsi
jne 0x12f44
cmpl $0x2, %r12d
jl 0x12f44
cmpb $0x6, %bpl
jb 0x12f44
movzbl %bl, %edx
movq %r14, %rdi
callq 0x195bc
testb %al, %al
jne 0x12f66
movswl 0x6(%r14), %eax
movswl 0x4(%r14), %ecx
incl %eax
cmpl %ecx, %eax
jne 0x12f5d
leaq 0x16aae(%rip), %rax     # 0x29a09
jmp 0x12f64
leaq 0x16aa2(%rip), %rax     # 0x29a06
movb (%rax), %bl
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/board.h
// Function: Morat::Havannah::Board::encirclable(Morat::Move, Morat::Side) const
bool encirclable(const Move pos, Side player) const {
		Side otherplayer = ~player;
		int posxy = xy(pos);

		const Cell * g = & cells_[find_group(posxy)];
		if(g->piece == otherplayer && (g->edge || g->corner))
			return false;

		for (auto m : neighbors_small(posxy)) {
			if(!m.on_board())
				return false;

			const Cell * g = cell(find_group(m.xy));
			if(g->piece == otherplayer && (g->edge || g->corner))
				return false;
		}
		return true;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movsbl (%rdi), %ecx
movsbl %sil, %eax
shrl $0x8, %esi
movb $0x3, %r14b
movq %rdi, %rbx
movsbl %sil, %ebp
subb %dl, %r14b
imull %eax, %ecx
addl %ecx, %ebp
movl %ebp, %esi
callq 0xf5c2
movslq %eax, %rcx
movq 0x10(%rbx), %rax
shlq $0x4, %rcx
cmpb %r14b, (%rax,%rcx)
jne 0x13727
addq %rcx, %rax
movb 0x4(%rax), %cl
orb 0x5(%rax), %cl
jne 0x13782
imull $0x12, %ebp, %eax
xorl %r12d, %r12d
movslq %eax, %r15
shlq $0x2, %r15
addq 0x88(%rbx), %r15
cmpq $0x18, %r12
sete %bpl
je 0x13784
movl (%r15,%r12), %esi
cmpl $0xfffeffff, %esi       # imm = 0xFFFEFFFF
ja 0x13784
sarl $0x10, %esi
movq %rbx, %rdi
callq 0xf5c2
movslq %eax, %rcx
movq 0x10(%rbx), %rax
shlq $0x4, %rcx
cmpb %r14b, (%rax,%rcx)
jne 0x1377c
addq %rcx, %rax
cmpb $0x0, 0x5(%rax)
jne 0x13784
cmpb $0x0, 0x4(%rax)
jne 0x13784
addq $0x4, %r12
jmp 0x1373b
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/lbdist.h
// Function: Morat::Havannah::LBDists::_get(int, Morat::Side)
int _get(int pos, Side player) {
		int list[6];
		for(int i = 0; i < 6; i++)
			list[i] = dist(i, player, pos);
		partialsort(list, 2);
		int corners = list[0] + list[1] - 1;

		for(int i = 6; i < 12; i++)
			list[i-6] = dist(i, player, pos);
		partialsort(list, 3);
		int edges = list[0] + list[1] + list[2] - 2;

		return std::min(corners, edges);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movsbq %dl, %rax
movslq %esi, %rcx
movq %rdi, %rbx
imulq $0x5a4, %rax, %rax      # imm = 0x5A4
leaq (%rax,%rcx,4), %r15
xorl %ecx, %ecx
leaq -0x5a4(%rdi,%r15), %rax
cmpq $0x6, %rcx
je 0x137cf
movl (%rax), %edx
addq $0xb48, %rax            # imm = 0xB48
movl %edx, (%rsp,%rcx,4)
incq %rcx
jmp 0x137b9
movq %rsp, %r14
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1383e
movl (%r14), %eax
movl 0x4(%r14), %ecx
leaq 0x3e0c(%rbx,%r15), %rdx
xorl %esi, %esi
cmpq $0x6, %rsi
je 0x13808
movl (%rdx), %edi
addq $0xb48, %rdx            # imm = 0xB48
movl %edi, (%rsp,%rsi,4)
incq %rsi
jmp 0x137f1
leal -0x1(%rax,%rcx), %ebp
movq %rsp, %r14
pushq $0x3
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1383e
movl (%r14), %eax
movl 0x8(%r14), %ecx
addl 0x4(%r14), %eax
leal -0x2(%rcx,%rax), %eax
cmpl %ebp, %eax
cmovll %eax, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/../lib/lbdist.h
// Function: Morat::LBDistsBase<Morat::Havannah::LBDists, Morat::Havannah::Board>::partialsort(int*, int)
void partialsort(int * list, int max){
	//partially sort the list with selection sort
		for(int i = 0; i < max; i++){
			int mini = i;

			for(int j = i+1; j < 6; j++)
				if(list[mini] > list[j])
					mini = j;

			if(mini != i){
				int t = list[i];
				list[i] = list[mini];
				list[mini] = t;
			}
		}
	}

// Assembly:
movl %edx, %eax
sarl $0x1f, %eax
andnl %edx, %eax, %eax
pushq $0x1
popq %rcx
xorl %edx, %edx
cmpq %rax, %rdx
je 0x13898
movq %rcx, %rdi
movl %edx, %r8d
movslq %r8d, %r9
cmpq $0x6, %rdi
jae 0x13879
movl (%rsi,%r9,4), %r10d
movl %edi, %r9d
cmpl (%rsi,%rdi,4), %r10d
jg 0x13871
movl %r8d, %r9d
incq %rdi
movl %r9d, %r8d
jmp 0x13858
movl %r8d, %edi
cmpq %rdi, %rdx
je 0x13890
movl (%rsi,%rdx,4), %edi
movl (%rsi,%r9,4), %r8d
movl %r8d, (%rsi,%rdx,4)
movl %edi, (%rsi,%r9,4)
incq %rdx
incq %rcx
jmp 0x1384d
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/board.cpp
// Function: Morat::Havannah::Board::iscorner(int, int) const
int Board::iscorner(int x, int y) const {
	if(!on_board(x,y))
		return -1;

	int m = size_r_m1_, e = size_ - 1;

	if(x == 0 && y == 0) return 0;
	if(x == m && y == 0) return 1;
	if(x == e && y == m) return 2;
	if(x == e && y == e) return 3;
	if(x == m && y == e) return 4;
	if(x == 0 && y == m) return 5;

	return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
callq 0x992a
testb %al, %al
je 0x192df
movl %ebp, %eax
orl %ebx, %eax
je 0x192e7
movsbl 0x2(%r14), %ecx
movl %ebp, %edx
movl %ecx, %eax
xorl %ebx, %eax
orl %eax, %edx
jne 0x192eb
pushq $0x1
jmp 0x192e1
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
jmp 0x192e2
movsbl (%r14), %edx
xorl %ebp, %ecx
decl %edx
movl %edx, %esi
xorl %ebx, %esi
movl %esi, %edi
orl %ecx, %edi
jne 0x19301
pushq $0x2
jmp 0x192e1
xorl %ebp, %edx
orl %edx, %esi
jne 0x1930b
pushq $0x3
jmp 0x192e1
orl %edx, %eax
jne 0x19313
pushq $0x4
jmp 0x192e1
xorl %eax, %eax
orl %ecx, %ebx
sete %al
decl %eax
orl $0x5, %eax
jmp 0x192e2
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/board.cpp
// Function: Morat::Havannah::Board::isedge(int, int) const
int Board::isedge(int x, int y) const {
	if(!on_board(x,y))
		return -1;

	int m = size_r_m1_, e = size_ - 1;

	if(y   == 0 && x != 0 && x != m) return 0;
	if(x-y == m && x != m && x != e) return 1;
	if(x   == e && y != m && y != e) return 2;
	if(y   == e && x != e && x != m) return 3;
	if(y-x == m && x != m && x != 0) return 4;
	if(x   == 0 && y != m && y != 0) return 5;

	return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x992a
pushq $-0x1
popq %rcx
testb %al, %al
je 0x193ed
movsbl 0x2(%r14), %edx
testl %ebx, %ebx
setne %al
testl %ebp, %ebp
sete %sil
cmpl %ebp, %edx
sete %dil
orb %al, %sil
xorl %eax, %eax
orb %dil, %sil
cmpb $0x1, %sil
jne 0x193ef
movsbl (%r14), %eax
movl %ebp, %edi
decl %eax
cmpl %ebp, %edx
sete %sil
subl %ebx, %edi
cmpl %edx, %edi
setne %dil
cmpl %ebp, %eax
sete %r8b
orb %sil, %r8b
orb %dil, %r8b
cmpb $0x1, %r8b
jne 0x1939d
cmpl %ebx, %eax
je 0x193a2
cmpl %ebp, %eax
jne 0x193a2
cmpl %ebx, %edx
je 0x193a2
pushq $0x2
jmp 0x1939f
pushq $0x1
popq %rax
jmp 0x193ef
cmpl %ebp, %eax
sete %sil
cmpl %ebp, %edx
sete %dil
cmpl %ebx, %eax
setne %al
orb %sil, %dil
orb %al, %dil
cmpb $0x1, %dil
jne 0x193d3
testl %ebp, %ebp
je 0x193d7
cmpl %ebp, %edx
je 0x193d7
movl %ebx, %eax
subl %ebp, %eax
cmpl %edx, %eax
jne 0x193d7
pushq $0x4
jmp 0x1939f
pushq $0x3
jmp 0x1939f
testl %ebp, %ebp
jne 0x193ed
cmpl %ebx, %edx
setne %al
testl %ebx, %ebx
setne %dl
testb %al, %dl
je 0x193ed
pushq $0x5
jmp 0x1939f
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/board.cpp
// Function: Morat::Havannah::Board::checkring_df(Morat::MoveValid const&, Morat::Side) const
bool Board::checkring_df(const MoveValid & pos, const Side turn) const {
	const Cell * start = cell(pos);
	start->mark = 1;
	bool success = false;
	for(int i = 0; i < 4; i++){ //4 instead of 6 since any ring must have its first endpoint in the first 4
		MoveValid loc = neighbors(pos)[i];

		if(!loc.on_board())
			continue;

		const Cell * g = cell(loc);

		if(turn != g->piece)
			continue;

		g->mark = 1;
		success = followring(loc, i, turn, (perm_rings - g->perm));
		g->mark = 0;

		if(success)
			break;
	}
	start->mark = 0;
	return success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x3(%rsp), %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
movb %bl, (%rax)
movswq 0x2(%rsi), %rax
movq 0x10(%rdi), %rcx
shlq $0x4, %rax
leaq 0x6(%rcx,%rax), %rax
movq %rax, 0x10(%rsp)
movb $0x1, (%rax)
movl %ebp, 0xc(%rsp)
cmpq $0x4, %rbp
je 0x194b1
movswq 0x2(%r14), %rax
imulq $0x48, %rax, %rax
addq 0x88(%r15), %rax
movl (%rax,%rbp,4), %eax
movl %eax, 0x8(%rsp)
shrl $0x10, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x194a9
movq 0x10(%r15), %r12
movswq %ax, %r13
shlq $0x4, %r13
cmpb %bl, (%r12,%r13)
jne 0x194a9
movb $0x1, 0x6(%r12,%r13)
leaq 0x8(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x4(%rsp), %r8
movq %r15, %rdi
movl 0x9c(%r15), %eax
movzbl 0x7(%r12,%r13), %ecx
subl %ecx, %eax
leaq 0x3(%rsp), %rcx
movl %eax, 0x4(%rsp)
callq 0x194d0
movb $0x0, 0x6(%r12,%r13)
testb %al, %al
jne 0x194b1
incq %rbp
jmp 0x1942d
movq 0x10(%rsp), %rcx
cmpq $0x4, %rbp
setb %al
movb $0x0, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/board.cpp
// Function: Morat::Havannah::Board::followring(Morat::MoveValid const&, int const&, Morat::Side const&, int const&) const
bool Board::followring(const MoveValid & cur, const int & dir, const Side & turn, const int & permsneeded) const {
	for(int i = 5; i <= 7; i++){
		int nd = (dir + i) % 6;
		MoveValid next = neighbors(cur)[nd];

		if(!next.on_board())
			continue;

		const Cell * g = cell(next);

		if(g->mark)
			return (permsneeded <= 0);

		if(turn != g->piece)
			continue;

		g->mark = 1;
		bool success = followring(next, nd, turn, (permsneeded - g->perm));
		g->mark = 0;

		if(success)
			return true;
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x18(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
pushq $0x5
popq %rbp
pushq $0x6
popq %rdi
movq %rsi, 0x20(%rsp)
cmpl $0x8, %ebp
je 0x1959a
movl (%r12), %eax
addl %ebp, %eax
cltd
idivl %edi
movl %edx, 0x14(%rsp)
movslq %edx, %rdx
movswq 0x2(%rsi), %rax
imulq $0x48, %rax, %rax
addq 0x88(%r13), %rax
movl (%rax,%rdx,4), %eax
movl %eax, 0x10(%rsp)
shrl $0x10, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x19593
movq 0x10(%r13), %rbx
movswq %ax, %r14
shlq $0x4, %r14
cmpb $0x0, 0x6(%rbx,%r14)
jne 0x1959e
movb (%r15), %al
cmpb (%rbx,%r14), %al
jne 0x19593
movq 0x18(%rsp), %rax
movb $0x1, 0x6(%rbx,%r14)
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %r8
movq %r13, %rdi
movq %r15, %rcx
movzbl 0x7(%rbx,%r14), %edx
movl (%rax), %eax
subl %edx, %eax
leaq 0x14(%rsp), %rdx
movl %eax, 0xc(%rsp)
callq 0x194d0
pushq $0x6
popq %rdi
movq 0x20(%rsp), %rsi
movb $0x0, 0x6(%rbx,%r14)
testb %al, %al
jne 0x195ab
incl %ebp
jmp 0x194f7
xorl %eax, %eax
jmp 0x195ad
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
setle %al
jmp 0x195ad
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/havannah/../lib/zobrist.h
// Function: Morat::Zobrist<12>::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), %rax
pushq $0x1
popq %rcx
cmpq $0xc, %rcx
je 0x1c958
movq (%rdi,%rcx,8), %rdx
cmpq %rdx, %rax
cmovaeq %rdx, %rax
incq %rcx
jmp 0x1c942
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/snaury[P]t-digest-simple/./merging_tdigest.hpp
// Function: MergingTDigest::quantile(double)
double quantile(double q) {
        compress();
        if (summary_.empty())
            return NAN;
        if (summary_.size() == 1)
            return summary_[0].mean;
        double index = q * (count_ - 1);
        double a = summary_[0].mean;
        double aIndex = (summary_[0].count - 1) * 0.5;
        int64_t sum = summary_[0].count;
        double b = summary_[1].mean;
        double bIndex = sum + (summary_[1].count - 1) * 0.5;
        for (size_t i = 2; i < summary_.size(); ++i) {
            if (index <= bIndex) {
                return interpolate(index, aIndex, a, bIndex, b);
            }
            a = b;
            aIndex = bIndex;
            sum += summary_[i-1].count;
            b = summary_[i].mean;
            bIndex = sum + (summary_[i].count - 1) * 0.5;
        }
        // either there are exactly two centroids or index is past the end
        return interpolate(index, aIndex, a, bIndex, b);
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
callq 0x2652
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x2825
subq %rax, %rcx
cmpq $0x10, %rcx
jne 0x2832
movsd (%rax), %xmm0
jmp 0x2902
movsd 0x1803(%rip), %xmm0     # 0x4030
jmp 0x2902
movq 0x30(%rbx), %rdx
decq %rdx
movq %rdx, %xmm0
punpckldq 0x17fa(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
sarq $0x4, %rcx
subpd 0x17fe(%rip), %xmm0     # 0x4050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x8(%rsp), %xmm1
movsd (%rax), %xmm2
movq 0x8(%rax), %rdx
leaq -0x1(%rdx), %rsi
cvtsi2sd %rsi, %xmm4
movsd 0x179b(%rip), %xmm3     # 0x4018
mulsd %xmm3, %xmm4
cvtsi2sd %rdx, %xmm5
movq 0x18(%rax), %rsi
decq %rsi
cvtsi2sd %rsi, %xmm0
addq $0x10, %rax
mulsd %xmm3, %xmm0
addsd %xmm5, %xmm0
pushq $0x2
popq %rsi
movsd (%rax), %xmm5
cmpq %rcx, %rsi
jae 0x28de
ucomisd %xmm1, %xmm0
jae 0x28de
addq 0x8(%rax), %rdx
cvtsi2sd %rdx, %xmm2
movq 0x18(%rax), %rdi
decq %rdi
movapd %xmm0, %xmm4
cvtsi2sd %rdi, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
incq %rsi
addq $0x10, %rax
movapd %xmm5, %xmm2
jmp 0x28a1
movapd %xmm0, %xmm3
subsd %xmm4, %xmm3
subsd %xmm1, %xmm0
divsd %xmm3, %xmm0
subsd %xmm4, %xmm1
divsd %xmm3, %xmm1
mulsd %xmm5, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/snaury[P]t-digest-simple/./merging_tdigest.hpp
// Function: MergingTDigest::add(MergingTDigest::Centroid const&)
void add(const Centroid& c) {
        if (buffer_size_ >= max_buffer_size_) {
            compress();
        }
        summary_.push_back(c);
        ++buffer_size_;
        ++count_;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpq 0x20(%rdi), %rax
jb 0x2a10
movq %rbx, %rdi
callq 0x2652
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a36
movdqu 0x28(%rbx), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yasz24[P]eau2/src/network/server.cpp
// Function: main
int main(int argc , char *argv[]) {
	char *ip;
	size_t port;
	size_t num_nodes;

	if (argc != 5  || (strcmp(argv[1], "-ip") != 0) || (strcmp(argv[3], "-nodes") != 0)) {
	    fprintf(stderr,"usage: server -ip <host-ip-address>:PORT -nodes <num_nodes>\n");
	    _exit(1);
	} 
	ip = strtok(argv[2], ":");
    port = std::stoi(strtok(NULL, ":"));
    //std::cout << "port:"<< port << "\n";
	num_nodes = std::stoi(argv[4]);
    //std::cout << "nodes:"<< num_nodes << "\n";

    NetworkIP* client_ = new NetworkIP();

    client_->server_init(0, ip, port, num_nodes);
	Demo* demo = new Demo(0, client_);
	demo->start_kv();
	demo->run_();
	while (true) {

	}
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
cmpl $0x5, %edi
jne 0x7671
movq %rsi, %r14
movq 0x8(%rsi), %rdi
leaq 0x10b46(%rip), %rsi     # 0x180a8
callq 0x72c0
testl %eax, %eax
jne 0x7671
movq 0x18(%r14), %rdi
leaq 0x10b32(%rip), %rsi     # 0x180ac
callq 0x72c0
testl %eax, %eax
jne 0x7671
movq 0x10(%r14), %rdi
leaq 0x10b5e(%rip), %r15     # 0x180f0
movq %r15, %rsi
callq 0x7330
movq %rax, %rbx
xorl %edi, %edi
movq %r15, %rsi
callq 0x7330
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %rax, %rsi
callq 0x70f0
leaq -0x48(%rbp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x76bf
movl %eax, %r15d
leaq -0x48(%rbp), %rdi
callq 0x7120
movq 0x20(%r14), %rsi
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x70f0
leaq -0x48(%rbp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x76bf
movl %eax, %r12d
movslq %r15d, %r15
leaq -0x48(%rbp), %rdi
callq 0x7120
pushq $0x48
popq %rdi
callq 0x7250
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
leaq 0x1bc15(%rip), %rax     # 0x23238
movq %rax, (%r14)
movq $0x1, 0x18(%r14)
andq $0x0, 0x40(%r14)
movslq %r12d, %r8
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x76e0
pushq $0x38
popq %rdi
callq 0x7250
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x795e
movq %r15, %rdi
callq 0x79f4
movq (%r15), %rax
movq %r15, %rdi
callq *0x40(%rax)
jmp 0x766f
movq 0x1d958(%rip), %rax     # 0x24fd0
movq (%rax), %rcx
leaq 0x10a31(%rip), %rdi     # 0x180b3
pushq $0x3c
popq %rsi
pushq $0x1
popq %rdx
callq 0x73b0
pushq $0x1
popq %rdi
callq 0x7340
movq %rax, %rbx
movq %r15, %rdi
callq 0x7220
jmp 0x76b7
jmp 0x76a6
jmp 0x76b4
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x7120
jmp 0x76b7
movq %rax, %rbx
movq %rbx, %rdi
callq 0x7370
// File: /workspace/github_cpp_makefile_star2_O2/yasz24[P]eau2/src/network/./network.h
// Function: Directory::Directory(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long*, String**)
Directory(size_t sender, size_t target, size_t id, size_t i_clients, size_t* i_ports, String** i_addresses) {
        kind_ = (enum MsgKind)9;
        sender_ = sender;
        target_ = target;
        id_ = id;
        clients = i_clients;
        size_t* tmp_ports = new size_t[i_clients];
        String** tmp_addresses = new String*[i_clients];
        for(int i = 0;  i < i_clients; i++) {
            tmp_ports[i] = i_ports[i];
        }
        ports = tmp_ports;
        for(int i = 0; i < i_clients; i++) {
            tmp_addresses[i] = i_addresses[i]->clone();
        }
        addresses = tmp_addresses; 
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %rbx
andq $0x0, 0x8(%rdi)
leaq 0x1b598(%rip), %rax     # 0x23400
movq %rax, (%rdi)
movl $0x9, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq %rdi, -0x30(%rbp)
movq %r8, 0x30(%rdi)
movq %r8, %rax
shrq $0x3d, %rax
leaq (,%r8,8), %rcx
xorl %r14d, %r14d
negq %rax
movl $0x0, %r12d
sbbq %r12, %r12
orq %rcx, %r12
movq %r12, %rdi
callq 0x7030
movq %rax, %r13
movq %r12, %rdi
callq 0x7030
movq %rax, %r12
cmpq %r14, %rbx
je 0x7ed0
movq (%r15,%r14,8), %rax
movq %rax, (%r13,%r14,8)
incq %r14
jmp 0x7ebd
movq -0x30(%rbp), %r15
movq %r13, 0x38(%r15)
xorl %r14d, %r14d
movq 0x10(%rbp), %r13
cmpq %r14, %rbx
je 0x7ef8
movq (%r13,%r14,8), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, (%r12,%r14,8)
incq %r14
jmp 0x7edf
movq %r12, 0x40(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ridgelab[P]Kmer-SSR/src/main.cpp
// Function: main
int main(int argc, char* argv[])
{
	int ret_val = 0;
	
	Arguments* args;

	try
	{
		args = new Arguments(argc, argv);

		if(!args->helpOrVersionDisplayed())
		{
			FindSSRs find_ssrs(args);
			ret_val = find_ssrs.run();
		}
	}
	catch (string error)
	{
		cerr << error << endl;
		return 1;
	}
	catch (const char* error)
	{
		cerr << error << endl;
		return 1;
	}
	
	delete args;

	return ret_val;
	//pthread_exit(NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movl $0xf0, %edi
callq 0x32e0
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x94ba
movq %r14, %rdi
callq 0xa144
xorl %ebx, %ebx
testb %al, %al
jne 0x38b6
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6d30
leaq 0x8(%rsp), %rdi
callq 0x6eca
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x6e3e
movq %r14, %rdi
callq 0xa086
movl $0xf0, %esi
movq %r14, %rdi
callq 0x32f0
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6e3e
jmp 0x3907
jmp 0x3901
movq %rdx, %r15
movq %rax, %rbx
movl $0xf0, %esi
movq %r14, %rdi
callq 0x32f0
jmp 0x3907
movq %rdx, %r15
movq %rax, %rbx
cmpl $0x2, %r15d
jne 0x394f
movq %rbx, %rdi
callq 0x33a0
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x33f0
movq %rbx, %rdi
callq 0x3120
movq 0x116bf(%rip), %rdi     # 0x14ff0
leaq 0x8(%rsp), %rsi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
leaq 0x8(%rsp), %rdi
callq 0x35d8
jmp 0x3974
cmpl $0x1, %r15d
jne 0x399d
movq %rbx, %rdi
callq 0x3120
movq 0x1168c(%rip), %rdi     # 0x14ff0
movq %rax, %rsi
callq 0x32d0
movq %rax, %rdi
callq 0x3150
callq 0x34d0
pushq $0x1
popq %rbx
jmp 0x38cb
movq %rax, %rbx
callq 0x34d0
jmp 0x399d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x35d8
callq 0x34d0
movq %rbx, %rdi
callq 0x3550
movq %rax, %rdi
callq 0x39ad
// File: /workspace/github_cpp_makefile_star2_O2/ridgelab[P]Kmer-SSR/src/SSRcontainer.cpp
// Function: SSRcontainer::clear()
void SSRcontainer::clear()
{
	for (unordered_map<string, vector<SSR*>*>::iterator itr = this->ssrs->begin(); itr != this->ssrs->end(); ++itr)
	{
		//delete itr->first;
		
		for (uint32_t i = 0; i < itr->second->size(); ++i)
		{
			delete itr->second->at(i);
		}

		itr->second->clear();

		delete itr->second;
	}

	this->ssrs->clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rbp
addq $0x10, %rbp
pushq $0x28
popq %r14
pushq $0x18
popq %r15
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x40d4
xorl %r12d, %r12d
movl %r12d, %r12d
movq 0x28(%rbp), %r13
movq (%r13), %rax
movq 0x8(%r13), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
jbe 0x40b6
movq %r13, %rdi
movq %r12, %rsi
callq 0x478e
movq (%rax), %r13
testq %r13, %r13
je 0x40a6
movq %r13, %rdi
callq 0x3e5a
movq %r13, %rdi
movq %r14, %rsi
callq 0x32f0
incl %r12d
jmp 0x406d
cmpq %rax, %rcx
je 0x40bf
movq %rax, 0x8(%r13)
movq %r13, %rdi
callq 0x4c1a
movq %r13, %rdi
movq %r15, %rsi
callq 0x32f0
jmp 0x4061
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4840
// File: /workspace/github_cpp_makefile_star2_O2/ridgelab[P]Kmer-SSR/src/SSRcontainer.cpp
// Function: SSRcontainer::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, SSR*)
void SSRcontainer::add(const string &identifier, SSR* ssr)
{
	if (this->ssrs->count(identifier)) // if the key (and thus the associated vector) already exists in the map
	{
		this->ssrs->at(identifier)->push_back(ssr);
	}
	else // if it doesn't yet exist in the map
	{
		vector<SSR*>* temp_ptr = new vector<SSR*>( { ssr } ); // create the vector
		std::pair<string, vector<SSR*>*> temp_pair(identifier, temp_ptr); // create the pair
		this->ssrs->insert(temp_pair); // add the pair to the map
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, 0x8(%rsp)
movq (%rdi), %rdi
callq 0x48e2
testq %rax, %rax
je 0x413e
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x4a18
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x473a
jmp 0x418b
pushq $0x18
popq %rdi
callq 0x32e0
movq %rax, %r15
leaq 0x10(%rsp), %rsi
movq %r12, (%rsi)
pushq $0x1
popq %rdx
leaq 0x7(%rsp), %rcx
movq %rax, %rdi
callq 0x4758
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x33f0
movq %r15, 0x20(%r12)
movq (%rbx), %rdi
movq %r12, %rsi
callq 0x4c52
leaq 0x10(%rsp), %rdi
callq 0x35d8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35d8
jmp 0x41b4
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x32f0
movq %rbx, %rdi
callq 0x3550
// File: /workspace/github_cpp_makefile_star2_O2/ridgelab[P]Kmer-SSR/src/SSRcontainer.cpp
// Function: SSRcontainer::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<SSR*, std::allocator<SSR*>>*)
void SSRcontainer::add(const string &identifier, vector<SSR*>* ssrs_vec)
{
	if (ssrs_vec != nullptr)
	{
		if (this->ssrs->count(identifier)) // if the key (and thus the associated vector) already exists in the map
		{
			vector<SSR*>* temp_ptr = this->ssrs->at(identifier); // get the vector

			// add each SSR* in ssrs_vec into the vector pointed to by the identifier in the map (this->ssrs)
			for (uint32_t i = 0; i < ssrs_vec->size(); ++i)
			{
				temp_ptr->push_back(ssrs_vec->at(i));
			}
		}
		else // if it doesn't yet exist in the map
		{
			std::pair<string, vector<SSR*>*> temp_pair(identifier, ssrs_vec);
			this->ssrs->insert(temp_pair);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdx, %rdx
je 0x4247
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x48e2
testq %rax, %rax
je 0x4221
movq (%r14), %rdi
movq %r15, %rsi
callq 0x4a18
movq (%rax), %r14
xorl %eax, %eax
movl %eax, %r15d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x3, %rax
cmpq %r15, %rax
jbe 0x4247
movq %rbx, %rdi
movq %r15, %rsi
callq 0x478e
movq %r14, %rdi
movq %rax, %rsi
callq 0x473a
leal 0x1(%r15), %eax
jmp 0x41f2
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x33f0
movq %rbx, 0x20(%r12)
movq (%r14), %rdi
movq %r12, %rsi
callq 0x4c52
movq %rsp, %rdi
callq 0x35d8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x35d8
movq %rbx, %rdi
callq 0x3550
// File: /workspace/github_cpp_makefile_star2_O2/ridgelab[P]Kmer-SSR/src/SSRcontainer.cpp
// Function: SSRcontainer::writeToFile(std::basic_ofstream<char, std::char_traits<char>>&) const
void SSRcontainer::writeToFile(ofstream &ofd) const
{
	for (unordered_map<string, vector<SSR*>*>::iterator itr = this->ssrs->begin(); itr != this->ssrs->end(); ++itr)
	{
		for (uint32_t i = 0; i < itr->second->size(); ++i)
		{
			ofd << itr->first << '\t';
			itr->second->at(i)->writeToFile(ofd);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %r12
addq $0x10, %r12
pushq $0x9
popq %rbp
movq (%r12), %r12
testq %r12, %r12
je 0x42d6
leaq 0x8(%r12), %r14
xorl %eax, %eax
movl %eax, %r15d
movq 0x28(%r12), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x427b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32b0
movq %rax, %rdi
movl %ebp, %esi
callq 0x3350
movq 0x28(%r12), %rdi
movq %r15, %rsi
callq 0x478e
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x3e8e
leal 0x1(%r15), %eax
jmp 0x428b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ridgelab[P]Kmer-SSR/src/SSRcontainer.cpp
// Function: SSRcontainer::writeToFile(OutputFile&, bool, bool)
void SSRcontainer::writeToFile(OutputFile &ofd, bool block, bool clear)
{
	if (ofd.obtainLock(block))
	{
		for (unordered_map<string, vector<SSR*>*>::iterator itr = this->ssrs->begin(); itr != this->ssrs->end(); ++itr)
		{
			for (uint32_t i = 0; i < itr->second->size(); ++i)
			{
				ofd << itr->first << '\t';
				itr->second->at(i)->writeToFile(ofd);
			}
		}

		ofd.unlock();

		if (clear)
		{
			this->clear();
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x3ca6
testb %al, %al
je 0x4392
movl %ebp, 0x4(%rsp)
movq (%rbx), %rbp
addq $0x10, %rbp
pushq $0x9
popq %r15
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x436d
leaq 0x8(%rbp), %r12
xorl %eax, %eax
movl %eax, %r13d
movq 0x28(%rbp), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
jbe 0x4314
movq %r14, %rdi
movq %r12, %rsi
callq 0x3de8
movq %rax, %rdi
movl %r15d, %esi
callq 0x3dae
movq 0x28(%rbp), %rdi
movq %r13, %rsi
callq 0x478e
movq (%rax), %rdi
movq %r14, %rsi
callq 0x3ede
leal 0x1(%r13), %eax
jmp 0x4323
movq %r14, %rdi
callq 0x3cc6
cmpb $0x0, 0x4(%rsp)
je 0x4392
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4044
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop