// File: 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
subq $0x390, %rsp            # imm = 0x390
movq %rdi, -0x328(%rbp)
movq %rdi, %rax
movq %rax, -0x320(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x318(%rbp)
movq 0x8(%rax), %rax
testb $0x1, 0x10(%rax)
je 0xf8cf7
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
movq %rax, -0x330(%rbp)
subq $0xa, %rax
ja 0xf8c97
movq -0x330(%rbp), %rax
leaq 0x875f(%rip), %rcx      # 0x100c48
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x28(%rbp), %rdi
callq 0xa0c50
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x30, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xeca20
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0xeca50
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xeca80
testb $0x1, %al
jne 0xf853e
jmp 0xf85e3
leaq -0x38(%rbp), %rdi
callq 0xecac0
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0xf90c0
jmp 0xf855d
leaq -0x68(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xf8f10
jmp 0xf856c
leaq -0x28(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xecae0
jmp 0xf857b
leaq -0x68(%rbp), %rdi
callq 0x992c0
leaq -0x78(%rbp), %rdi
callq 0xf90f0
leaq -0x38(%rbp), %rdi
callq 0xecb10
jmp 0xf8528
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf8740
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf85d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x992c0
leaq -0x78(%rbp), %rdi
callq 0xf90f0
jmp 0xf8740
leaq -0xe0(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xbd9b0
jmp 0xf85f5
leaq -0x101(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x99850
movq -0x338(%rbp), %rdx
leaq 0x8466(%rip), %rsi      # 0x100a7c
leaq -0x100(%rbp), %rdi
callq 0x99640
jmp 0xf8624
leaq -0xc8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0xf95b0
jmp 0xf8640
leaq 0x6ec4(%rip), %rsi      # 0xff50b
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rdx
callq 0xa6e30
jmp 0xf865c
movq -0x328(%rbp), %rdi
leaq 0x8418(%rip), %rdx      # 0x100a82
leaq -0xa8(%rbp), %rsi
callq 0xa10c0
jmp 0xf8678
leaq -0xa8(%rbp), %rdi
callq 0x992c0
leaq -0xc8(%rbp), %rdi
callq 0x992c0
leaq -0x100(%rbp), %rdi
callq 0x992c0
leaq -0x101(%rbp), %rdi
callq 0x994f0
leaq -0xe0(%rbp), %rdi
callq 0xa0c70
leaq -0x28(%rbp), %rdi
callq 0xa0c70
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf8728
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf871c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf8710
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x992c0
leaq -0xc8(%rbp), %rdi
callq 0x992c0
leaq -0x100(%rbp), %rdi
callq 0x992c0
leaq -0x101(%rbp), %rdi
callq 0x994f0
leaq -0xe0(%rbp), %rdi
callq 0xa0c70
leaq -0x28(%rbp), %rdi
callq 0xa0c70
jmp 0xf8f05
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rsi
leaq -0x118(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0xf9080
movq -0x328(%rbp), %rdi
movq -0x340(%rbp), %rsi
callq 0xf8fb0
jmp 0xf8785
leaq -0x118(%rbp), %rdi
callq 0xf90b0
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xf90b0
jmp 0xf8f05
leaq -0x130(%rbp), %rdi
callq 0xa0c50
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x18, %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
callq 0xeccb0
movq %rax, -0x140(%rbp)
movq -0x138(%rbp), %rdi
callq 0xecce0
movq %rax, -0x148(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xecd10
testb $0x1, %al
jne 0xf8817
jmp 0xf886a
leaq -0x140(%rbp), %rdi
callq 0xecd50
movq (%rax), %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rsi
addq $0x8, %rsi
leaq -0x130(%rbp), %rdi
callq 0xa1220
jmp 0xf8846
jmp 0xf8848
leaq -0x140(%rbp), %rdi
callq 0xecd70
jmp 0xf87fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf89cd
leaq -0x1a8(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xbd9b0
jmp 0xf887f
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x348(%rbp)
callq 0x99850
movq -0x348(%rbp), %rdx
leaq 0x81dc(%rip), %rsi      # 0x100a7c
leaq -0x1c8(%rbp), %rdi
callq 0x99640
jmp 0xf88ae
leaq -0x190(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
callq 0xf95b0
jmp 0xf88ca
leaq 0x6c3a(%rip), %rsi      # 0xff50b
leaq -0x170(%rbp), %rdi
leaq -0x190(%rbp), %rdx
callq 0xa6e30
jmp 0xf88e6
movq -0x328(%rbp), %rdi
leaq 0x818e(%rip), %rdx      # 0x100a82
leaq -0x170(%rbp), %rsi
callq 0xa10c0
jmp 0xf8902
leaq -0x170(%rbp), %rdi
callq 0x992c0
leaq -0x190(%rbp), %rdi
callq 0x992c0
leaq -0x1c8(%rbp), %rdi
callq 0x992c0
leaq -0x1c9(%rbp), %rdi
callq 0x994f0
leaq -0x1a8(%rbp), %rdi
callq 0xa0c70
leaq -0x130(%rbp), %rdi
callq 0xa0c70
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf89b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf89a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf899d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x992c0
leaq -0x190(%rbp), %rdi
callq 0x992c0
leaq -0x1c8(%rbp), %rdi
callq 0x992c0
leaq -0x1c9(%rbp), %rdi
callq 0x994f0
leaq -0x1a8(%rbp), %rdi
callq 0xa0c70
leaq -0x130(%rbp), %rdi
callq 0xa0c70
jmp 0xf8f05
leaq -0x1e8(%rbp), %rdi
callq 0xa0c50
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x18, %rax
movq %rax, -0x1f0(%rbp)
movq -0x1f0(%rbp), %rdi
callq 0xeccb0
movq %rax, -0x1f8(%rbp)
movq -0x1f0(%rbp), %rdi
callq 0xecce0
movq %rax, -0x200(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0xecd10
testb $0x1, %al
jne 0xf8a42
jmp 0xf8b23
leaq -0x1f8(%rbp), %rdi
callq 0xecd50
movq (%rax), %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rdx
addq $0x8, %rdx
leaq 0x8015(%rip), %rsi      # 0x100a7f
leaq -0x248(%rbp), %rdi
callq 0xa6e30
jmp 0xf8a78
leaq 0x8000(%rip), %rdx      # 0x100a7f
leaq -0x228(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0xa10c0
jmp 0xf8a94
leaq -0x1e8(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0xecae0
jmp 0xf8aa9
leaq -0x228(%rbp), %rdi
callq 0x992c0
leaq -0x248(%rbp), %rdi
callq 0x992c0
leaq -0x1f8(%rbp), %rdi
callq 0xecd70
jmp 0xf8a26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf8c86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf8b12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x992c0
leaq -0x248(%rbp), %rdi
callq 0x992c0
jmp 0xf8c86
leaq -0x2a0(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0xbd9b0
jmp 0xf8b38
leaq -0x2c1(%rbp), %rdi
movq %rdi, -0x350(%rbp)
callq 0x99850
movq -0x350(%rbp), %rdx
leaq 0x7f23(%rip), %rsi      # 0x100a7c
leaq -0x2c0(%rbp), %rdi
callq 0x99640
jmp 0xf8b67
leaq -0x288(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
leaq -0x2c0(%rbp), %rdx
callq 0xf95b0
jmp 0xf8b83
leaq 0x6981(%rip), %rsi      # 0xff50b
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rdx
callq 0xa6e30
jmp 0xf8b9f
movq -0x328(%rbp), %rdi
leaq 0x7ed5(%rip), %rdx      # 0x100a82
leaq -0x268(%rbp), %rsi
callq 0xa10c0
jmp 0xf8bbb
leaq -0x268(%rbp), %rdi
callq 0x992c0
leaq -0x288(%rbp), %rdi
callq 0x992c0
leaq -0x2c0(%rbp), %rdi
callq 0x992c0
leaq -0x2c1(%rbp), %rdi
callq 0x994f0
leaq -0x2a0(%rbp), %rdi
callq 0xa0c70
leaq -0x1e8(%rbp), %rdi
callq 0xa0c70
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf8c6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf8c62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0xf8c56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x992c0
leaq -0x288(%rbp), %rdi
callq 0x992c0
leaq -0x2c0(%rbp), %rdi
callq 0x992c0
leaq -0x2c1(%rbp), %rdi
callq 0x994f0
leaq -0x2a0(%rbp), %rdi
callq 0xa0c70
leaq -0x1e8(%rbp), %rdi
callq 0xa0c70
jmp 0xf8f05
leaq -0x2c2(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0x99850
movq -0x328(%rbp), %rdi
movq -0x358(%rbp), %rdx
leaq 0x7ef0(%rip), %rsi      # 0x100baf
callq 0x99640
jmp 0xf8cc6
leaq -0x2c2(%rbp), %rdi
callq 0x994f0
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x2c2(%rbp), %rdi
callq 0x994f0
jmp 0xf8f05
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
movq %rax, -0x360(%rbp)
subq $0xa, %rax
ja 0xf8e9b
movq -0x360(%rbp), %rax
leaq 0x7ef9(%rip), %rcx      # 0x100c1c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x50(%rax), %rsi
leaq -0x2d8(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0xf90c0
movq -0x328(%rbp), %rdi
movq -0x368(%rbp), %rsi
callq 0xf8f10
jmp 0xf8d63
leaq -0x2d8(%rbp), %rdi
callq 0xf90f0
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0xf90f0
jmp 0xf8f05
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rsi
leaq -0x2e8(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0xf9080
movq -0x328(%rbp), %rdi
movq -0x370(%rbp), %rsi
callq 0xf8fb0
jmp 0xf8dcb
leaq -0x2e8(%rbp), %rdi
callq 0xf90b0
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0xf90b0
jmp 0xf8f05
movq -0x328(%rbp), %rdi
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
addq $0x8, %rsi
callq 0x991c0
jmp 0xf8ef5
movq -0x318(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdx
addq $0x8, %rdx
leaq 0x7c45(%rip), %rsi      # 0x100a7f
movq %rsi, -0x378(%rbp)
leaq -0x308(%rbp), %rdi
movq %rdi, -0x380(%rbp)
callq 0xa6e30
movq -0x328(%rbp), %rdi
movq -0x380(%rbp), %rsi
movq -0x378(%rbp), %rdx
callq 0xa10c0
jmp 0xf8e70
leaq -0x308(%rbp), %rdi
callq 0x992c0
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x308(%rbp), %rdi
callq 0x992c0
jmp 0xf8f05
leaq -0x309(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x99850
movq -0x328(%rbp), %rdi
movq -0x388(%rbp), %rdx
leaq 0x7cec(%rip), %rsi      # 0x100baf
callq 0x99640
jmp 0xf8eca
leaq -0x309(%rbp), %rdi
callq 0x994f0
jmp 0xf8ef5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x309(%rbp), %rdi
callq 0x994f0
jmp 0xf8f05
movq -0x320(%rbp), %rax
addq $0x390, %rsp            # imm = 0x390
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x99840
nop