// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x5190
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6073
jmp 0x6321
jmp 0x6075
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x6145
cmpq $0x0, -0x38(%rbp)
jne 0x60e3
movq $0x1, -0x38(%rbp)
movq -0x38(%rbp), %rdi
shlq $0x3, %rdi
callq 0x1130
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x60df
movq 0x18f40(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x38(%rbp), %r8
shlq $0x3, %r8
leaq 0x1254c(%rip), %rsi     # 0x1860e
leaq 0x1279f(%rip), %rdx     # 0x18868
movl $0xfc, %ecx
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x60e1
jmp 0x6143
movq -0x38(%rbp), %rax
shlq %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
shlq $0x3, %rsi
callq 0x1150
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x613f
movq 0x18ee0(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x38(%rbp), %r8
shlq $0x3, %r8
leaq 0x12873(%rip), %rsi     # 0x18995
leaq 0x1273f(%rip), %rdx     # 0x18868
movl $0xfc, %ecx
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x6141
jmp 0x6143
jmp 0x6145
movq -0x40(%rbp), %rdx
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6163
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x22, (%rax)
jne 0x62a3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x31b0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x1fd0
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x5190
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x61b0
jmp 0x62db
jmp 0x61b2
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x6282
cmpq $0x0, -0x38(%rbp)
jne 0x6220
movq $0x1, -0x38(%rbp)
movq -0x38(%rbp), %rdi
shlq $0x3, %rdi
callq 0x1130
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x621c
movq 0x18e03(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x38(%rbp), %r8
shlq $0x3, %r8
leaq 0x1240f(%rip), %rsi     # 0x1860e
leaq 0x12662(%rip), %rdx     # 0x18868
movl $0x107, %ecx            # imm = 0x107
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x621e
jmp 0x6280
movq -0x38(%rbp), %rax
shlq %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
shlq $0x3, %rsi
callq 0x1150
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x627c
movq 0x18da3(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x38(%rbp), %r8
shlq $0x3, %r8
leaq 0x12736(%rip), %rsi     # 0x18995
leaq 0x12602(%rip), %rdx     # 0x18868
movl $0x107, %ecx            # imm = 0x107
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x627e
jmp 0x6280
jmp 0x6282
movq -0x40(%rbp), %rdx
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6163
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rcx
callq 0xd5a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x6332
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x630c
movq -0x28(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x9810
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x62e3
jmp 0x630e
movq -0x28(%rbp), %rdi
callq 0x1030
movq $0x0, -0x28(%rbp)
jmp 0x6321
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)