// File: /workspace/github_cpp_makefile_star2_O3/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 -0xa0(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq 0x50(%rsi), %rsi
leaq -0x110(%rbp), %rdi
callq 0x32e54
leaq -0x110(%rbp), %rdi
movq 0x8(%rdi), %r14
movq (%rdi), %r15
callq 0x33446
cmpq %r15, %r14
je 0x4b5ed
leaq 0x58b1(%rip), %rsi      # 0x50ac0
leaq -0xb0(%rbp), %rdi
callq 0x24650
movq %r13, -0x90(%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 0x32e54
movq -0x128(%rbp), %r14
cmpq -0x120(%rbp), %r14
je 0x4b5ad
leaq -0x58(%rbp), %r12
leaq -0x88(%rbp), %r13
leaq -0x48(%rbp), %r15
cmpl $0x1, 0x20(%r14)
jne 0x4b4da
leaq -0x148(%rbp), %rbx
movq %rbx, %rdi
leaq 0x59a9(%rip), %rsi      # 0x50c30
movq %r14, %rdx
callq 0x2b4b3
movq %rbx, %rdi
leaq 0x599e(%rip), %rsi      # 0x50c37
callq 0x24650
leaq -0xc0(%rbp), %rsi
movq %rsi, -0xd0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b2ce
movq %rdx, -0xd0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xc0(%rbp)
jmp 0x4b2d4
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 0x240f0
leaq -0xe0(%rbp), %rsi
movq %rsi, -0xf0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b331
movq %rdx, -0xf0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xe0(%rbp)
jmp 0x4b337
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 0x3ded(%rip), %rsi      # 0x4f14c
callq 0x24650
leaq -0x78(%rbp), %rsi
movq %rsi, -0x88(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b38e
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x4b394
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r13, %rdi
callq 0x240f0
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b3de
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x4b3e4
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 0x5696(%rip), %rsi      # 0x50a9b
callq 0x24650
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b42a
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x4b432
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 0x240f0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4b46b
callq 0x24320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4b47d
callq 0x24320
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4b492
callq 0x24320
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x4b4aa
callq 0x24320
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x4b4c2
callq 0x24320
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x4b4da
callq 0x24320
movq %r13, %rdi
movl $0x1, %esi
callq 0x492b4
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x34543
addq $0x28, %r14
leaq 0x5653(%rip), %rsi      # 0x50b53
cmpq -0x120(%rbp), %r14
je 0x4b510
leaq 0x54ad(%rip), %rsi      # 0x509bd
movq %r15, %rdi
callq 0x24650
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b538
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x4b540
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 -0xb0(%rbp), %rdi
callq 0x240f0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4b579
callq 0x24320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4b58b
callq 0x24320
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4b5a0
callq 0x24320
cmpq -0x120(%rbp), %r14
jne 0x4b26b
movq -0x108(%rbp), %rdx
testq %rdx, %rdx
je 0x4b619
leaq -0x38(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x110(%rbp), %rsi
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x290da
leaq 0x5578(%rip), %rsi      # 0x50b53
leaq -0x48(%rbp), %rdi
callq 0x24650
movq -0x90(%rbp), %r13
jmp 0x4b63b
leaq 0x10(%r13), %rax
movq %rax, (%r13)
movq -0xb0(%rbp), %rcx
cmpq %r12, %rcx
je 0x4b71b
movq %rcx, (%r13)
movq -0xa0(%rbp), %rax
movq %rax, 0x10(%r13)
jmp 0x4b723
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x552c(%rip), %rdx      # 0x50b54
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x29178
movq -0x90(%rbp), %r13
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x240f0
leaq -0x58(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0xa0(%rbp), %r14
je 0x4b67d
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x4b683
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 0x3be7(%rip), %rsi      # 0x4f28c
callq 0x24650
leaq 0x10(%r13), %rcx
movq %rcx, (%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x290da
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4b6d2
callq 0x24320
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b6e4
callq 0x24320
leaq -0x128(%rbp), %rdi
callq 0x33446
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x4b708
callq 0x24320
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x4b72e
callq 0x24320
jmp 0x4b72e
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq -0xa8(%rbp), %rax
movq %rax, 0x8(%r13)
movq %r13, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4b830
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
jne 0x4b872
jmp 0x4b877
jmp 0x4b830
movq %rax, %r14
jmp 0x4b78a
movq %rax, %r14
jmp 0x4b883
jmp 0x4b771
movq %rax, %r14
jmp 0x4b89b
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4b78a
callq 0x24320
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x4b86d
movq %rax, %r14
jmp 0x4b820
movq %rax, %r14
jmp 0x4b7f0
movq %rax, %r14
jmp 0x4b7c9
jmp 0x4b830
movq %rax, %r14
jmp 0x4b808
movq %rax, %r14
jmp 0x4b7db
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4b7c9
callq 0x24320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4b7db
callq 0x24320
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4b7f0
callq 0x24320
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x4b808
callq 0x24320
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x4b820
callq 0x24320
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
jmp 0x4b86d
movq %rax, %r14
jmp 0x4b877
movq %rax, %r14
jmp 0x4b862
movq %rax, %r14
jmp 0x4b850
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4b850
callq 0x24320
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4b862
callq 0x24320
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4b877
callq 0x24320
leaq -0x128(%rbp), %rdi
callq 0x33446
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x4b89b
callq 0x24320
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x4b8b3
callq 0x24320
movq %r14, %rdi
callq 0x245f0
nop