// File: npaster[P]gmsh_tools/gmshData.cpp
// Function: gmsh::ElementNodeData::writeElementNodeData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const
void
ElementNodeData::writeElementNodeData(const std::string name_mesh) const
{
   std::ofstream mesh_file;
   mesh_file.open(name_mesh, std::ofstream::out | std::ofstream::app);
   if (!mesh_file.is_open()) {
      std::cout << "Unable to open file " << name_mesh << std::endl;
      abort();
   } else {
      std::cout << "------------------------" << std::endl;
      std::cout << "Writing Results " << name_mesh << std::endl;
      std::cout << "MSH ASCII file format" << std::endl;
      std::cout << "------------------------" << std::endl;
   }

   mesh_file << "$ElementNodeData" << std::endl;
   mesh_file << 1 << std::endl; // string tag

   mesh_file << "\" " << m_title << "\" " << std::endl; // name of the view
   mesh_file << 1 << std::endl;                         // real tag
   mesh_file << m_time_value << std::endl;              // time value
   mesh_file << 3 << std::endl;                         // integer tag
   mesh_file << 0 << std::endl;                         // time Step

   mesh_file << m_composante << std::endl;
   mesh_file << m_datas.size() << std::endl;

   for (size_t i = 0; i < m_datas.size(); i++) {
      mesh_file << m_datas[i].getIndex() << " ";

      std::vector<double> tmpresu(m_datas[i].getData());
      for (size_t j = 0; j < std::min(m_composante, tmpresu.size()); j++) {
         mesh_file << tmpresu[j] << " ";
      }
      for (size_t j = std::min(m_composante, tmpresu.size()); j < m_composante; j++) {
         mesh_file << 0.0 << " ";
      }

      mesh_file << std::endl;
   }

   mesh_file << "$EndElementNodeData" << std::endl;
   mesh_file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rsi, -0x278(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x22c0
movl $0x10, %edi
movl $0x1, %esi
callq 0x1be30
movl %eax, -0x264(%rbp)
jmp 0x1ae68
movl -0x264(%rbp), %edx
movq -0x278(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x20e0
jmp 0x1ae83
leaq -0x210(%rbp), %rdi
callq 0x2140
movb %al, -0x279(%rbp)
jmp 0x1ae97
movb -0x279(%rbp), %al
testb $0x1, %al
jne 0x1af0c
jmp 0x1aea3
movq 0x1612e(%rip), %rdi     # 0x30fd8
leaq 0x6931(%rip), %rsi      # 0x217e2
callq 0x21b0
movq %rax, -0x288(%rbp)
jmp 0x1aebf
movq -0x278(%rbp), %rsi
movq -0x288(%rbp), %rdi
callq 0x2190
movq %rax, -0x290(%rbp)
jmp 0x1aedb
movq -0x290(%rbp), %rdi
movq 0x160df(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1aef0
callq 0x2110
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x1b496
movq 0x160c5(%rip), %rdi     # 0x30fd8
leaq 0x6151(%rip), %rsi      # 0x2106b
callq 0x21b0
movq %rax, -0x298(%rbp)
jmp 0x1af28
movq -0x298(%rbp), %rdi
movq 0x16092(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1af3d
movq 0x16094(%rip), %rdi     # 0x30fd8
leaq 0x6fc8(%rip), %rsi      # 0x21f13
callq 0x21b0
movq %rax, -0x2a0(%rbp)
jmp 0x1af59
movq -0x278(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
callq 0x2190
movq %rax, -0x2a8(%rbp)
jmp 0x1af75
movq -0x2a8(%rbp), %rdi
movq 0x16045(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1af8a
movq 0x16047(%rip), %rdi     # 0x30fd8
leaq 0x6c8f(%rip), %rsi      # 0x21c27
callq 0x21b0
movq %rax, -0x2b0(%rbp)
jmp 0x1afa6
movq -0x2b0(%rbp), %rdi
movq 0x16014(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1afbb
movq 0x16016(%rip), %rdi     # 0x30fd8
leaq 0x60a2(%rip), %rsi      # 0x2106b
callq 0x21b0
movq %rax, -0x2b8(%rbp)
jmp 0x1afd7
movq -0x2b8(%rbp), %rdi
movq 0x15fe3(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1afec
jmp 0x1afee
leaq 0x6f63(%rip), %rsi      # 0x21f58
leaq -0x210(%rbp), %rdi
callq 0x21b0
movq %rax, -0x2c0(%rbp)
jmp 0x1b00a
movq -0x2c0(%rbp), %rdi
movq 0x15fb0(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b01f
leaq -0x210(%rbp), %rdi
movl $0x1, %esi
callq 0x22d0
movq %rax, -0x2c8(%rbp)
jmp 0x1b039
movq -0x2c8(%rbp), %rdi
movq 0x15f81(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b04e
leaq 0x6ebb(%rip), %rsi      # 0x21f10
leaq -0x210(%rbp), %rdi
callq 0x21b0
movq %rax, -0x2d0(%rbp)
jmp 0x1b06a
movq -0x2d0(%rbp), %rdi
movq -0x270(%rbp), %rsi
addq $0x10, %rsi
callq 0x2190
movq %rax, -0x2d8(%rbp)
jmp 0x1b08a
movq -0x2d8(%rbp), %rdi
leaq 0x6e78(%rip), %rsi      # 0x21f10
callq 0x21b0
movq %rax, -0x2e0(%rbp)
jmp 0x1b0a6
movq -0x2e0(%rbp), %rdi
movq 0x15f14(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b0bb
leaq -0x210(%rbp), %rdi
movl $0x1, %esi
callq 0x22d0
movq %rax, -0x2e8(%rbp)
jmp 0x1b0d5
movq -0x2e8(%rbp), %rdi
movq 0x15ee5(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b0ea
movq -0x270(%rbp), %rax
movsd 0x8(%rax), %xmm0
leaq -0x210(%rbp), %rdi
callq 0x2320
movq %rax, -0x2f0(%rbp)
jmp 0x1b10b
movq -0x2f0(%rbp), %rdi
movq 0x15eaf(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b120
leaq -0x210(%rbp), %rdi
movl $0x3, %esi
callq 0x22d0
movq %rax, -0x2f8(%rbp)
jmp 0x1b13a
movq -0x2f8(%rbp), %rdi
movq 0x15e80(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b14f
leaq -0x210(%rbp), %rdi
xorl %esi, %esi
callq 0x22d0
movq %rax, -0x300(%rbp)
jmp 0x1b166
movq -0x300(%rbp), %rdi
movq 0x15e54(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b17b
movq -0x270(%rbp), %rax
movq (%rax), %rsi
leaq -0x210(%rbp), %rdi
callq 0x2060
movq %rax, -0x308(%rbp)
jmp 0x1b19a
movq -0x308(%rbp), %rdi
movq 0x15e20(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b1af
movq -0x270(%rbp), %rdi
addq $0x30, %rdi
callq 0x1be50
movq %rax, %rsi
leaq -0x210(%rbp), %rdi
callq 0x2060
movq %rax, -0x310(%rbp)
jmp 0x1b1d7
movq -0x310(%rbp), %rdi
movq 0x15de3(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b1ec
movq $0x0, -0x228(%rbp)
movq -0x270(%rbp), %rdi
movq -0x228(%rbp), %rax
movq %rax, -0x318(%rbp)
addq $0x30, %rdi
callq 0x1be50
movq %rax, %rcx
movq -0x318(%rbp), %rax
cmpq %rcx, %rax
jae 0x1b442
movq -0x270(%rbp), %rdi
addq $0x30, %rdi
movq -0x228(%rbp), %rsi
callq 0x1bea0
movq %rax, %rdi
callq 0x192b0
movq %rax, %rsi
leaq -0x210(%rbp), %rdi
callq 0x2060
movq %rax, -0x320(%rbp)
jmp 0x1b25f
movq -0x320(%rbp), %rdi
leaq 0x6c91(%rip), %rsi      # 0x21efe
callq 0x21b0
jmp 0x1b274
movq -0x270(%rbp), %rdi
addq $0x30, %rdi
movq -0x228(%rbp), %rsi
callq 0x1bea0
movq %rax, %rsi
leaq -0x240(%rbp), %rdi
callq 0x19280
jmp 0x1b29c
movq $0x0, -0x248(%rbp)
movq -0x248(%rbp), %rax
movq %rax, -0x330(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x1b7f0
movq -0x270(%rbp), %rdi
movq %rax, -0x250(%rbp)
leaq -0x250(%rbp), %rsi
callq 0x4880
movq %rax, -0x328(%rbp)
jmp 0x1b2e4
movq -0x330(%rbp), %rax
movq -0x328(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1b374
movq -0x248(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0x1bec0
movsd (%rax), %xmm0
leaq -0x210(%rbp), %rdi
callq 0x2320
movq %rax, -0x338(%rbp)
jmp 0x1b323
movq -0x338(%rbp), %rdi
leaq 0x6bcd(%rip), %rsi      # 0x21efe
callq 0x21b0
jmp 0x1b338
jmp 0x1b33a
movq -0x248(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x248(%rbp)
jmp 0x1b2a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x1ba60
jmp 0x1b496
leaq -0x240(%rbp), %rdi
callq 0x1b7f0
movq -0x270(%rbp), %rdi
movq %rax, -0x260(%rbp)
leaq -0x260(%rbp), %rsi
callq 0x4880
movq %rax, -0x340(%rbp)
jmp 0x1b3a3
movq -0x340(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x258(%rbp)
movq -0x270(%rbp), %rcx
movq -0x258(%rbp), %rax
cmpq (%rcx), %rax
jae 0x1b40a
leaq -0x210(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x2320
movq %rax, -0x348(%rbp)
jmp 0x1b3df
movq -0x348(%rbp), %rdi
leaq 0x6b11(%rip), %rsi      # 0x21efe
callq 0x21b0
jmp 0x1b3f4
jmp 0x1b3f6
movq -0x258(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x258(%rbp)
jmp 0x1b3b4
movq 0x15bb7(%rip), %rsi     # 0x30fc8
leaq -0x210(%rbp), %rdi
callq 0x21e0
jmp 0x1b41f
leaq -0x240(%rbp), %rdi
callq 0x1ba60
movq -0x228(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x228(%rbp)
jmp 0x1b1f7
leaq 0x6b20(%rip), %rsi      # 0x21f69
leaq -0x210(%rbp), %rdi
callq 0x21b0
movq %rax, -0x350(%rbp)
jmp 0x1b45e
movq -0x350(%rbp), %rdi
movq 0x15b5c(%rip), %rsi     # 0x30fc8
callq 0x21e0
jmp 0x1b473
leaq -0x210(%rbp), %rdi
callq 0x2240
jmp 0x1b481
leaq -0x210(%rbp), %rdi
callq 0x2260
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
leaq -0x210(%rbp), %rdi
callq 0x2260
movq -0x218(%rbp), %rdi
callq 0x22e0
nop