// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, %r15
leaq 0x8(%rdi), %r13
movq 0x8(%rdi), %rdi
movl (%rdi), %eax
cmpl $0x1e, %eax
je 0x6a84
cmpl $0x20, %eax
jne 0x6ad6
callq 0x53ac
movq (%r15), %rdi
movq %r13, %rsi
callq 0x45d6
movq 0x8(%r15), %rdi
xorl %ebp, %ebp
cmpl $0x21, (%rdi)
movl $0x0, %ebx
movl $0x0, %r12d
je 0x6b6e
xorl %r14d, %r14d
xorl %eax, %eax
movq $0x0, 0x8(%rsp)
movq %rax, %r12
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x5c5f
testl %eax, %eax
jne 0x6bac
movq (%r13), %rdi
cmpl $0x25, (%rdi)
jne 0x6bb3
callq 0x53ac
movq (%r15), %rdi
movq %r13, %rsi
callq 0x45d6
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6917
testl %eax, %eax
jne 0x6bce
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq (%r13), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
callq 0x959d
movq %rax, %rbx
movq %r14, %rcx
cmpq %r14, %r12
jne 0x6a42
testq %rcx, %rcx
je 0x6a25
movq %rcx, %r14
shlq $0x4, %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rcx, %rbp
callq 0x1160
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x6c44
addq %rbp, %rbp
movq %rbp, %rcx
xorl %ebp, %ebp
jmp 0x6a42
movl $0x8, %edi
callq 0x1130
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x6c4c
movl $0x1, %ecx
movq 0x8(%rsp), %rax
movq %rbx, (%rax,%r12,8)
movq (%r13), %rdi
movl (%rdi), %eax
cmpl $0x22, %eax
jne 0x6b5d
movq %rcx, %r14
callq 0x53ac
movq (%r15), %rdi
movq %r13, %rsi
callq 0x45d6
movq 0x8(%r15), %rdi
leaq 0x1(%r12), %rax
cmpl $0x21, (%rdi)
jne 0x6981
jmp 0x6b66
movq $0x0, 0x10(%rsp)
callq 0x53ac
movq (%r15), %rdi
movq %r13, %rsi
callq 0x45d6
movq 0x8(%r15), %rdi
cmpl $0x1f, (%rdi)
jne 0x6aee
callq 0x53ac
movq (%r15), %rdi
movq %r13, %rsi
callq 0x45d6
movq 0x10(%rsp), %rdi
movq 0x8(%r15), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x9778
movq %rax, %rdi
movl $0x1, %esi
jmp 0x6b49
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x6fc5
testl %eax, %eax
je 0x6b3f
movl %eax, %ebp
jmp 0x6c27
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x6e64
movl %eax, %ebp
testl %eax, %eax
jne 0x6c27
movq (%r13), %rdi
cmpl $0x1f, (%rdi)
je 0x6aa6
movl $0x1, %esi
movq %r15, %rdi
movl $0x1f, %edx
xorl %eax, %eax
callq 0x5b97
movq 0x10(%rsp), %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x6c27
callq 0x98e7
jmp 0x6c27
movq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x93cc
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
xorl %ebp, %ebp
jmp 0x6c33
cmpl $0x21, %eax
jne 0x6be6
incq %r12
movq 0x8(%rsp), %rbx
callq 0x53ac
movq (%r15), %rdi
movq %r13, %rsi
callq 0x45d6
movq 0x8(%r15), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x948f
movq %rax, %rdi
xorl %esi, %esi
callq 0x93cc
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
jmp 0x6c33
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x6bda
movl $0x1, %esi
movq %r15, %rdi
movl $0x25, %edx
xorl %eax, %eax
callq 0x5b97
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x6bd0
movl %eax, %ebp
movq 0x10(%rsp), %rdi
callq 0x809d
movq 0x8(%rsp), %r15
testq %r15, %r15
jne 0x6c07
jmp 0x6c27
movl $0x1, %esi
movq %r15, %rdi
movl $0x22, %edx
xorl %eax, %eax
callq 0x5b97
incq %r12
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %r15
testq %r12, %r12
je 0x6c1f
xorl %ebx, %ebx
movq (%r15,%rbx,8), %rdi
callq 0x957f
incq %rbx
cmpq %rbx, %r12
jne 0x6c0e
movq %r15, %rdi
callq 0x1030
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x17ec
callq 0x181c