// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/grd2pts/grd2pts.cpp
// Function: main
int 
main(int argc, char **argv)
{
  // Parse program arguments
  if (!ParseArgs(argc, argv)) exit(-1);

  // Read grid files
  RNArray<R3Grid *> grids;
  int status = ReadGrids(grids, grid_names);
  if (!status) exit(-1);

  // Create combined grid
  R3Grid *grid = CreateGrid(grids, sigma);
  if (!grid) exit(-1);

  // Create mask
  R3Grid *mask = CreateMask(grid, local_maxima_only);
  if (!mask) exit(-1);

  // Create points
  RNArray<Point *> *points = CreatePoints(grid, mask, npoints, min_spacing);
  if (!points) exit(-1);

  // Write points
  if (!WritePoints(*points, points_name)) exit(-1);

  // Return success 
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
movl %edi, %ebx
cmpl $0x2, %edi
jne 0x10759
movq 0x8(%r14), %rax
cmpb $0x2d, (%rax)
jne 0x10759
leaq 0x83c96(%rip), %rdi     # 0x942e2
callq 0xe720
xorl %edi, %edi
callq 0xe570
leaq 0x8(%r14), %r12
leal -0x1(%rbx), %ebp
movq (%r12), %r15
cmpb $0x2d, (%r15)
jne 0x106e7
cmpb $0x76, 0x1(%r15)
jne 0x1067b
cmpb $0x0, 0x2(%r15)
je 0x10719
leaq 0x83a5c(%rip), %rsi     # 0x940de
movq %r15, %rdi
callq 0xe670
testl %eax, %eax
je 0x106f8
leaq 0x83a50(%rip), %rsi     # 0x940e5
movq %r15, %rdi
callq 0xe670
testl %eax, %eax
je 0x10701
leaq 0x83a46(%rip), %rsi     # 0x940ee
movq %r15, %rdi
callq 0xe670
testl %eax, %eax
je 0x10727
leaq 0x83a40(%rip), %rsi     # 0x940fb
movq %r15, %rdi
callq 0xe670
testl %eax, %eax
je 0x10741
leaq 0x83a34(%rip), %rsi     # 0x94102
movq %r15, %rdi
callq 0xe670
testl %eax, %eax
jne 0x11128
movb $0x1, 0xcb553(%rip)     # 0xdbc38
jmp 0x10720
leaq 0xcb52a(%rip), %rdi     # 0xdbc18
movq %r15, %rsi
callq 0x111de
jmp 0x10720
movb $0x1, 0xcb529(%rip)     # 0xdbc28
jmp 0x10720
addl $-0x2, %ebx
movq 0x10(%r14), %rdi
addq $0x10, %r14
callq 0xe730
movl %eax, 0xcad89(%rip)     # 0xdb4a0
jmp 0x10759
movb $0x1, 0xcb50c(%rip)     # 0xdbc2c
movl %ebp, %ebx
movq %r12, %r14
jmp 0x10759
addl $-0x2, %ebx
movq 0x10(%r14), %rdi
addq $0x10, %r14
callq 0xe5a0
movsd %xmm0, 0xcb501(%rip)    # 0xdbc40
jmp 0x10759
addl $-0x2, %ebx
movq 0x10(%r14), %rdi
addq $0x10, %r14
callq 0xe5a0
movsd %xmm0, 0xcb4d7(%rip)    # 0xdbc30
cmpl $0x2, %ebx
jge 0x10658
movl 0xcb4bc(%rip), %eax     # 0xdbc24
testq %rax, %rax
je 0x1113d
cmpl $0x1, %eax
jle 0x11146
leaq 0xcb497(%rip), %rdi     # 0xdbc18
movq 0xcb490(%rip), %rcx     # 0xdbc18
movq -0x8(%rcx,%rax,8), %rax
movq %rax, 0xd8(%rsp)
callq 0x111d4
leaq 0x88(%rsp), %rdi
callq 0x668ba
leaq 0x60(%rsp), %rdi
callq 0x66372
leaq 0x60(%rsp), %rdi
callq 0x111cc
leaq 0xa0(%rsp), %rbx
leaq 0x83a10(%rip), %r13     # 0x941da
leaq 0x88(%rsp), %rbp
xorl %r12d, %r12d
movslq 0xcb448(%rip), %rsi     # 0xdbc24
cmpq %rsi, %r12
jge 0x108b0
movq 0xcb42c(%rip), %rax     # 0xdbc18
movq (%rax,%r12,8), %r15
movq %rbx, %rdi
callq 0x66372
movq %rbx, %rdi
callq 0x111cc
movl $0x250, %edi            # imm = 0x250
callq 0xe450
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x161c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x1c958
testl %eax, %eax
je 0x1110f
cmpb $0x1, 0xcb3f7(%rip)     # 0xdbc2c
jne 0x1089d
leaq 0x83b10(%rip), %rdi     # 0x9434e
callq 0xe720
movq %rbx, %rdi
callq 0x663ac
leaq 0x83856(%rip), %rdi     # 0x940a8
movb $0x1, %al
callq 0xe070
movl 0x238(%r14), %esi
movl 0x23c(%r14), %edx
movl 0x240(%r14), %ecx
leaq 0x8394e(%rip), %rdi     # 0x941c3
xorl %eax, %eax
callq 0xe070
movq %r14, %rdi
callq 0x111e6
movq %r13, %rdi
movb $0x1, %al
callq 0xe070
movq 0xca6eb(%rip), %rax     # 0xdaf80
movq (%rax), %rdi
callq 0xe540
movq %rbp, %rdi
movq %r14, %rsi
callq 0x111de
incq %r12
jmp 0x107d5
cmpb $0x1, 0xcb375(%rip)     # 0xdbc2c
jne 0x108f4
leaq 0x838b7(%rip), %rdi     # 0x94177
xorl %eax, %eax
callq 0xe070
leaq 0x60(%rsp), %rdi
callq 0x663ac
leaq 0x838b2(%rip), %rdi     # 0x9418a
movb $0x1, %al
callq 0xe070
movq 0xca69a(%rip), %rax     # 0xdaf80
movq (%rax), %rdi
callq 0xe540
movl 0xcb330(%rip), %esi     # 0xdbc24
testl %esi, %esi
je 0x11120
movsd 0xcb32c(%rip), %xmm0    # 0xdbc30
movsd %xmm0, 0x30(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x66372
leaq 0x60(%rsp), %rdi
callq 0x111cc
movl $0x250, %edi            # imm = 0x250
callq 0xe450
movq %rax, %r12
movq 0x88(%rsp), %rax
movq (%rax), %rsi
movq %r12, %rdi
callq 0x16a7e
pushq $0x1
popq %rbx
movslq 0x94(%rsp), %rax
cmpq %rax, %rbx
jge 0x10967
movq 0x88(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r12, %rdi
callq 0x1983c
incq %rbx
jmp 0x10941
movsd 0x220(%r12), %xmm0
mulsd 0x30(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x10989
movq %r12, %rdi
callq 0x181b8
cmpb $0x1, 0xcb29c(%rip)     # 0xdbc2c
jne 0x10af5
leaq 0x83973(%rip), %rdi     # 0x94310
callq 0xe720
leaq 0x60(%rsp), %rdi
callq 0x663ac
leaq 0x836f5(%rip), %rdi     # 0x940a8
movb $0x1, %al
callq 0xe070
movl 0x238(%r12), %esi
movl 0x23c(%r12), %edx
movl 0x240(%r12), %ecx
leaq 0x83810(%rip), %rdi     # 0x941e9
xorl %eax, %eax
callq 0xe070
leaq 0xa0(%rsp), %rdi
movq %r12, %rsi
callq 0x11202
movsd 0xa8(%rsp), %xmm0
movsd 0xb0(%rsp), %xmm1
movsd 0xb8(%rsp), %xmm2
movsd 0xc0(%rsp), %xmm3
movsd 0xc8(%rsp), %xmm4
movsd 0xd0(%rsp), %xmm5
leaq 0x837d5(%rip), %rdi     # 0x94202
movb $0x6, %al
callq 0xe070
movsd 0x228(%r12), %xmm0
leaq 0x837e6(%rip), %rdi     # 0x9422b
movb $0x1, %al
callq 0xe070
movq %r12, %rdi
callq 0x16cbe
leaq 0x837e0(%rip), %rdi     # 0x9423b
movl %eax, %esi
xorl %eax, %eax
callq 0xe070
movq %r12, %rdi
callq 0x112a2
leaq 0x837dc(%rip), %rdi     # 0x9424f
movb $0x1, %al
callq 0xe070
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0x16c0e
movsd 0x48(%rsp), %xmm0
leaq 0x837ca(%rip), %rdi     # 0x9425e
movb $0x1, %al
callq 0xe070
movsd 0x50(%rsp), %xmm0
leaq 0x837c6(%rip), %rdi     # 0x9426e
movb $0x1, %al
callq 0xe070
movq %r12, %rdi
callq 0x16c66
leaq 0x837c0(%rip), %rdi     # 0x9427e
movb $0x1, %al
callq 0xe070
leaq 0x837c1(%rip), %rdi     # 0x9428d
movsd 0x30(%rsp), %xmm0
movb $0x1, %al
callq 0xe070
movq 0xca4a0(%rip), %rax     # 0xdaf80
movq (%rax), %rdi
callq 0xe540
leaq 0xa0(%rsp), %rdi
callq 0x1213a
movzbl 0xcb13c(%rip), %eax     # 0xdbc38
movl %eax, 0x24(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x66372
leaq 0x60(%rsp), %rdi
callq 0x111cc
movl $0x250, %edi            # imm = 0x250
callq 0xe450
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x16a7e
cmpl $0x0, 0x24(%rsp)
movq %r12, 0x98(%rsp)
movq %r14, 0x10(%rsp)
je 0x10d48
movl 0x240(%r12), %eax
xorl %esi, %esi
testl %eax, %eax
movl $0x0, %ecx
movl %eax, 0x18(%rsp)
cmovgl %eax, %ecx
movl %ecx, 0x78(%rsp)
pushq $-0x1
popq %rax
movl %eax, 0x28(%rsp)
cmpl 0x78(%rsp), %esi
je 0x10d48
movl 0x23c(%r12), %r10d
leal -0x1(%rsi), %eax
movl %eax, 0x80(%rsp)
leal 0x1(%rsi), %eax
movl %eax, 0x30(%rsp)
xorl %r13d, %r13d
testl %r10d, %r10d
movl $0x0, %eax
cmovgl %r10d, %eax
movl %eax, 0x7c(%rsp)
pushq $-0x1
popq %rax
movl %eax, 0x2c(%rsp)
cmpl 0x7c(%rsp), %r13d
je 0x10d34
movslq 0x238(%r12), %rbp
leal -0x1(%r13), %eax
movl %eax, 0x84(%rsp)
leal 0x1(%r13), %edx
testl %ebp, %ebp
movl $0x0, %eax
cmovgl %ebp, %eax
movq %rax, 0xe0(%rsp)
xorl %eax, %eax
pushq $-0x1
popq %r14
cmpq 0xe0(%rsp), %rax
je 0x10d28
movq 0x230(%r12), %r15
movl 0x248(%r12), %r8d
movl %r8d, %ecx
imull %esi, %ecx
movl 0x244(%r12), %r12d
movq %rax, %rdi
movl %r12d, %eax
imull %r13d, %eax
movl %edi, 0xc(%rsp)
addl %edi, %ecx
addl %eax, %ecx
movl 0x28(%rsp), %eax
movq %r8, 0x58(%rsp)
imull %r8d, %eax
movslq %ecx, %rcx
movsd (%r15,%rcx,8), %xmm0
movl 0x2c(%rsp), %ecx
imull %r12d, %ecx
incq %rdi
movq %rdi, 0x40(%rsp)
addl %r14d, %eax
addl %ecx, %eax
movl 0x80(%rsp), %ecx
cmpl 0x30(%rsp), %ecx
jg 0x10d13
testl %ecx, %ecx
sets %dil
cmpl 0x18(%rsp), %ecx
setge %r9b
orb %dil, %r9b
jne 0x10cda
movq %rax, %rdi
movl 0x84(%rsp), %r9d
cmpl %edx, %r9d
jg 0x10cda
testl %r9d, %r9d
sets %r11b
cmpl %r10d, %r9d
setge %bl
orb %r11b, %bl
jne 0x10cd2
xorl %r11d, %r11d
cmpq $0x3, %r11
je 0x10cd2
movq %r14, %rbx
addq %r11, %rbx
sets %r8b
cmpq %rbp, %rbx
setge %bl
orb %r8b, %bl
jne 0x10ccd
cmpl %esi, %ecx
jne 0x10cba
cmpl %r13d, %r9d
jne 0x10cba
cmpq $0x1, %r11
je 0x10ccd
leal (%rdi,%r11), %r8d
movslq %r8d, %r8
movsd (%r15,%r8,8), %xmm1
ucomisd %xmm0, %xmm1
ja 0x10ce6
incq %r11
jmp 0x10c90
incl %r9d
addq %r12, %rdi
jmp 0x10c76
incl %ecx
addq 0x58(%rsp), %rax
jmp 0x10c4e
movq 0x10(%rsp), %rdi
movq 0x230(%rdi), %rax
movl 0x248(%rdi), %ecx
imull %esi, %ecx
movl 0x244(%rdi), %edi
imull %r13d, %edi
addl 0xc(%rsp), %ecx
addl %edi, %ecx
movslq %ecx, %rcx
andq $0x0, (%rax,%rcx,8)
incq %r14
movq 0x98(%rsp), %r12
movq 0x40(%rsp), %rax
jmp 0x10bde
incl 0x2c(%rsp)
movl %edx, %r13d
jmp 0x10ba4
incl 0x28(%rsp)
movl 0x30(%rsp), %eax
movl %eax, %esi
movq 0x10(%rsp), %r14
jmp 0x10b67
cmpb $0x1, 0xcaedd(%rip)     # 0xdbc2c
jne 0x10eae
leaq 0x835ce(%rip), %rdi     # 0x9432a
callq 0xe720
leaq 0x60(%rsp), %rdi
callq 0x663ac
leaq 0x83336(%rip), %rdi     # 0x940a8
movb $0x1, %al
callq 0xe070
movl 0x238(%r14), %esi
movl 0x23c(%r14), %edx
movl 0x240(%r14), %ecx
leaq 0x83454(%rip), %rdi     # 0x941e9
xorl %eax, %eax
callq 0xe070
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0x11202
movsd 0xa8(%rsp), %xmm0
movsd 0xb0(%rsp), %xmm1
movsd 0xb8(%rsp), %xmm2
movsd 0xc0(%rsp), %xmm3
movsd 0xc8(%rsp), %xmm4
movsd 0xd0(%rsp), %xmm5
leaq 0x83419(%rip), %rdi     # 0x94202
movb $0x6, %al
callq 0xe070
movsd 0x228(%r14), %xmm0
leaq 0x8342b(%rip), %rdi     # 0x9422b
movb $0x1, %al
callq 0xe070
movq %r14, %rdi
callq 0x16cbe
leaq 0x83425(%rip), %rdi     # 0x9423b
movl %eax, %esi
xorl %eax, %eax
callq 0xe070
movq %r14, %rdi
callq 0x112a2
leaq 0x83421(%rip), %rdi     # 0x9424f
movb $0x1, %al
callq 0xe070
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x16c0e
movsd 0x48(%rsp), %xmm0
leaq 0x8340f(%rip), %rdi     # 0x9425e
movb $0x1, %al
callq 0xe070
movsd 0x50(%rsp), %xmm0
leaq 0x8340b(%rip), %rdi     # 0x9426e
movb $0x1, %al
callq 0xe070
movq %r14, %rdi
callq 0x16c66
leaq 0x83405(%rip), %rdi     # 0x9427e
movb $0x1, %al
callq 0xe070
leaq 0x83414(%rip), %rdi     # 0x9429b
movl 0x24(%rsp), %esi
xorl %eax, %eax
callq 0xe070
movq 0xca0e7(%rip), %rax     # 0xdaf80
movq (%rax), %rdi
callq 0xe540
leaq 0xa0(%rsp), %rdi
callq 0x1213a
movl 0xca5ec(%rip), %eax     # 0xdb4a0
movl %eax, 0xc(%rsp)
movsd 0xcad80(%rip), %xmm0    # 0xdbc40
movsd %xmm0, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x66372
leaq 0x48(%rsp), %rdi
callq 0x111cc
pushq $0x10
popq %rdi
callq 0xe450
movq %rax, 0x18(%rsp)
movq %rax, %rdi
callq 0x668ba
movl 0xc(%rsp), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movl %ecx, 0x58(%rsp)
xorl %eax, %eax
cmpl 0x58(%rsp), %eax
je 0x11062
movl %eax, %r15d
movl 0x24c(%r14), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movq 0x230(%r14), %rdx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
xorl %esi, %esi
pushq $-0x1
popq %rcx
cmpl %esi, %eax
je 0x10f5c
movsd (%rdx,%rsi,8), %xmm0
movapd 0x30(%rsp), %xmm1
ucomisd %xmm1, %xmm0
cmoval %esi, %ecx
maxsd %xmm1, %xmm0
incq %rsi
movapd %xmm0, 0x30(%rsp)
jmp 0x10f37
testl %ecx, %ecx
js 0x11062
movl %ecx, %eax
cltd
idivl 0x248(%r14)
movl %eax, %ebx
movl %edx, %eax
movl 0x244(%r14), %edi
cltd
idivl %edi
movq %r12, %rsi
movl %eax, %r12d
movl %ecx, %eax
cltd
idivl %edi
movl %edx, %r13d
cvtsi2sd %edx, %xmm0
cvtsi2sd %r12d, %xmm1
cvtsi2sd %ebx, %xmm2
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0x1c932
leaq 0x60(%rsp), %rdi
leaq 0x88edd(%rip), %rsi     # 0x99e90
callq 0x226cc
leaq 0x60(%rsp), %rdi
callq 0x229be
pushq $0x38
popq %rdi
callq 0xe450
movq %rax, %rbp
movq %rax, %rdi
movq %r14, %rsi
leaq 0x60(%rsp), %rdx
movapd 0x30(%rsp), %xmm0
callq 0x112e8
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x111de
movsd 0x40(%rsp), %xmm0
ucomisd 0x83022(%rip), %xmm0    # 0x94020
jbe 0x11022
movapd 0x30(%rsp), %xmm1
xorpd 0x83002(%rip), %xmm1    # 0x94010
movq 0x10(%rsp), %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
callq 0x1131c
jmp 0x1104b
movq 0x10(%rsp), %rcx
movq 0x230(%rcx), %rax
imull 0x248(%rcx), %ebx
imull 0x244(%rcx), %r12d
addl %r13d, %ebx
addl %r12d, %ebx
movslq %ebx, %rcx
andq $0x0, (%rax,%rcx,8)
movl %r15d, %eax
incl %eax
movq 0x98(%rsp), %r12
movq 0x10(%rsp), %r14
jmp 0x10f03
cmpb $0x1, 0xcabc3(%rip)     # 0xdbc2c
movq 0x18(%rsp), %rbx
jne 0x110da
leaq 0x832c4(%rip), %rdi     # 0x9433b
callq 0xe720
leaq 0x48(%rsp), %rdi
callq 0x663ac
leaq 0x8301b(%rip), %rdi     # 0x940a8
movb $0x1, %al
callq 0xe070
movl 0xc(%rbx), %esi
leaq 0x83021(%rip), %rdi     # 0x940bf
xorl %eax, %eax
callq 0xe070
leaq 0x83209(%rip), %rdi     # 0x942b5
movl 0xc(%rsp), %esi
xorl %eax, %eax
callq 0xe070
leaq 0x83210(%rip), %rdi     # 0x942ce
movsd 0x40(%rsp), %xmm0
movb $0x1, %al
callq 0xe070
movq 0xc9eae(%rip), %rax     # 0xdaf80
movq (%rax), %rdi
callq 0xe540
movq %rbx, %rdi
movq 0xd8(%rsp), %rsi
callq 0x1041c
testl %eax, %eax
je 0x11120
leaq 0x88(%rsp), %rdi
callq 0x66928
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x83091(%rip), %rdi     # 0x941a7
movq %r15, %rsi
xorl %eax, %eax
callq 0x6877a
pushq $-0x1
popq %rdi
callq 0xe570
leaq 0x82fe6(%rip), %rdi     # 0x94115
movq %r15, %rsi
xorl %eax, %eax
callq 0x6877a
pushq $0x1
jmp 0x11122
leaq 0x82fef(%rip), %rdi     # 0x94133
jmp 0x1114d
leaq 0x83006(%rip), %rdi     # 0x94153
xorl %eax, %eax
callq 0x6877a
jmp 0x11120
movq %rax, %rbx
pushq $0x10
popq %rsi
movq 0x18(%rsp), %rdi
jmp 0x111aa
jmp 0x1116b
jmp 0x1116b
jmp 0x1119f
jmp 0x1116b
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x1213a
jmp 0x111b6
movq %rax, %rbx
movl $0x250, %esi            # imm = 0x250
movq %r12, %rdi
jmp 0x111aa
jmp 0x111b3
jmp 0x111b3
jmp 0x111b3
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %rbp, %rdi
jmp 0x111aa
jmp 0x111b3
jmp 0x111b3
movq %rax, %rbx
movl $0x250, %esi            # imm = 0x250
movq %r14, %rdi
callq 0xe460
jmp 0x111b6
jmp 0x111b3
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x66928
movq %rbx, %rdi
callq 0xe810
nop