// File: /workspace/github_cpp_makefile_star2_O2/mitchellsayer[P]FastPointCloudSegmentation/src/main.cc
// Function: main
int main() {

  int n_iters = 3;
  int n_lpr = 20;
  int n_segs = 3;
  double seed_thresh = 0.4; //meters
  double dist_thresh = 0.2; //meters

  double th_run = 0.5;
  double th_merge = 1.0;
  int x_max = 30;
  int y_max = 15;
  int n_scanlines = 50;

  std::vector<Vec3> input_cloud;
  std::vector<Vec3> predicted_ground;
  std::vector<Vec3> predicted_not_ground;
  std::vector<Vec3> predicted_clusters;

  PointCloudSegmenter segmenter(x_max, y_max, n_iters, n_lpr, n_segs, seed_thresh, dist_thresh, n_scanlines, th_run, th_merge);

  parseInput(input_cloud, segmenter);
  std::cout << "Input size: " << input_cloud.size() << std::endl;

  segmenter.GroundPlaneFitting(input_cloud);

  predicted_ground = segmenter.GetGroundPoints();
  predicted_not_ground = segmenter.GetNonGroundPoints();

  predicted_clusters = segmenter.ScanLineRun(segmenter.p_all);
  generateOutput(predicted_clusters, "predicted_clusters.txt");

  return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
xorps %xmm0, %xmm0
andq $0x0, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
andq $0x0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
andq $0x0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
andq $0x0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
leaq -0x180(%rbp), %rsi
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
andq $0x0, 0x40(%rsi)
movaps %xmm0, (%rsi)
movups %xmm0, 0x88(%rsi)
movups %xmm0, 0x98(%rsi)
movups %xmm0, 0xa8(%rsi)
movups %xmm0, 0xb8(%rsi)
andq $0x0, 0xc8(%rsi)
movaps 0x3854(%rip), %xmm0     # 0x7070
movups %xmm0, 0x58(%rsi)
movabsq $0x3fd999999999999a, %rax # imm = 0x3FD999999999999A
movq %rax, 0x48(%rsi)
movabsq $0x3fc999999999999a, %rax # imm = 0x3FC999999999999A
movq %rax, 0x50(%rsi)
movabsq $0xf0000001e, %rax      # imm = 0xF0000001E
movq %rax, 0x80(%rsi)
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x70(%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsi)
leaq -0x250(%rbp), %rdi
callq 0x4242
leaq -0x20(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x3a2b
leaq -0x250(%rbp), %rdi
callq 0x433c
movq 0x7730(%rip), %rdi      # 0xafc8
leaq 0x3854(%rip), %rsi      # 0x70f3
callq 0x2190
movq %rax, %rdi
movq -0x18(%rbp), %rax
subq -0x20(%rbp), %rax
pushq $0x1c
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
leaq -0x180(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x24ba
leaq -0x38(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x4746
leaq -0x90(%rbp), %rdi
leaq -0x38(%rbp), %rbx
movq %rbx, %rsi
callq 0x56f6
movq %rbx, %rdi
callq 0x47fe
leaq -0x168(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x4746
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0x56f6
movq %rbx, %rdi
callq 0x47fe
leaq -0x150(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x2cbe
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x56f6
movq %rbx, %rdi
callq 0x47fe
leaq 0x37a8(%rip), %rsi      # 0x7100
leaq -0xb0(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x438a
leaq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3b9b
leaq -0xb0(%rbp), %rdi
callq 0x2090
leaq -0x180(%rbp), %rdi
callq 0x433c
leaq -0x50(%rbp), %rdi
callq 0x47fe
leaq -0x70(%rbp), %rdi
callq 0x47fe
leaq -0x90(%rbp), %rdi
callq 0x47fe
leaq -0x20(%rbp), %rdi
callq 0x47fe
xorl %eax, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x2090
jmp 0x39f0
jmp 0x39ed
jmp 0x39ed
jmp 0x39ed
jmp 0x39ed
movq %rax, %rbx
leaq -0x250(%rbp), %rdi
callq 0x433c
jmp 0x39f0
movq %rax, %rbx
leaq -0x180(%rbp), %rdi
callq 0x433c
leaq -0x50(%rbp), %rdi
callq 0x47fe
leaq -0x70(%rbp), %rdi
callq 0x47fe
leaq -0x90(%rbp), %rdi
callq 0x47fe
leaq -0x20(%rbp), %rdi
callq 0x47fe
movq %rbx, %rdi
callq 0x2290