// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/compiler/javascript/javascript_struct.cpp
// Function: reviser::javascript::JavaScriptStructProperty::Generate[abi:cxx11]()
string JavaScriptStructProperty::Generate() {
    string code_decorater;
    for (Decorater* d: node->decoraters) {
      JavaScriptDecorater decorater(d, parent);
      code_decorater += decorater.Generate();
    }

    vector<string> revisers;
    vector<ReviserSyntaxDefinition> defs = JavaScriptCommon::FindReviserSyntaxDefinitionByDataType(node->declare->type);

    // 如果是数组类型数据，将translator放在TypeArray装饰器中
    if (node->declare->array_type) {
      switch (node->declare->type) {
        case TYPE_BOOL:
        case TYPE_FLOAT:
        case TYPE_DOUBLE:
        case TYPE_INT32:
        case TYPE_INT64:
        case TYPE_UINT32:
        case TYPE_UINT64:
        case TYPE_STRING: {
          vector<string> args;
          for (ReviserSyntaxDefinition d : defs) {
            args.push_back(JavaScriptCommon::DecoraterDefinition(d));
          }
          vector<DecoraterArg> v({{ ARG_ARRAY, args }});
          revisers.push_back(JavaScriptCommon::DecoraterDefinition(ReviserMethodMap[REVISER_TYPE_ARRAY], &v));
          break;
        }

        case TYPE_ENUM:
          break;

        case TYPE_STRUCT: {
          vector<DecoraterArg> v({{ ARG_STRING, vector<string>({ node->declare->type_id->text }) }});
          revisers.push_back(JavaScriptCommon::DecoraterDefinition(ReviserMethodMap[REVISER_TYPE_ARRAY_STRUCT], &v));
          break;
        }

        default:
          break;
      }
    } else {
      switch (node->declare->type) {
        case TYPE_BOOL:
        case TYPE_FLOAT:
        case TYPE_DOUBLE:
        case TYPE_INT32:
        case TYPE_INT64:
        case TYPE_UINT32:
        case TYPE_UINT64:
        case TYPE_STRING: {
          for (int i = defs.size() - 1; i >= 0; i--) {
            revisers.push_back(JavaScriptCommon::DecoraterDefinition(defs.at(i)));
          }
          break;
        }

        case TYPE_ENUM:
          break;

        case TYPE_STRUCT: {
          vector<DecoraterArg> v({{ ARG_STRING, vector<string>({ node->declare->type_id->text }) }});
          revisers.push_back(JavaScriptCommon::DecoraterDefinition(ReviserMethodMap[REVISER_TYPE_STRUCT], &v));
          break;
        }

        default:
          break;
      }
    }

    string indent = JavaScriptCommon::Indent(node->level + 1);
    return (
        revisers.size() > 0
        ? indent + ("@" + JavaScriptCommon::JoinVector(revisers, "\n" + indent + "@") + "\n")
        : ""
      )
      + code_decorater + indent + JavaScriptDeclare(node->declare).Generate() + ";";
 
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp            # imm = 0x358
movq %rdi, -0xd8(%rbp)
leaq -0x188(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsi, -0xb8(%rbp)
movq 0x20(%rsi), %rax
movq 0x30(%rax), %r12
movq 0x38(%rax), %r13
leaq -0x48(%rbp), %rbx
leaq -0x90(%rbp), %r14
leaq -0x198(%rbp), %r15
cmpq %r13, %r12
je 0x52536
movq (%r12), %rax
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movb $0x0, -0x80(%rbp)
movq %rcx, -0x78(%rbp)
movq %rax, -0x70(%rbp)
movq 0x20(%rcx), %rcx
movl 0x98(%rcx), %ecx
incl %ecx
movl %ecx, 0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52e1c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x35670
movq %rbx, %rdi
callq 0x35180
addq $0x8, %r12
jmp 0x524d9
xorps %xmm0, %xmm0
andq $0x0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movq -0xb8(%rbp), %rbx
movq 0x20(%rbx), %rax
movq 0x48(%rax), %rax
movl (%rax), %esi
leaq -0x120(%rbp), %rdi
callq 0x50da6
movq 0x20(%rbx), %rax
movq 0x48(%rax), %rax
movl (%rax), %ecx
cmpb $0x1, 0x4(%rax)
jne 0x5260d
cmpl $0x8, %ecx
jae 0x52759
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq -0x120(%rbp), %r12
movq -0x118(%rbp), %r15
leaq -0x90(%rbp), %r13
leaq -0x378(%rbp), %rbx
leaq -0x48(%rbp), %r14
cmpq %r15, %r12
je 0x52695
movq %r13, %rdi
movq %r12, %rsi
callq 0x406a8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x406a8
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x52fde
leaq -0xb0(%rbp), %rdi
movq %r14, %rsi
callq 0x38f8a
movq %r14, %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x4062c
movq %r13, %rdi
callq 0x4062c
addq $0x40, %r12
jmp 0x525b4
cmpl $0x8, %ecx
jae 0x52833
leaq -0x120(%rbp), %r15
movq 0x8(%r15), %rax
subq (%r15), %rax
shrq $0x6, %rax
movl %eax, %r14d
decq %r14
leaq -0x338(%rbp), %r12
leaq -0x90(%rbp), %r13
leaq -0xd0(%rbp), %rbx
testl %r14d, %r14d
js 0x5291c
movl %r14d, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %r15, %rdi
callq 0x53102
movq %r12, %rdi
movq %rax, %rsi
callq 0x406a8
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x52fde
movq %rbx, %rdi
movq %r13, %rsi
callq 0x38f8a
movq %r13, %rdi
callq 0x35180
movq %r12, %rdi
callq 0x4062c
decq %r14
jmp 0x52643
leaq -0x88(%rbp), %rdi
movl $0x3, -0x8(%rdi)
leaq -0xb0(%rbp), %rsi
callq 0x41758
leaq -0x48(%rbp), %rdi
leaq -0x90(%rbp), %rsi
pushq $0x1
popq %rdx
leaq -0x108(%rbp), %rcx
callq 0x53062
leaq -0x88(%rbp), %rdi
callq 0x38d68
leaq -0x108(%rbp), %rsi
movl $0x1, (%rsi)
leaq 0x1a417(%rip), %rdi     # 0x6cb00
callq 0x50d54
leaq -0x2f8(%rbp), %rdi
movq %rax, %rsi
callq 0x406a8
leaq -0x90(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x52fde
leaq -0xd0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x38f8a
leaq -0x90(%rbp), %rdi
callq 0x35180
leaq -0x2f8(%rbp), %rdi
callq 0x4062c
leaq -0x48(%rbp), %rdi
callq 0x5309c
leaq -0xb0(%rbp), %rdi
callq 0x38d68
jmp 0x5291c
cmpl $0xa, %ecx
jne 0x5291c
movl $0x1, -0x90(%rbp)
movq 0x10(%rax), %rsi
addq $0x8, %rsi
leaq -0x48(%rbp), %rdi
callq 0x35470
leaq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rsi
pushq $0x1
popq %rdx
leaq -0x108(%rbp), %rcx
callq 0x530c8
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
pushq $0x1
popq %rdx
leaq -0x140(%rbp), %rcx
callq 0x53062
leaq -0x88(%rbp), %rdi
callq 0x38d68
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x35180
andl $0x0, (%rbx)
leaq 0x1a32a(%rip), %rdi     # 0x6cb00
leaq -0x48(%rbp), %rsi
callq 0x50d54
leaq -0x2b8(%rbp), %rdi
movq %rax, %rsi
callq 0x406a8
leaq -0x90(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x52fde
leaq -0xd0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x38f8a
leaq -0x90(%rbp), %rdi
callq 0x35180
leaq -0x2b8(%rbp), %rdi
jmp 0x5290b
cmpl $0xa, %ecx
jne 0x5291c
movl $0x1, -0x90(%rbp)
movq 0x10(%rax), %rsi
addq $0x8, %rsi
leaq -0x48(%rbp), %rdi
callq 0x35470
leaq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rsi
pushq $0x1
popq %rdx
leaq -0x108(%rbp), %rcx
callq 0x530c8
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
pushq $0x1
popq %rdx
leaq -0x140(%rbp), %rcx
callq 0x53062
leaq -0x88(%rbp), %rdi
callq 0x38d68
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x35180
movl $0x2, (%rbx)
leaq 0x1a24d(%rip), %rdi     # 0x6cb00
leaq -0x48(%rbp), %rsi
callq 0x50d54
leaq -0x278(%rbp), %rdi
movq %rax, %rsi
callq 0x406a8
leaq -0x90(%rbp), %rdi
leaq -0x278(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x52fde
leaq -0xd0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x38f8a
leaq -0x90(%rbp), %rdi
callq 0x35180
leaq -0x278(%rbp), %rdi
callq 0x4062c
leaq -0xb0(%rbp), %rdi
callq 0x5309c
movq -0xb8(%rbp), %r12
movq 0x20(%r12), %rax
movl 0x8(%rax), %esi
incl %esi
leaq -0x90(%rbp), %rdi
callq 0x4f628
movq -0xd0(%rbp), %r14
movq -0xc8(%rbp), %r15
cmpq %r14, %r15
movq -0xd8(%rbp), %rbx
je 0x52a08
leaq -0x158(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x41758
leaq 0x61cd(%rip), %rsi      # 0x58b3e
leaq -0x1d8(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x3aa1e
leaq 0x6219(%rip), %rdx      # 0x58ba4
leaq -0x1f8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x38f1f
leaq -0x218(%rbp), %rdi
leaq -0x158(%rbp), %rsi
leaq -0x1f8(%rbp), %rdx
callq 0x4fe2e
leaq 0x61e5(%rip), %rsi      # 0x58ba4
leaq -0x238(%rbp), %rdi
leaq -0x218(%rbp), %rdx
callq 0x3aa1e
leaq 0x6165(%rip), %rdx      # 0x58b3e
leaq -0x178(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x38f1f
leaq -0x140(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x178(%rbp), %rdx
callq 0x4f6ac
jmp 0x52a22
leaq 0x6130(%rip), %rsi      # 0x58b3f
leaq -0x140(%rbp), %rdi
leaq -0x178(%rbp), %rdx
callq 0x35130
leaq -0x108(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x198(%rbp), %rdx
callq 0x38ef6
leaq -0xb0(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x38ef6
movq 0x20(%r12), %rax
movq 0x48(%rax), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x4fd80
leaq -0x1b8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x4fd94
leaq -0x48(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x1b8(%rbp), %rdx
callq 0x3a9ad
leaq 0x600d(%rip), %rdx      # 0x58aa9
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x38f1f
leaq -0x48(%rbp), %rdi
callq 0x35180
leaq -0x1b8(%rbp), %rdi
callq 0x35180
leaq -0xe8(%rbp), %rdi
callq 0x4fd8e
leaq -0xb0(%rbp), %rdi
callq 0x35180
leaq -0x108(%rbp), %rdi
callq 0x35180
leaq -0x140(%rbp), %rdi
callq 0x35180
cmpq %r14, %r15
je 0x52b3a
leaq -0x178(%rbp), %rdi
callq 0x35180
leaq -0x238(%rbp), %rdi
callq 0x35180
leaq -0x218(%rbp), %rdi
callq 0x35180
leaq -0x1f8(%rbp), %rdi
callq 0x35180
leaq -0x1d8(%rbp), %rdi
callq 0x35180
leaq -0x158(%rbp), %rdi
callq 0x38d68
leaq -0x90(%rbp), %rdi
callq 0x35180
leaq -0x120(%rbp), %rdi
callq 0x50ede
leaq -0xd0(%rbp), %rdi
callq 0x38d68
leaq -0x198(%rbp), %rdi
callq 0x35180
movq %rbx, %rax
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x52ba4
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x52bb0
movq %rax, %rbx
leaq -0x278(%rbp), %rdi
jmp 0x52bb7
movq %rax, %rbx
leaq -0x2b8(%rbp), %rdi
callq 0x4062c
jmp 0x52bee
jmp 0x52bc0
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x38d68
jmp 0x52bd6
jmp 0x52bd3
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
jmp 0x52d35
jmp 0x52dab
jmp 0x52dab
jmp 0x52beb
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x5309c
jmp 0x52dae
jmp 0x52c6c
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x52c15
movq %rax, %rbx
leaq -0x2f8(%rbp), %rdi
callq 0x4062c
jmp 0x52c77
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x38d68
jmp 0x52d9d
jmp 0x52d48
movq %rax, %rbx
jmp 0x52ce6
movq %rax, %rbx
jmp 0x52cf2
movq %rax, %rbx
jmp 0x52cfe
movq %rax, %rbx
jmp 0x52d0a
movq %rax, %rbx
jmp 0x52d16
movq %rax, %rbx
jmp 0x52d22
movq %rax, %rbx
jmp 0x52d2e
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x5309c
jmp 0x52d9d
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x35180
jmp 0x52c96
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x35180
jmp 0x52ca7
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x4fd8e
jmp 0x52cb8
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x35180
jmp 0x52cc9
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x35180
leaq -0x140(%rbp), %rdi
callq 0x35180
cmpq %r14, %r15
je 0x52d2e
leaq -0x178(%rbp), %rdi
callq 0x35180
leaq -0x238(%rbp), %rdi
callq 0x35180
leaq -0x218(%rbp), %rdi
callq 0x35180
leaq -0x1f8(%rbp), %rdi
callq 0x35180
leaq -0x1d8(%rbp), %rdi
callq 0x35180
leaq -0x158(%rbp), %rdi
callq 0x38d68
leaq -0x90(%rbp), %rdi
callq 0x35180
jmp 0x52dae
movq %rax, %rbx
jmp 0x52cd5
jmp 0x52dab
movq %rax, %rbx
jmp 0x52dba
movq %rax, %rbx
jmp 0x52d9d
movq %rax, %rbx
jmp 0x52d91
movq %rax, %rbx
jmp 0x52d6b
movq %rax, %rbx
jmp 0x52d85
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x35180
leaq -0x338(%rbp), %rdi
callq 0x4062c
jmp 0x52dae
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x35180
leaq -0x378(%rbp), %rdi
callq 0x4062c
leaq -0x90(%rbp), %rdi
callq 0x4062c
leaq -0xb0(%rbp), %rdi
callq 0x38d68
jmp 0x52dae
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x50ede
leaq -0xd0(%rbp), %rdi
callq 0x38d68
jmp 0x52dd9
movq %rax, %rbx
jmp 0x52dd9
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x35180
leaq -0x198(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0
nop