// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/hex/agentpns.h
// Function: Morat::Hex::AgentPNS::start_gc()
void start_gc() {
		Time starttime;
		logerr("Starting GC with limit " + to_str(gclimit) + " ... ");

		garbage_collect(& root);

		Time gctime;
		ctmem.compact(1.0, 0.75);

		Time compacttime;
		logerr(to_str(100.0*ctmem.meminuse()/memlimit, 1) + " % of tree remains - " +
			to_str((gctime - starttime)*1000, 0)  + " msec gc, " + to_str((compacttime - gctime)*1000, 0) + " msec compact\n");

		if(ctmem.meminuse() >= memlimit/2)
			gclimit = (unsigned int)(gclimit*1.3);
		else if(gclimit > 5)
			gclimit = (unsigned 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
leaq 0x8(%rsp), %r14
movq %rdi, %rbx
xorl %esi, %esi
movq %r14, %rdi
callq 0x55b0
vcvtsi2sdq (%r14), %xmm0, %xmm0
movl 0x68(%rbx), %esi
vmovsd %xmm0, 0x28(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm1, %xmm0
leaq 0x30(%rsp), %r14
movq %r14, %rdi
vmovsd %xmm0, 0xb0(%rsp)
callq 0x11399
leaq 0x16330(%rip), %rcx     # 0x33f1e
movl $0x17, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x18(%rsp), %r15
movq %rax, %rcx
addq $0x10, %rcx
movq %r15, -0x10(%r15)
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x1dc23
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r15)
jmp 0x1dc30
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1563b(%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 0x1dc7e
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r14)
jmp 0x1dc91
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
movq 0x8(%rax), %rdx
movq 0x2b334(%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 0x1dcd6
callq 0x52e0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1dce5
callq 0x52e0
leaq 0x40(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x1dcf9
callq 0x52e0
leaq 0x1540(%rbx), %rsi
movq %rbx, %rdi
callq 0x1b8b8
leaq 0x8(%rsp), %r14
xorl %esi, %esi
movq %r14, %rdi
callq 0x55b0
vcvtsi2sdq (%r14), %xmm1, %xmm0
vmovss 0x144ec(%rip), %xmm1    # 0x32210
leaq 0x70(%rbx), %rdi
vmovsd %xmm0, 0xa8(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm2, %xmm0
vmovsd %xmm0, 0xa0(%rsp)
vmovss 0x144b8(%rip), %xmm0    # 0x32200
callq 0x1d2e8
leaq 0x8(%rsp), %r14
xorl %esi, %esi
movq %r14, %rdi
callq 0x55b0
vcvtsi2sdq (%r14), %xmm2, %xmm0
movl $0x1, %esi
vmovsd %xmm0, 0x98(%rsp)
vcvtsi2sdq 0x8(%r14), %xmm2, %xmm0
leaq 0x138(%rsp), %r14
movq %r14, %rdi
vmovsd %xmm0, 0x90(%rsp)
vcvtusi2sdq 0x1428(%rbx), %xmm2, %xmm0
vmulsd 0x14485(%rip), %xmm0, %xmm0 # 0x32220
vcvtusi2sdq 0x60(%rbx), %xmm2, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
callq 0x2f6e8
leaq 0x154e2(%rip), %rsi     # 0x33294
movq %r14, %rdi
callq 0x56e0
vmovsd 0xb0(%rsp), %xmm0
vmovsd 0xa0(%rsp), %xmm1
leaq 0x80(%rsp), %r14
movq %rax, %rcx
addq $0x10, %rcx
vdivsd 0x13225(%rip), %xmm0, %xmm0 # 0x31008
vdivsd 0x1321d(%rip), %xmm1, %xmm1 # 0x31008
movq %r14, -0x10(%r14)
movq (%rax), %rdx
vaddsd 0x28(%rsp), %xmm0, %xmm0
vaddsd 0xa8(%rsp), %xmm1, %xmm2
cmpq %rcx, %rdx
jne 0x1de11
vmovupd (%rcx), %xmm1
vmovupd %xmm1, (%r14)
jmp 0x1de21
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
vsubsd %xmm0, %xmm2, %xmm0
vmulsd 0x143eb(%rip), %xmm0, %xmm0 # 0x32218
movq 0x8(%rax), %rdx
vmovsd %xmm2, 0x28(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x2f6e8
movq 0x78(%rsp), %r8
movq 0xe0(%rsp), %rdx
movq 0x70(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r14, %rcx
je 0x1de82
movq 0x80(%rsp), %rdi
movq 0xd8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1deae
leaq 0xe8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x1dea9
movq 0xe8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1deba
leaq 0x70(%rsp), %rdi
callq 0x50c0
jmp 0x1decb
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x60(%rsp), %rdx
leaq 0x10(%rax), %rcx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
cmpq %rcx, %rsi
jne 0x1deea
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%rdx)
jmp 0x1def7
movq %rsi, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1538f(%rip), %rsi     # 0x332aa
leaq 0x50(%rsp), %rdi
callq 0x56e0
vmovsd 0x90(%rsp), %xmm0
vmovsd 0x28(%rsp), %xmm2
movq %r12, 0x30(%rsp)
movq %rax, %rcx
addq $0x10, %rcx
vdivsd 0x130c0(%rip), %xmm0, %xmm0 # 0x31008
movq (%rax), %rdx
vaddsd 0x98(%rsp), %xmm0, %xmm0
cmpq %rcx, %rdx
jne 0x1df65
vmovupd (%rcx), %xmm1
vmovupd %xmm1, (%r12)
jmp 0x1df72
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
vsubsd %xmm2, %xmm0, %xmm0
vmulsd 0x1429a(%rip), %xmm0, %xmm0 # 0x32218
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
callq 0x2f6e8
movq 0x38(%rsp), %r8
movq 0xc0(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl $0xf, %edi
leaq (%rdx,%r8), %rax
cmpq %r12, %rcx
je 0x1dfca
movq 0x40(%rsp), %rdi
movq 0xb8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x1dff6
leaq 0xc8(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x1dff1
movq 0xc8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1e002
leaq 0x30(%rsp), %rdi
callq 0x50c0
jmp 0x1e013
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
movq %r15, 0x8(%rsp)
leaq 0x10(%rax), %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
jne 0x1e02f
vmovupd (%rcx), %xmm0
vmovupd %xmm0, (%r15)
jmp 0x1e03c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x8, %rdx
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x15255(%rip), %rsi     # 0x332b5
leaq 0x8(%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 0x1e093
vmovupd (%rcx), %xmm0
movq %rbp, %rdi
vmovupd %xmm0, (%rbp)
jmp 0x1e0a6
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 0x1e0dc
callq 0x52e0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e0eb
callq 0x52e0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e101
callq 0x52e0
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e110
callq 0x52e0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e123
callq 0x52e0
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e139
callq 0x52e0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x1e148
callq 0x52e0
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e15e
callq 0x52e0
movq 0x60(%rbx), %rcx
movl 0x68(%rbx), %eax
shrq %rcx
cmpq %rcx, 0x1428(%rbx)
jae 0x1e180
cmpl $0x6, %eax
jb 0x1e19b
vmovsd 0x14102(%rip), %xmm0    # 0x32280
jmp 0x1e188
vmovsd 0x140f0(%rip), %xmm0    # 0x32278
vcvtusi2sd %eax, %xmm3, %xmm1
vmulsd %xmm1, %xmm0, %xmm0
vcvttsd2usi %xmm0, %eax
movl %eax, 0x68(%rbx)
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x1e1c4
callq 0x52e0
jmp 0x1e1c4
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e1df
callq 0x52e0
jmp 0x1e1df
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e1f3
callq 0x52e0
jmp 0x1e1f3
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e20b
callq 0x52e0
jmp 0x1e20b
movq %rax, %rbx
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e226
callq 0x52e0
jmp 0x1e226
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x1e23a
callq 0x52e0
jmp 0x1e23a
movq %rax, %rbx
leaq 0x148(%rsp), %rax
jmp 0x1e260
movq 0x8(%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x1e25b
callq 0x52e0
jmp 0x1e25b
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e26e
callq 0x52e0
movq %rbx, %rdi
callq 0x5670