// File: 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
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x1d0(%rbp)
movq %rdi, %rax
movq %rax, -0x1c8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x99650
movq -0x1c0(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %esi
leaq -0xb0(%rbp), %rdi
callq 0xeb9c0
jmp 0xeb3c4
leaq 0x15647(%rip), %rdx     # 0x100a12
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xaaee0
jmp 0xeb3e0
movq -0x1c0(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x30(%rax), %rdx
addq $0x8, %rdx
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa1070
jmp 0xeb405
leaq 0x1560b(%rip), %rdx     # 0x100a17
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xa10c0
jmp 0xeb41b
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x99590
leaq -0x50(%rbp), %rdi
callq 0x992c0
leaq -0x70(%rbp), %rdi
callq 0x992c0
leaq -0x90(%rbp), %rdi
callq 0x992c0
leaq -0xb0(%rbp), %rdi
callq 0x992c0
movq -0x1c0(%rbp), %rax
movq $0x0, -0xc8(%rbp)
movq 0x20(%rax), %rdi
addq $0x38, %rdi
callq 0xad910
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
movq %rcx, -0xd0(%rbp)
movq 0x20(%rax), %rax
addq $0x38, %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
callq 0xad7c0
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdi
callq 0xad650
movq %rax, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xbd930
testb $0x1, %al
jne 0xeb4d3
jmp 0xeb6ad
leaq -0xe0(%rbp), %rdi
callq 0xbd970
movq -0x1c0(%rbp), %rdx
movq (%rax), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0xeb920
jmp 0xeb505
movq -0xc8(%rbp), %rax
incq %rax
movq %rax, -0xc8(%rbp)
movl -0xc8(%rbp), %edx
leaq -0x178(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xeb790
jmp 0xeb531
leaq -0x158(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x178(%rbp), %rdx
callq 0xeba70
jmp 0xeb54a
movq -0xc8(%rbp), %rax
movq -0xd0(%rbp), %rcx
subq %rcx, %rax
leaq 0x1564c(%rip), %rax     # 0x100bae
leaq 0x154b4(%rip), %rdx     # 0x100a1d
cmovaeq %rax, %rdx
leaq -0x138(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0xa10c0
jmp 0xeb582
leaq -0x30(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x99590
leaq -0x138(%rbp), %rdi
callq 0x992c0
leaq -0x158(%rbp), %rdi
callq 0x992c0
leaq -0x178(%rbp), %rdi
callq 0x992c0
leaq -0x118(%rbp), %rdi
callq 0xeb970
leaq -0xe0(%rbp), %rdi
callq 0xbd990
jmp 0xeb4b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xeb76d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xeb639
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xeb62d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x992c0
leaq -0x90(%rbp), %rdi
callq 0x992c0
leaq -0xb0(%rbp), %rdi
callq 0x992c0
jmp 0xeb76d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xeb69c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xeb690
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x992c0
leaq -0x178(%rbp), %rdi
callq 0x992c0
leaq -0x118(%rbp), %rdi
callq 0xeb970
jmp 0xeb76d
movq -0x1c0(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %esi
leaq -0x1b8(%rbp), %rdi
callq 0xeb9c0
jmp 0xeb6c9
leaq -0x198(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x1b8(%rbp), %rdx
callq 0xc25f0
jmp 0xeb6e2
movq -0x1d0(%rbp), %rdi
leaq 0x15330(%rip), %rdx     # 0x100a20
leaq -0x198(%rbp), %rsi
callq 0xa10c0
jmp 0xeb6fe
leaq -0x198(%rbp), %rdi
callq 0x992c0
leaq -0x1b8(%rbp), %rdi
callq 0x992c0
leaq -0x30(%rbp), %rdi
callq 0x992c0
movq -0x1c8(%rbp), %rax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xeb761
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x992c0
leaq -0x1b8(%rbp), %rdi
callq 0x992c0
leaq -0x30(%rbp), %rdi
callq 0x992c0
movq -0xb8(%rbp), %rdi
callq 0x99840
nopw %cs:(%rax,%rax)