// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: eq_expr_ast_bytecode_generate
static enum BYTECODE_GENERATOR_CODES eq_expr_ast_bytecode_generate(bytecode_generator_type_t bc_gen, const struct EQ_EXPR_AST*ast)
{
    enum BYTECODE_GENERATOR_CODES r = relational_expr_ast_bytecode_generate(bc_gen, ast->left);
    if (r != BYTECODE_GENERATOR_OK) {
        return r;
    }    
    if (ast->right != NULL) {
        r = relational_expr_ast_bytecode_generate(bc_gen, ast->right);
        if (r != BYTECODE_GENERATOR_OK) {
            return r;
        }
        if (ast->eq_op == AST_EQ_OP_EQEQ) {
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_EQ_EQEQ);
        } else if (ast->eq_op == AST_EQ_OP_NEQ) {
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_EQ_NEQ);
        } else {
            fprintf(stderr, "Invalid AST_EQ_OP type: %d\n", ast->eq_op);
            exit(EXIT_FAILURE);            
        }
    }

    return BYTECODE_GENERATOR_OK;    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rsi
callq 0xa2e6
testl %eax, %eax
je 0xa128
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%r15), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0xa120
movq %r14, %rdi
callq 0xa2e6
testl %eax, %eax
jne 0xa11e
movl 0x8(%r15), %edx
cmpl $0x1, %edx
je 0xa194
testl %edx, %edx
jne 0xa232
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xa1d6
testq %rsi, %rsi
je 0xa203
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 0xa24f
movq 0x8(%r15), %rsi
jmp 0xa221
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xa1d1
testq %rsi, %rsi
je 0xa1db
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 0xa271
movq 0x8(%r15), %rsi
jmp 0xa1f9
movq (%r15), %rax
jmp 0xa1f9
movq (%r15), %rax
jmp 0xa221
movq $0x1, 0x10(%r15)
pushq $0x8
popq %rdi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xa293
xorl %esi, %esi
movq $0xf, (%rax,%rsi,8)
jmp 0xa229
movq $0x1, 0x10(%r15)
pushq $0x8
popq %rdi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xa2b6
xorl %esi, %esi
movq $0xe, (%rax,%rsi,8)
incq 0x8(%r15)
jmp 0xa120
movq 0xbdb7(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x5533(%rip), %rsi      # 0xf776
xorl %eax, %eax
callq 0x1100
jmp 0xa2de
movq 0xbd9a(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq 0x10(%r15), %r8
shlq $0x3, %r8
leaq 0x4689(%rip), %rsi      # 0xe8f1
leaq 0x50a9(%rip), %rdx      # 0xf318
jmp 0xa2d2
movq 0xbd78(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq 0x10(%r15), %r8
shlq $0x3, %r8
leaq 0x4667(%rip), %rsi      # 0xe8f1
leaq 0x5087(%rip), %rdx      # 0xf318
jmp 0xa2af
movq 0xbd56(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x431a(%rip), %rsi      # 0xe5be
leaq 0x506d(%rip), %rdx      # 0xf318
pushq $0x8
popq %r8
movl $0x1b5, %ecx            # imm = 0x1B5
jmp 0xa2d7
movq 0xbd33(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x42f7(%rip), %rsi      # 0xe5be
leaq 0x504a(%rip), %rdx      # 0xf318
pushq $0x8
popq %r8
movl $0x1b3, %ecx            # imm = 0x1B3
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180