// File: /workspace/github_cpp_makefile_star2_O1/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::filterPlane(std::vector<int, std::allocator<int>>*, PCD::Plane, float, bool)
void PCD::filterPlane(std::vector<int> *ind,Plane p, float threshold,bool positiveOrNegative) {
	float distanceThreshold = threshold * sqrt( p.a * p.a + p.b * p.b + p.c * p.c);
	if (positiveOrNegative) {
		for (int j=0;j<numPoints;j++) {
			if ( fabs( p.a * float_data[j * 4] +
				 p.b * float_data[j * 4 + 1] +
				 p.c * float_data[j * 4 + 2] +
				 p.d )
				 < distanceThreshold)	
				ind->push_back(j);
		}
	} else {
		for (int j=0;j<numPoints;j++) {
			if ( fabs( p.a * float_data[j * 4] +
				 p.b * float_data[j * 4 + 1] +
				 p.c * float_data[j * 4 + 2] +
				 p.d )
				 > distanceThreshold)	
				ind->push_back(j);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebp
movaps %xmm0, %xmm3
movq %rsi, %rbx
movq %rdi, %r14
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movaps %xmm4, %xmm0
mulss %xmm4, %xmm0
movaps %xmm3, %xmm5
mulss %xmm3, %xmm5
addss %xmm0, %xmm5
movaps %xmm1, %xmm0
mulss %xmm1, %xmm0
addss %xmm5, %xmm0
xorps %xmm5, %xmm5
ucomiss %xmm5, %xmm0
movaps %xmm1, 0x40(%rsp)
movaps %xmm3, 0x30(%rsp)
movaps %xmm4, 0x20(%rsp)
jb 0x6d90
sqrtss %xmm0, %xmm0
jmp 0x6db0
movss %xmm2, 0x4(%rsp)
callq 0x23b0
movss 0x4(%rsp), %xmm2
movaps 0x20(%rsp), %xmm4
movaps 0x30(%rsp), %xmm3
movaps 0x40(%rsp), %xmm1
mulss %xmm2, %xmm0
testb %bpl, %bpl
movss %xmm0, 0x4(%rsp)
je 0x6e9c
movl $0x0, 0xc(%rsp)
cmpl $0x0, 0x60(%r14)
jle 0x6f70
movaps %xmm1, %xmm6
shufps $0x55, %xmm1, %xmm6     # xmm6 = xmm6[1,1],xmm1[1,1]
xorl %eax, %eax
movaps 0x45da(%rip), %xmm7     # 0xb3c0
leaq 0xc(%rsp), %r15
movaps %xmm6, 0x10(%rsp)
movq 0x58(%r14), %rcx
leal (,%rax,4), %edx
movslq %edx, %rdx
leal 0x1(,%rax,4), %esi
movslq %esi, %rsi
movss (%rcx,%rsi,4), %xmm5
mulss %xmm4, %xmm5
movss (%rcx,%rdx,4), %xmm2
mulss %xmm3, %xmm2
addss %xmm5, %xmm2
leal 0x2(,%rax,4), %edx
movslq %edx, %rdx
movss (%rcx,%rdx,4), %xmm5
mulss %xmm1, %xmm5
addss %xmm2, %xmm5
addss %xmm6, %xmm5
andps %xmm7, %xmm5
ucomiss %xmm5, %xmm0
jbe 0x6e83
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6e57
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x6e83
movq %rbx, %rdi
movq %r15, %rdx
callq 0x80de
movaps 0x4557(%rip), %xmm7     # 0xb3c0
movaps 0x10(%rsp), %xmm6
movss 0x4(%rsp), %xmm0
movaps 0x20(%rsp), %xmm4
movaps 0x30(%rsp), %xmm3
movaps 0x40(%rsp), %xmm1
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl 0x60(%r14), %eax
jl 0x6df0
jmp 0x6f70
movl $0x0, 0x8(%rsp)
cmpl $0x0, 0x60(%r14)
jle 0x6f70
movaps %xmm1, %xmm6
shufps $0x55, %xmm1, %xmm6     # xmm6 = xmm6[1,1],xmm1[1,1]
xorl %eax, %eax
movaps 0x4501(%rip), %xmm7     # 0xb3c0
leaq 0x8(%rsp), %r15
movaps %xmm6, 0x10(%rsp)
movq 0x58(%r14), %rcx
leal (,%rax,4), %edx
movslq %edx, %rdx
leal 0x1(,%rax,4), %esi
movslq %esi, %rsi
movss (%rcx,%rsi,4), %xmm5
mulss %xmm4, %xmm5
movss (%rcx,%rdx,4), %xmm2
mulss %xmm3, %xmm2
addss %xmm5, %xmm2
leal 0x2(,%rax,4), %edx
movslq %edx, %rdx
movss (%rcx,%rdx,4), %xmm5
mulss %xmm1, %xmm5
addss %xmm2, %xmm5
addss %xmm6, %xmm5
andps %xmm7, %xmm5
ucomiss %xmm0, %xmm5
jbe 0x6f5c
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6f30
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x6f5c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x80de
movaps 0x447e(%rip), %xmm7     # 0xb3c0
movaps 0x10(%rsp), %xmm6
movss 0x4(%rsp), %xmm0
movaps 0x20(%rsp), %xmm4
movaps 0x30(%rsp), %xmm3
movaps 0x40(%rsp), %xmm1
movl 0x8(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
cmpl 0x60(%r14), %eax
jl 0x6ec9
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop