// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_generator.cpp
// Function: reviser::javascript::JavaScriptGenerator::Generate[abi:cxx11]()
string JavaScriptGenerator::Generate() {
    string block_separetor = "\n\n";
    string code(
      "//\n"
      "// language: JavaScript\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 0x8112(%rip), %rsi      # 0x58b3d
leaq -0xc0(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0x35130
leaq 0x8070(%rip), %rsi      # 0x58ab5
leaq -0xa0(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x35130
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x5002c
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 0x50b63
movl (%r13), %eax
movq 0x8(%r13), %rsi
testl %eax, %eax
je 0x50b11
cmpl $0x1, %eax
jne 0x50b5a
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 0x50b4a
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 0x50ab9
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x5078a
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 0x50bec
jmp 0x50bfc
jmp 0x50c0c
jmp 0x50bec
jmp 0x50bfc
jmp 0x50c0c
movq %rax, %rbx
jmp 0x50c1b
jmp 0x50bec
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x35180
jmp 0x50bff
jmp 0x50bfc
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x35180
jmp 0x50c0f
jmp 0x50c0c
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x35180
leaq -0xc0(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop