// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_expr.cpp
// Function: reviser::javascript::JavaScriptRightValue::Generate[abi:cxx11]()
string JavaScriptRightValue::Generate() {
    if (node->array_type) {
      switch (node->type) {
        case TYPE_ENUM: {
          vector<string> values;
          for (EnumValue* v : node->evs) {
            values.push_back(JavaScriptEnumValue(v).Generate());
          }
          return "[" + JavaScriptCommon::JoinVector(values, ", ") + "]";
        }

        case TYPE_STRUCT:
          return JavaScriptStructValue(node->sv).Generate();

        case TYPE_BOOL:
        case TYPE_FLOAT:
        case TYPE_DOUBLE:
        case TYPE_INT32:
        case TYPE_INT64:
        case TYPE_UINT32:
        case TYPE_UINT64: {
          vector<string> values;
          for (Token* t : node->dvs) {
            values.push_back(t->text);
          }
          return "[" + JavaScriptCommon::JoinVector(values, ", ") + "]";
        }

        case TYPE_STRING: {
          vector<string> values;
          for (Token* t : node->dvs) {
            values.push_back("\"" + t->text + "\"");
          }
          return "[" + JavaScriptCommon::JoinVector(values, ", ") + "]";
        }

        default:
          return "";
      }
    }

    switch (node->type) {
      case TYPE_ENUM:
        return JavaScriptEnumValue(node->ev).Generate();

      case TYPE_STRUCT:
        return JavaScriptStructValue(node->sv).Generate();

      case TYPE_BOOL:
      case TYPE_FLOAT:
      case TYPE_DOUBLE:
      case TYPE_INT32:
      case TYPE_INT64:
      case TYPE_UINT32:
      case TYPE_UINT64:
        return node->id->text;

      case TYPE_STRING:
        return "\"" + node->id->text + "\"";

      default:
        return "";
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %r12
movq 0x8(%rsi), %rax
movl (%rax), %edx
cmpb $0x1, 0x10(%rax)
movl %edx, %ecx
jne 0x4f760
cmpl $0xa, %edx
ja 0x4f85e
leaq 0x92bb(%rip), %rdx      # 0x589e0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq -0x70(%rbp), %r14
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq 0x18(%rax), %rbx
movq 0x20(%rax), %r15
cmpq %r15, %rbx
je 0x4f78e
movq (%rbx), %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x38f8a
addq $0x8, %rbx
jmp 0x4f746
cmpl $0xa, %edx
ja 0x4f85e
leaq 0x9244(%rip), %rdx      # 0x589b4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x8(%rax), %rsi
addq $0x8, %rsi
movq %r12, %rdi
callq 0x35470
jmp 0x4f82f
leaq -0xc8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x41758
leaq 0x9267(%rip), %rsi      # 0x58a0c
leaq -0x120(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x35130
leaq -0x90(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0x4fe2e
leaq 0x7d85(%rip), %rsi      # 0x5755b
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3aa1e
leaq 0x9225(%rip), %rdx      # 0x58a12
leaq -0x50(%rbp), %rsi
movq %r12, %rdi
callq 0x38f1f
leaq -0x50(%rbp), %rdi
callq 0x35180
leaq -0x90(%rbp), %rdi
callq 0x35180
leaq -0x120(%rbp), %rdi
callq 0x35180
leaq -0xc8(%rbp), %rdi
callq 0x38d68
leaq -0x70(%rbp), %rdi
callq 0x38d68
movq %r12, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%rax), %rax
leaq -0x50(%rbp), %rsi
andq $0x0, (%rsi)
movq %rax, 0x8(%rsi)
movq %r12, %rdi
callq 0x4fc70
jmp 0x4f82f
leaq 0x92da(%rip), %rsi      # 0x58b3f
leaq -0x50(%rbp), %rdx
movq %r12, %rdi
callq 0x35130
jmp 0x4f82f
movq %r12, -0x98(%rbp)
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %rcx
movaps %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
movq 0x18(%rax), %rbx
movq 0x20(%rax), %r14
leaq 0x9177(%rip), %r15      # 0x58a0f
leaq -0x90(%rbp), %r12
leaq -0x50(%rbp), %r13
cmpq %r14, %rbx
je 0x4fa49
movq (%rbx), %rdx
addq $0x8, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x3aa1e
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x38f1f
leaq -0x70(%rbp), %rdi
movq %r13, %rsi
callq 0x4fe9c
movq %r13, %rdi
callq 0x35180
movq %r12, %rdi
callq 0x35180
addq $0x8, %rbx
jmp 0x4f8a3
movq 0x50(%rax), %rax
leaq -0x50(%rbp), %rsi
andq $0x0, (%rsi)
movq %rax, 0x8(%rsi)
movq %r12, %rdi
callq 0x4fbfc
jmp 0x4f82f
movq %r12, -0x98(%rbp)
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq 0x30(%rax), %rbx
movq 0x38(%rax), %r13
leaq -0x50(%rbp), %r15
leaq -0x90(%rbp), %r12
cmpq %r13, %rbx
je 0x4f9aa
movq (%rbx), %rax
andq $0x0, -0x90(%rbp)
movq %rax, -0x88(%rbp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4fbfc
movq %r14, %rdi
movq %r15, %rsi
callq 0x4fe9c
movq %r15, %rdi
callq 0x35180
addq $0x8, %rbx
jmp 0x4f935
movq 0x8(%rax), %rdx
addq $0x8, %rdx
leaq 0x9090(%rip), %r14      # 0x58a0f
leaq -0x50(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3aa1e
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x38f1f
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x4f82f
leaq -0xe0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x41758
leaq 0x904b(%rip), %rsi      # 0x58a0c
leaq -0x140(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x35130
movq -0x98(%rbp), %r12
leaq -0x90(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x4fe2e
leaq 0x7b62(%rip), %rsi      # 0x5755b
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3aa1e
leaq 0x9002(%rip), %rdx      # 0x58a12
leaq -0x50(%rbp), %rsi
movq %r12, %rdi
callq 0x38f1f
leaq -0x50(%rbp), %rdi
callq 0x35180
leaq -0x90(%rbp), %rdi
callq 0x35180
leaq -0x140(%rbp), %rdi
callq 0x35180
leaq -0xe0(%rbp), %rdi
jmp 0x4f821
leaq -0xb0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x41758
leaq 0x8fac(%rip), %rsi      # 0x58a0c
leaq -0x100(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x35130
movq -0x98(%rbp), %r12
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x4fe2e
leaq 0x7ac3(%rip), %rsi      # 0x5755b
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3aa1e
leaq 0x8f63(%rip), %rdx      # 0x58a12
leaq -0x50(%rbp), %rsi
movq %r12, %rdi
callq 0x38f1f
leaq -0x50(%rbp), %rdi
callq 0x35180
leaq -0x90(%rbp), %rdi
callq 0x35180
leaq -0x100(%rbp), %rdi
callq 0x35180
leaq -0xb0(%rbp), %rdi
jmp 0x4f821
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x4faf9
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x4fb0a
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x35180
jmp 0x4fb1b
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x4fbb2
jmp 0x4fbe7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x4fb3d
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x4fb4e
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x35180
jmp 0x4fb5f
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
jmp 0x4fbb2
jmp 0x4fbe7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x4fbf3
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x4fb89
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x4fb9a
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x35180
jmp 0x4fbab
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x38d68
jmp 0x4fbea
jmp 0x4fbe7
jmp 0x4fbe7
movq %rax, %rbx
jmp 0x4fbce
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
leaq -0x90(%rbp), %rdi
jmp 0x4fbe0
jmp 0x4fbe7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x4fbea
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x38d68
movq %rbx, %rdi
callq 0x355f0
nop