// File: npaster[P]gmsh_tools/gmshMesh.cpp
// Function: gmsh::Gmesh::convertInDiscontinuousMesh3()
void
Gmesh::convertInDiscontinuousMesh3()
{
   const size_t numberofNewNodes =
     4 * _tetrahedra.size() + 5 * _pyramids.size() + 6 * _prisms.size() + 8 * _hexahedra.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();
   }

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

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

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x198(%rbp)
subq $-0x80, %rdi
callq 0xe6e0
movq -0x198(%rbp), %rdi
movq %rax, -0x1a8(%rbp)
addq $0xc8, %rdi
callq 0xea10
movq -0x1a8(%rbp), %rcx
movq -0x198(%rbp), %rdi
leaq (%rax,%rax,4), %rax
leaq (%rax,%rcx,4), %rax
movq %rax, -0x1a0(%rbp)
addq $0xb0, %rdi
callq 0xe9e0
movq -0x198(%rbp), %rdi
movq %rax, %rcx
movq -0x1a0(%rbp), %rax
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,2), %rax
movq %rax, -0x190(%rbp)
addq $0x98, %rdi
callq 0xe710
movq -0x198(%rbp), %rsi
movq %rax, %rcx
movq -0x190(%rbp), %rax
leaq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
addq $0x8, %rsi
movq %rsi, -0x188(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xde10
movq -0x188(%rbp), %rdi
callq 0xf640
movq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xf660
jmp 0xd48d
movq -0x198(%rbp), %rdi
movq $0x1, -0x40(%rbp)
addq $0x38, %rdi
callq 0xe110
cmpq $0x0, %rax
jbe 0xd4f2
movq -0x198(%rbp), %rdi
addq $0x38, %rdi
callq 0xe110
movq -0x198(%rbp), %rdi
movq %rax, %rcx
movq 0xe0(%rdi), %rax
subq %rcx, %rax
movq %rax, 0xe0(%rdi)
addq $0x38, %rdi
callq 0xf820
jmp 0xd4f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xdb90
movq -0x198(%rbp), %rdi
addq $0x50, %rdi
callq 0xe3e0
cmpq $0x0, %rax
jbe 0xd53c
movq -0x198(%rbp), %rdi
addq $0x50, %rdi
callq 0xe3e0
movq -0x198(%rbp), %rdi
movq %rax, %rcx
movq 0xe0(%rdi), %rax
subq %rcx, %rax
movq %rax, 0xe0(%rdi)
addq $0x50, %rdi
callq 0xf8a0
movq -0x198(%rbp), %rdi
addq $0x68, %rdi
callq 0xe410
cmpq $0x0, %rax
jbe 0xd586
movq -0x198(%rbp), %rdi
addq $0x68, %rdi
callq 0xe410
movq -0x198(%rbp), %rdi
movq %rax, %rcx
movq 0xe0(%rdi), %rax
subq %rcx, %rax
movq %rax, 0xe0(%rdi)
addq $0x68, %rdi
callq 0xf8c0
movq $0x0, -0x48(%rbp)
movq -0x198(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x1b0(%rbp)
addq $0x98, %rdi
callq 0xe710
movq %rax, %rcx
movq -0x1b0(%rbp), %rax
cmpq %rcx, %rax
jae 0xd6d2
movq -0x198(%rbp), %rdi
addq $0x98, %rdi
movq -0x48(%rbp), %rsi
callq 0xf8e0
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
callq 0x29f0
jmp 0xd5e4
movq $0x0, -0x68(%rbp)
cmpq $0x8, -0x68(%rbp)
jae 0xd6b8
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 0xd63f
movq -0x198(%rbp), %rdi
addq $0x98, %rdi
movq -0x48(%rbp), %rsi
callq 0xf8e0
movq %rax, %rdi
movq -0x68(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2a50
jmp 0xd668
movq -0x198(%rbp), %rdi
addq $0x8, %rdi
leaq -0x90(%rbp), %rsi
callq 0xef90
jmp 0xd681
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0xd5ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x37c0
jmp 0xdb90
leaq -0x60(%rbp), %rdi
callq 0x37c0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xd58e
movq $0x0, -0x98(%rbp)
movq -0x198(%rbp), %rdi
movq -0x98(%rbp), %rax
movq %rax, -0x1b8(%rbp)
addq $0x80, %rdi
callq 0xe6e0
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
cmpq %rcx, %rax
jae 0xd84e
movq -0x198(%rbp), %rdi
subq $-0x80, %rdi
movq -0x98(%rbp), %rsi
callq 0xf900
movq %rax, %rsi
leaq -0xb0(%rbp), %rdi
callq 0x29f0
jmp 0xd739
movq $0x0, -0xb8(%rbp)
cmpq $0x4, -0xb8(%rbp)
jae 0xd82b
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 0xd7a6
movq -0x198(%rbp), %rdi
subq $-0x80, %rdi
movq -0x98(%rbp), %rsi
callq 0xf900
movq %rax, %rdi
movq -0xb8(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2a50
jmp 0xd7d2
movq -0x198(%rbp), %rdi
addq $0x8, %rdi
leaq -0xe0(%rbp), %rsi
callq 0xef90
jmp 0xd7eb
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0xb8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb8(%rbp)
jmp 0xd744
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x37c0
jmp 0xdb90
leaq -0xb0(%rbp), %rdi
callq 0x37c0
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0xd6dd
movq $0x0, -0xe8(%rbp)
movq -0x198(%rbp), %rdi
movq -0xe8(%rbp), %rax
movq %rax, -0x1c0(%rbp)
addq $0xb0, %rdi
callq 0xe9e0
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
cmpq %rcx, %rax
jae 0xd9d0
movq -0x198(%rbp), %rdi
addq $0xb0, %rdi
movq -0xe8(%rbp), %rsi
callq 0xf920
movq %rax, %rsi
leaq -0x100(%rbp), %rdi
callq 0x29f0
jmp 0xd8b8
movq $0x0, -0x108(%rbp)
cmpq $0x6, -0x108(%rbp)
jae 0xd9ad
movq -0x108(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x36c0
movq (%rax), %rsi
decq %rsi
leaq -0x28(%rbp), %rdi
callq 0xf860
movq 0x20(%rax), %rcx
movq %rcx, -0x110(%rbp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, -0x120(%rbp)
movaps %xmm0, -0x130(%rbp)
movq -0x40(%rbp), %rsi
leaq -0x130(%rbp), %rdi
callq 0x27e0
jmp 0xd925
movq -0x198(%rbp), %rdi
addq $0xb0, %rdi
movq -0xe8(%rbp), %rsi
callq 0xf920
movq %rax, %rdi
movq -0x108(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2a50
jmp 0xd954
movq -0x198(%rbp), %rdi
addq $0x8, %rdi
leaq -0x130(%rbp), %rsi
callq 0xef90
jmp 0xd96d
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0xd8c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x37c0
jmp 0xdb90
leaq -0x100(%rbp), %rdi
callq 0x37c0
movq -0xe8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe8(%rbp)
jmp 0xd859
movq $0x0, -0x138(%rbp)
movq -0x198(%rbp), %rdi
movq -0x138(%rbp), %rax
movq %rax, -0x1c8(%rbp)
addq $0xc8, %rdi
callq 0xea10
movq %rax, %rcx
movq -0x1c8(%rbp), %rax
cmpq %rcx, %rax
jae 0xdb4f
movq -0x198(%rbp), %rdi
addq $0xc8, %rdi
movq -0x138(%rbp), %rsi
callq 0xf940
movq %rax, %rsi
leaq -0x150(%rbp), %rdi
callq 0x29f0
jmp 0xda3a
movq $0x0, -0x158(%rbp)
cmpq $0x5, -0x158(%rbp)
jae 0xdb2c
movq -0x158(%rbp), %rsi
leaq -0x150(%rbp), %rdi
callq 0x36c0
movq (%rax), %rsi
decq %rsi
leaq -0x28(%rbp), %rdi
callq 0xf860
movq 0x20(%rax), %rcx
movq %rcx, -0x160(%rbp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, -0x170(%rbp)
movaps %xmm0, -0x180(%rbp)
movq -0x40(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x27e0
jmp 0xdaa7
movq -0x198(%rbp), %rdi
addq $0xc8, %rdi
movq -0x138(%rbp), %rsi
callq 0xf940
movq %rax, %rdi
movq -0x158(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2a50
jmp 0xdad6
movq -0x198(%rbp), %rdi
addq $0x8, %rdi
leaq -0x180(%rbp), %rsi
callq 0xef90
jmp 0xdaef
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x158(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x158(%rbp)
jmp 0xda45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x37c0
jmp 0xdb90
leaq -0x150(%rbp), %rdi
callq 0x37c0
movq -0x138(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x138(%rbp)
jmp 0xd9db
movq -0x40(%rbp), %rax
subq $0x1, %rax
cmpq -0x10(%rbp), %rax
jne 0xdb5f
jmp 0xdb7e
leaq 0x1420c(%rip), %rdi     # 0x21d72
leaq 0x13d18(%rip), %rsi     # 0x21885
movl $0x393, %edx            # imm = 0x393
leaq 0x14282(%rip), %rcx     # 0x21dfb
callq 0x2130
leaq -0x28(%rbp), %rdi
callq 0xe1a0
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0xe1a0
movq -0x30(%rbp), %rdi
callq 0x22e0
nopw %cs:(%rax,%rax)