// File: 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
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
addq $0x50, %rdi
callq 0xe3e0
movq -0xf8(%rbp), %rdi
leaq (%rax,%rax,2), %rax
movq %rax, -0xf0(%rbp)
addq $0x68, %rdi
callq 0xe410
movq -0xf8(%rbp), %rsi
movq %rax, %rcx
movq -0xf0(%rbp), %rax
leaq (%rax,%rcx,4), %rax
movq %rax, -0x10(%rbp)
addq $0x8, %rsi
movq %rsi, -0xe8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xde10
movq -0xe8(%rbp), %rdi
callq 0xf640
movq -0xe8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xf660
jmp 0xd039
movq -0xf8(%rbp), %rdi
movq $0x1, -0x40(%rbp)
addq $0x38, %rdi
callq 0xe110
cmpq $0x0, %rax
jbe 0xd09e
movq -0xf8(%rbp), %rdi
addq $0x38, %rdi
callq 0xe110
movq -0xf8(%rbp), %rdi
movq %rax, %rcx
movq 0xe0(%rdi), %rax
subq %rcx, %rax
movq %rax, 0xe0(%rdi)
addq $0x38, %rdi
callq 0xf820
jmp 0xd09e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xd398
movq $0x0, -0x48(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x100(%rbp)
addq $0x50, %rdi
callq 0xe3e0
movq %rax, %rcx
movq -0x100(%rbp), %rax
cmpq %rcx, %rax
jae 0xd1e1
movq -0xf8(%rbp), %rdi
addq $0x50, %rdi
movq -0x48(%rbp), %rsi
callq 0xf840
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
callq 0x29f0
jmp 0xd0f6
movq $0x0, -0x68(%rbp)
cmpq $0x3, -0x68(%rbp)
jae 0xd1c7
movq -0x68(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x36c0
movq (%rax), %rsi
decq %rsi
leaq -0x28(%rbp), %rdi
callq 0xf860
movq 0x20(%rax), %rcx
movq %rcx, -0x70(%rbp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movq -0x40(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x27e0
jmp 0xd151
movq -0xf8(%rbp), %rdi
addq $0x50, %rdi
movq -0x48(%rbp), %rsi
callq 0xf840
movq %rax, %rdi
movq -0x68(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2a50
jmp 0xd177
movq -0xf8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x90(%rbp), %rsi
callq 0xef90
jmp 0xd190
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0xd0fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x37c0
jmp 0xd398
leaq -0x60(%rbp), %rdi
callq 0x37c0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xd0a6
movq $0x0, -0x98(%rbp)
movq -0xf8(%rbp), %rdi
movq -0x98(%rbp), %rax
movq %rax, -0x108(%rbp)
addq $0x68, %rdi
callq 0xe410
movq %rax, %rcx
movq -0x108(%rbp), %rax
cmpq %rcx, %rax
jae 0xd357
movq -0xf8(%rbp), %rdi
addq $0x68, %rdi
movq -0x98(%rbp), %rsi
callq 0xf880
movq %rax, %rsi
leaq -0xb0(%rbp), %rdi
callq 0x29f0
jmp 0xd245
movq $0x0, -0xb8(%rbp)
cmpq $0x4, -0xb8(%rbp)
jae 0xd334
movq -0xb8(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x36c0
movq (%rax), %rsi
decq %rsi
leaq -0x28(%rbp), %rdi
callq 0xf860
movq 0x20(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, -0xd0(%rbp)
movaps %xmm0, -0xe0(%rbp)
movq -0x40(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x27e0
jmp 0xd2b2
movq -0xf8(%rbp), %rdi
addq $0x68, %rdi
movq -0x98(%rbp), %rsi
callq 0xf880
movq %rax, %rdi
movq -0xb8(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2a50
jmp 0xd2de
movq -0xf8(%rbp), %rdi
addq $0x8, %rdi
leaq -0xe0(%rbp), %rsi
callq 0xef90
jmp 0xd2f7
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0xb8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb8(%rbp)
jmp 0xd250
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x37c0
jmp 0xd398
leaq -0xb0(%rbp), %rdi
callq 0x37c0
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0xd1ec
movq -0x40(%rbp), %rax
subq $0x1, %rax
cmpq -0x10(%rbp), %rax
jne 0xd367
jmp 0xd386
leaq 0x14a04(%rip), %rdi     # 0x21d72
leaq 0x14510(%rip), %rsi     # 0x21885
movl $0x34b, %edx            # imm = 0x34B
leaq 0x14a4a(%rip), %rcx     # 0x21dcb
callq 0x2130
leaq -0x28(%rbp), %rdi
callq 0xe1a0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0xe1a0
movq -0x30(%rbp), %rdi
callq 0x22e0
nopw (%rax,%rax)