// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/hex/agentmcts.h
// Function: Morat::Hex::AgentMCTS::start_gc()
void start_gc() {
		Time starttime;
		logerr("Starting player GC with limit " + to_str(gclimit) + " ... ");
		uint64_t nodesbefore = nodes;
		garbage_collect(root, rootboard.to_play());
		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 $0x158, %rsp            # imm = 0x158
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x55b0
vcvtsi2sdq (%r14), %xmm0, %xmm0
movl 0x4118(%rbx), %esi
vmovsd %xmm0, 0x20(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm1, %xmm0
leaq 0x28(%rsp), %r14
movq %r14, %rdi
vmovsd %xmm0, 0xb0(%rsp)
callq 0x1131a
leaq 0x1e22e(%rip), %rcx     # 0x3326f
movl $0x1e, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x10(%rsp), %r15
movq %rax, %rcx
addq $0x10, %rcx
movq %r15, -0x10(%r15)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x15076
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r15)
jmp 0x15082
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1e1eb(%rip), %rsi     # 0x3328e
callq 0x56e0
leaq 0x108(%rsp), %r14
movq %rax, %rcx
addq $0x10, %rcx
movq %r14, -0x10(%r14)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x150ce
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r14)
jmp 0x150e1
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
movq 0x8(%rax), %rdx
movq 0x33ee4(%rip), %r13     # 0x48fd0
movq %rdx, 0x100(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r13), %rsi
movq 0xf8(%rsp), %rdi
callq 0x5370
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x15126
callq 0x52e0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x15134
callq 0x52e0
leaq 0x38(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x15148
callq 0x52e0
vcvtusi2sdq 0x4110(%rbx), %xmm1, %xmm0
movl 0x18(%rbx), %edx
leaq 0x40e0(%rbx), %rsi
movq %rbx, %rdi
vmovsd %xmm0, 0xa8(%rsp)
callq 0x10816
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x55b0
vcvtsi2sdq (%r14), %xmm1, %xmm0
vmovss 0x1d089(%rip), %xmm1    # 0x32210
leaq 0x4130(%rbx), %rdi
vmovsd %xmm0, 0xa0(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm2, %xmm0
vmovsd %xmm0, 0x98(%rsp)
vmovss 0x1d052(%rip), %xmm0    # 0x32200
callq 0x12534
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x55b0
vcvtsi2sdq (%r14), %xmm2, %xmm0
movl $0x1, %esi
vmovsd %xmm0, 0x90(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm2, %xmm0
leaq 0x138(%rsp), %r14
movq %r14, %rdi
vmovsd %xmm0, 0x88(%rsp)
vcvtusi2sdq 0x4110(%rbx), %xmm2, %xmm0
vmulsd 0x1d021(%rip), %xmm0, %xmm0 # 0x32220
vdivsd 0xa8(%rsp), %xmm0, %xmm0
callq 0x2f6e8
leaq 0x1e080(%rip), %rsi     # 0x33294
movq %r14, %rdi
callq 0x56e0
vmovsd 0xb0(%rsp), %xmm0
vmovsd 0x98(%rsp), %xmm1
leaq 0x78(%rsp), %r14
movq %rax, %rcx
addq $0x10, %rcx
vdivsd 0x1bdc6(%rip), %xmm0, %xmm0 # 0x31008
vdivsd 0x1bdbe(%rip), %xmm1, %xmm1 # 0x31008
movq %r14, -0x10(%r14)
movq (%rax), %rdx
vaddsd 0x20(%rsp), %xmm0, %xmm0
vaddsd 0xa0(%rsp), %xmm1, %xmm2
cmpq %rcx, %rdx
jne 0x15270
vmovupd (%rcx), %xmm1
vmovupd %xmm1, (%r14)
jmp 0x1527d
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
vsubsd %xmm0, %xmm2, %xmm0
vmulsd 0x1cf8f(%rip), %xmm0, %xmm0 # 0x32218
movq 0x8(%rax), %rdx
vmovsd %xmm2, 0x20(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x2f6e8
movq 0x70(%rsp), %r8
movq 0xe0(%rsp), %rdx
movq 0x68(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r14, %rcx
je 0x152db
movq 0x78(%rsp), %rdi
movq 0xd8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x15307
leaq 0xe8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x15302
movq 0xe8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x15313
leaq 0x68(%rsp), %rdi
callq 0x50c0
jmp 0x15324
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x58(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x15343
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x15350
movq %rsi, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1df36(%rip), %rsi     # 0x332aa
leaq 0x48(%rsp), %rdi
callq 0x56e0
vmovsd 0x88(%rsp), %xmm0
vmovsd 0x20(%rsp), %xmm2
movq %r12, 0x28(%rsp)
movq %rax, %rcx
addq $0x10, %rcx
vdivsd 0x1bc67(%rip), %xmm0, %xmm0 # 0x31008
movq (%rax), %rdx
vaddsd 0x90(%rsp), %xmm0, %xmm0
cmpq %rcx, %rdx
jne 0x153be
vmovupd (%rcx), %xmm1
vmovupd %xmm1, (%r12)
jmp 0x153cb
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
vsubsd %xmm2, %xmm0, %xmm0
vmulsd 0x1ce41(%rip), %xmm0, %xmm0 # 0x32218
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
callq 0x2f6e8
movq 0x30(%rsp), %r8
movq 0xc0(%rsp), %rdx
movq 0x28(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r12, %rcx
je 0x15423
movq 0x38(%rsp), %rdi
movq 0xb8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1544f
leaq 0xc8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x1544a
movq 0xc8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1545b
leaq 0x28(%rsp), %rdi
callq 0x50c0
jmp 0x1546c
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
movq %r15, (%rsp)
leaq 0x10(%rax), %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x15487
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r15)
jmp 0x15493
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1ddfe(%rip), %rsi     # 0x332b5
movq %rsp, %rdi
callq 0x56e0
leaq 0x128(%rsp), %rbp
movq %rax, %rcx
addq $0x10, %rcx
movq %rbp, -0x10(%rbp)
movq (%rax), %rdi
cmpq %rcx, %rdi
jne 0x154e8
vmovupd (%rcx), %xmm0
movq %rbp, %rdi
vmovupd %xmm0, (%rbp)
jmp 0x154fb
movq %rdi, 0x118(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x128(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x120(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r13), %rsi
callq 0x5370
movq 0x118(%rsp), %rdi
cmpq %rbp, %rdi
je 0x15531
callq 0x52e0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1553f
callq 0x52e0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15555
callq 0x52e0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x15564
callq 0x52e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15577
callq 0x52e0
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1558d
callq 0x52e0
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x1559c
callq 0x52e0
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x155b2
callq 0x52e0
movq 0x60(%rbx), %rcx
movl 0x4118(%rbx), %eax
shrq %rcx
cmpq %rcx, 0x54e8(%rbx)
jae 0x155df
movl 0x94(%rbx), %ecx
leal (%rcx,%rcx,4), %ecx
cmpl %ecx, %eax
jle 0x155f9
vmovsd 0x1cca3(%rip), %xmm0    # 0x32280
jmp 0x155e7
vmovsd 0x1cc91(%rip), %xmm0    # 0x32278
vcvtsi2sd %eax, %xmm3, %xmm1
vmulsd %xmm1, %xmm0, %xmm0
vcvttsd2si %xmm0, %eax
movl %eax, 0x4118(%rbx)
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x15621
callq 0x52e0
jmp 0x15621
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1563c
callq 0x52e0
jmp 0x1563c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x15650
callq 0x52e0
jmp 0x15650
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15668
callq 0x52e0
jmp 0x15668
movq %rax, %rbx
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15683
callq 0x52e0
jmp 0x15683
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x15697
callq 0x52e0
jmp 0x15697
movq %rax, %rbx
leaq 0x148(%rsp), %rax
jmp 0x156bc
movq (%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x156b7
callq 0x52e0
jmp 0x156b7
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x156ca
callq 0x52e0
movq %rbx, %rdi
callq 0x5670