// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVScene.cpp
// Function: gaps::GSVScene::UpdatePointIdentifiers()
void GSVScene::
UpdatePointIdentifiers(void) 
{
  // Update all point identifiers
  int point_identifier = 0;
  for (int ir = 0; ir < NRuns(); ir++) {
    GSVRun *run = Run(ir);
    for (int is = 0; is < run->NSegments(); is++) {
      GSVSegment *segment = run->Segment(is);
      for (int iu = 0; iu < segment->NSurveys(); iu++) {
        GSVSurvey *survey = segment->Survey(iu);
        for (int ia = 0; ia < survey->NScans(); ia++) {
          GSVScan *scan = survey->Scan(ia);
          scan->ReadPoints();
          for (int ie = 0; ie < scan->NScanlines(); ie++) {
            GSVScanline *scanline = scan->Scanline(ie);
            for (int ik = 0; ik < scanline->NPoints(); ik++) {
              scanline->SetPointIdentifier(ik, point_identifier++);
            }
          }
          scan->ReleasePoints();
        }
      }
    }
  }

  // Just checking
  assert(point_identifier == NPoints());
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x7c(%rsp)
movl $0x0, 0x78(%rsp)
movq 0x20(%rsp), %rdi
movl 0x78(%rsp), %eax
movl %eax, 0x1c(%rsp)
callq 0x39f90
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x3c0ff
movq 0x20(%rsp), %rdi
movl 0x78(%rsp), %esi
callq 0x39fb0
movq %rax, 0x70(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x70(%rsp), %rdi
callq 0x39fe0
movl %eax, %ecx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x3c0ed
movq 0x70(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0x3a000
movq %rax, 0x60(%rsp)
movl $0x0, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x60(%rsp), %rdi
callq 0x3a030
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x3c0db
movq 0x60(%rsp), %rdi
movl 0x5c(%rsp), %esi
callq 0x3a050
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
callq 0x3a080
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x3c0c9
movq 0x50(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x3a0a0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x557c0
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
callq 0x3a0d0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3c0af
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x3a0f0
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x3a120
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x3c09d
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl 0x7c(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
callq 0x44450
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x3c059
jmp 0x3c09f
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x3c022
movq 0x40(%rsp), %rdi
callq 0x55960
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x3bfdd
jmp 0x3c0cb
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x3bfa2
jmp 0x3c0dd
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x3bf67
jmp 0x3c0ef
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x3bf2c
addq $0x88, %rsp
retq
nopw (%rax,%rax)