// File: /workspace/github_cpp_makefile_star2_O2/npaster[P]gmsh_tools/gmshMesh.cpp
// Function: gmsh::Gmesh::convertInDiscontinuousMesh2()
void
Gmesh::convertInDiscontinuousMesh2()
{
   const size_t      numberofNewNodes = 3 * _triangles.size() + 4 * _quadrangles.size();
   std::vector<Node> oldNodes(_nodes);

   _nodes.clear();
   _nodes.reserve(numberofNewNodes);
   size_t indexCurrentNode = 1;

   if (_edges.size() > 0) {
      _number_of_elements -= _edges.size();
      _edges.clear();
   }

   for (size_t i = 0; i < _triangles.size(); i++) {
      std::vector<size_t> indexnodes = _triangles[i].getNodes();
      for (size_t j = 0; j < 3; j++) {
         Node tmpNode(oldNodes[indexnodes[j] - 1]);
         tmpNode.changeIndex(indexCurrentNode);
         _triangles[i].changeNode(j, indexCurrentNode);
         _nodes.push_back(tmpNode);
         indexCurrentNode += 1;
      }
   }

   for (size_t i = 0; i < _quadrangles.size(); i++) {
      std::vector<size_t> indexnodes = _quadrangles[i].getNodes();
      for (size_t j = 0; j < 4; j++) {
         Node tmpNode(oldNodes[indexnodes[j] - 1]);
         tmpNode.changeIndex(indexCurrentNode);
         _quadrangles[i].changeNode(j, indexCurrentNode);
         _nodes.push_back(tmpNode);
         indexCurrentNode += 1;
      }
   }

   assert(indexCurrentNode - 1 == numberofNewNodes);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r14
movq 0x58(%rdi), %rax
movq 0x70(%rdi), %rcx
subq 0x50(%rdi), %rax
pushq $0x38
popq %rdi
cqto
idivq %rdi
leaq (%rax,%rax,2), %rsi
subq 0x68(%r14), %rcx
movq %rcx, %rax
cqto
idivq %rdi
leaq (%rsi,%rax,4), %rbx
leaq 0x8(%r14), %rsi
leaq -0xa0(%rbp), %rdi
movq %rsi, -0x38(%rbp)
callq 0x7d88
movq 0x8(%r14), %rax
cmpq %rax, 0x10(%r14)
je 0x760e
movq %rax, 0x10(%r14)
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x85a0
movq %rbx, -0x88(%rbp)
movq 0x40(%r14), %rax
subq 0x38(%r14), %rax
je 0x7643
leaq 0x38(%r14), %rdi
pushq $-0x38
popq %rcx
cqto
idivq %rcx
addq %rax, 0xe0(%r14)
callq 0x86c0
pushq $0x1
popq %rbx
xorl %edi, %edi
movq %r14, %r13
movq 0x50(%r14), %rsi
movq 0x58(%r14), %rax
subq %rsi, %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
cmpq %rax, %rdi
jae 0x76fe
movq %rdi, -0x30(%rbp)
imulq $0x38, %rdi, %r15
addq %r15, %rsi
leaq -0x50(%rbp), %rdi
callq 0x26e4
xorl %r14d, %r14d
leaq (%rbx,%r14), %r12
cmpq $0x3, %r14
je 0x76e3
movq -0x50(%rbp), %rax
movq -0xa0(%rbp), %rcx
imulq $0x28, (%rax,%r14,8), %rax
movups -0x28(%rcx,%rax), %xmm0
movups -0x18(%rcx,%rax), %xmm1
movaps %xmm0, -0x80(%rbp)
movaps %xmm1, -0x70(%rbp)
movq -0x8(%rcx,%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x80(%rbp), %rdi
movq %r12, %rsi
callq 0x2620
movq 0x50(%r13), %rdi
addq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2706
movq -0x38(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x8354
incq %r14
jmp 0x767e
leaq -0x50(%rbp), %rdi
callq 0x2e88
movq -0x30(%rbp), %rdi
incq %rdi
movq %r12, %rbx
movq %r13, %r14
jmp 0x764b
xorl %edi, %edi
movq 0x68(%r14), %rsi
movq 0x70(%r14), %rax
subq %rsi, %rax
cqto
pushq $0x38
popq %rcx
idivq %rcx
cmpq %rax, %rdi
jae 0x77b3
movq %rdi, -0x30(%rbp)
imulq $0x38, %rdi, %r15
addq %r15, %rsi
leaq -0x50(%rbp), %rdi
callq 0x26e4
xorl %r14d, %r14d
leaq (%rbx,%r14), %r12
cmpq $0x4, %r14
je 0x7798
movq -0x50(%rbp), %rax
movq -0xa0(%rbp), %rcx
imulq $0x28, (%rax,%r14,8), %rax
movups -0x28(%rcx,%rax), %xmm0
movups -0x18(%rcx,%rax), %xmm1
movaps %xmm0, -0x80(%rbp)
movaps %xmm1, -0x70(%rbp)
movq -0x8(%rcx,%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x80(%rbp), %rdi
movq %r12, %rsi
callq 0x2620
movq 0x68(%r13), %rdi
addq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2706
movq -0x38(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x8354
incq %r14
jmp 0x7733
leaq -0x50(%rbp), %rdi
callq 0x2e88
movq -0x30(%rbp), %rdi
incq %rdi
movq %r12, %rbx
movq %r13, %r14
jmp 0x7700
decq %rbx
cmpq -0x88(%rbp), %rbx
jne 0x77da
leaq -0xa0(%rbp), %rdi
callq 0x8722
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x63df(%rip), %rdi      # 0xdbc0
leaq 0x5f3c(%rip), %rsi      # 0xd724
leaq 0x642a(%rip), %rcx      # 0xdc19
movl $0x34b, %edx            # imm = 0x34B
callq 0x2150
jmp 0x77fd
jmp 0x77fd
movq %rax, %rbx
jmp 0x7810
jmp 0x7804
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2e88
leaq -0xa0(%rbp), %rdi
callq 0x8722
movq %rbx, %rdi
callq 0x22a0