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

    struct ADDITIVE_EXPR_AST*left = NULL;
    enum AST_REL_OP rel_op = AST_REL_OP_LT;
    struct ADDITIVE_EXPR_AST*right = NULL;

    r = additive_expr_ast_read(parser, &left);
    if (r != PARSER_OK) {
        goto  err0;
    }

    if (((parser->tok)->token_type == TOKEN_TYPE_LT) || ((parser->tok)->token_type == TOKEN_TYPE_GT) ||
        ((parser->tok)->token_type == TOKEN_TYPE_LE) || ((parser->tok)->token_type == TOKEN_TYPE_GE)) {
        if ((parser->tok)->token_type == TOKEN_TYPE_LT) {
            rel_op = AST_REL_OP_LT;
        } else if ((parser->tok)->token_type == TOKEN_TYPE_GT) {
            rel_op = AST_REL_OP_GT;
        } else if ((parser->tok)->token_type == TOKEN_TYPE_LE) {
            rel_op = AST_REL_OP_LE;
        } else if ((parser->tok)->token_type == TOKEN_TYPE_GE) {
            rel_op = AST_REL_OP_GE;
        }

        token_free((parser->tok));
        lexer_next_token(parser->lexer, &(parser->tok));

        r = additive_expr_ast_read(parser, &right);
        if (r != PARSER_OK) {
            goto err1;
        }
    }

    (*relational_expr) = create_relational_expr_ast(left, rel_op, right,
                                                    (parser->tok)->frag.starting.line,
                                                    (parser->tok)->frag.starting.pos);

    return PARSER_OK;

 err1:
    additive_expr_ast_free(left);
 err0:
    (*relational_expr) = NULL;
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x6d80
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6c52
jmp 0x6d65
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x11, (%rax)
je 0x6c8a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x12, (%rax)
je 0x6c8a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x13, (%rax)
je 0x6c8a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x14, (%rax)
jne 0x6d21
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x11, (%rax)
jne 0x6ca0
movl $0x0, -0x2c(%rbp)
jmp 0x6ce6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x12, (%rax)
jne 0x6cb6
movl $0x1, -0x2c(%rbp)
jmp 0x6ce4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x13, (%rax)
jne 0x6ccc
movl $0x2, -0x2c(%rbp)
jmp 0x6ce2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x14, (%rax)
jne 0x6ce0
movl $0x3, -0x2c(%rbp)
jmp 0x6ce2
jmp 0x6ce4
jmp 0x6ce6
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 -0x38(%rbp), %rsi
callq 0x6d80
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6d1f
jmp 0x6d5c
jmp 0x6d21
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%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 0xc0a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x6d76
movq -0x28(%rbp), %rdi
callq 0xc380
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop