// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/parser/parser.c
// Function: left_unary_expr_ast_read
static enum PARSER_CODES left_unary_expr_ast_read(struct PARSER*parser, struct LEFT_UNARY_EXPR_AST**left_unary_expr)
{
    enum PARSER_CODES r;

    enum AST_LEFT_UNARY_OP op = AST_LEFT_UNARY_OP_PLUS;

    struct PRIMARY_EXPR_AST*primary_expr;
    
    if ((parser->tok)->token_type == TOKEN_TYPE_PLUS) {
        op = AST_LEFT_UNARY_OP_PLUS;
        token_free((parser->tok));
        lexer_next_token(parser->lexer, &(parser->tok));
    } else if ((parser->tok)->token_type == TOKEN_TYPE_MINUS) {
        op = AST_LEFT_UNARY_OP_MINUS;
        token_free((parser->tok));
        lexer_next_token(parser->lexer, &(parser->tok));
    }

    r = primary_expr_ast_read(parser, &primary_expr);
    if (r != PARSER_OK) {
        goto err0;
    }

    (*left_unary_expr) = create_left_unary_expr_ast(op, primary_expr,
                                                    (parser->tok)->frag.starting.line,
                                                    (parser->tok)->frag.starting.pos);

    return PARSER_OK;

 err0:
    (*left_unary_expr) = NULL;
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rdi), %r14
movq 0x8(%rdi), %rdi
movl (%rdi), %eax
xorl %ebp, %ebp
cmpl $0x16, %eax
je 0x51fe
cmpl $0x17, %eax
jne 0x520e
pushq $0x1
popq %rbp
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
movq (%r14), %rdi
movl (%rdi), %eax
cmpl $0x9, %eax
je 0x53fb
cmpl $0xa, %eax
je 0x5298
cmpl $0x1d, %eax
je 0x5397
cmpl $0x1b, %eax
je 0x5347
cmpl $0xc, %eax
jne 0x53cd
leaq 0x58(%rdi), %rax
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
movq %rax, %rdi
callq 0x843b
movq %rax, %r13
movq 0x8(%r15), %rdi
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
movq 0x8(%r15), %rax
cmpl $0x1b, (%rax)
jne 0x54f8
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x3cd3
testl %eax, %eax
jne 0x550c
movq 0x8(%rsp), %rdi
pushq $0x2
jmp 0x5534
movq 0x18(%rdi), %r13
movq 0x20(%rdi), %r12
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
movq 0x8(%r15), %rdi
cmpl $0x1b, (%rdi)
jne 0x54e2
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x332c
testl %eax, %eax
jne 0x54f2
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq 0x8(%rsp), %r13
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x3db4
movl %eax, %r12d
testl %eax, %eax
jne 0x550f
movq (%r14), %rdi
cmpl $0x1c, (%rdi)
jne 0x556a
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x816a
pushq $0x1
popq %rsi
movq %rax, %rdi
jmp 0x5535
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x464d
movl %eax, %r12d
testl %eax, %eax
jne 0x5517
movq (%r14), %rdi
cmpl $0x1c, (%rdi)
jne 0x551c
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
movq 0x8(%rsp), %rdi
pushq $0x5
jmp 0x5534
movq 0x58(%rdi), %rax
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
movq %rax, %rdi
callq 0x84f9
movq %rax, %r12
movq 0x8(%r15), %rdi
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
pushq $0x4
popq %rsi
movq %r12, %rdi
jmp 0x5535
movl $0x9, (%rsp)
xorl %r14d, %r14d
pushq $0x5
popq %rsi
pushq $0xc
popq %rdx
pushq $0x1d
popq %rcx
pushq $0x1b
popq %r8
pushq $0xa
popq %r9
movq %r15, %rdi
xorl %eax, %eax
callq 0x3273
pushq $-0x1
popq %r12
jmp 0x5555
movq 0x18(%rdi), %r12
movq 0x20(%rdi), %r13
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
movq 0x8(%r15), %rdi
cmpl $0x1b, (%rdi)
jne 0x54e2
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x332c
testl %eax, %eax
jne 0x54f2
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x3db4
movl %eax, %r12d
testl %eax, %eax
jne 0x55a3
andq $0x0, 0x10(%rsp)
movq (%r14), %rdi
cmpl $0x22, (%rdi)
jne 0x5580
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x332c
testl %eax, %eax
jne 0x5590
movq (%r14), %rdi
cmpl $0x1c, (%rdi)
jne 0x55b1
callq 0x297c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x1c9f
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x8057
movq %rax, %rdi
xorl %esi, %esi
jmp 0x5535
pushq $0x1
popq %rsi
pushq $0x1b
popq %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x3273
pushq $-0x1
popq %r12
jmp 0x5517
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x3db4
testl %eax, %eax
je 0x552d
movl %eax, %r12d
movq %r13, %rdi
callq 0x588a
xorl %r14d, %r14d
jmp 0x5555
movq 0x8(%rsp), %rdi
callq 0x6424
pushq $0x1
popq %rsi
pushq $0x23
jmp 0x54e7
movq 0x8(%rsp), %rdi
pushq $0x3
popq %rsi
callq 0x7f3a
movq (%r14), %rcx
movq 0x18(%rcx), %rdx
movq 0x20(%rcx), %rcx
movl %ebp, %edi
movq %rax, %rsi
callq 0x7d5b
movq %rax, %r14
xorl %r12d, %r12d
movq %r14, (%rbx)
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rsi
pushq $0x1c
popq %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x3273
pushq $-0x1
popq %r12
jmp 0x550f
pushq $0x22
popq %rdx
pushq $0x1
popq %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3273
movq 0x8(%rsp), %rdi
callq 0x6093
pushq $-0x1
popq %r12
movq 0x10(%rsp), %r13
testq %r13, %r13
jne 0x550f
jmp 0x5517
pushq $0x1c
jmp 0x5582
nopl (%rax)