// File: /workspace/github_c_makefile_star2_O0/masyagin1998[P]GCI/src/parser/parser.c
// Function: multiplicative_expr_ast_read
static enum PARSER_CODES multiplicative_expr_ast_read(struct PARSER*parser, struct MULTIPLICATIVE_EXPR_AST**multiplicative_expr)
{
    enum PARSER_CODES r;

    struct LEFT_UNARY_EXPR_AST**left_unary_exprs = NULL;
    size_t left_unary_exprs_len = 0;
    size_t left_unary_exprs_cap = 0;

    enum AST_MULTIPLICATIVE_OP*ops = NULL;
    size_t ops_len = 0;
    size_t ops_cap = 0;
    
    struct LEFT_UNARY_EXPR_AST*left_unary_expr;

    r = left_unary_expr_ast_read(parser, &left_unary_expr);
    if (r != PARSER_OK) {
        goto err0;
    }

    PUSH_BACK(left_unary_exprs, left_unary_expr);

    while (((parser->tok)->token_type == TOKEN_TYPE_MUL) || ((parser->tok)->token_type == TOKEN_TYPE_DIV) || ((parser->tok)->token_type == TOKEN_TYPE_MOD)) {
        if ((parser->tok)->token_type == TOKEN_TYPE_MUL) {
            PUSH_BACK(ops, AST_MULTIPLICATIVE_OP_MUL);
        } else if ((parser->tok)->token_type == TOKEN_TYPE_DIV) {
            PUSH_BACK(ops, AST_MULTIPLICATIVE_OP_DIV);
        } else if ((parser->tok)->token_type == TOKEN_TYPE_MOD) {
            PUSH_BACK(ops, AST_MULTIPLICATIVE_OP_MOD);
        }
        
        token_free((parser->tok));
        lexer_next_token(parser->lexer, &(parser->tok));

        r = left_unary_expr_ast_read(parser, &left_unary_expr);
        if (r != PARSER_OK) {
            goto err1;
        }

        PUSH_BACK(left_unary_exprs, left_unary_expr);
    }

    (*multiplicative_expr) = create_multiplicative_expr_ast(left_unary_exprs, ops, left_unary_exprs_len,
                                                            (parser->tok)->frag.starting.line,
                                                            (parser->tok)->frag.starting.pos);

    return PARSER_OK;

 err1:
    {
        size_t i;
        for (i = 0; i < ops_len; i++) {
            left_unary_expr_ast_free(left_unary_exprs[i]);
        }
        SAFE_FREE(left_unary_exprs);
    }
    if (ops != NULL) {
        SAFE_FREE(ops);
    }    
 err0:
    (*multiplicative_expr) = NULL;
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x7950
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x732b
jmp 0x7933
jmp 0x732d
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x73fd
cmpq $0x0, -0x38(%rbp)
jne 0x739b
movq $0x1, -0x38(%rbp)
movq -0x38(%rbp), %rdi
shlq $0x3, %rdi
callq 0x1130
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x7397
movq 0x17c88(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x38(%rbp), %r8
shlq $0x3, %r8
leaq 0x11294(%rip), %rsi     # 0x1860e
leaq 0x114e7(%rip), %rdx     # 0x18868
movl $0x277, %ecx            # imm = 0x277
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x7399
jmp 0x73fb
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 0x73f7
movq 0x17c28(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x38(%rbp), %r8
shlq $0x3, %r8
leaq 0x115bb(%rip), %rsi     # 0x18995
leaq 0x11487(%rip), %rdx     # 0x18868
movl $0x277, %ecx            # imm = 0x277
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x73f9
jmp 0x73fb
jmp 0x73fd
movq -0x58(%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 0x741b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movb $0x1, %al
cmpl $0x18, (%rcx)
movb %al, -0x61(%rbp)
je 0x7450
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movb $0x1, %al
cmpl $0x19, (%rcx)
movb %al, -0x61(%rbp)
je 0x7450
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1a, (%rax)
sete %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x745c
jmp 0x7895
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x18, (%rax)
jne 0x755f
jmp 0x746f
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x753f
cmpq $0x0, -0x50(%rbp)
jne 0x74dd
movq $0x1, -0x50(%rbp)
movq -0x50(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1130
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x74d9
movq 0x17b46(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x50(%rbp), %r8
shlq $0x2, %r8
leaq 0x11152(%rip), %rsi     # 0x1860e
leaq 0x113a5(%rip), %rdx     # 0x18868
movl $0x27b, %ecx            # imm = 0x27B
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x74db
jmp 0x753d
movq -0x50(%rbp), %rax
shlq %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq $0x2, %rsi
callq 0x1150
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x7539
movq 0x17ae6(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x50(%rbp), %r8
shlq $0x2, %r8
leaq 0x11479(%rip), %rsi     # 0x18995
leaq 0x11345(%rip), %rdx     # 0x18868
movl $0x27b, %ecx            # imm = 0x27B
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x753b
jmp 0x753d
jmp 0x753f
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x7766
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x19, (%rax)
jne 0x7662
jmp 0x7572
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x7642
cmpq $0x0, -0x50(%rbp)
jne 0x75e0
movq $0x1, -0x50(%rbp)
movq -0x50(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1130
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x75dc
movq 0x17a43(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x50(%rbp), %r8
shlq $0x2, %r8
leaq 0x1104f(%rip), %rsi     # 0x1860e
leaq 0x112a2(%rip), %rdx     # 0x18868
movl $0x27d, %ecx            # imm = 0x27D
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x75de
jmp 0x7640
movq -0x50(%rbp), %rax
shlq %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq $0x2, %rsi
callq 0x1150
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x763c
movq 0x179e3(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x50(%rbp), %r8
shlq $0x2, %r8
leaq 0x11376(%rip), %rsi     # 0x18995
leaq 0x11242(%rip), %rdx     # 0x18868
movl $0x27d, %ecx            # imm = 0x27D
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x763e
jmp 0x7640
jmp 0x7642
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x7764
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1a, (%rax)
jne 0x7762
jmp 0x7675
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x7745
cmpq $0x0, -0x50(%rbp)
jne 0x76e3
movq $0x1, -0x50(%rbp)
movq -0x50(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1130
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x76df
movq 0x17940(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x50(%rbp), %r8
shlq $0x2, %r8
leaq 0x10f4c(%rip), %rsi     # 0x1860e
leaq 0x1119f(%rip), %rdx     # 0x18868
movl $0x27f, %ecx            # imm = 0x27F
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x76e1
jmp 0x7743
movq -0x50(%rbp), %rax
shlq %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq $0x2, %rsi
callq 0x1150
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x773f
movq 0x178e0(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x50(%rbp), %r8
shlq $0x2, %r8
leaq 0x11273(%rip), %rsi     # 0x18995
leaq 0x1113f(%rip), %rdx     # 0x18868
movl $0x27f, %ecx            # imm = 0x27F
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x7741
jmp 0x7743
jmp 0x7745
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movl $0x2, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x7762
jmp 0x7764
jmp 0x7766
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 -0x58(%rbp), %rsi
callq 0x7950
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x77a2
jmp 0x78d1
jmp 0x77a4
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x7874
cmpq $0x0, -0x38(%rbp)
jne 0x7812
movq $0x1, -0x38(%rbp)
movq -0x38(%rbp), %rdi
shlq $0x3, %rdi
callq 0x1130
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x780e
movq 0x17811(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x38(%rbp), %r8
shlq $0x3, %r8
leaq 0x10e1d(%rip), %rsi     # 0x1860e
leaq 0x11070(%rip), %rdx     # 0x18868
movl $0x28a, %ecx            # imm = 0x28A
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x7810
jmp 0x7872
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 0x786e
movq 0x177b1(%rip), %rax     # 0x1eff0
movq (%rax), %rdi
movq -0x38(%rbp), %r8
shlq $0x3, %r8
leaq 0x11144(%rip), %rsi     # 0x18995
leaq 0x11010(%rip), %rdx     # 0x18868
movl $0x28a, %ecx            # imm = 0x28A
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1170
jmp 0x7870
jmp 0x7872
jmp 0x7874
movq -0x58(%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 0x741b
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %r8
callq 0xc770
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7944
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x7902
movq -0x28(%rbp), %rax
movq -0x60(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xca70
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x78d9
jmp 0x7904
movq -0x28(%rbp), %rdi
callq 0x1030
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x7931
jmp 0x791e
movq -0x40(%rbp), %rdi
callq 0x1030
movq $0x0, -0x40(%rbp)
jmp 0x7931
jmp 0x7933
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)