// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/typescript/typescript_expr.cpp
// Function: reviser::typescript::TypeScriptDeclare::Generate[abi:cxx11]()
string TypeScriptDeclare::Generate() {
    string type;
    string value;

    switch (node->type) {
      case TYPE_ENUM:
      case TYPE_STRUCT:
        type = node->type_id->text;
        break;

      case TYPE_BOOL:
      case TYPE_FLOAT:
      case TYPE_DOUBLE:
      case TYPE_INT32:
      case TYPE_INT64:
      case TYPE_UINT32:
      case TYPE_UINT64:
      case TYPE_STRING:
        type = TypeScriptBuildInDataTypeMap[node->type];
        break;

      default:
        type = "any";
    }

    if (node->array_type) {
      type = type + "[]";
    }

    return "public "
      + node->id->text
      + ": " + type + " = "
      + TypeScriptRightValue(node->rv).Generate();
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r14
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
xorl %ecx, %ecx
movb %cl, (%rax)
leaq -0xe8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movq 0x8(%rsi), %rsi
movl (%rsi), %eax
cmpl $0x8, %eax
jae 0x542cd
leaq 0x18b15(%rip), %rdi     # 0x6cdd8
callq 0x5450a
movq %rax, %rsi
jmp 0x542e1
addl $-0x9, %eax
cmpl $0x1, %eax
ja 0x54413
movq 0x10(%rsi), %rsi
addq $0x8, %rsi
leaq -0x38(%rbp), %rdi
callq 0x35200
movq 0x8(%r14), %rax
cmpb $0x1, 0x4(%rax)
jne 0x54324
leaq 0x4716(%rip), %rdx      # 0x58a11
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3ccf9
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r15
movq %r15, %rsi
callq 0x35400
movq %r15, %rdi
callq 0x35180
movq 0x8(%r14), %rax
movq 0x8(%rax), %rdx
addq $0x8, %rdx
leaq 0x48d6(%rip), %rsi      # 0x58c09
leaq -0x98(%rbp), %rdi
callq 0x3aa1e
leaq 0x2f57(%rip), %rdx      # 0x5729d
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x38f1f
leaq -0xd8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x38ef6
leaq 0x469d(%rip), %rdx      # 0x58a14
leaq -0x58(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x38f1f
movq 0x8(%r14), %rax
movq 0x18(%rax), %rax
leaq -0x108(%rbp), %rsi
andq $0x0, (%rsi)
movq %rax, 0x8(%rsi)
leaq -0x78(%rbp), %rdi
callq 0x53bd4
leaq -0x58(%rbp), %rsi
leaq -0x78(%rbp), %rdx
movq %rbx, %rdi
callq 0x3a9ad
leaq -0x78(%rbp), %rdi
callq 0x35180
leaq -0x58(%rbp), %rdi
callq 0x35180
leaq -0xd8(%rbp), %rdi
callq 0x35180
leaq -0xb8(%rbp), %rdi
callq 0x35180
leaq -0x98(%rbp), %rdi
callq 0x35180
leaq -0xf8(%rbp), %rdi
callq 0x35180
leaq -0x38(%rbp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x47eb(%rip), %rsi      # 0x58c05
leaq -0x38(%rbp), %rdi
callq 0x35650
jmp 0x542ea
jmp 0x5447b
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x35180
jmp 0x5443b
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x35180
jmp 0x54449
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x35180
jmp 0x5445a
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x35180
jmp 0x5446b
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x35180
jmp 0x5447e
jmp 0x5447b
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x35180
leaq -0x38(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop