// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: multiplicative_expr_ast_bytecode_generate
static enum BYTECODE_GENERATOR_CODES multiplicative_expr_ast_bytecode_generate(bytecode_generator_type_t bc_gen, const struct MULTIPLICATIVE_EXPR_AST*ast)
{
    size_t i;

    enum BYTECODE_GENERATOR_CODES r = left_unary_expr_ast_bytecode_generate(bc_gen, ast->lues[0]);
    if (r != BYTECODE_GENERATOR_OK) {
        return r;
    }
    for (i = 1; i < ast->lues_len; i++) {
        r = left_unary_expr_ast_bytecode_generate(bc_gen, ast->lues[i]);
        if (r != BYTECODE_GENERATOR_OK) {
            return r;
        }
        switch (ast->ops[i - 1]) {
        case AST_MULTIPLICATIVE_OP_MUL:
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_MULTIPLICATIVE_MUL);
            break;
        case AST_MULTIPLICATIVE_OP_DIV:
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_MULTIPLICATIVE_DIV);
            break;
        case AST_MULTIPLICATIVE_OP_MOD:
            PUSH_BACK(bc_gen->bc->op_codes, BC_OP_MULTIPLICATIVE_MOD);
            break;
        default:
            fprintf(stderr, "Invalid AST_MULTIPLICATIVE_OP type: %d\n", ast->ops[i - 1]);
            exit(EXIT_FAILURE);
            break;
        }
    }

    return BYTECODE_GENERATOR_OK;    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq (%rax), %rsi
callq 0xc832
testl %eax, %eax
jne 0xc7fa
cmpq $0x2, 0x10(%rbx)
jb 0xc7f8
movl $0x1, %r12d
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0xc832
testl %eax, %eax
jne 0xc7fa
movq 0x8(%rbx), %rax
movl -0x4(%rax,%r12,4), %edi
cmpl $0x2, %edi
je 0xc71c
cmpl $0x1, %edi
je 0xc6df
testl %edi, %edi
jne 0xc806
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xc763
testq %rsi, %rsi
je 0xc7c0
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 0xc80b
movq 0x8(%r15), %rsi
jmp 0xc7dc
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xc759
testq %rsi, %rsi
je 0xc768
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 0xc813
movq 0x8(%r15), %rsi
jmp 0xc788
movq 0x8(%r14), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xc75e
testq %rsi, %rsi
je 0xc796
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 0xc81b
movq 0x8(%r15), %rsi
jmp 0xc7b2
movq (%r15), %rax
jmp 0xc788
movq (%r15), %rax
jmp 0xc7b2
movq (%r15), %rax
jmp 0xc7dc
movq $0x1, 0x10(%r15)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xc82d
xorl %esi, %esi
addq $0x8, %r15
movq $0x17, (%rax,%rsi,8)
jmp 0xc7e8
movq $0x1, 0x10(%r15)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xc823
xorl %esi, %esi
addq $0x8, %r15
movq $0x18, (%rax,%rsi,8)
jmp 0xc7e8
movq $0x1, 0x10(%r15)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xc828
xorl %esi, %esi
addq $0x8, %r15
movq $0x16, (%rax,%rsi,8)
incq (%r15)
incq %r12
cmpq 0x10(%rbx), %r12
jb 0xc661
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x33f2
movq %r15, %rdi
callq 0x3389
movq %r15, %rdi
callq 0x3320
movq %r15, %rdi
callq 0x32b7
callq 0x32ef
callq 0x33c1
callq 0x3358