// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: args_list_ast_read
static enum PARSER_CODES args_list_ast_read(struct PARSER*parser, struct ARGS_LIST_AST**args_list)
{
    enum PARSER_CODES r;
    struct ASSIGNMENT_EXPR_AST**assignment_exprs = NULL;
    size_t assignment_exprs_len = 0;
    size_t assignment_exprs_cap = 0;

    struct ASSIGNMENT_EXPR_AST*assignment_expr;

    r = assignment_expr_ast_read(parser, &assignment_expr);
    if (r != PARSER_OK) {
        goto err0;
    }
    
    PUSH_BACK(assignment_exprs, assignment_expr);    
    
    while ((parser->tok)->token_type == TOKEN_TYPE_COMMA) {
        token_free((parser->tok));
        lexer_next_token(parser->lexer, &(parser->tok));

        r = assignment_expr_ast_read(parser, &assignment_expr);
        if (r != PARSER_OK) {
            goto err1;
        }
        
        PUSH_BACK(assignment_exprs, assignment_expr);    
    }

    (*args_list) = create_args_list_ast(assignment_exprs, assignment_exprs_len,
                                        (parser->tok)->frag.starting.line,
                                        (parser->tok)->frag.starting.pos);

    return PARSER_OK;

 err1:
    {
        size_t i;
        for (i = 0; i < assignment_exprs_len; i++) {
            assignment_expr_ast_free(assignment_exprs[i]);
        }
        SAFE_FREE(assignment_exprs);
    }
 err0:
    (*args_list) = NULL;
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
callq 0x3f90
testl %eax, %eax
je 0x44d9
movl %eax, %ebx
xorl %eax, %eax
jmp 0x45c4
movq %r14, 0x10(%rsp)
pushq $0x8
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x461d
movq %rax, %r14
leaq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%r14)
leaq 0x8(%r15), %rbp
pushq $0x1
popq %r13
movq %r13, %r12
movq (%rbp), %rdi
cmpl $0x22, (%rdi)
jne 0x4586
callq 0x297c
movq (%r15), %rdi
movq %rbp, %rsi
callq 0x1c9f
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x3f90
testl %eax, %eax
jne 0x459d
cmpq %r13, %r12
jne 0x4578
testq %r12, %r12
je 0x4560
movq %r12, %rbx
shlq $0x4, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1160
testq %rax, %rax
je 0x45d8
movq %rax, %r14
leaq (%r12,%r12), %r13
jmp 0x4578
pushq $0x8
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x45fa
movq %rax, %r14
pushq $0x1
popq %r13
movq 0x8(%rsp), %rax
movq %rax, (%r14,%r12,8)
incq %r12
jmp 0x4508
movq 0x18(%rdi), %rdx
movq 0x20(%rdi), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0x83c8
xorl %ebx, %ebx
jmp 0x45bf
movl %eax, %ebx
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x45b5
movq (%r14,%r15,8), %rdi
callq 0x5ef7
incq %r15
jmp 0x45a2
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
movq 0x10(%rsp), %r14
movq %rax, (%r14)
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x11a11(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0xa308(%rip), %rsi      # 0xe8f1
leaq 0xa1d4(%rip), %rdx      # 0xe7c4
movl $0x107, %ecx            # imm = 0x107
movq %rbx, %r8
jmp 0x463e
movq 0x119ef(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x9fb3(%rip), %rsi      # 0xe5be
leaq 0xa1b2(%rip), %rdx      # 0xe7c4
pushq $0x8
popq %r8
movl $0x107, %ecx            # imm = 0x107
jmp 0x463e
movq 0x119cc(%rip), %rax     # 0x15ff0
movq (%rax), %rdi
leaq 0x9f90(%rip), %rsi      # 0xe5be
leaq 0xa18f(%rip), %rdx      # 0xe7c4
pushq $0x8
popq %r8
movl $0xfc, %ecx
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180