// File: /workspace/github_cpp_makefile_star2_O2/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 $0x88, %rsp
movq %r9, 0x18(%rsp)
movq %r8, 0x20(%rsp)
movl %edx, %ebp
movq %rsi, %rbx
movq 0xd0(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x67f54(%rip)     # 0x78af8
je 0x10d75
movq %rdi, %r13
cmpq $0x0, 0x67f5b(%rip)     # 0x78b10
jne 0x10bd7
movq %rcx, %r14
pushq $0x18
popq %rdi
callq 0xc380
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x11bac
movq %r12, 0x67f39(%rip)     # 0x78b10
movq %r13, 0x28(%rsp)
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
movq %rbp, 0x10(%rsp)
movq 0xd0(%rsp), %r13
movq 0xd8(%rsp), %r12
subq $0x1, %rbp
jb 0x10c76
leaq 0x70(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3c830
movq %r15, %rdi
movq 0xc0(%rsp), %rsi
callq 0x3ce66
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x3c81e
movq 0x67ede(%rip), %rdi     # 0x78b10
leaq 0x67e4f(%rip), %rax     # 0x78a88
movsd (%rax), %xmm1
xorps %xmm0, %xmm0
movq %r15, %rsi
leaq 0x30(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1339a
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3cb0a
movq %r12, %rdi
movq %r14, %rsi
callq 0x3cb0a
addq $0x18, %r12
addq $0x18, %r13
addq $0x18, %rbx
jmp 0x10bf8
cmpq $0x0, 0x67e9a(%rip)     # 0x78b18
movq 0xd8(%rsp), %rbp
jne 0x10ca7
pushq $0x18
popq %rdi
callq 0xc380
movq %rax, %r14
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x11bac
movq %r14, 0x67e71(%rip)     # 0x78b18
xorl %r12d, %r12d
movq 0x18(%rsp), %rax
testl %eax, %eax
cmovlel %r12d, %eax
negq %rax
movq %rax, 0x18(%rsp)
imulq $0x18, 0x10(%rsp), %rax
addq %rax, %rbp
addq %rax, 0x8(%rsp)
leaq 0x70(%rsp), %r13
cmpq %r12, 0x18(%rsp)
je 0x10d68
movq %r13, %rdi
movq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x3c830
movq %r13, %rdi
movq 0xc8(%rsp), %rsi
callq 0x3ce66
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x3c81e
movq 0x67e09(%rip), %rdi     # 0x78b18
leaq 0x67d72(%rip), %rax     # 0x78a88
movsd (%rax), %xmm1
xorps %xmm0, %xmm0
movq %r13, %rsi
leaq 0x30(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1339a
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3cb0a
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3cb0a
addq $0x18, %r14
movq %r14, 0x20(%rsp)
decq %r12
addq $0x18, %rbp
addq $0x18, %rbx
movq %rbx, 0x8(%rsp)
jmp 0x10cd0
movq 0x10(%rsp), %rax
subq %r12, %rax
jmp 0x10f80
cmpq $0x0, 0x67d83(%rip)     # 0x78b00
jne 0x10ddd
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x4e1da
xorl %r13d, %r13d
movq %rbp, %rax
testl %eax, %eax
cmovgl %eax, %r13d
movq %rbx, %r12
subq $0x1, %r13
jb 0x10db2
movq %r14, %rdi
movq %r12, %rsi
callq 0x112ee
addq $0x18, %r12
jmp 0x10d9b
pushq $0x60
popq %rdi
callq 0xc380
movq %rax, %r14
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x11140
movq %r14, 0x67d2d(%rip)     # 0x78b00
leaq 0x30(%rsp), %rdi
callq 0x4e248
cmpq $0x0, 0x67d23(%rip)     # 0x78b08
jne 0x10e49
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x4e1da
xorl %r13d, %r13d
movq 0x18(%rsp), %rax
testl %eax, %eax
cmovgl %eax, %r13d
movq 0x20(%rsp), %r12
subq $0x1, %r13
jb 0x10e1e
movq %r14, %rdi
movq %r12, %rsi
callq 0x112ee
addq $0x18, %r12
jmp 0x10e07
pushq $0x60
popq %rdi
callq 0xc380
movq %rax, %r14
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x11140
movq %r14, 0x67cc9(%rip)     # 0x78b08
leaq 0x30(%rsp), %rdi
callq 0x4e248
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
leaq 0x30(%rsp), %r15
movq %rbp, 0x10(%rsp)
movq %rbp, %r14
movq 0xd0(%rsp), %r12
movq 0xd8(%rsp), %rbp
movq %rbp, %r13
subq $0x1, %r14
jb 0x10edc
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3c830
movq %r15, %rdi
movq 0xc0(%rsp), %rsi
callq 0x3ce66
movq 0x67c70(%rip), %rdi     # 0x78b08
xorps %xmm0, %xmm0
movq %r15, %rsi
movsd 0x4016a(%rip), %xmm1    # 0x51010
xorl %edx, %edx
callq 0x11256
movq %rax, %rbp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3cb0a
movq %r13, %rdi
movq %rbp, %rsi
movq 0xd8(%rsp), %rbp
callq 0x3cb0a
addq $0x18, %r13
addq $0x18, %r12
addq $0x18, %rbx
jmp 0x10e70
xorl %r14d, %r14d
movq 0x18(%rsp), %r12
testl %r12d, %r12d
cmovlel %r14d, %r12d
negq %r12
imulq $0x18, 0x10(%rsp), %rax
addq %rax, %rbp
addq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rbx
cmpq %r14, %r12
je 0x10f78
movq %rbx, %rdi
movq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x3c830
movq %rbx, %rdi
movq 0xc8(%rsp), %rsi
callq 0x3ce66
movq 0x67bd3(%rip), %rdi     # 0x78b00
xorps %xmm0, %xmm0
movq %rbx, %rsi
movsd 0x400d5(%rip), %xmm1    # 0x51010
xorl %edx, %edx
callq 0x11256
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x3cb0a
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3cb0a
addq $0x18, %r15
movq %r15, 0x20(%rsp)
decq %r14
addq $0x18, %rbp
addq $0x18, %r13
movq %r13, 0x8(%rsp)
jmp 0x10f01
movq 0x10(%rsp), %rax
subq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10f96
jmp 0x10fc5
movq %rax, %rbx
pushq $0x60
popq %rsi
movq %r14, %rdi
callq 0xc390
jmp 0x10fc8
jmp 0x10fc5
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
jmp 0x10fbc
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0xc390
jmp 0x10fd2
jmp 0x10fc5
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4e248
movq %rbx, %rdi
callq 0xc650