// File: jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: SleighCompile::attachNames(std::vector<SleighSymbol*, std::allocator<SleighSymbol*>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
void SleighCompile::attachNames(vector<SleighSymbol *> *symlist,vector<string> *names)

{
  SleighSymbol *dupsym = dedupSymbolList(symlist);
  if (dupsym != (SleighSymbol *)0)
    reportWarning("\"attach names\" list contains duplicate entries: "+dupsym->getName(),true);
  for(int4 i=0;i<symlist->size();++i) {
    ValueSymbol *sym = (ValueSymbol *)(*symlist)[i];
    if (sym == (ValueSymbol *)0) continue;
    PatternValue *patval = sym->getPatternValue();
    if (patval->maxValue() + 1 != names->size()) {
      reportError("Attach name " + sym->getName() + " is wrong size for list", true);
    }
    symtab.replaceSymbol(sym,new NameSymbol(sym->getName(),patval,*names));
  }
  delete names;
  delete symlist;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movq -0x10(%rbp), %rsi
callq 0x64970
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x64dc8
movq -0x20(%rbp), %rdi
callq 0x401a0
movq %rax, %rdx
leaq 0x749ec(%rip), %rsi     # 0xd9765
leaq -0x40(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x147f0
movq -0xa8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movl $0x1, %edx
callq 0x62430
jmp 0x64da3
leaq -0x40(%rbp), %rdi
callq 0x11300
jmp 0x64dc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x11300
jmp 0x65001
movl $0x0, -0x50(%rbp)
movslq -0x50(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6c010
movq %rax, %rcx
movq -0xb8(%rbp), %rax
cmpq %rcx, %rax
jae 0x64f9c
movq -0x10(%rbp), %rdi
movslq -0x50(%rbp), %rsi
callq 0x6c030
movq (%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x64e16
jmp 0x64f6f
movq -0x58(%rbp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
addq $0x1, %rax
movq %rax, -0xc0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x15090
movq %rax, %rcx
movq -0xc0(%rbp), %rax
cmpq %rcx, %rax
je 0x64ef6
movq -0x58(%rbp), %rdi
callq 0x401a0
movq %rax, %rdx
leaq 0x7492e(%rip), %rsi     # 0xd9796
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x147f0
movq -0xc8(%rbp), %rsi
leaq 0x748c4(%rip), %rdx     # 0xd974d
leaq -0x80(%rbp), %rdi
callq 0x6b540
jmp 0x64e94
movq -0xa8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0x1, %edx
callq 0x603b0
jmp 0x64eab
leaq -0x80(%rbp), %rdi
callq 0x11300
leaq -0xa0(%rbp), %rdi
callq 0x11300
jmp 0x64ef6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x64ee5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x11300
leaq -0xa0(%rbp), %rdi
callq 0x11300
jmp 0x65001
movq -0xa8(%rbp), %rax
addq $0x198, %rax            # imm = 0x198
movq %rax, -0xe8(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl $0x58, %edi
callq 0x11440
movq %rax, -0xd8(%rbp)
movq -0x58(%rbp), %rdi
callq 0x401a0
movq %rax, -0xd0(%rbp)
jmp 0x64f38
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x6c1d0
jmp 0x64f55
movq -0xd8(%rbp), %rdx
movq -0xe0(%rbp), %rsi
movq -0xe8(%rbp), %rdi
callq 0xa2f40
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x64dcf
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x58, %esi
callq 0x11450
jmp 0x65001
movq -0x18(%rbp), %rax
movq %rax, -0xf0(%rbp)
cmpq $0x0, %rax
je 0x64fca
movq -0xf0(%rbp), %rdi
callq 0x1bc40
movq -0xf0(%rbp), %rdi
movl $0x18, %esi
callq 0x11450
movq -0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
cmpq $0x0, %rax
je 0x64ff8
movq -0xf8(%rbp), %rdi
callq 0x6c170
movq -0xf8(%rbp), %rdi
movl $0x18, %esi
callq 0x11450
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x118b0
nopw (%rax,%rax)