// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpb $0x0, 0x90(%rdi)
jne 0x425cc
cmpl $0x0, 0xf8(%rdi)
jns 0x425ab
movl $0x0, 0xf8(%rdi)
cmpl $0x0, 0xfc(%rdi)
jns 0x425ab
movl $0x0, 0xfc(%rdi)
movl (%rdi), %eax
cmpl %eax, 0xfc(%rdi)
jl 0x425cc
leal -0x1(%rax), %ecx
movl %ecx, 0xfc(%rdi)
cmpl %eax, 0xf8(%rdi)
jl 0x425cc
movl %ecx, 0xf8(%rdi)
cmpb $0x0, 0x91(%rdi)
jne 0x4261d
cmpl $0x0, 0x100(%rdi)
jns 0x425fb
movl $0x0, 0x100(%rdi)
cmpl $0x0, 0x104(%rdi)
jns 0x425fb
movl $0x0, 0x104(%rdi)
movl 0x4(%rdi), %eax
cmpl %eax, 0x104(%rdi)
jl 0x4261d
leal -0x1(%rax), %ecx
movl %ecx, 0x104(%rdi)
cmpl %eax, 0x100(%rdi)
jl 0x4261d
movl %ecx, 0x100(%rdi)
cmpb $0x0, 0x92(%rdi)
jne 0x4266e
cmpl $0x0, 0x108(%rdi)
jns 0x4264c
movl $0x0, 0x108(%rdi)
cmpl $0x0, 0x10c(%rdi)
jns 0x4264c
movl $0x0, 0x10c(%rdi)
movl 0x8(%rdi), %eax
cmpl %eax, 0x10c(%rdi)
jl 0x4266e
leal -0x1(%rax), %ecx
movl %ecx, 0x10c(%rdi)
cmpl %eax, 0x108(%rdi)
jl 0x4266e
movl %ecx, 0x108(%rdi)
movl (%rdi), %r10d
movl 0xf8(%rdi), %esi
movl %esi, 0x110(%rdi)
movl 0x100(%rdi), %r9d
movl %r9d, 0x114(%rdi)
movl 0x108(%rdi), %r8d
movl %r8d, 0x118(%rdi)
testl %esi, %esi
js 0x426a7
movl %esi, %eax
cltd
idivl %r10d
movl %edx, %ecx
jmp 0x426b9
leal -0x1(%r10), %eax
subl %esi, %eax
cltd
idivl %r10d
negl %edx
leal (%r10,%rdx), %ecx
decl %ecx
movl %ecx, 0x30(%rdi)
movl %ecx, 0x11c(%rdi)
testl %esi, %esi
js 0x426ce
movl %esi, %eax
cltd
idivl %r10d
jmp 0x426d8
incl %esi
movl %esi, %eax
cltd
idivl %r10d
decl %eax
cvtsi2sd %eax, %xmm0
mulsd 0x60(%rdi), %xmm0
movsd %xmm0, 0x98(%rdi)
movsd %xmm0, 0xb0(%rdi)
movl 0x4(%rdi), %r11d
testl %r9d, %r9d
js 0x42705
movl %r9d, %eax
cltd
idivl %r11d
movl %edx, %esi
jmp 0x42718
leal -0x1(%r11), %eax
subl %r9d, %eax
cltd
idivl %r11d
negl %edx
leal (%r11,%rdx), %esi
decl %esi
movl %esi, 0x34(%rdi)
movl %esi, 0x120(%rdi)
testl %r9d, %r9d
js 0x4272f
movl %r9d, %eax
cltd
idivl %r11d
jmp 0x4273b
incl %r9d
movl %r9d, %eax
cltd
idivl %r11d
decl %eax
pushq %rbx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x68(%rdi), %xmm0
movsd %xmm0, 0xa0(%rdi)
movsd %xmm0, 0xb8(%rdi)
movl 0x8(%rdi), %ebx
testl %r8d, %r8d
js 0x4276b
movl %r8d, %eax
cltd
idivl %ebx
movl %edx, %r9d
jmp 0x4277d
leal -0x1(%rbx), %eax
subl %r8d, %eax
cltd
idivl %ebx
negl %edx
leal (%rbx,%rdx), %r9d
decl %r9d
movl %r9d, 0x38(%rdi)
movl %r9d, 0x124(%rdi)
testl %r8d, %r8d
js 0x42795
movl %r8d, %eax
cltd
idivl %ebx
jmp 0x427a0
incl %r8d
movl %r8d, %eax
cltd
idivl %ebx
decl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x70(%rdi), %xmm0
movsd %xmm0, 0xa8(%rdi)
movsd %xmm0, 0xc0(%rdi)
movl 0xfc(%rdi), %eax
testl %eax, %eax
popq %rbx
js 0x427cd
cltd
idivl %r10d
jmp 0x427e0
leal -0x1(%r10), %edx
subl %eax, %edx
movl %edx, %eax
cltd
idivl %r10d
negl %edx
addl %r10d, %edx
decl %edx
movl %ecx, %r8d
subl %edx, %r8d
movl %r8d, 0x128(%rdi)
movl 0x104(%rdi), %eax
testl %eax, %eax
js 0x427fd
cltd
idivl %r11d
jmp 0x42810
leal -0x1(%r11), %edx
subl %eax, %edx
movl %edx, %eax
cltd
idivl %r11d
negl %edx
addl %r11d, %edx
decl %edx
leal (%rsi,%r11), %eax
subl %edx, %eax
imull %r10d, %eax
addl %r8d, %eax
movl %eax, 0x12c(%rdi)
addl %r10d, %r8d
movl %r8d, 0x128(%rdi)
imull %r11d, %r9d
addl %esi, %r9d
imull %r10d, %r9d
addl %ecx, %r9d
movl %r9d, 0x3c(%rdi)
movl $0x0, 0x40(%rdi)
retq
nop