// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
movq %rsi, %r13
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %rdi
movl (%rdi), %eax
cmpl $0x1e, %eax
je 0x6d23
cmpl $0x20, %eax
jne 0x6d5d
movq %r13, 0x18(%rsp)
callq 0x53b0
movq (%r14), %rdi
movq %r15, %rsi
callq 0x45b5
movq $0x0, 0x10(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq (%r15), %rax
cmpl $0x21, (%rax)
je 0x6df5
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0x5cbc
testl %eax, %eax
je 0x6bcb
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x6c3a
movq (%r15), %rdi
cmpl $0x25, (%rdi)
jne 0x6c17
callq 0x53b0
movq (%r14), %rdi
movq %r15, %rsi
callq 0x45b5
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
callq 0x6b48
movl %eax, %ebx
testl %eax, %eax
jne 0x6c30
movq 0x8(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq (%r15), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
callq 0x9942
movq %rax, %rbp
xorl %ebx, %ebx
jmp 0x6c3c
movl $0x1, %esi
movq %r14, %rdi
movl $0x25, %edx
xorl %eax, %eax
callq 0x5bec
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rdi
callq 0x841c
xorl %ebp, %ebp
movl $0x5, %r13d
testl %ebx, %ebx
je 0x6c54
testl %r13d, %r13d
je 0x6ba7
jmp 0x6d79
movq 0x20(%rsp), %rcx
cmpq %rcx, %r12
jne 0x6cbe
testq %rcx, %rcx
je 0x6ca1
movq %r15, %r14
movq %r12, %r15
movq %rcx, %r12
movq %rcx, %rbx
shlq $0x4, %rbx
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1160
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x6eb2
addq %r12, %r12
movq %r12, %rcx
movq %r15, %r12
movq %r14, %r15
movq 0x28(%rsp), %r14
jmp 0x6cbe
movl $0x8, %edi
callq 0x1130
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x6eba
movl $0x1, %ecx
movq 0x10(%rsp), %rax
movq %rbp, (%rax,%r12,8)
incq %r12
movq (%r15), %rdi
movl (%rdi), %eax
cmpl $0x21, %eax
movq %rcx, 0x20(%rsp)
je 0x6cf8
cmpl $0x22, %eax
jne 0x6d05
callq 0x53b0
movq (%r14), %rdi
movq %r15, %rsi
callq 0x45b5
xorl %ebx, %ebx
xorl %r13d, %r13d
jmp 0x6c46
movl $0x4, %r13d
xorl %ebx, %ebx
jmp 0x6c46
movl $0x1, %esi
movq %r14, %rdi
movl $0x22, %edx
xorl %eax, %eax
callq 0x5bec
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x6c46
movq $0x0, 0x8(%rsp)
callq 0x53b0
movq (%r14), %rdi
movq %r15, %rsi
callq 0x45b5
movq 0x8(%r14), %rax
cmpl $0x1f, (%rax)
je 0x6dc0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x70dd
testl %eax, %eax
je 0x6dc0
movl %eax, %ebx
jmp 0x6e62
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x723e
testl %eax, %eax
je 0x6e2b
movl %eax, %ebx
jmp 0x6e87
cmpl $0x1, %r13d
je 0x6e7e
cmpl $0x5, %r13d
jne 0x6df5
movq 0x10(%rsp), %r15
testq %r15, %r15
movq 0x18(%rsp), %r13
je 0x6db9
testq %r12, %r12
je 0x6db1
xorl %r14d, %r14d
movq (%r15,%r14,8), %rdi
callq 0x9924
incq %r14
cmpq %r14, %r12
jne 0x6da0
movq %r15, %rdi
callq 0x1030
xorl %eax, %eax
jmp 0x6e83
movq (%r15), %rdi
cmpl $0x1f, (%rdi)
jne 0x6e37
callq 0x53b0
movq (%r14), %rdi
movq %r15, %rsi
callq 0x45b5
movq 0x8(%rsp), %rdi
movq 0x8(%r14), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x9b1d
movq %rax, %r15
xorl %ebx, %ebx
jmp 0x6e65
movq 0x18(%rsp), %r13
movq 0x8(%r14), %rdi
callq 0x53b0
movq (%r14), %rdi
movq %r15, %rsi
callq 0x45b5
movq 0x8(%r14), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x9834
xorl %ebx, %ebx
jmp 0x6e83
movq 0x8(%rsp), %rdi
movl $0x2, %esi
jmp 0x6e71
xorl %r15d, %r15d
movl $0x1, %esi
movq %r14, %rdi
movl $0x1f, %edx
xorl %eax, %eax
callq 0x5bec
movq 0x8(%rsp), %rdi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x6e65
callq 0x9c8c
xorl %r15d, %r15d
testl %ebx, %ebx
jne 0x6e87
movq %r15, %rdi
movl $0x1, %esi
callq 0x976a
movq %rax, (%r13)
xorl %ebx, %ebx
jmp 0x6e8f
movq 0x18(%rsp), %r13
testl %ebx, %ebx
je 0x6ea0
movq $0x0, (%r13)
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
callq 0x976a
movq %rax, (%r13)
jmp 0x6e8f
movq %rbx, %rdi
callq 0x17ce
callq 0x17fe