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

        case TYPE_STRUCT:
          return TypeScriptStructValue(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 "[" + TypeScriptCommon::JoinVector(values, ", ") + "]";
        }

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

        default:
          return "";
      }
    }

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

      case TYPE_STRUCT:
        return TypeScriptStructValue(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 0x53c44
cmpl $0xa, %edx
ja 0x53d42
leaq 0x4fcf(%rip), %rdx      # 0x58bd8
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 0x53c72
movq (%rbx), %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x38f8a
addq $0x8, %rbx
jmp 0x53c2a
cmpl $0xa, %edx
ja 0x53d42
leaq 0x4f58(%rip), %rdx      # 0x58bac
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x8(%rax), %rsi
addq $0x8, %rsi
movq %r12, %rdi
callq 0x35470
jmp 0x53d13
leaq -0xc8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x41758
leaq 0x4d83(%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 0x5449c
leaq 0x38a1(%rip), %rsi      # 0x5755b
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3aa1e
leaq 0x4d41(%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 0x54154
jmp 0x53d13
leaq 0x4df6(%rip), %rsi      # 0x58b3f
leaq -0x50(%rbp), %rdx
movq %r12, %rdi
callq 0x35130
jmp 0x53d13
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 0x4c93(%rip), %r15      # 0x58a0f
leaq -0x90(%rbp), %r12
leaq -0x50(%rbp), %r13
cmpq %r14, %rbx
je 0x53f2d
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 0x53d87
movq 0x50(%rax), %rax
leaq -0x50(%rbp), %rsi
andq $0x0, (%rsi)
movq %rax, 0x8(%rsi)
movq %r12, %rdi
callq 0x540e0
jmp 0x53d13
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 0x53e8e
movq (%rbx), %rax
andq $0x0, -0x90(%rbp)
movq %rax, -0x88(%rbp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x540e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x4fe9c
movq %r15, %rdi
callq 0x35180
addq $0x8, %rbx
jmp 0x53e19
movq 0x8(%rax), %rdx
addq $0x8, %rdx
leaq 0x4bac(%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 0x53d13
leaq -0xe0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x41758
leaq 0x4b67(%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 0x5449c
leaq 0x367e(%rip), %rsi      # 0x5755b
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3aa1e
leaq 0x4b1e(%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 0x53d05
leaq -0xb0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x41758
leaq 0x4ac8(%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 0x5449c
leaq 0x35df(%rip), %rsi      # 0x5755b
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3aa1e
leaq 0x4a7f(%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 0x53d05
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x53fdd
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x53fee
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x35180
jmp 0x53fff
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x54096
jmp 0x540cb
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x54021
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x54032
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x35180
jmp 0x54043
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
jmp 0x54096
jmp 0x540cb
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x540d7
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x5406d
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x5407e
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x35180
jmp 0x5408f
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x38d68
jmp 0x540ce
jmp 0x540cb
jmp 0x540cb
movq %rax, %rbx
jmp 0x540b2
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
leaq -0x90(%rbp), %rdi
jmp 0x540c4
jmp 0x540cb
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35180
jmp 0x540ce
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x38d68
movq %rbx, %rdi
callq 0x355f0
nop