// File: /workspace/github_c_makefile_star2_O1/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 0x7cb0
cmpl $0x17, %eax
jne 0x7cc0
movl $0x1, %ebp
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
movq (%r14), %rdi
movl (%rdi), %eax
cmpl $0xb, %eax
jle 0x7d47
cmpl $0x1d, %eax
je 0x7dae
cmpl $0x1b, %eax
je 0x7deb
cmpl $0xc, %eax
jne 0x7e6c
leaq 0x58(%rdi), %rax
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
movq %rax, %rdi
callq 0xad3f
movq %rax, %r13
movq 0x8(%r15), %rdi
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
movq 0x8(%r15), %rax
cmpl $0x1b, (%rax)
jne 0x7ec5
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x683c
movl %eax, %r12d
testl %eax, %eax
jne 0x7ee0
movq 0x8(%rsp), %rdi
movl $0x2, %esi
jmp 0x8021
cmpl $0x9, %eax
je 0x7e1b
cmpl $0xa, %eax
jne 0x7e6c
movq 0x18(%rdi), %r13
movq 0x20(%rdi), %r12
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
movq 0x8(%r15), %rdi
cmpl $0x1b, (%rdi)
jne 0x7eed
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x5cbc
testl %eax, %eax
je 0x803c
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x80f9
movq 0x58(%rdi), %rax
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
movq %rax, %rdi
callq 0xadd4
movq %rax, %r12
movq 0x8(%r15), %rdi
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
movq %r12, %rdi
movl $0x4, %esi
callq 0xa8d9
jmp 0x7f6b
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x723e
movb $0x1, %r13b
testl %eax, %eax
je 0x7f0f
movl %eax, %r12d
jmp 0x7f62
movq 0x18(%rdi), %r13
movq 0x20(%rdi), %r12
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
movq 0x8(%r15), %rdi
cmpl $0x1b, (%rdi)
jne 0x7ea3
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5cbc
testl %eax, %eax
je 0x7f73
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x80c8
movl $0x9, (%rsp)
movl $0x5, %esi
movq %r15, %rdi
movl $0xc, %edx
movl $0x1d, %ecx
movl $0x1b, %r8d
movl $0xa, %r9d
xorl %eax, %eax
callq 0x5bec
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x8117
xorl %r13d, %r13d
movl $0x1, %esi
movq %r15, %rdi
movl $0x1b, %edx
xorl %eax, %eax
callq 0x5bec
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x80cb
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x692f
movl %eax, %r12d
testl %eax, %eax
je 0x8017
movq %r13, %rdi
callq 0x841c
jmp 0x8026
xorl %r13d, %r13d
movl $0x1, %esi
movq %r15, %rdi
movl $0x1b, %edx
xorl %eax, %eax
callq 0x5bec
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x80fc
movq (%r14), %rdi
cmpl $0x1c, (%rdi)
jne 0x7f3e
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
movq 0x8(%rsp), %rdi
movl $0x5, %esi
callq 0xa8d9
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0x7f62
movq 0x8(%rsp), %rdi
callq 0x8f73
movl $0x1, %esi
movq %r15, %rdi
movl $0x23, %edx
xorl %eax, %eax
callq 0x5bec
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testb %r13b, %r13b
jne 0x8117
xorl %r12d, %r12d
jmp 0x8119
movq %r12, 0x18(%rsp)
movq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x692f
movl %eax, %r12d
testl %eax, %eax
jne 0x80b9
movq $0x0, 0x10(%rsp)
movq (%r14), %rdi
movl $0x22, %edx
cmpl $0x22, (%rdi)
jne 0x809a
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5cbc
testl %eax, %eax
jne 0x80a9
movq (%r14), %rdi
movl $0x1c, %edx
cmpl $0x1c, (%rdi)
jne 0x809a
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
movq 0x18(%rsp), %rcx
callq 0xa99d
movq %rax, %r13
xorl %r12d, %r12d
jmp 0x80cb
movq 0x8(%rsp), %rdi
movl $0x3, %esi
callq 0xa8d9
movb $0x1, %cl
testl %r12d, %r12d
jne 0x802f
xorl %ecx, %ecx
testb %cl, %cl
je 0x7f6b
jmp 0x8117
movq %r13, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq 0x8(%rsp), %r13
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x692f
movl %eax, %r12d
testl %eax, %eax
jne 0x80f1
movq (%r14), %rdi
cmpl $0x1c, (%rdi)
jne 0x80d7
callq 0x53b0
movq (%r15), %rdi
movq %r14, %rsi
callq 0x45b5
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0xaaae
movq %rax, %r13
xorl %r12d, %r12d
jmp 0x80fc
movl $0x1, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x5bec
movq 0x8(%rsp), %rdi
callq 0x8c06
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x80c8
callq 0x841c
xorl %r13d, %r13d
testl %r12d, %r12d
jne 0x810e
movq %r13, %rdi
xorl %esi, %esi
jmp 0x8109
movl $0x1, %esi
movq %r15, %rdi
movl $0x1c, %edx
xorl %eax, %eax
callq 0x5bec
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r13, %rdi
callq 0x841c
xorl %r13d, %r13d
testl %r12d, %r12d
jne 0x810e
movq %r13, %rdi
movl $0x1, %esi
callq 0xa8d9
testl %r12d, %r12d
je 0x7f6b
xorl %eax, %eax
xorl %ecx, %ecx
testl %r12d, %r12d
jne 0x813b
movq (%r14), %rcx
movq 0x18(%rcx), %rdx
movq 0x20(%rcx), %rcx
movl %ebp, %edi
movq %rax, %rsi
callq 0xa72f
movq %rax, %rcx
xorl %r12d, %r12d
movq %rcx, (%rbx)
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq