// File: Luthaf[P]zeopp/voro++/src/v_compute.cc
// Function: voro::voro_compute<voro::container>::scan_bits_mask_add(unsigned int, unsigned int*, int, int, int, int*&)
inline void voro_compute<c_class>::scan_bits_mask_add(unsigned int q,unsigned int *mijk,int ei,int ej,int ek,int *&qu_e) {
	const unsigned int b1=1<<21,b2=1<<22,b3=1<<24,b4=1<<25,b5=1<<27,b6=1<<28;
	if((q&b2)==b2) {
		if(ei>0) {*(mijk-1)=mv;*(qu_e++)=ei-1;*(qu_e++)=ej;*(qu_e++)=ek;}
		if((q&b1)==0&&ei<hx-1) {*(mijk+1)=mv;*(qu_e++)=ei+1;*(qu_e++)=ej;*(qu_e++)=ek;}
	} else if((q&b1)==b1&&ei<hx-1) {*(mijk+1)=mv;*(qu_e++)=ei+1;*(qu_e++)=ej;*(qu_e++)=ek;}
	if((q&b4)==b4) {
		if(ej>0) {*(mijk-hx)=mv;*(qu_e++)=ei;*(qu_e++)=ej-1;*(qu_e++)=ek;}
		if((q&b3)==0&&ej<hy-1) {*(mijk+hx)=mv;*(qu_e++)=ei;*(qu_e++)=ej+1;*(qu_e++)=ek;}
	} else if((q&b3)==b3&&ej<hy-1) {*(mijk+hx)=mv;*(qu_e++)=ei;*(qu_e++)=ej+1;*(qu_e++)=ek;}
	if((q&b6)==b6) {
		if(ek>0) {*(mijk-hxy)=mv;*(qu_e++)=ei;*(qu_e++)=ej;*(qu_e++)=ek-1;}
		if((q&b5)==0&&ek<hz-1) {*(mijk+hxy)=mv;*(qu_e++)=ei;*(qu_e++)=ej;*(qu_e++)=ek+1;}
	} else if((q&b5)==b5&&ek<hz-1) {*(mijk+hxy)=mv;*(qu_e++)=ei;*(qu_e++)=ej;*(qu_e++)=ek+1;}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x200000, -0x28(%rbp)  # imm = 0x200000
movl $0x400000, -0x2c(%rbp)  # imm = 0x400000
movl $0x1000000, -0x30(%rbp) # imm = 0x1000000
movl $0x2000000, -0x34(%rbp) # imm = 0x2000000
movl $0x8000000, -0x38(%rbp) # imm = 0x8000000
movl $0x10000000, -0x3c(%rbp) # imm = 0x10000000
movl -0xc(%rbp), %eax
andl $0x400000, %eax         # imm = 0x400000
cmpl $0x400000, %eax         # imm = 0x400000
jne 0x23b8f
cmpl $0x0, -0x1c(%rbp)
jle 0x23b1c
movq -0x48(%rbp), %rax
movl 0x70(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, -0x4(%rax)
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0xc(%rbp), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
jne 0x23b8d
movq -0x48(%rbp), %rcx
movl -0x1c(%rbp), %eax
movl 0x38(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x23b8d
movq -0x48(%rbp), %rax
movl 0x70(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
jmp 0x23c04
movl -0xc(%rbp), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x200000, %eax         # imm = 0x200000
jne 0x23c02
movq -0x48(%rbp), %rcx
movl -0x1c(%rbp), %eax
movl 0x38(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x23c02
movq -0x48(%rbp), %rax
movl 0x70(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
jmp 0x23c04
movl -0xc(%rbp), %eax
andl $0x2000000, %eax        # imm = 0x2000000
cmpl $0x2000000, %eax        # imm = 0x2000000
jne 0x23cf0
cmpl $0x0, -0x20(%rbp)
jle 0x23c79
movq -0x48(%rbp), %rcx
movl 0x70(%rcx), %edx
movq -0x18(%rbp), %rax
movslq 0x38(%rcx), %rsi
xorl %ecx, %ecx
subq %rsi, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0xc(%rbp), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
jne 0x23cee
movq -0x48(%rbp), %rcx
movl -0x20(%rbp), %eax
movl 0x3c(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x23cee
movq -0x48(%rbp), %rcx
movl 0x70(%rcx), %edx
movq -0x18(%rbp), %rax
movslq 0x38(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
jmp 0x23d69
movl -0xc(%rbp), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0x23d67
movq -0x48(%rbp), %rcx
movl -0x20(%rbp), %eax
movl 0x3c(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x23d67
movq -0x48(%rbp), %rcx
movl 0x70(%rcx), %edx
movq -0x18(%rbp), %rax
movslq 0x38(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
jmp 0x23d69
movl -0xc(%rbp), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x10000000, %eax       # imm = 0x10000000
jne 0x23e55
cmpl $0x0, -0x24(%rbp)
jle 0x23dde
movq -0x48(%rbp), %rcx
movl 0x70(%rcx), %edx
movq -0x18(%rbp), %rax
movslq 0x44(%rcx), %rsi
xorl %ecx, %ecx
subq %rsi, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0xc(%rbp), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
jne 0x23e53
movq -0x48(%rbp), %rcx
movl -0x24(%rbp), %eax
movl 0x40(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x23e53
movq -0x48(%rbp), %rcx
movl 0x70(%rcx), %edx
movq -0x18(%rbp), %rax
movslq 0x44(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
jmp 0x23ece
movl -0xc(%rbp), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x8000000, %eax        # imm = 0x8000000
jne 0x23ecc
movq -0x48(%rbp), %rcx
movl -0x24(%rbp), %eax
movl 0x40(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x23ecc
movq -0x48(%rbp), %rcx
movl 0x70(%rcx), %edx
movq -0x18(%rbp), %rax
movslq 0x44(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x4, %rsi
movq %rsi, (%rdx)
movl %ecx, (%rax)
jmp 0x23ece
popq %rbp
retq