// File: /workspace/github_cpp_makefile_star2_O3/dannycalegari[P]circle_pack/./Layout_routine.cc
// Function: Packing::determine_centers()
void Packing::determine_centers(){			// figure out centers of vertices
	Point P;
	int i,j,k,l;
	double d;
	initialize_centers();
	if(verbose){
		cout << "determining centers.\n";
		if(geometry=='H'){
			cout << "hyperbolic geometry.\n";
		};
	};
	i=lay[0][0];	// special case
	j=lay[1][0];	// special case
	P.x=0.0;
	P.y=0.0;
	P.z=1.0;
	// P=ORIGIN;
	center[i]=P;
//	cout << "center " << 0 << " index " << i << " laid out at " << P.x << " " << P.y << " " << P.z << "\n";
	d=rad[i]+rad[j];
	P=HTR(d)(P);
	center[j]=P;
//	cout << "center " << 1 << " index " << j << " laid out at " << P.x << " " << P.y << " " << P.z << "\n";
	for(l=2;l<(int) lay.size();l++){
		i=lay[l][0];
		k=lay[l][1];
		j=lay[l][2];
		P=layout_point(rad[i], center[j], rad[j], center[k], rad[k], geometry);
		center[i]=P;
//		cout << "center " << l << " index " << i << " laid out on " << j << " and " << k << " at " << P.x << " " << P.y << " " << P.z << "\n";
	};
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
callq 0x5d70
cmpb $0x1, 0xb8(%rbx)
jne 0x5e83
movq 0x817c(%rip), %rdi      # 0xdfd0
leaq 0x453d(%rip), %rsi      # 0xa398
movl $0x15, %edx
callq 0x2220
cmpb $0x48, 0x60(%rbx)
jne 0x5e83
movq 0x815e(%rip), %rdi      # 0xdfd0
leaq 0x438b(%rip), %rsi      # 0xa204
movl $0x15, %edx
callq 0x2220
movq 0x68(%rbx), %rax
movq 0xa0(%rbx), %rcx
movq (%rax), %rdx
movq 0x18(%rax), %rax
movslq (%rdx), %rdx
movslq (%rax), %r15
leaq (%rdx,%rdx,2), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rcx,%rax,8)
movabsq $0x3ff0000000000000, %rsi # imm = 0x3FF0000000000000
movq %rsi, 0x10(%rcx,%rax,8)
movq 0x18(%rbx), %rax
movsd (%rax,%rdx,8), %xmm0
addsd (%rax,%r15,8), %xmm0
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x30cc
movq (%r14), %rax
movq (%rax), %rcx
movq 0x18(%rax), %rdx
movq 0x30(%rax), %rax
xorpd %xmm1, %xmm1
movsd 0x8(%rax), %xmm0
mulsd %xmm1, %xmm0
mulsd (%rax), %xmm1
addsd %xmm0, %xmm1
addsd 0x10(%rax), %xmm1
movsd %xmm1, 0x38(%rsp)
movsd (%rcx), %xmm2
movsd 0x8(%rcx), %xmm1
movsd 0x10(%rcx), %xmm0
movhps 0x8(%rdx), %xmm1        # xmm1 = xmm1[0,1],mem[0,1]
movaps %xmm1, 0x70(%rsp)
movhps (%rdx), %xmm2           # xmm2 = xmm2[0,1],mem[0,1]
movaps %xmm2, 0x60(%rsp)
movhpd 0x10(%rdx), %xmm0       # xmm0 = xmm0[0],mem[0]
movapd %xmm0, 0x80(%rsp)
movq %r14, %rdi
callq 0x9106
movq 0xa0(%rbx), %rax
leaq (%r15,%r15,2), %rcx
xorpd %xmm0, %xmm0
movapd 0x70(%rsp), %xmm2
mulpd %xmm0, %xmm2
movapd 0x60(%rsp), %xmm1
mulpd %xmm0, %xmm1
addpd %xmm2, %xmm1
addpd 0x80(%rsp), %xmm1
movupd %xmm1, (%rax,%rcx,8)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x10(%rax,%rcx,8)
movq 0x68(%rbx), %rcx
movq 0x70(%rbx), %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
imull $0xaaaaaaab, %edx, %edx # imm = 0xAAAAAAAB
cmpl $0x3, %edx
jl 0x6051
movl $0x2, %r15d
movl $0x30, %r12d
leaq 0x40(%rsp), %r14
movq (%rcx,%r12), %rcx
movslq (%rcx), %r13
movslq 0x4(%rcx), %rdx
movslq 0x8(%rcx), %rcx
movq 0x18(%rbx), %rsi
movsd (%rsi,%r13,8), %xmm0
leaq (%rcx,%rcx,2), %rdi
movsd (%rsi,%rcx,8), %xmm1
leaq (%rdx,%rdx,2), %rcx
movsd (%rsi,%rdx,8), %xmm2
movsbl 0x60(%rbx), %esi
movq 0x10(%rax,%rcx,8), %rdx
movq %rdx, 0x28(%rsp)
movups (%rax,%rcx,8), %xmm3
movups %xmm3, 0x18(%rsp)
movq 0x10(%rax,%rdi,8), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax,%rdi,8), %xmm3
movups %xmm3, (%rsp)
movq %r14, %rdi
callq 0x57a5
movsd 0x50(%rsp), %xmm0
movapd 0x40(%rsp), %xmm1
movq 0xa0(%rbx), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
movupd %xmm1, (%rax,%rcx,8)
movsd %xmm0, 0x10(%rax,%rcx,8)
incq %r15
movq 0x68(%rbx), %rcx
movq 0x70(%rbx), %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
imull $0xaaaaaaab, %edx, %edx # imm = 0xAAAAAAAB
movslq %edx, %rdx
addq $0x18, %r12
cmpq %rdx, %r15
jl 0x5fa4
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq