// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_enum.cpp
// Function: reviser::javascript::JavaScriptEnum::Generate[abi:cxx11]()
string JavaScriptEnum::Generate() {
    string code;

    code = JavaScriptCommon::Indent(node->level)
      + "var " + node->id->text + " = {\n";

    size_t counter = 0;
    size_t total = node->properties.size();

    for (EnumProperty* p: node->properties) {
      JavaScriptEnumProperty property(p, this);
      counter++;
      code  = code + property.Generate(counter) + (counter >= total ? "\n" : ",\n");
    }

    return code + JavaScriptCommon::Indent(node->level) + "};";
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
leaq -0xa8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb $0x0, (%rax)
movq %rsi, -0x30(%rbp)
movq 0x20(%rsi), %rax
movl 0x8(%rax), %esi
leaq -0xd8(%rbp), %rdi
callq 0x4f628
leaq 0x9708(%rip), %rdx      # 0x589a2
leaq -0xf8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x3ccf9
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x30(%rax), %rdx
addq $0x8, %rdx
leaq -0x98(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x38ef6
movq %rbx, -0x68(%rbp)
leaq 0x96cc(%rip), %rdx      # 0x589a7
leaq -0x60(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x38f1f
leaq -0xb8(%rbp), %rdi
leaq -0x60(%rbp), %rbx
movq %rbx, %rsi
callq 0x35400
movq %rbx, %rdi
callq 0x35180
leaq -0x98(%rbp), %r13
movq %r13, %rdi
callq 0x35180
leaq -0xf8(%rbp), %rbx
movq %rbx, %rdi
callq 0x35180
leaq -0xd8(%rbp), %r12
movq %r12, %rdi
callq 0x35180
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x38(%rax), %r14
movq 0x40(%rax), %rax
movq %rax, -0x78(%rbp)
subq %r14, %rax
sarq $0x3, %rax
movq %rax, -0x70(%rbp)
pushq $0x1
popq %r15
cmpq -0x78(%rbp), %r14
je 0x4f3fb
movq (%r14), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movb $0x0, -0x50(%rbp)
movq -0x30(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq %rax, -0x40(%rbp)
movq 0x20(%rcx), %rcx
movl 0x8(%rcx), %ecx
incl %ecx
movl %ecx, 0x8(%rax)
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
movl %r15d, %edx
callq 0x4f4e2
movq %rbx, %rdi
leaq -0xb8(%rbp), %rsi
movq %r12, %rdx
callq 0x4f6ac
cmpq -0x70(%rbp), %r15
leaq 0x978c(%rip), %rdx      # 0x58b3e
leaq 0x95f4(%rip), %rax      # 0x589ad
cmovbq %rax, %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x38f1f
leaq -0xb8(%rbp), %rdi
movq %r13, %rsi
callq 0x35400
movq %r13, %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x35180
movq %r12, %rdi
callq 0x35180
addq $0x8, %r14
incq %r15
jmp 0x4f356
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %esi
leaq -0x98(%rbp), %rdi
callq 0x4f628
leaq -0x60(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x42892
movq -0x68(%rbp), %rbx
leaq 0x957c(%rip), %rdx      # 0x589b0
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x38f1f
leaq -0x60(%rbp), %rdi
callq 0x35180
leaq -0x98(%rbp), %rdi
callq 0x35180
leaq -0xb8(%rbp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x35180
jmp 0x4f487
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
jmp 0x4f4c9
jmp 0x4f4a9
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x35180
jmp 0x4f4b6
jmp 0x4f4b3
jmp 0x4f4ae
jmp 0x4f4a9
movq %rax, %rbx
jmp 0x4f4ce
movq %rax, %rbx
jmp 0x4f4c2
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x35180
leaq -0xd8(%rbp), %rdi
callq 0x35180
leaq -0xb8(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0