// File: mitchellsayer[P]FastPointCloudSegmentation/src/./point_cloud_segmenter.cc
// Function: PointCloudSegmenter::ExtractClusters(std::vector<Scanline, std::allocator<Scanline>>&)
std::vector<Vec3> PointCloudSegmenter::ExtractClusters( std::vector<Scanline>& scanlines ) {
  std::vector<Scanline>::iterator s_it;
  std::vector<Vec3>::iterator v_it;
  std::vector<Vec3> out_points;
  int i = 0;

  for (s_it = scanlines.begin(); s_it != scanlines.end(); s_it++, i++ ) {
    for (v_it = s_it->points.begin(); v_it != s_it->points.end(); v_it++) {
      if (v_it->label < this->rtable.size() && v_it->label != -3) {
        v_it->label = this->rtable[v_it->label];
        out_points.push_back(*v_it);
      }
    }
  }
  return out_points;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5f40
leaq -0x28(%rbp), %rdi
callq 0x57d0
movq -0x78(%rbp), %rdi
movb $0x0, -0x29(%rbp)
callq 0x57b0
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6390
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x64a0
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6460
testb $0x1, %al
jne 0x499b
jmp 0x4b72
leaq -0x20(%rbp), %rdi
callq 0x64d0
movq %rax, %rdi
addq $0x48, %rdi
callq 0x57f0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x64d0
movq %rax, %rdi
addq $0x48, %rdi
callq 0x5860
movq %rax, -0x50(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x5820
testb $0x1, %al
jne 0x49eb
jmp 0x4b53
leaq -0x28(%rbp), %rdi
callq 0x5c60
movq -0x80(%rbp), %rdi
movss 0x18(%rax), %xmm0
movss %xmm0, -0x94(%rbp)
addq $0xb8, %rdi
callq 0x68a0
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x90(%rbp)
testq %rax, %rax
movss %xmm0, -0x8c(%rbp)
js 0x4a52
movss -0x90(%rbp), %xmm0
movss %xmm0, -0x8c(%rbp)
movss -0x94(%rbp), %xmm1
movss -0x8c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x4b3d
leaq -0x28(%rbp), %rdi
callq 0x5c60
movss 0x18(%rax), %xmm0
movss 0xd58b(%rip), %xmm1     # 0x1200c
ucomiss %xmm1, %xmm0
jne 0x4a8d
jp 0x4a8d
jmp 0x4b3d
movq -0x80(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0xb0(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x5c60
movq -0xb0(%rbp), %rdi
movss 0x18(%rax), %xmm0
movss 0xd54e(%rip), %xmm2     # 0x12010
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
cvttss2si %xmm1, %rax
cvttss2si %xmm0, %rsi
movq %rsi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rsi
callq 0x68c0
movq -0xa0(%rbp), %rdi
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0xa4(%rbp)
callq 0x5c60
movss -0xa4(%rbp), %xmm0
movq -0xa0(%rbp), %rdi
movss %xmm0, 0x18(%rax)
callq 0x5900
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x5890
jmp 0x4b24
jmp 0x4b3d
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0x5d70
jmp 0x4b95
jmp 0x4b3f
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x5920
movq %rax, -0x68(%rbp)
jmp 0x49bc
jmp 0x4b55
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x6860
movq %rax, -0x70(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4978
movb $0x1, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x4b85
movq -0x78(%rbp), %rdi
callq 0x5d70
movq -0x88(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x2370
nop