// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5ca0
movl 0x4118(%rbx), %esi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0xd1be
leaq 0x13a16(%rip), %rsi     # 0x240cb
leaq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0xcf8b
leaq 0x13a21(%rip), %rdx     # 0x240ea
leaq 0x128(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x8051
leaq 0x128(%rsp), %r14
movq %r14, %rdi
callq 0xd451
movq %r14, %rdi
callq 0x5150
leaq 0x20(%rsp), %rdi
callq 0x5150
leaq 0x48(%rsp), %rdi
callq 0x5150
vcvtusi2sdq 0x4110(%rbx), %xmm0, %xmm0
movl 0x18(%rbx), %edx
leaq 0x40e0(%rbx), %rsi
movq %rbx, %rdi
vmovsd %xmm0, 0x10(%rsp)
callq 0xca22
leaq 0x8(%rsp), %rdi
callq 0x5ca0
vmovss 0x12ae1(%rip), %xmm0    # 0x2321c
vmovss 0x12aed(%rip), %xmm1    # 0x23230
leaq 0x4130(%rbx), %rdi
callq 0xdd2a
leaq 0x18(%rsp), %rdi
callq 0x5ca0
vcvtusi2sdq 0x4110(%rbx), %xmm2, %xmm0
leaq 0xe8(%rsp), %r14
vmulsd 0x12a65(%rip), %xmm0, %xmm0 # 0x231d8
vdivsd 0x10(%rsp), %xmm0, %xmm0
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x20e6c
leaq 0x13965(%rip), %rdx     # 0x240f0
leaq 0xa8(%rsp), %rdi
movq %r14, %rsi
callq 0x8051
vmovsd 0x8(%rsp), %xmm0
vsubsd 0x40(%rsp), %xmm0, %xmm0
vmulsd 0x12a21(%rip), %xmm0, %xmm0 # 0x231d0
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
callq 0x20e6c
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0xcf24
leaq 0x13924(%rip), %rdx     # 0x24106
leaq 0x48(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x8051
vmovsd 0x18(%rsp), %xmm0
vsubsd 0x8(%rsp), %xmm0, %xmm0
vmulsd 0x129c8(%rip), %xmm0, %xmm0 # 0x231d0
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
callq 0x20e6c
leaq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xcf24
leaq 0x138e2(%rip), %rdx     # 0x24111
leaq 0x108(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x8051
leaq 0x108(%rsp), %r14
movq %r14, %rdi
callq 0xd451
movq %r14, %rdi
callq 0x5150
leaq 0x20(%rsp), %rdi
callq 0x5150
leaq 0x68(%rsp), %rdi
callq 0x5150
leaq 0x48(%rsp), %rdi
callq 0x5150
leaq 0xc8(%rsp), %rdi
callq 0x5150
leaq 0x88(%rsp), %rdi
callq 0x5150
leaq 0xa8(%rsp), %rdi
callq 0x5150
leaq 0xe8(%rsp), %rdi
callq 0x5150
movq 0x60(%rbx), %rcx
movl 0x4118(%rbx), %eax
shrq %rcx
cmpq %rcx, 0x54e8(%rbx)
jae 0x108d6
imull $0x5, 0x94(%rbx), %ecx
cmpl %ecx, %eax
jle 0x108f0
vmovsd 0x1293c(%rip), %xmm0    # 0x23210
jmp 0x108de
vmovsd 0x1292a(%rip), %xmm0    # 0x23208
vcvtsi2sd %eax, %xmm2, %xmm1
vmulsd %xmm1, %xmm0, %xmm0
vcvttsd2si %xmm0, %eax
movl %eax, 0x4118(%rbx)
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
retq
leaq 0x20(%rsp), %rdi
movq %rax, %rbx
callq 0x5150
jmp 0x1090d
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5150
jmp 0x1091c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5150
jmp 0x1092b
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x5150
jmp 0x1093d
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x5150
leaq 0xa8(%rsp), %rdi
callq 0x5150
leaq 0xe8(%rsp), %rdi
jmp 0x10982
movq %rax, %rbx
jmp 0x1094a
movq %rax, %rbx
jmp 0x10957
leaq 0x20(%rsp), %rdi
movq %rax, %rbx
callq 0x5150
jmp 0x1097d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5150
movq %rbx, %rdi
callq 0x5650
nop