// File: /workspace/github_cpp_makefile_star2_O2/CoinXu[P]reviser-compiler/src/parser.cpp
// Function: reviser::compiler::Parser::ConsumeStructDeclare()
Declare* Parser::ConsumeStructDeclare() {
    Token* sid = CloneToken(tokenizer->Previous());
    // struct type id
    if (!generator->descriptor->FindStructContextVariableById(sid->text)) {
      RuntimeError("undefined struct [" + sid->text + "] in current scope");
    }

    Expect(TOKEN_ID);
    Token* id = CloneToken(token);
    StructValue* sv;

    // struct only allow null to default value
    if (Accept(TOKEN_ASSIGN)) {
      Expect(TOKEN_DATA_TYPE);
      sv = new StructValue(sid, CloneToken(token));
      if (token.text != ReservedWordMap[RESERVED_NULL]) {
        RuntimeError("struct only allow null to default value");
      }
    } else {
      sv = new StructValue(sid, nullptr);
    }

    generator->descriptor->AddDataTypesOnce(TYPE_STRUCT);
    RightValue* rv = new RightValue(sv);
    Declare* declare = new Declare(TYPE_STRUCT, id, sid, rv);
    return declare;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x3da46
movq %rax, %rsi
callq 0x3b480
movq %rax, %rbx
movq 0x8(%r14), %rax
movq 0x50(%rax), %r12
leaq 0x8(%rbx), %r15
leaq -0xa8(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x35470
movq %r12, %rdi
movq %r13, %rsi
callq 0x413de
movq %rax, %r12
leaq -0xa8(%rbp), %rdi
callq 0x35180
testq %r12, %r12
jne 0x3c5e3
leaq 0x1b0fe(%rip), %rsi     # 0x57696
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x3aa1e
leaq 0x1b0fb(%rip), %rdx     # 0x576a9
leaq -0x88(%rbp), %rdi
movq %r12, %rsi
callq 0x38f1f
leaq -0x88(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3b4e8
leaq -0x88(%rbp), %rdi
callq 0x35180
leaq -0x48(%rbp), %rdi
callq 0x35180
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x3b58a
leaq 0x10(%r14), %r13
movq %r13, %rsi
callq 0x3b480
movq %rax, %r15
pushq $0x3d
popq %rsi
movq %r14, %rdi
callq 0x3ada2
testb %al, %al
je 0x3c691
movq %r14, %rdi
xorl %esi, %esi
callq 0x3b58a
pushq $0x10
popq %rdi
callq 0x35330
movq %rax, %r12
movq %r13, %rsi
callq 0x3b480
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3f296
leaq 0x18(%r14), %r13
leaq -0x48(%rbp), %rsi
movl $0xc, (%rsi)
leaq 0x302b0(%rip), %rdi     # 0x6c900
callq 0x39c9c
movq %r13, %rdi
movq %rax, %rsi
callq 0x3cdf7
testb %al, %al
je 0x3c6a9
leaq 0x1b051(%rip), %rsi     # 0x576bc
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x35130
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3b4e8
leaq -0x68(%rbp), %rdi
callq 0x35180
jmp 0x3c6a9
pushq $0x10
popq %rdi
callq 0x35330
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3f296
movq 0x8(%r14), %rax
movq 0x50(%rax), %rdi
pushq $0xa
popq %rsi
callq 0x415b6
pushq $0x58
popq %rdi
callq 0x35330
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3f22e
pushq $0x20
popq %rdi
callq 0x35330
movq %rax, %r12
pushq $0xa
popq %rsi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x3f2ec
movq %r12, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
jmp 0x3c753
movq %rax, %rbx
jmp 0x3c758
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x35180
jmp 0x3c72a
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
jmp 0x3c753
jmp 0x3c73c
jmp 0x3c73c
movq %rax, %rbx
movq %r14, %rdi
jmp 0x3c742
movq %rax, %rbx
movq %r12, %rdi
callq 0x35310
jmp 0x3c758
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x35180
movq %rbx, %rdi
callq 0x355f0