// File: 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 %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x6280
movq -0xe0(%rbp), %rax
testb $0x1, 0xb8(%rax)
je 0x6387
movq 0x11c7a(%rip), %rdi     # 0x17fd0
leaq 0xb013(%rip), %rsi      # 0x11370
callq 0x21f0
movq -0xe0(%rbp), %rax
movsbl 0x60(%rax), %eax
cmpl $0x48, %eax
jne 0x6385
movq 0x11c57(%rip), %rdi     # 0x17fd0
leaq 0xae5c(%rip), %rsi      # 0x111dc
callq 0x21f0
jmp 0x6387
movq -0xe0(%rbp), %rdi
addq $0x68, %rdi
movq %rdi, -0x108(%rbp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0x100(%rbp)
callq 0xa4a0
movq -0x100(%rbp), %rsi
movq %rax, %rdi
callq 0xa4e0
movq -0x108(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x1, %esi
callq 0xa4a0
movq -0x100(%rbp), %rsi
movq %rax, %rdi
callq 0xa4e0
movq -0xe0(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x10(%rbp)
addq $0xa0, %rdi
movslq -0x24(%rbp), %rsi
callq 0xa5c0
movq -0xe0(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
movups -0x20(%rbp), %xmm0
movups %xmm0, (%rax)
addq $0x18, %rdi
movq %rdi, -0xf8(%rbp)
movslq -0x24(%rbp), %rsi
callq 0xa270
movq -0xf8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0xf0(%rbp)
movslq -0x28(%rbp), %rsi
callq 0xa270
movsd -0xf0(%rbp), %xmm0
movsd (%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
leaq -0x68(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x2fe0
movq -0xe8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movups -0x20(%rbp), %xmm0
movaps %xmm0, -0x80(%rbp)
movq -0x70(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movaps -0x80(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0x50(%rbp), %rdi
callq 0xa750
jmp 0x64bb
movq -0x50(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xa410
movq -0xe0(%rbp), %rdi
addq $0xa0, %rdi
movslq -0x28(%rbp), %rsi
callq 0xa5c0
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x2, -0x30(%rbp)
movq -0xe0(%rbp), %rdi
movl -0x30(%rbp), %eax
movl %eax, -0x10c(%rbp)
addq $0x68, %rdi
callq 0xa520
movq %rax, %rcx
movl -0x10c(%rbp), %eax
cmpl %ecx, %eax
jge 0x6757
movq -0xe0(%rbp), %rdi
addq $0x68, %rdi
movslq -0x30(%rbp), %rsi
callq 0xa4a0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa4e0
movq -0xe0(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x24(%rbp)
addq $0x68, %rdi
movslq -0x30(%rbp), %rsi
callq 0xa4a0
movq %rax, %rdi
movl $0x1, %esi
callq 0xa4e0
movq -0xe0(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
addq $0x68, %rdi
movslq -0x30(%rbp), %rsi
callq 0xa4a0
movq %rax, %rdi
movl $0x2, %esi
callq 0xa4e0
movq -0xe0(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x28(%rbp)
addq $0x18, %rdi
movslq -0x24(%rbp), %rsi
callq 0xa270
movq -0xe0(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x120(%rbp)
addq $0xa0, %rdi
movslq -0x28(%rbp), %rsi
callq 0xa5c0
movq -0xe0(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xb8(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xb0(%rbp)
addq $0x18, %rdi
movslq -0x28(%rbp), %rsi
callq 0xa270
movq -0xe0(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x118(%rbp)
addq $0xa0, %rdi
movslq -0x2c(%rbp), %rsi
callq 0xa5c0
movq -0xe0(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, -0xd8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xc8(%rbp)
addq $0x18, %rdi
movslq -0x2c(%rbp), %rsi
callq 0xa270
movsd -0x120(%rbp), %xmm0
movsd -0x118(%rbp), %xmm1
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movsd (%rcx), %xmm2
leaq -0xa8(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
leaq -0xd8(%rbp), %rcx
movq (%rdx), %rsi
movq %rsi, (%rsp)
movq 0x8(%rdx), %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rdx), %rdx
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x28(%rsp)
movsbl 0x60(%rax), %esi
callq 0x5c40
movq -0xe0(%rbp), %rdi
movq -0xa8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x10(%rbp)
addq $0xa0, %rdi
movslq -0x24(%rbp), %rsi
callq 0xa5c0
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6511
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xa410
jmp 0x6760
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x23c0
nopl (%rax)