// File: /workspace/github_c_makefile_star2_O2/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, %r15
movq %rdi, %r14
movq (%rsi), %rsi
callq 0xa66b
testl %eax, %eax
je 0xa307
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%r15), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xa2ff
movq %r14, %rdi
callq 0xa66b
testl %eax, %eax
jne 0xa2fd
movl 0x8(%r15), %edx
cmpq $0x3, %rdx
ja 0xa527
leaq 0x4fa9(%rip), %rax      # 0xf2dc
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xa45e
testq %rsi, %rsi
je 0xa4c9
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r14), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xa544
movq 0x8(%r15), %rsi
jmp 0xa4e7
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xa454
testq %rsi, %rsi
je 0xa46e
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r14), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xa569
movq 0x8(%r15), %rsi
jmp 0xa48c
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xa459
testq %rsi, %rsi
je 0xa49d
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r14), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xa58b
movq 0x8(%r15), %rsi
jmp 0xa4bb
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xa466
testq %rsi, %rsi
je 0xa4f5
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%r14), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xa5ad
movq 0x8(%r15), %rsi
jmp 0xa513
movq (%r15), %rax
jmp 0xa48c
movq (%r15), %rax
jmp 0xa4bb
movq (%r15), %rax
jmp 0xa4e7
movq (%r15), %rax
jmp 0xa513
movq $0x1, 0x10(%r15)
pushq $0x8
popq %rdi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xa5d2
xorl %esi, %esi
addq $0x8, %r15
movq $0x12, (%rax,%rsi,8)
jmp 0xa51f
movq $0x1, 0x10(%r15)
pushq $0x8
popq %rdi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xa5f5
xorl %esi, %esi
addq $0x8, %r15
movq $0x13, (%rax,%rsi,8)
jmp 0xa51f
movq $0x1, 0x10(%r15)
pushq $0x8
popq %rdi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xa618
xorl %esi, %esi
addq $0x8, %r15
movq $0x10, (%rax,%rsi,8)
jmp 0xa51f
movq $0x1, 0x10(%r15)
pushq $0x8
popq %rdi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xa63b
xorl %esi, %esi
addq $0x8, %r15
movq $0x11, (%rax,%rsi,8)
incq (%r15)
jmp 0xa2ff
movq 0xbac2(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x525a(%rip), %rsi      # 0xf792
xorl %eax, %eax
callq 0x1100
jmp 0xa663
movq 0xbaa5(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq 0x10(%r15), %r8
shlq $0x3, %r8
leaq 0x4394(%rip), %rsi      # 0xe8f1
leaq 0x4db4(%rip), %rdx      # 0xf318
jmp 0xa634
movq 0xba80(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq 0x10(%r15), %r8
shlq $0x3, %r8
leaq 0x436f(%rip), %rsi      # 0xe8f1
leaq 0x4d8f(%rip), %rdx      # 0xf318
jmp 0xa5ee
movq 0xba5e(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq 0x10(%r15), %r8
shlq $0x3, %r8
leaq 0x434d(%rip), %rsi      # 0xe8f1
leaq 0x4d6d(%rip), %rdx      # 0xf318
jmp 0xa611
movq 0xba3c(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq 0x10(%r15), %r8
shlq $0x3, %r8
leaq 0x432b(%rip), %rsi      # 0xe8f1
leaq 0x4d4b(%rip), %rdx      # 0xf318
jmp 0xa657
movq 0xba17(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x3fdb(%rip), %rsi      # 0xe5be
leaq 0x4d2e(%rip), %rdx      # 0xf318
pushq $0x8
popq %r8
movl $0x198, %ecx            # imm = 0x198
jmp 0xa65c
movq 0xb9f4(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x3fb8(%rip), %rsi      # 0xe5be
leaq 0x4d0b(%rip), %rdx      # 0xf318
pushq $0x8
popq %r8
movl $0x19b, %ecx            # imm = 0x19B
jmp 0xa65c
movq 0xb9d1(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x3f95(%rip), %rsi      # 0xe5be
leaq 0x4ce8(%rip), %rdx      # 0xf318
pushq $0x8
popq %r8
movl $0x192, %ecx            # imm = 0x192
jmp 0xa65c
movq 0xb9ae(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x3f72(%rip), %rsi      # 0xe5be
leaq 0x4cc5(%rip), %rdx      # 0xf318
pushq $0x8
popq %r8
movl $0x195, %ecx            # imm = 0x195
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180