// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/mshalign/mshalign.cpp
// Function: CreatePointCorrespondences(gaps::R3Mesh*, gaps::R3Point const*, int, gaps::R3Mesh*, gaps::R3Point const*, int, gaps::R3Affine const&, gaps::R3Affine const&, gaps::R3Point*, gaps::R3Point*, int)
static int
CreatePointCorrespondences(
  R3Mesh *mesh1, const R3Point *points1, int npoints1,
  R3Mesh *mesh2, const R3Point *points2, int npoints2, 
  const R3Affine& affine12, const R3Affine& affine21,
  R3Point *correspondences1, R3Point *correspondences2, 
  int max_correspondences)
{
  // Check method
  if (correspondence_method == 0) {
    return CreatePointPointCorrespondences(
      mesh1, points1, npoints1, 
      mesh2, points2, npoints2, 
      affine12, affine21, 
      correspondences1, correspondences2, max_correspondences);
  }
  else {
    return CreatePointSurfaceCorrespondences(
      mesh1, points1, npoints1, 
      mesh2, points2, npoints2, 
      affine12, affine21, 
      correspondences1, correspondences2, max_correspondences);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, %rbx
movl %edx, %r13d
movq %rsi, %rbp
movq %rdi, 0x58(%rsp)
movq 0xc8(%rsp), %r12
cmpl $0x0, 0x6d0aa(%rip)     # 0x7eae8
je 0x11b26
cmpq $0x0, 0x6d0b4(%rip)     # 0x7eb00
jne 0x11a70
movq %rcx, %r14
movl $0x18, %edi
callq 0xc370
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x12900
movq %r15, 0x6d090(%rip)     # 0x7eb00
testl %r13d, %r13d
jle 0x11ca3
movq %rbx, 0x50(%rsp)
movl %r13d, %ecx
movq %rcx, 0x8(%rsp)
xorl %r13d, %r13d
movq 0xc0(%rsp), %r15
movq %r12, %r14
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x424ca
movq %rbx, %rdi
movq 0xb0(%rsp), %rsi
callq 0x42dd6
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x424b8
movq 0x6d038(%rip), %rdi     # 0x7eb00
leaq 0x6cfa9(%rip), %rax     # 0x7ea78
movsd (%rax), %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rsi
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x14356
movq %r15, %rdi
movq %rbp, %rsi
callq 0x42828
movq %r14, %rdi
movq %r12, %rsi
callq 0x42828
incq %r13
addq $0x18, %r14
addq $0x18, %r15
addq $0x18, %rbp
cmpq %r13, 0x8(%rsp)
jne 0x11a94
movq 0xc8(%rsp), %r12
movq 0x50(%rsp), %rbx
jmp 0x11ca6
cmpq $0x0, 0x6cfc2(%rip)     # 0x7eaf0
jne 0x11b97
leaq 0x10(%rsp), %rdi
callq 0x55da0
testl %r13d, %r13d
jle 0x11b62
movl %r13d, %r12d
leaq 0x10(%rsp), %r14
movq %rbp, %r15
movl 0x1c(%rsp), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x55e36
addq $0x18, %r15
decq %r12
jne 0x11b4a
movl $0x60, %edi
callq 0xc370
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x11e7e
movq 0xc8(%rsp), %r12
movq %r14, 0x6cf63(%rip)     # 0x7eaf0
leaq 0x10(%rsp), %rdi
callq 0x55e0a
cmpq $0x0, 0x6cf59(%rip)     # 0x7eaf8
jne 0x11c0c
leaq 0x10(%rsp), %rdi
callq 0x55da0
cmpl $0x0, 0x4(%rsp)
jle 0x11bd7
movl 0x4(%rsp), %r12d
leaq 0x10(%rsp), %r14
movq %rbx, %r15
movl 0x1c(%rsp), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x55e36
addq $0x18, %r15
decq %r12
jne 0x11bbf
movl $0x60, %edi
callq 0xc370
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x11e7e
movq 0xc8(%rsp), %r12
movq %r14, 0x6cef6(%rip)     # 0x7eaf8
leaq 0x10(%rsp), %rdi
callq 0x55e0a
testl %r13d, %r13d
jle 0x11d90
movl %r13d, %ecx
movq %rcx, 0x8(%rsp)
xorl %r13d, %r13d
movq 0xc0(%rsp), %r15
movq %r12, %r14
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x424ca
movq %r12, %rdi
movq 0xb0(%rsp), %rsi
callq 0x42dd6
movq 0x6cea6(%rip), %rdi     # 0x7eaf8
xorps %xmm0, %xmm0
movq %r12, %rsi
movsd 0x473b0(%rip), %xmm1    # 0x59010
xorl %edx, %edx
callq 0x11fb0
movq %rax, %r12
movq %r15, %rdi
movq %rbp, %rsi
callq 0x42828
movq %r14, %rdi
movq %r12, %rsi
callq 0x42828
incq %r13
addq $0x18, %r14
addq $0x18, %r15
addq $0x18, %rbp
cmpq %r13, 0x8(%rsp)
jne 0x11c2b
movq 0xc8(%rsp), %r12
jmp 0x11d93
xorl %r13d, %r13d
cmpq $0x0, 0x6ce5a(%rip)     # 0x7eb08
movq 0xc0(%rsp), %r15
movl 0x4(%rsp), %ebp
jne 0x11cdd
movl $0x18, %edi
callq 0xc370
movq %rax, %r14
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x12900
movq %r14, 0x6ce2b(%rip)     # 0x7eb08
testl %ebp, %ebp
jle 0x11e1d
movl %r13d, %eax
movl %ebp, %r14d
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
addq %rax, %r12
addq %rax, %r15
addl %ebp, %r13d
movq %r13, 0x8(%rsp)
movq %rbx, %r13
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x424ca
movq %rbx, %rdi
movq 0xb8(%rsp), %rsi
callq 0x42dd6
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
callq 0x424b8
movq 0x6cdd0(%rip), %rdi     # 0x7eb08
leaq 0x6cd39(%rip), %rax     # 0x7ea78
movsd (%rax), %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rsi
movq %r13, %rbx
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x14356
movq %r15, %rdi
movq %rbp, %rsi
callq 0x42828
movq %r12, %rdi
movq %r13, %rsi
callq 0x42828
addq $0x18, %r12
addq $0x18, %r15
addq $0x18, %rbx
decq %r14
jne 0x11d01
movq 0x8(%rsp), %r13
jmp 0x11e1d
xorl %r13d, %r13d
movl 0x4(%rsp), %ecx
testl %ecx, %ecx
movq 0xc0(%rsp), %rbp
jle 0x11e1d
movl %r13d, %eax
movl %ecx, %r15d
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
addq %rax, %r12
addq %rax, %rbp
addl %ecx, %r13d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x424ca
movq %r14, %rdi
movq 0xb8(%rsp), %rsi
callq 0x42dd6
movq 0x6cd0f(%rip), %rdi     # 0x7eaf0
xorps %xmm0, %xmm0
movq %r14, %rsi
movsd 0x47221(%rip), %xmm1    # 0x59010
xorl %edx, %edx
callq 0x11fb0
movq %rbp, %rdi
movq %rax, %rsi
callq 0x42828
movq %r12, %rdi
movq %rbx, %rsi
callq 0x42828
addq $0x18, %r12
addq $0x18, %rbp
addq $0x18, %rbx
decq %r15
jne 0x11dbf
movl %r13d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11e33
jmp 0x11e68
movq %rax, %rbx
movl $0x60, %esi
movq %r14, %rdi
callq 0xc380
jmp 0x11e6b
jmp 0x11e68
movq %rax, %rbx
movl $0x18, %esi
movq %r14, %rdi
jmp 0x11e5f
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0xc380
jmp 0x11e75
jmp 0x11e68
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x55e0a
movq %rbx, %rdi
callq 0xc620
nop