// File: icemiliang[P]vot/src/vot/c_loops.cc
// Function: voro::c_loop_subset::setup_common()
void c_loop_subset::setup_common() {
	if(!xperiodic) {
		if(ai<0) {ai=0;if(bi<0) bi=0;}
		if(bi>=nx) {bi=nx-1;if(ai>=nx) ai=nx-1;}
	}
	if(!yperiodic) {
		if(aj<0) {aj=0;if(bj<0) bj=0;}
		if(bj>=ny) {bj=ny-1;if(aj>=ny) aj=ny-1;}
	}
	if(!zperiodic) {
		if(ak<0) {ak=0;if(bk<0) bk=0;}
		if(bk>=nz) {bk=nz-1;if(ak>=nz) ak=nz-1;}
	}
	ci=ai;cj=aj;ck=ak;
	di=i=step_mod(ci,nx);apx=px=step_div(ci,nx)*sx;
	dj=j=step_mod(cj,ny);apy=py=step_div(cj,ny)*sy;
	dk=k=step_mod(ck,nz);apz=pz=step_div(ck,nz)*sz;
	inc1=di-step_mod(bi,nx);
	inc2=nx*(ny+dj-step_mod(bj,ny))+inc1;
	inc1+=nx;
	ijk=di+nx*(dj+ny*dk);
	q=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
testb $0x1, 0x90(%rax)
jne 0x83bab
movq -0x10(%rbp), %rax
cmpl $0x0, 0xf8(%rax)
jge 0x83b71
movq -0x10(%rbp), %rax
movl $0x0, 0xf8(%rax)
cmpl $0x0, 0xfc(%rax)
jge 0x83b6f
movq -0x10(%rbp), %rax
movl $0x0, 0xfc(%rax)
jmp 0x83b71
movq -0x10(%rbp), %rcx
movl 0xfc(%rcx), %eax
cmpl (%rcx), %eax
jl 0x83ba9
movq -0x10(%rbp), %rcx
movl (%rcx), %eax
subl $0x1, %eax
movl %eax, 0xfc(%rcx)
movl 0xf8(%rcx), %eax
cmpl (%rcx), %eax
jl 0x83ba7
movq -0x10(%rbp), %rax
movl (%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0xf8(%rax)
jmp 0x83ba9
jmp 0x83bab
movq -0x10(%rbp), %rax
testb $0x1, 0x91(%rax)
jne 0x83c2a
movq -0x10(%rbp), %rax
cmpl $0x0, 0x100(%rax)
jge 0x83bec
movq -0x10(%rbp), %rax
movl $0x0, 0x100(%rax)
cmpl $0x0, 0x104(%rax)
jge 0x83bea
movq -0x10(%rbp), %rax
movl $0x0, 0x104(%rax)
jmp 0x83bec
movq -0x10(%rbp), %rcx
movl 0x104(%rcx), %eax
cmpl 0x4(%rcx), %eax
jl 0x83c28
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %eax
subl $0x1, %eax
movl %eax, 0x104(%rcx)
movl 0x100(%rcx), %eax
cmpl 0x4(%rcx), %eax
jl 0x83c26
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x100(%rax)
jmp 0x83c28
jmp 0x83c2a
movq -0x10(%rbp), %rax
testb $0x1, 0x92(%rax)
jne 0x83ca9
movq -0x10(%rbp), %rax
cmpl $0x0, 0x108(%rax)
jge 0x83c6b
movq -0x10(%rbp), %rax
movl $0x0, 0x108(%rax)
cmpl $0x0, 0x10c(%rax)
jge 0x83c69
movq -0x10(%rbp), %rax
movl $0x0, 0x10c(%rax)
jmp 0x83c6b
movq -0x10(%rbp), %rcx
movl 0x10c(%rcx), %eax
cmpl 0x8(%rcx), %eax
jl 0x83ca7
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %eax
subl $0x1, %eax
movl %eax, 0x10c(%rcx)
movl 0x108(%rcx), %eax
cmpl 0x8(%rcx), %eax
jl 0x83ca5
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x108(%rax)
jmp 0x83ca7
jmp 0x83ca9
movq -0x10(%rbp), %rdi
movl 0xf8(%rdi), %eax
movl %eax, 0x110(%rdi)
movl 0x100(%rdi), %eax
movl %eax, 0x114(%rdi)
movl 0x108(%rdi), %eax
movl %eax, 0x118(%rdi)
movl 0x110(%rdi), %esi
movl (%rdi), %edx
callq 0x845f0
movq -0x10(%rbp), %rdi
movl %eax, 0x30(%rdi)
movl %eax, 0x11c(%rdi)
movl 0x110(%rdi), %esi
movl (%rdi), %edx
callq 0x84640
movq -0x10(%rbp), %rdi
cvtsi2sd %eax, %xmm0
mulsd 0x60(%rdi), %xmm0
movsd %xmm0, 0x98(%rdi)
movsd %xmm0, 0xb0(%rdi)
movl 0x114(%rdi), %esi
movl 0x4(%rdi), %edx
callq 0x845f0
movq -0x10(%rbp), %rdi
movl %eax, 0x34(%rdi)
movl %eax, 0x120(%rdi)
movl 0x114(%rdi), %esi
movl 0x4(%rdi), %edx
callq 0x84640
movq -0x10(%rbp), %rdi
cvtsi2sd %eax, %xmm0
mulsd 0x68(%rdi), %xmm0
movsd %xmm0, 0xa0(%rdi)
movsd %xmm0, 0xb8(%rdi)
movl 0x118(%rdi), %esi
movl 0x8(%rdi), %edx
callq 0x845f0
movq -0x10(%rbp), %rdi
movl %eax, 0x38(%rdi)
movl %eax, 0x124(%rdi)
movl 0x118(%rdi), %esi
movl 0x8(%rdi), %edx
callq 0x84640
movq -0x10(%rbp), %rdi
cvtsi2sd %eax, %xmm0
mulsd 0x70(%rdi), %xmm0
movsd %xmm0, 0xa8(%rdi)
movsd %xmm0, 0xc0(%rdi)
movl 0x11c(%rdi), %eax
movl %eax, -0x1c(%rbp)
movl 0xfc(%rdi), %esi
movl (%rdi), %edx
callq 0x845f0
movq -0x10(%rbp), %rdi
movl %eax, %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, 0x128(%rdi)
movl (%rdi), %eax
movl %eax, -0x14(%rbp)
movl 0x4(%rdi), %eax
addl 0x120(%rdi), %eax
movl %eax, -0x18(%rbp)
movl 0x104(%rdi), %esi
movl 0x4(%rdi), %edx
callq 0x845f0
movl -0x18(%rbp), %edx
movl -0x14(%rbp), %ecx
movl %eax, %esi
movq -0x10(%rbp), %rax
subl %esi, %edx
imull %edx, %ecx
addl 0x128(%rax), %ecx
movl %ecx, 0x12c(%rax)
movl (%rax), %ecx
addl 0x128(%rax), %ecx
movl %ecx, 0x128(%rax)
movl 0x11c(%rax), %ecx
movl (%rax), %edx
movl 0x120(%rax), %esi
movl 0x4(%rax), %edi
imull 0x124(%rax), %edi
addl %edi, %esi
imull %esi, %edx
addl %edx, %ecx
movl %ecx, 0x3c(%rax)
movl $0x0, 0x40(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)