// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: assignment_expr_ast_read
static enum PARSER_CODES assignment_expr_ast_read(struct PARSER*parser, struct ASSIGNMENT_EXPR_AST**assignment_expr)
{
    enum PARSER_CODES r;

    switch ((parser->tok)->token_type) {
    case TOKEN_TYPE_LBRACE: {
        struct OBJECT_LITERAL_AST*object_literal;
        r = object_literal_ast_read(parser, &object_literal);
        if (r != PARSER_OK) {
            goto err0;
        }
        (*assignment_expr) = create_assignment_expr_ast(object_literal, AST_ASSIGNMENT_EXPR_TYPE_OBJECT_LITERAL);
        break;
    }
    case TOKEN_TYPE_LBRACKET: {
        struct ARRAY_LITERAL_AST*array_literal;
        r = array_literal_ast_read(parser, &array_literal);
        if (r != PARSER_OK) {
            goto err0;
        }
        (*assignment_expr) = create_assignment_expr_ast(array_literal, AST_ASSIGNMENT_EXPR_TYPE_ARRAY_LITERAL);
        break;
    }
    default: {
        struct LOGICAL_OR_EXPR_AST*logical_or_expr;
        r = logical_or_expr_ast_read(parser, &logical_or_expr);
        if (r != PARSER_OK) {
            goto err0;
        }
        (*assignment_expr) = create_assignment_expr_ast(logical_or_expr, AST_ASSIGNMENT_EXPR_TYPE_LOGICAL_OR_EXPR);
        break;
    }
    }

    return PARSER_OK;

 err0:
    (*assignment_expr) = NULL;
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %r14
leaq 0x8(%rdi), %r13
movq 0x8(%rdi), %rdi
movl (%rdi), %eax
cmpl $0x1e, %eax
je 0x40d3
cmpl $0x20, %eax
jne 0x411e
movq %r12, 0x8(%rsp)
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r12d, %r12d
callq 0x297c
movq (%r14), %rdi
movq %r13, %rsi
callq 0x1c9f
movq 0x8(%r14), %rdi
cmpl $0x21, (%rdi)
je 0x4192
movq %r14, %rdi
movq %rsp, %rsi
callq 0x332c
testl %eax, %eax
jne 0x41d1
movq (%r13), %rdi
cmpl $0x25, (%rdi)
jne 0x41dc
callq 0x297c
movq (%r14), %rdi
movq %r13, %rsi
callq 0x1c9f
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3f90
testl %eax, %eax
jne 0x41f2
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
movq (%r13), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
callq 0x6f1d
movq %rax, %rbx
cmpq %r12, %rbp
jne 0x4096
testq %rbp, %rbp
je 0x407e
movq %rbp, %r12
shlq $0x4, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1160
testq %rax, %rax
je 0x423c
movq %rax, %r15
leaq (,%rbp,2), %r12
jmp 0x4096
pushq $0x8
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x425e
movq %rax, %r15
pushq $0x1
popq %r12
movq %rbx, (%r15,%rbp,8)
incq %rbp
movq (%r13), %rdi
movl (%rdi), %eax
cmpl $0x22, %eax
je 0x3fcd
cmpl $0x21, %eax
movq 0x8(%rsp), %r12
je 0x4197
pushq $0x1
popq %rsi
pushq $0x22
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3273
pushq $-0x1
popq %r14
jmp 0x4208
andq $0x0, (%rsp)
callq 0x297c
movq (%r14), %rdi
movq %r13, %rsi
callq 0x1c9f
movq 0x8(%r14), %rdi
cmpl $0x1f, (%rdi)
jne 0x4135
callq 0x297c
movq (%r14), %rdi
movq %r13, %rsi
callq 0x1c9f
movq (%rsp), %rdi
movq 0x8(%r14), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x70f6
pushq $0x1
popq %rsi
movq %rax, %rdi
jmp 0x4155
movq %rsp, %rsi
movq %r14, %rdi
callq 0x464d
testl %eax, %eax
je 0x414e
movl %eax, %r14d
jmp 0x4225
movq %rsp, %rsi
movq %r14, %rdi
callq 0x44ae
movl %eax, %ebx
testl %eax, %eax
je 0x4166
movl %ebx, %r14d
jmp 0x4225
movq (%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x6cdb
movq %rax, (%r12)
xorl %r14d, %r14d
jmp 0x422a
movq (%r13), %rdi
cmpl $0x1f, (%rdi)
je 0x40f1
pushq $0x1
popq %rsi
pushq $0x1f
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3273
movq (%rsp), %rdi
pushq $-0x1
popq %rbx
testq %rdi, %rdi
je 0x4146
callq 0x7281
jmp 0x4146
movq 0x8(%rsp), %r12
callq 0x297c
movq (%r14), %rdi
movq %r13, %rsi
callq 0x1c9f
movq 0x8(%r14), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6def
xorl %r14d, %r14d
movq %rax, %rdi
xorl %esi, %esi
callq 0x6cdb
movq %rax, (%r12)
jmp 0x422a
movq 0x8(%rsp), %r12
pushq $-0x1
popq %r14
jmp 0x4203
pushq $0x1
popq %rsi
pushq $0x25
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3273
pushq $-0x1
popq %r14
jmp 0x41f5
movl %eax, %r14d
movq (%rsp), %rdi
callq 0x588a
movq 0x8(%rsp), %r12
testq %r15, %r15
je 0x4225
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x421d
movq (%r15,%rbx,8), %rdi
callq 0x6eff
incq %rbx
jmp 0x420a
movq %r15, %rdi
callq 0x1030
andq $0x0, (%r12)
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x11dad(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0xa6a4(%rip), %rsi      # 0xe8f1
leaq 0xa570(%rip), %rdx      # 0xe7c4
movl $0x3d2, %ecx            # imm = 0x3D2
movq %r12, %r8
jmp 0x427f
movq 0x11d8b(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0xa34f(%rip), %rsi      # 0xe5be
leaq 0xa54e(%rip), %rdx      # 0xe7c4
pushq $0x8
popq %r8
movl $0x3d2, %ecx            # imm = 0x3D2
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180