// File: jingdao[P]PointCloudApp/kdtree.cpp
// Function: KdTree::getBoundingBox()
KdTree::Cube KdTree::getBoundingBox() {
	float minX=float_data[0],maxX=float_data[0];
	float minY=float_data[1],maxY=float_data[1];
	float minZ=float_data[2],maxZ=float_data[2];
	for (int i=1;i<cloud->numPoints;i++) {
		if (float_data[i * 4] < minX) minX = float_data[i * 4];
		else if (float_data[i * 4] > maxX) maxX = float_data[i * 4];
		if (float_data[i * 4 + 1] < minY) minY = float_data[i * 4 + 1];
		else if (float_data[i * 4 + 1] > maxY) maxY = float_data[i * 4 + 1];
		if (float_data[i * 4 + 2] < minZ) minZ = float_data[i * 4 + 2];
		else if (float_data[i * 4 + 2] > maxZ) maxZ = float_data[i * 4 + 2];
	}
	Cube res = {minX, minY, minZ, maxX, maxY, maxZ};
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x30(%rax), %rcx
movss (%rcx), %xmm0
movss %xmm0, -0xc(%rbp)
movq 0x30(%rax), %rcx
movss (%rcx), %xmm0
movss %xmm0, -0x10(%rbp)
movq 0x30(%rax), %rcx
movss 0x4(%rcx), %xmm0
movss %xmm0, -0x14(%rbp)
movq 0x30(%rax), %rcx
movss 0x4(%rcx), %xmm0
movss %xmm0, -0x18(%rbp)
movq 0x30(%rax), %rcx
movss 0x8(%rcx), %xmm0
movss %xmm0, -0x1c(%rbp)
movq 0x30(%rax), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
movq 0x38(%rcx), %rcx
cmpl 0x60(%rcx), %eax
jge 0xe6df
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
movss -0xc(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xe592
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0xc(%rbp)
jmp 0xe5cb
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss -0x10(%rbp), %xmm0
jbe 0xe5c9
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0xe5cb
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
movss -0x14(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xe60e
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x14(%rbp)
jmp 0xe64d
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss -0x18(%rbp), %xmm0
jbe 0xe64b
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x18(%rbp)
jmp 0xe64d
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
movss -0x1c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xe690
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x1c(%rbp)
jmp 0xe6cf
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss -0x20(%rbp), %xmm0
jbe 0xe6cd
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x20(%rbp)
jmp 0xe6cf
jmp 0xe6d1
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xe541
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
movss -0xc(%rbp), %xmm0
movss %xmm0, (%rcx)
movss -0x14(%rbp), %xmm0
movss %xmm0, 0x4(%rcx)
movss -0x1c(%rbp), %xmm0
movss %xmm0, 0x8(%rcx)
movss -0x10(%rbp), %xmm0
movss %xmm0, 0xc(%rcx)
movss -0x18(%rbp), %xmm0
movss %xmm0, 0x10(%rcx)
movss -0x20(%rbp), %xmm0
movss %xmm0, 0x14(%rcx)
popq %rbp
retq
nopw %cs:(%rax,%rax)