// File: /workspace/github_cpp_makefile_star2_O2/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 0x3838e
movl 0xf8(%rdi), %eax
testl %eax, %eax
js 0x38357
movl 0xfc(%rdi), %ecx
jmp 0x38375
andl $0x0, 0xf8(%rdi)
movl 0xfc(%rdi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x38375
andl $0x0, 0xfc(%rdi)
xorl %eax, %eax
xorl %ecx, %ecx
movl (%rdi), %edx
cmpl %edx, %ecx
jl 0x3838e
leal -0x1(%rdx), %ecx
movl %ecx, 0xfc(%rdi)
cmpl %edx, %eax
jl 0x3838e
movl %ecx, 0xf8(%rdi)
cmpb $0x0, 0x91(%rdi)
jne 0x383e1
movl 0x100(%rdi), %eax
testl %eax, %eax
js 0x383a9
movl 0x104(%rdi), %ecx
jmp 0x383c7
andl $0x0, 0x100(%rdi)
movl 0x104(%rdi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x383c7
andl $0x0, 0x104(%rdi)
xorl %eax, %eax
xorl %ecx, %ecx
movl 0x4(%rdi), %edx
cmpl %edx, %ecx
jl 0x383e1
leal -0x1(%rdx), %ecx
movl %ecx, 0x104(%rdi)
cmpl %edx, %eax
jl 0x383e1
movl %ecx, 0x100(%rdi)
movl 0x108(%rdi), %esi
cmpb $0x0, 0x92(%rdi)
jne 0x38436
testl %esi, %esi
js 0x383fc
movl 0x10c(%rdi), %eax
jmp 0x3841a
andl $0x0, 0x108(%rdi)
movl 0x10c(%rdi), %eax
xorl %esi, %esi
testl %eax, %eax
jns 0x3841a
andl $0x0, 0x10c(%rdi)
xorl %esi, %esi
xorl %eax, %eax
movl 0x8(%rdi), %ecx
cmpl %ecx, %eax
jl 0x38436
leal -0x1(%rcx), %eax
movl %eax, 0x10c(%rdi)
cmpl %ecx, %esi
jl 0x38436
movl %eax, 0x108(%rdi)
movl %eax, %esi
movl (%rdi), %r10d
movl 0xf8(%rdi), %r8d
movl %r8d, 0x110(%rdi)
movl 0x100(%rdi), %r9d
movl %r9d, 0x114(%rdi)
movl %esi, 0x118(%rdi)
testl %r8d, %r8d
js 0x3846b
movl %r8d, %eax
cltd
idivl %r10d
movl %edx, %ecx
jmp 0x3848a
leal -0x1(%r10), %eax
subl %r8d, %eax
cltd
idivl %r10d
negl %edx
leal (%r10,%rdx), %ecx
decl %ecx
incl %r8d
movl %r8d, %eax
cltd
idivl %r10d
decl %eax
movl %ecx, 0x30(%rdi)
movl %ecx, 0x11c(%rdi)
cvtsi2sd %eax, %xmm0
mulsd 0x60(%rdi), %xmm0
movsd %xmm0, 0x98(%rdi)
movsd %xmm0, 0xb0(%rdi)
movl 0x4(%rdi), %r11d
testl %r9d, %r9d
js 0x384c1
movl %r9d, %eax
cltd
idivl %r11d
movl %edx, %r8d
jmp 0x384e1
leal -0x1(%r11), %eax
subl %r9d, %eax
cltd
idivl %r11d
negl %edx
leal (%r11,%rdx), %r8d
decl %r8d
incl %r9d
movl %r9d, %eax
cltd
idivl %r11d
decl %eax
pushq %rbx
movl %r8d, 0x34(%rdi)
movl %r8d, 0x120(%rdi)
cvtsi2sd %eax, %xmm0
mulsd 0x68(%rdi), %xmm0
movsd %xmm0, 0xa0(%rdi)
movsd %xmm0, 0xb8(%rdi)
movl 0x8(%rdi), %ebx
testl %esi, %esi
js 0x38517
movl %esi, %eax
cltd
idivl %ebx
movl %edx, %r9d
jmp 0x38531
leal -0x1(%rbx), %eax
subl %esi, %eax
cltd
idivl %ebx
negl %edx
leal (%rbx,%rdx), %r9d
decl %r9d
incl %esi
movl %esi, %eax
cltd
idivl %ebx
decl %eax
movl %r9d, 0x38(%rdi)
movl %r9d, 0x124(%rdi)
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 0x38568
cltd
idivl %r10d
movl %edx, %esi
jmp 0x3857c
leal -0x1(%r10), %edx
subl %eax, %edx
movl %edx, %eax
cltd
idivl %r10d
negl %edx
leal (%r10,%rdx), %esi
decl %esi
movl 0x104(%rdi), %eax
testl %eax, %eax
js 0x3858c
cltd
idivl %r11d
jmp 0x3859f
leal -0x1(%r11), %edx
subl %eax, %edx
movl %edx, %eax
cltd
idivl %r11d
negl %edx
addl %r11d, %edx
decl %edx
movl %ecx, %eax
subl %esi, %eax
leal (%r8,%r11), %esi
subl %edx, %esi
imull %r10d, %esi
addl %eax, %esi
movl %esi, 0x12c(%rdi)
addl %r10d, %eax
movl %eax, 0x128(%rdi)
imull %r11d, %r9d
addl %r8d, %r9d
imull %r10d, %r9d
addl %ecx, %r9d
movl %r9d, 0x3c(%rdi)
andl $0x0, 0x40(%rdi)
retq
nop