// File: /workspace/github_cpp_makefile_star2_O1/CoinXu[P]reviser-compiler/src/compiler/typescript/typescript_generator.cpp
// Function: reviser::typescript::TypeScriptGenerator::Export[abi:cxx11]()
string TypeScriptGenerator::Export() {
    string code;

    if (descriptor->GlobalVariables().size() == 0) {
      return code;
    }

    code += "export {\n";
    string alias;
    vector<Descriptor::VariableDeclare> variables = descriptor->GlobalVariables();

    for (vector<Descriptor::VariableDeclare>::iterator it = begin(variables); it != end(variables); it++) {
      if ((*it).type == DECLARE_STRUCT) {
        alias += "const " + (*it).id + " = Ns" + (*it).id + "." + (*it).id + ";\n";
      }
      code += TypeScriptCommon::Indent(1) + (*it).id + (next(it) == end(variables) ? "\n" : ",\n");
    }

    return (alias.size() > 0 ? (alias + "\n") : "") + code += "}";
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rbx
movq %rdi, %r13
leaq -0x78(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq 0x50(%rsi), %rsi
leaq -0x110(%rbp), %rdi
callq 0x340d2
leaq -0x110(%rbp), %rdi
movq 0x8(%rdi), %r14
movq (%rdi), %r15
callq 0x346ca
cmpq %r15, %r14
je 0x4c94b
leaq 0x5562(%rip), %rsi      # 0x51ac0
leaq -0x88(%rbp), %rdi
callq 0x25650
movq %r13, -0xb0(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x50(%rbx), %rsi
leaq -0x128(%rbp), %rdi
callq 0x340d2
movq -0x128(%rbp), %r14
cmpq -0x120(%rbp), %r14
je 0x4c90b
leaq -0x58(%rbp), %r12
leaq -0xa8(%rbp), %r13
leaq -0x48(%rbp), %r15
cmpl $0x1, 0x20(%r14)
jne 0x4c835
leaq -0x148(%rbp), %rbx
movq %rbx, %rdi
leaq 0x565a(%rip), %rsi      # 0x51c30
movq %r14, %rdx
callq 0x2c6b4
movq %rbx, %rdi
leaq 0x564f(%rip), %rsi      # 0x51c37
callq 0x25650
leaq -0xc0(%rbp), %rsi
movq %rsi, -0xd0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4c61d
movq %rdx, -0xd0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xc0(%rbp)
jmp 0x4c623
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0xc8(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq -0xd0(%rbp), %rdi
callq 0x250f0
leaq -0xe0(%rbp), %rsi
movq %rsi, -0xf0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4c680
movq %rdx, -0xf0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xe0(%rbp)
jmp 0x4c686
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0xe8(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xf0(%rbp), %rdi
leaq 0x3a9e(%rip), %rsi      # 0x5014c
callq 0x25650
leaq -0x98(%rbp), %rsi
movq %rsi, -0xa8(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4c6e3
movq %rdx, -0xa8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x98(%rbp)
jmp 0x4c6e9
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0xa0(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r13, %rdi
callq 0x250f0
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4c736
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x4c73c
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
leaq 0x533e(%rip), %rsi      # 0x51a9b
callq 0x25650
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4c782
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x4c78a
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x110(%rbp), %rdi
callq 0x250f0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4c7c3
callq 0x25320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4c7d5
callq 0x25320
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x4c7ed
callq 0x25320
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x4c805
callq 0x25320
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x4c81d
callq 0x25320
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x4c835
callq 0x25320
movq %r13, %rdi
movl $0x1, %esi
callq 0x4a586
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x357bd
addq $0x28, %r14
leaq 0x52f8(%rip), %rsi      # 0x51b53
cmpq -0x120(%rbp), %r14
je 0x4c86b
leaq 0x5152(%rip), %rsi      # 0x519bd
movq %r15, %rdi
callq 0x25650
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4c893
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x4c89b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x250f0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4c8d4
callq 0x25320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4c8e6
callq 0x25320
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x4c8fe
callq 0x25320
cmpq -0x120(%rbp), %r14
jne 0x4c5ba
movq -0x108(%rbp), %rdx
testq %rdx, %rdx
je 0x4c974
leaq -0x38(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x110(%rbp), %rsi
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x2a264
leaq 0x521a(%rip), %rsi      # 0x51b53
leaq -0x48(%rbp), %rdi
callq 0x25650
movq -0xb0(%rbp), %r13
jmp 0x4c996
leaq 0x10(%r13), %rax
movq %rax, (%r13)
movq -0x88(%rbp), %rcx
cmpq %r12, %rcx
je 0x4ca5f
movq %rcx, (%r13)
movq -0x78(%rbp), %rax
movq %rax, 0x10(%r13)
jmp 0x4ca67
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x51d1(%rip), %rdx      # 0x51b54
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x2a2fe
movq -0xb0(%rbp), %r13
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x250f0
leaq -0x58(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x78(%rbp), %r12
je 0x4c9d2
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x4c9d8
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3892(%rip), %rsi      # 0x5028c
callq 0x25650
leaq 0x10(%r13), %rcx
movq %rcx, (%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x2a264
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4ca27
callq 0x25320
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ca39
callq 0x25320
leaq -0x128(%rbp), %rdi
callq 0x346ca
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x4ca82
callq 0x25320
jmp 0x4ca82
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq -0x80(%rbp), %rax
movq %rax, 0x8(%r13)
movq %r12, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movb $0x0, -0x78(%rbp)
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x4ca93
callq 0x25320
movq %r13, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4cb98
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
jne 0x4cbdd
jmp 0x4cbe2
jmp 0x4cb98
movq %rax, %r14
jmp 0x4caef
movq %rax, %r14
jmp 0x4cbee
jmp 0x4cad6
movq %rax, %r14
jmp 0x4cc06
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4caef
callq 0x25320
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x4cbd8
movq %rax, %r14
jmp 0x4cb88
movq %rax, %r14
jmp 0x4cb58
movq %rax, %r14
jmp 0x4cb2e
jmp 0x4cb98
movq %rax, %r14
jmp 0x4cb70
movq %rax, %r14
jmp 0x4cb40
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4cb2e
callq 0x25320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4cb40
callq 0x25320
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x4cb58
callq 0x25320
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x4cb70
callq 0x25320
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x4cb88
callq 0x25320
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
jmp 0x4cbd8
movq %rax, %r14
jmp 0x4cbe2
movq %rax, %r14
jmp 0x4cbca
movq %rax, %r14
jmp 0x4cbb8
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4cbb8
callq 0x25320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4cbca
callq 0x25320
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x4cbe2
callq 0x25320
leaq -0x128(%rbp), %rdi
callq 0x346ca
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x4cc06
callq 0x25320
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4cc1b
callq 0x25320
movq %r14, %rdi
callq 0x255f0
nop