// File: /workspace/github_cpp_makefile_star2_O2/Eronana[P]strawberry/src/ast_codegen.cpp
// Function: AST_AssignmentExpression::codeGen(Symbol*)
DEF_AST_METHOD(AssignmentExpression,AST_CODEGEN)
{
    bool isIdentifier=is_identifier(expr);
    if(isIdentifier&&GET_LITERAL(assignOptr).type==TOKEN_ASSIGN)
    {
        CODEGEN(assignExpr);
        storeVariant(symbol,expr);
        return;
    }
    CODEGEN(assignExpr);
    CODEGEN(expr);
    if(GET_LITERAL(assignOptr).type!=TOKEN_ASSIGN)PRINTF("swap\n");
    switch(GET_LITERAL(assignOptr).type)
    {
        case TOKEN_ASSIGN:
            PRINTF("pop\n");
            break;
        case TOKEN_MUL_ASSIGN:
            PRINTF("mul\n");
            break;
        case TOKEN_DIV_ASSIGN:
            PRINTF("div\n");
            break;
        case TOKEN_MOD_ASSIGN:
            PRINTF("mod\n");
            break;
        case TOKEN_ADD_ASSIGN:
            PRINTF("add\n");
            break;
        case TOKEN_SUB_ASSIGN:
            PRINTF("sub\n");
            break;
        case TOKEN_LEFT_SHIFT_ASSIGN:
            PRINTF("shl\n");
            break;
        case TOKEN_RIGHT_SHIFT_ASSIGN:
            PRINTF("shr\n");
            break;
        case TOKEN_BITWISE_AND_ASSIGN:
            PRINTF("and\n");
            break;
        case TOKEN_BITWISE_XOR_ASSIGN:
            PRINTF("xor\n");
            break;
        case TOKEN_BITWISE_OR_ASSIGN:
            PRINTF("or\n");
            break;
        default:
            break;
    }
    if(isIdentifier)storeVariant(symbol,expr);
    else PRINTF("object_reset\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x1a0ca
movl %eax, %ebp
testb %al, %al
je 0x1af91
movq 0x10(%r15), %rax
cmpl $0x20, 0x8(%rax)
jne 0x1af91
movq 0x18(%r15), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x18(%rax)
jmp 0x1afe0
movq 0x18(%r15), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x18(%rax)
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x18(%rax)
movq 0x10(%r15), %rax
cmpl $0x20, 0x8(%rax)
jne 0x1aff3
incl 0x14b85(%rip)           # 0x2fb40
leaq 0x14856(%rip), %rax     # 0x2f818
movq (%rax), %rcx
leaq 0x35eb(%rip), %rdi      # 0x1e5b7
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x64c0
testb %bpl, %bpl
je 0x1b060
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1bf9d
incl 0x14b47(%rip)           # 0x2fb40
leaq 0x14818(%rip), %r12     # 0x2f818
movq (%r12), %rcx
leaq 0x35fa(%rip), %rdi      # 0x1e605
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0x64c0
movq 0x10(%r15), %rax
movl 0x8(%rax), %eax
leal -0x3(%rax), %ecx
cmpl $0x9, %ecx
jbe 0x1b08a
cmpl $0x15, %eax
je 0x1b160
cmpl $0x18, %eax
je 0x1b108
cmpl $0x1b, %eax
je 0x1b11e
cmpl $0x25, %eax
je 0x1b134
cmpl $0x21, %eax
je 0x1b14a
cmpl $0x20, %eax
je 0x1afb5
jmp 0x1afd7
incl 0x14ada(%rip)           # 0x2fb40
leaq 0x147ab(%rip), %rax     # 0x2f818
movq (%rax), %rcx
leaq 0x35aa(%rip), %rdi      # 0x1e621
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x64c0
leaq 0x3487(%rip), %rax      # 0x1e518
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
incl 0x14aa0(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x35d0(%rip), %rdi      # 0x1e67b
jmp 0x1afcc
incl 0x14a8a(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x35bf(%rip), %rdi      # 0x1e680
jmp 0x1afcc
incl 0x14a74(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x359a(%rip), %rdi      # 0x1e671
jmp 0x1afcc
incl 0x14a5e(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x357f(%rip), %rdi      # 0x1e66c
jmp 0x1afcc
incl 0x14a48(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x3573(%rip), %rdi      # 0x1e676
jmp 0x1afcc
incl 0x14a32(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x356d(%rip), %rdi      # 0x1e686
jmp 0x1afcc
incl 0x14a1c(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x355c(%rip), %rdi      # 0x1e68b
jmp 0x1afcc
incl 0x14a06(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x3550(%rip), %rdi      # 0x1e695
jmp 0x1afcc
incl 0x149f0(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x353f(%rip), %rdi      # 0x1e69a
jmp 0x1afcc
incl 0x149da(%rip)           # 0x2fb40
movq (%r12), %rcx
leaq 0x3520(%rip), %rdi      # 0x1e691
pushq $0x3
jmp 0x1afce