// File: salleaffaire[P]MXFParser/./dictionary.hpp
// Function: Dictionary<16>::add(Signature<16>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void add(const Signature<T> x, std::string name) {
      DictionaryNode *current_node;

      // Adding the root
      auto it = mRootNodes.find(x[0]);
      if (it == mRootNodes.end()) {
         current_node = new DictionaryNode;
         mRootNodes[x[0]] = current_node;
         //std::cout << "Creating a new root node for " << x[0] << std::endl;
      }
      else {
         current_node = it->second;
         //std::cout << "Following root node for " << x[0] << std::endl; 
      }
      // Adding all other node
      for (int i=1;i<T;i++) {
         auto it = current_node->mChildrenNodes.find(x[i]);
         if (it == current_node->mChildrenNodes.end()) {
            DictionaryNode *new_node = new DictionaryNode;
            current_node->mChildrenNodes[x[i]] = new_node;
            current_node = new_node;
            //std::cout << "Creating a new node for " << x[i] << std::endl;
         }
         else {
            current_node = it->second;
            //std::cout << "Following node for " << x[i] << std::endl;
         }         
      }
      current_node->mValue = name;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rsi, -0x78(%rbp)
movq %rdi, %rax
leaq 0x10(%rbp), %rdi
movq %rdi, -0x70(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
xorl %esi, %esi
callq 0xa440
movq -0x68(%rbp), %rdi
movw %ax, -0x22(%rbp)
leaq -0x22(%rbp), %rsi
callq 0x7190
movq -0x68(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0x7210
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x73f0
testb $0x1, %al
jne 0x9db6
jmp 0x9e07
movl $0x50, %edi
callq 0x3200
movq %rax, %rdi
movq %rdi, -0x88(%rbp)
callq 0xa460
movq -0x88(%rbp), %rax
movq -0x70(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
xorl %esi, %esi
callq 0xa440
movq -0x68(%rbp), %rdi
movw %ax, -0x32(%rbp)
leaq -0x32(%rbp), %rsi
callq 0xa490
movq -0x80(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x9e18
leaq -0x20(%rbp), %rdi
callq 0x7240
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x38(%rbp)
cmpl $0x10, -0x38(%rbp)
jge 0x9f19
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x90(%rbp)
movl -0x38(%rbp), %eax
movzwl %ax, %esi
callq 0xa440
movq -0x90(%rbp), %rdi
movw %ax, -0x42(%rbp)
leaq -0x42(%rbp), %rsi
callq 0x7190
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x7210
movq %rax, -0x50(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x73f0
testb $0x1, %al
jne 0x9e83
jmp 0x9ef8
movl $0x50, %edi
callq 0x3200
movq %rax, %rdi
movq %rdi, -0xa8(%rbp)
callq 0xa460
movq -0xa8(%rbp), %rax
movq -0x70(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xa0(%rbp)
movl -0x38(%rbp), %eax
movzwl %ax, %esi
callq 0xa440
movq -0xa0(%rbp), %rdi
movw %ax, -0x5a(%rbp)
leaq -0x5a(%rbp), %rsi
callq 0xa490
movq -0x98(%rbp), %rcx
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x9f09
leaq -0x40(%rbp), %rdi
callq 0x7240
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x9f0b
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x9e1f
movq -0x78(%rbp), %rsi
movq -0x18(%rbp), %rdi
callq 0x3050
addq $0xb0, %rsp
popq %rbp
retq
nop