// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/pentago/agentmcts.h
// Function: Morat::Pentago::AgentMCTS::start_gc()
void start_gc() {
		Time starttime;
		logerr("Starting player GC with limit " + to_str(gclimit) + " ... ");
		uint64_t nodesbefore = nodes;
		Board copy = rootboard;
		garbage_collect(copy, & root);
		Time gctime;
		ctmem.compact(1.0, 0.75);
		Time compacttime;
		logerr(to_str(100.0*nodes/nodesbefore, 1) + " % of tree remains - " +
			to_str((gctime - starttime)*1000, 0)  + " msec gc, " + to_str((compacttime - gctime)*1000, 0) + " msec compact\n");

		if(ctmem.meminuse() >= maxmem/2)
			gclimit = (int)(gclimit*1.3);
		else if(gclimit > rollouts*5)
			gclimit = (int)(gclimit*0.9); //slowly decay to a minimum of 5
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
leaq 0x100(%rsp), %r14
movq %rdi, %rbx
xorl %esi, %esi
movq %r14, %rdi
callq 0x5600
vcvtsi2sdq (%r14), %xmm0, %xmm0
movl 0xd0(%rbx), %esi
vmovsd %xmm0, 0x8(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm1, %xmm0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
vmovsd %xmm0, 0xb8(%rsp)
callq 0xe589
leaq 0x18356(%rip), %rcx     # 0x2e430
movl $0x1e, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x53c0
leaq 0x110(%rsp), %r14
movq %rax, %rcx
addq $0x10, %rcx
movq %r14, -0x10(%r14)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x16112
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r14)
jmp 0x16125
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
movq 0x8(%rax), %rdx
leaq 0x100(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18304(%rip), %rsi     # 0x2e44f
callq 0x5720
leaq 0x138(%rsp), %r12
movq %rax, %rcx
addq $0x10, %rcx
movq %r12, -0x10(%r12)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x16178
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r12)
jmp 0x1618b
movq %rdx, 0x128(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x138(%rsp)
movq 0x8(%rax), %rdx
movq 0x26e42(%rip), %r15     # 0x3cfd8
movq %rdx, 0x130(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x128(%rsp), %rdi
callq 0x53b0
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x161cf
callq 0x5310
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0x161e1
callq 0x5310
leaq 0x20(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x161f5
callq 0x5310
movq 0xa0(%rbx), %rax
vcvtusi2sdq 0xc8(%rbx), %xmm1, %xmm0
leaq 0x100(%rsp), %rsi
leaq 0xa8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, 0x20(%rsi)
vmovups 0x80(%rbx), %ymm1
vmovsd %xmm0, 0xb0(%rsp)
vmovups %ymm1, (%rsi)
vzeroupper
callq 0x12628
leaq 0x10(%rsp), %r14
xorl %esi, %esi
movq %r14, %rdi
callq 0x5600
vcvtsi2sdq (%r14), %xmm2, %xmm0
vmovss 0x172f2(%rip), %xmm1    # 0x2d544
leaq 0xe8(%rbx), %rdi
vmovsd %xmm0, 0xa8(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm2, %xmm0
vmovsd %xmm0, 0xa0(%rsp)
vmovss 0x172c7(%rip), %xmm0    # 0x2d540
callq 0x13eaa
leaq 0x10(%rsp), %r14
xorl %esi, %esi
movq %r14, %rdi
callq 0x5600
vcvtsi2sdq (%r14), %xmm2, %xmm0
movl $0x1, %esi
vmovsd %xmm0, 0x98(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm2, %xmm0
leaq 0x168(%rsp), %r14
movq %r14, %rdi
vmovsd %xmm0, 0x90(%rsp)
vcvtusi2sdq 0xc8(%rbx), %xmm2, %xmm0
vmulsd 0x1727f(%rip), %xmm0, %xmm0 # 0x2d548
vdivsd 0xb0(%rsp), %xmm0, %xmm0
callq 0x2a510
leaq 0x18177(%rip), %rsi     # 0x2e455
movq %r14, %rdi
callq 0x5720
vmovsd 0xb8(%rsp), %xmm0
vmovsd 0xa0(%rsp), %xmm1
leaq 0x60(%rsp), %r14
movq %rax, %rcx
addq $0x10, %rcx
vdivsd 0x15cfc(%rip), %xmm0, %xmm0 # 0x2c008
vdivsd 0x15cf4(%rip), %xmm1, %xmm1 # 0x2c008
movq %r14, -0x10(%r14)
movq (%rax), %rdx
vaddsd 0x8(%rsp), %xmm0, %xmm0
vaddsd 0xa8(%rsp), %xmm1, %xmm2
cmpq %rcx, %rdx
jne 0x1633a
vmovupd (%rcx), %xmm1
vmovupd %xmm1, (%r14)
jmp 0x16347
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
vsubsd %xmm0, %xmm2, %xmm0
vmulsd 0x16ded(%rip), %xmm0, %xmm0 # 0x2d140
movq 0x8(%rax), %rdx
vmovsd %xmm2, 0x8(%rsp)
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe0(%rsp), %rdi
xorl %esi, %esi
callq 0x2a510
movq 0x58(%rsp), %r8
movq 0xe8(%rsp), %rdx
movq 0x50(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r14, %rcx
je 0x163a5
movq 0x60(%rsp), %rdi
movq 0xe0(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x163d1
leaq 0xf0(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x163cc
movq 0xf0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x163dd
leaq 0x50(%rsp), %rdi
callq 0x50e0
jmp 0x163ee
leaq 0xe0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x53c0
leaq 0x40(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x1640d
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x1641a
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1802d(%rip), %rsi     # 0x2e46b
leaq 0x30(%rsp), %rdi
callq 0x5720
vmovsd 0x90(%rsp), %xmm0
vmovsd 0x8(%rsp), %xmm2
leaq 0x80(%rsp), %r13
movq %rax, %rcx
addq $0x10, %rcx
vdivsd 0x15b9a(%rip), %xmm0, %xmm0 # 0x2c008
movq %r13, -0x10(%r13)
movq (%rax), %rdx
vaddsd 0x98(%rsp), %xmm0, %xmm0
cmpq %rcx, %rdx
jne 0x1648f
vmovupd (%rcx), %xmm1
vmovupd %xmm1, (%r13)
jmp 0x1649f
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
vsubsd %xmm2, %xmm0, %xmm0
vmulsd 0x16c95(%rip), %xmm0, %xmm0 # 0x2d140
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
callq 0x2a510
movq 0x78(%rsp), %r8
movq 0xc8(%rsp), %rdx
movq 0x70(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r13, %rcx
je 0x164fa
movq 0x80(%rsp), %rdi
movq 0xc0(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x16526
leaq 0xd0(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x16521
movq 0xd0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x16532
leaq 0x70(%rsp), %rdi
callq 0x50e0
jmp 0x16543
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x53c0
movq %r12, 0x10(%rsp)
leaq 0x10(%rax), %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x16560
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r12)
jmp 0x1656d
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x17ee5(%rip), %rsi     # 0x2e476
leaq 0x10(%rsp), %rdi
callq 0x5720
leaq 0x158(%rsp), %rbp
movq %rax, %rcx
addq $0x10, %rcx
movq %rbp, -0x10(%rbp)
movq (%rax), %rdi
cmpq %rcx, %rdi
jne 0x165c4
vmovupd (%rcx), %xmm0
movq %rbp, %rdi
vmovupd %xmm0, (%rbp)
jmp 0x165d7
movq %rdi, 0x148(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x158(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x150(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
callq 0x53b0
movq 0x148(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1660c
callq 0x5310
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x1661b
callq 0x5310
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16631
callq 0x5310
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x16640
callq 0x5310
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16653
callq 0x5310
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16669
callq 0x5310
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x16678
callq 0x5310
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1668e
callq 0x5310
movq 0x40(%rbx), %rcx
movl 0xd0(%rbx), %eax
shrq %rcx
cmpq %rcx, 0x14a0(%rbx)
jae 0x166b8
movl 0x5c(%rbx), %ecx
leal (%rcx,%rcx,4), %ecx
cmpl %ecx, %eax
jle 0x166d2
vmovsd 0x16eca(%rip), %xmm0    # 0x2d580
jmp 0x166c0
vmovsd 0x16eb8(%rip), %xmm0    # 0x2d578
vcvtsi2sd %eax, %xmm3, %xmm1
vmulsd %xmm1, %xmm0, %xmm0
vcvttsd2si %xmm0, %eax
movl %eax, 0xd0(%rbx)
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rdi
movq %rax, %rbx
cmpq %r12, %rdi
je 0x166fb
callq 0x5310
jmp 0x166fb
movq %rax, %rbx
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16716
callq 0x5310
jmp 0x16716
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x1672a
callq 0x5310
jmp 0x1672a
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16742
callq 0x5310
jmp 0x16742
movq %rax, %rbx
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1675d
callq 0x5310
jmp 0x1675d
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x16771
callq 0x5310
jmp 0x16771
movq %rax, %rbx
leaq 0x178(%rsp), %rax
jmp 0x1679a
movq 0x100(%rsp), %rdi
movq %rax, %rbx
cmpq %r14, %rdi
je 0x16795
callq 0x5310
jmp 0x16795
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x167a8
callq 0x5310
movq %rbx, %rdi
callq 0x56c0