// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: relational_expr_ast_bytecode_generate
static enum BYTECODE_GENERATOR_CODES relational_expr_ast_bytecode_generate(bytecode_generator_type_t bc_gen, const struct RELATIONAL_EXPR_AST*ast)
{
    enum BYTECODE_GENERATOR_CODES r = additive_expr_ast_bytecode_generate(bc_gen, ast->left);
    if (r != BYTECODE_GENERATOR_OK) {
        return r;
    }
    if (ast->right != NULL) {
        r = additive_expr_ast_bytecode_generate(bc_gen, ast->right);
        if (r != BYTECODE_GENERATOR_OK) {
            return r;
        }
        switch (ast->rel_op) {
        case AST_REL_OP_LT:
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_REL_LT);
            break;
        case AST_REL_OP_GT:
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_REL_GT);
            break;
        case AST_REL_OP_LE:
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_REL_LE);
            break;
        case AST_REL_OP_GE:
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_REL_GE);
            break;
        default:
            fprintf(stderr, "Invalid AST_REL_OP type: %d\n", ast->rel_op);
            exit(EXIT_FAILURE);            
            break;
        }
    }

    return BYTECODE_GENERATOR_OK;    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rsi
callq 0xc4bd
testl %eax, %eax
je 0xc264
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%r14), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xc25c
movq %r15, %rdi
callq 0xc4bd
testl %eax, %eax
jne 0xc25a
movl 0x8(%r14), %edi
cmpq $0x3, %rdi
ja 0xc484
leaq 0x404c(%rip), %rax      # 0x102dc
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%r15), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xc3bb
testq %rsi, %rsi
je 0xc42a
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r15), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xc489
movq 0x8(%r14), %rsi
jmp 0xc446
movq 0x8(%r15), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xc3b1
testq %rsi, %rsi
je 0xc3cb
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r15), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xc491
movq 0x8(%r14), %rsi
jmp 0xc3eb
movq 0x8(%r15), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xc3b6
testq %rsi, %rsi
je 0xc3fc
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r15), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xc499
movq 0x8(%r14), %rsi
jmp 0xc41c
movq 0x8(%r15), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xc3c3
testq %rsi, %rsi
je 0xc454
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r15), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xc4a1
movq 0x8(%r14), %rsi
jmp 0xc470
movq (%r14), %rax
jmp 0xc3eb
movq (%r14), %rax
jmp 0xc41c
movq (%r14), %rax
jmp 0xc446
movq (%r14), %rax
jmp 0xc470
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xc4a9
xorl %esi, %esi
addq $0x8, %r14
movq $0x12, (%rax,%rsi,8)
jmp 0xc47c
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xc4ae
xorl %esi, %esi
addq $0x8, %r14
movq $0x13, (%rax,%rsi,8)
jmp 0xc47c
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xc4b3
xorl %esi, %esi
addq $0x8, %r14
movq $0x10, (%rax,%rsi,8)
jmp 0xc47c
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xc4b8
xorl %esi, %esi
addq $0x8, %r14
movq $0x11, (%rax,%rsi,8)
incq (%r14)
jmp 0xc25c
callq 0x319f
movq %r14, %rdi
callq 0x3136
movq %r14, %rdi
callq 0x3064
movq %r14, %rdi
callq 0x2ffb
movq %r14, %rdi
callq 0x30cd
callq 0x309c
callq 0x3033
callq 0x316e
callq 0x3105