// File: Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::returnChemicalFormula[abi:cxx11]()
std::string ATOM_NETWORK::returnChemicalFormula(){

 std::string formula;

 for(int i=0; i<MAX_ATOMIC_NUMBER; i++) atomic_composition[i] = 0;

 for(int i=0; i<numAtoms; i++) {
    atomic_composition[lookupAtomicNumber(atoms.at(i).type)-1]+=1;
    };

 for(int i=0; i<numAtoms; i++) {

    if(atomic_composition[lookupAtomicNumber(atoms.at(i).type)-1]>0)
      {
      std::ostringstream os ;
      os << atomic_composition[lookupAtomicNumber(atoms.at(i).type)-1];
      formula += atoms.at(i).type + os.str();
      atomic_composition[lookupAtomicNumber(atoms.at(i).type)-1]=0;
      };

    };

 return formula;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2f0, %rsp            # imm = 0x2F0
movq %rdi, -0x280(%rbp)
movq %rdi, %rax
movq %rax, -0x278(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x270(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x5720
movl $0x0, -0x18(%rbp)
cmpl $0x76, -0x18(%rbp)
jge 0x995f6
movq -0x270(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl $0x0, 0x114(%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x995cf
movl $0x0, -0x1c(%rbp)
movq -0x270(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x110(%rcx), %eax
jge 0x996c8
movq -0x270(%rbp), %rdi
movq %rdi, %rax
addq $0x114, %rax            # imm = 0x114
movq %rax, -0x290(%rbp)
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0x1c(%rbp), %rsi
callq 0xf090
movq %rax, -0x288(%rbp)
jmp 0x99643
movq -0x288(%rbp), %rsi
addq $0x40, %rsi
leaq -0x40(%rbp), %rdi
callq 0x5220
jmp 0x99659
leaq -0x40(%rbp), %rdi
callq 0x46c40
movl %eax, -0x294(%rbp)
jmp 0x9966a
movq -0x290(%rbp), %rax
movl -0x294(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
leaq -0x40(%rbp), %rdi
callq 0x5300
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x995fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x99a00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5300
jmp 0x99a00
movl $0x0, -0x50(%rbp)
movq -0x270(%rbp), %rcx
movl -0x50(%rbp), %eax
cmpl 0x110(%rcx), %eax
jge 0x999da
movq -0x270(%rbp), %rdi
movq %rdi, %rax
addq $0x114, %rax            # imm = 0x114
movq %rax, -0x2a8(%rbp)
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0x50(%rbp), %rsi
callq 0xf090
movq %rax, -0x2a0(%rbp)
jmp 0x99715
movq -0x2a0(%rbp), %rsi
addq $0x40, %rsi
leaq -0x70(%rbp), %rdi
callq 0x5220
jmp 0x9972b
leaq -0x70(%rbp), %rdi
callq 0x46c40
movl %eax, -0x2ac(%rbp)
jmp 0x9973c
movq -0x2a8(%rbp), %rax
movl -0x2ac(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2b0(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5300
movl -0x2b0(%rbp), %eax
cmpl $0x0, %eax
jle 0x999ca
leaq -0x1e8(%rbp), %rdi
callq 0x5700
jmp 0x9977e
movq -0x270(%rbp), %rdi
movq %rdi, %rax
addq $0x114, %rax            # imm = 0x114
movq %rax, -0x2c0(%rbp)
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0x50(%rbp), %rsi
callq 0xf090
movq %rax, -0x2b8(%rbp)
jmp 0x997ae
movq -0x2b8(%rbp), %rsi
addq $0x40, %rsi
leaq -0x208(%rbp), %rdi
callq 0x5220
jmp 0x997c7
leaq -0x208(%rbp), %rdi
callq 0x46c40
movl %eax, -0x2c4(%rbp)
jmp 0x997db
movq -0x2c0(%rbp), %rax
movl -0x2c4(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
leaq -0x1e8(%rbp), %rdi
callq 0x58d0
jmp 0x997fe
leaq -0x208(%rbp), %rdi
callq 0x5300
movq -0x270(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0x50(%rbp), %rsi
callq 0xf090
movq %rax, -0x2d0(%rbp)
jmp 0x9982a
movq -0x2d0(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x2d8(%rbp)
leaq -0x248(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x5580
jmp 0x99851
movq -0x2d8(%rbp), %rsi
leaq -0x228(%rbp), %rdi
leaq -0x248(%rbp), %rdx
callq 0xae600
jmp 0x9986d
movq -0x280(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x56b0
jmp 0x99882
leaq -0x228(%rbp), %rdi
callq 0x5300
leaq -0x248(%rbp), %rdi
callq 0x5300
movq -0x270(%rbp), %rdi
movq %rdi, %rax
addq $0x114, %rax            # imm = 0x114
movq %rax, -0x2e8(%rbp)
addq $0x2f0, %rdi            # imm = 0x2F0
movslq -0x50(%rbp), %rsi
callq 0xf090
movq %rax, -0x2e0(%rbp)
jmp 0x998ca
movq -0x2e0(%rbp), %rsi
addq $0x40, %rsi
leaq -0x268(%rbp), %rdi
callq 0x5220
jmp 0x998e3
leaq -0x268(%rbp), %rdi
callq 0x46c40
movl %eax, -0x2ec(%rbp)
jmp 0x998f7
movq -0x2e8(%rbp), %rax
movl -0x2ec(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl $0x0, (%rax,%rcx,4)
leaq -0x268(%rbp), %rdi
callq 0x5300
leaq -0x1e8(%rbp), %rdi
callq 0x5170
jmp 0x999ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5300
jmp 0x99a00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x999bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x5300
jmp 0x999bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x99996
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x5300
leaq -0x248(%rbp), %rdi
callq 0x5300
jmp 0x999bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x5300
leaq -0x1e8(%rbp), %rdi
callq 0x5170
jmp 0x99a00
jmp 0x999cc
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x996cf
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x999f0
movq -0x280(%rbp), %rdi
callq 0x5300
movq -0x278(%rbp), %rax
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbp
retq
movq -0x280(%rbp), %rdi
callq 0x5300
movq -0x48(%rbp), %rdi
callq 0x58f0
nopw %cs:(%rax,%rax)