// File: /workspace/github_cpp_makefile_star2_O2/Eronana[P]strawberry/src/ast_codegen.cpp
// Function: AST_FunctionExpression::codeGen(Symbol*)
DEF_AST_METHOD(FunctionExpression,AST_CODEGEN)
{
    auto symbol_bak=symbol;
    GET_SCOPE();
    int funcLabel=nextLabel();
    FunctionInfo func;
    functionStack.push(&func);
    FILE *bak=AST::fp;
    FILE *tmp_fp=AST::fp=tmpfile();
    func_tmpfile.push_back(tmp_fp);
    PRINTF("; function expression\n");
    PRINTF("label_%d:\n",funcLabel);
    auto localCount=symbol->localCount;
    if(localCount)PRINTF("addsp %d\n",symbol->localCount);
    CODEGEN(block);
    PRINTF("push null\n");
    PRINTF("ret\n");
    // if(localCount)PRINTF("subsp %d\n",symbol->localCount);
    functionStack.pop();
    AST::fp=bak;
    this_count++;
    PRINTF("new_array\n");
    for(auto &x:func.ext_list)
    {
        variantMethod(symbol_bak,x,"load");
        PRINTF("array_push\n");
    }
    PRINTF("create_function label_%d\n",funcLabel);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
leaq 0x20(%rsp), %r14
movq %rdi, (%r14)
leaq 0x13ae7(%rip), %rdi     # 0x2f698
movq %r14, %rsi
callq 0xed1e
movq (%rax), %r12
callq 0xc83c
leaq 0x28(%rsp), %rcx
andl $0x0, (%rcx)
andq $0x0, 0x8(%rcx)
movl %eax, 0xc(%rsp)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rcx)
movups %xmm0, 0x30(%rcx)
leaq 0x18(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x13bc4(%rip), %rdi     # 0x2f7b8
callq 0x1c36a
leaq 0x13c18(%rip), %rbx     # 0x2f818
movq (%rbx), %r14
callq 0x6350
movq %rax, (%rbx)
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x13f2e(%rip), %rdi     # 0x2fb48
callq 0x1bfb6
incl 0x13f1b(%rip)           # 0x2fb40
movq (%rbx), %rcx
leaq 0x2b80(%rip), %rdi      # 0x1e7af
pushq $0x16
popq %rsi
pushq $0x1
popq %rdx
callq 0x64c0
incl 0x13f00(%rip)           # 0x2fb40
movq (%rbx), %rdi
leaq 0x2a6c(%rip), %rsi      # 0x1e6b6
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x6390
movl 0x3c(%r12), %edx
testl %edx, %edx
je 0x1bc75
incl 0x13edc(%rip)           # 0x2fb40
movq (%rbx), %rdi
leaq 0x2b58(%rip), %rsi      # 0x1e7c6
xorl %eax, %eax
callq 0x6390
movq 0x10(%r15), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x18(%rax)
incl 0x13eb8(%rip)           # 0x2fb40
leaq 0x13b89(%rip), %rbx     # 0x2f818
movq (%rbx), %rcx
leaq 0x2b37(%rip), %rdi      # 0x1e7d0
pushq $0xa
popq %r12
pushq $0x1
popq %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0x64c0
incl 0x13e8e(%rip)           # 0x2fb40
movq (%rbx), %rcx
leaq 0x2b1f(%rip), %rdi      # 0x1e7db
pushq $0x4
popq %rsi
movq %r15, %rdx
callq 0x64c0
leaq 0x13aea(%rip), %rdi     # 0x2f7b8
callq 0x1c70e
leaq 0x13b32(%rip), %rax     # 0x2f80c
incl (%rax)
movq %r14, (%rbx)
incl 0x13e5b(%rip)           # 0x2fb40
leaq 0x2885(%rip), %rdi      # 0x1e571
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x64c0
movq 0x50(%rsp), %r14
movq 0x58(%rsp), %rbx
leaq 0x2ad5(%rip), %r12      # 0x1e7e0
leaq 0x2876(%rip), %r13      # 0x1e588
pushq $0xb
popq %rbp
cmpq %rbx, %r14
je 0x1bd4e
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x19fc0
incl 0x13e10(%rip)           # 0x2fb40
leaq 0x13ae1(%rip), %rax     # 0x2f818
movq (%rax), %rcx
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x64c0
addq $0x20, %r14
jmp 0x1bd15
incl 0x13dec(%rip)           # 0x2fb40
leaq 0x13abd(%rip), %rax     # 0x2f818
movq (%rax), %rdi
leaq 0x2a80(%rip), %rsi      # 0x1e7e5
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x6390
leaq 0x20(%rsp), %rdi
callq 0x1bfd4
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1bd8f
jmp 0x1bd8f
jmp 0x1bd8f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1bfd4
movq %rbx, %rdi
callq 0x6460