// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/typescript/typescript_generator.cpp
// Function: reviser::typescript::TypeScriptGenerator::Generate[abi:cxx11]()
string TypeScriptGenerator::Generate() {
    string block_separetor = "\n\n";
    string code(
      "//\n"
      "// language: TypeScript\n"
      "// generated by reviser-comiper\n"
      "// do not change this file\n"
      "// see https://github.com/CoinXu/reviser-compiler\n\n\n"
    );
    code += Import() + block_separetor;

    for (StmtSeqItem it: seq) {
      switch(it.type) {
        case STMT_TYPE_STRUCT:
          code += StmtStruct(structures.at(it.index)) + block_separetor;
          break;

        case STMT_TYPE_ENUM:
          code += StmtEnum(enums.at(it.index)) + block_separetor;
          break;

        default:
          break;
      }
    }

    return code + Export() + block_separetor;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x37de(%rip), %rsi      # 0x58b3d
leaq -0xc0(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0x35130
leaq 0x38b0(%rip), %rsi      # 0x58c29
leaq -0xa0(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x35130
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x5473c
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x38ef6
movq %rbx, -0x70(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x35670
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x35180
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x35180
movq 0x8(%r14), %r13
movq 0x10(%r14), %rbx
leaq 0x38(%r14), %rax
movq %rax, -0x80(%rbp)
leaq 0x20(%r14), %rax
movq %rax, -0x78(%rbp)
cmpq %rbx, %r13
je 0x55497
movl (%r13), %eax
movq 0x8(%r13), %rsi
testl %eax, %eax
je 0x55445
cmpl $0x1, %eax
jne 0x5548e
movq -0x78(%rbp), %rdi
callq 0x400ba
movq (%rax), %rdx
movq (%r14), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *(%rax)
movq %r15, %rdi
movq %r12, %rsi
leaq -0xc0(%rbp), %rdx
callq 0x38ef6
leaq -0xa0(%rbp), %rdi
movq %r15, %rsi
callq 0x35670
jmp 0x5547e
movq -0x80(%rbp), %rdi
callq 0x400dc
movq (%rax), %rdx
movq (%r14), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *0x8(%rax)
movq %r15, %rdi
movq %r12, %rsi
leaq -0xc0(%rbp), %rdx
callq 0x38ef6
leaq -0xa0(%rbp), %rdi
movq %r15, %rsi
callq 0x35670
movq %r15, %rdi
callq 0x35180
movq %r12, %rdi
callq 0x35180
addq $0x10, %r13
jmp 0x553ed
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x54e9a
leaq -0x48(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x4f6ac
movq -0x70(%rbp), %rbx
leaq -0x48(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
movq %rbx, %rdi
callq 0x38ef6
leaq -0x48(%rbp), %rdi
callq 0x35180
leaq -0x68(%rbp), %rdi
callq 0x35180
leaq -0xa0(%rbp), %rdi
callq 0x35180
leaq -0xc0(%rbp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x55520
jmp 0x55530
jmp 0x55540
jmp 0x55520
jmp 0x55530
jmp 0x55540
movq %rax, %rbx
jmp 0x5554f
jmp 0x55520
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x35180
jmp 0x55533
jmp 0x55530
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x35180
jmp 0x55543
jmp 0x55540
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x35180
leaq -0xc0(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop