// File: /workspace/github_c_makefile_star2_O3/masyagin1998[P]GCI/src/bytecode-generator/bytecode-generator.c
// Function: body_ast_bytecode_generate
static enum BYTECODE_GENERATOR_CODES body_ast_bytecode_generate(bytecode_generator_type_t bc_gen, const struct BODY_AST*ast, int*loop_start_idx,
                                                                int**loop_exit_idxs, size_t*loop_exit_idxs_len, size_t*loop_exit_idxs_cap)
{    
    size_t i;

    bc_gen->scope_depth++;

    for (i = 0; i < ast->stmts_len; i++) {
        enum BYTECODE_GENERATOR_CODES r = stmt_ast_bytecode_generate(bc_gen, ast->stmts[i], loop_start_idx,
                                                                     loop_exit_idxs, loop_exit_idxs_len, loop_exit_idxs_cap);
        if (r != BYTECODE_GENERATOR_OK) {
            return r;
        }
    }

    bc_gen->scope_depth--;

    while ((bc_gen->locals_len > 0) &&
           (bc_gen->locals[bc_gen->locals_len - 1].depth >
            bc_gen->scope_depth)) {
        PUSH_BACK(bc_gen->bc->op_codes, BC_OP_POP);
        bc_gen->locals_len--;
    }

    return BYTECODE_GENERATOR_OK;    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdi, %rbx
movq 0x28(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x28(%rdi)
cmpq $0x0, 0x8(%rsi)
je 0xb3ae
movq %rdx, %r13
movq %rsi, %rbp
leaq 0x20(%rbx), %rax
movq %rax, 0x68(%rsp)
leaq 0x5676(%rip), %r12      # 0x10228
xorl %r15d, %r15d
movq (%rbp), %rax
movq (%rax,%r15,8), %rax
movl 0x8(%rax), %edi
cmpq $0x9, %rdi
ja 0xb495
movslq (%r12,%rdi,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movq (%rax), %r12
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0xb959
movl %eax, %r14d
testl %eax, %eax
jne 0xb176
movq %r13, 0x8(%rsp)
movq (%r12), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbe20
cmpl $-0x1, %eax
je 0xb016
movl %eax, %eax
leaq (%rax,%rax,4), %rax
movq 0x10(%rbx), %rcx
movq 0x28(%rbx), %r13
cmpq %r13, 0x20(%rcx,%rax,8)
jne 0xb01a
movups 0x10(%r12), %xmm0
movups %xmm0, 0x40(%rbx)
movl $0xfffffffe, 0x58(%rbx) # imm = 0xFFFFFFFE
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
movq 0x8(%rsp), %r13
jmp 0xb176
movq %r13, %r12
movq (%rax), %r13
movq (%r13), %rsi
movq %rbx, %rdi
callq 0xbe63
testl %eax, %eax
jne 0xb452
movl $0x1c, %esi
movq %rbx, %rdi
callq 0xd211
movl %eax, 0x8(%rsp)
movq 0x8(%rbx), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xae50
testq %rsi, %rsi
je 0xae93
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%rbx), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xb4a2
movq 0x8(%r14), %rsi
jmp 0xaeb3
movq (%rax), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0xacd3
movq %rbx, %rdi
callq 0xb959
testl %eax, %eax
jne 0xb452
movq 0x8(%rbx), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xae4b
testq %rsi, %rsi
je 0xae62
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%rbx), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xb49a
movq 0x8(%r14), %rsi
jmp 0xae82
movq (%rax), %r12
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0xb959
testl %eax, %eax
jne 0xb452
movq (%r12), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0xcc97
jmp 0xb173
cmpq $0x0, 0x18(%rsp)
je 0xb45f
movl $0x1d, %esi
movq %rbx, %rdi
callq 0xd211
movl %eax, %r14d
movq 0x30(%rsp), %rax
movq (%rax), %rsi
movq 0x10(%rsp), %rax
cmpq (%rax), %rsi
jne 0xae55
testq %rsi, %rsi
je 0xaf4e
leaq (%rsi,%rsi), %rax
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x18(%rsp), %r12
movq (%r12), %rdi
shlq $0x3, %rsi
callq 0x1160
movq %rax, (%r12)
testq %rax, %rax
je 0xb4aa
leaq 0x5472(%rip), %r12      # 0x10228
jmp 0xaf75
movq (%rax), %r12
xorl %eax, %eax
movq %rax, 0x40(%rsp)
movq %rax, 0x70(%rsp)
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rax
movl 0x8(%rax), %eax
movl %eax, 0x2c(%rsp)
movq (%r12), %rsi
movq %rbx, %rdi
callq 0xbe63
testl %eax, %eax
jne 0xb173
movq 0x70(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
jne 0xb0be
testq %rsi, %rsi
je 0xb09d
leaq (%rsi,%rsi), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
shlq $0x3, %rsi
callq 0x1160
movq %rax, 0x40(%rsp)
testq %rax, %rax
jne 0xb0be
jmp 0xb4d0
testq %r13, %r13
je 0xb457
movslq (%r13), %rsi
movq %rbx, %rdi
callq 0xd30f
jmp 0xb186
movq (%r14), %rax
jmp 0xae82
movq (%r14), %rax
jmp 0xaeb3
movq 0x18(%rsp), %rax
movq (%rax), %rax
jmp 0xaf75
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xb4bc
xorl %esi, %esi
movq $0x1e, (%rax,%rsi,8)
incq 0x8(%r14)
jmp 0xb186
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xb4c1
xorl %esi, %esi
movq $0x0, (%rax,%rsi,8)
incq 0x8(%r14)
movq 0x8(%r13), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x10(%rsp), %r9
callq 0xab62
testl %eax, %eax
jne 0xb452
movl $0x1d, %esi
movq %rbx, %rdi
callq 0xd211
movl %eax, 0x3c(%rsp)
movslq 0x8(%rsp), %rcx
movq 0x8(%rbx), %r14
movq (%r14), %rax
movl %ecx, %edx
notl %edx
addl 0x8(%r14), %edx
movslq %edx, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xafac
testq %rsi, %rsi
je 0xaf8c
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x10(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x1160
movq 0x8(%rbx), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xb4b4
movq 0x8(%r14), %rsi
jmp 0xafac
movq 0x10(%rsp), %rax
movq $0x1, (%rax)
movl $0x4, %edi
callq 0x1130
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0xb4c6
movq 0x30(%rsp), %rdx
movq (%rdx), %rcx
movl %r14d, (%rax,%rcx,4)
incq %rcx
movq %rcx, (%rdx)
jmp 0xb186
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xb4cb
xorl %esi, %esi
movq $0x0, (%rax,%rsi,8)
movq 0x8(%r14), %rcx
incq %rcx
movq %rcx, 0x8(%r14)
movq 0x10(%r13), %rsi
testq %rsi, %rsi
movq %r12, %r13
leaq 0x5258(%rip), %r12      # 0x10228
je 0xafff
movq %rbx, %rdi
movq %r13, %rdx
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x10(%rsp), %r9
callq 0xab62
testl %eax, %eax
jne 0xb452
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movslq 0x3c(%rsp), %rdx
movl %edx, %esi
notl %esi
addl %esi, %ecx
movslq %ecx, %rcx
movq %rcx, (%rax,%rdx,8)
jmp 0xb186
movq 0x28(%rbx), %r13
movl $0x20, %edx
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x1040
movq %r13, 0x60(%rsp)
movups 0x70(%rsp), %xmm0
movups 0x80(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movq 0x18(%rbx), %rcx
cmpq 0x20(%rbx), %rcx
jne 0xb08f
testq %rcx, %rcx
je 0xb20e
leaq (%rcx,%rcx), %rax
movq %rax, 0x20(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x4, %rcx
leaq (%rcx,%rcx,4), %rsi
callq 0x1160
movq %rax, 0x10(%rbx)
testq %rax, %rax
movq 0x8(%rsp), %r13
je 0xb4e2
movq 0x18(%rbx), %rcx
jmp 0xb234
movq 0x10(%rbx), %rax
movq 0x8(%rsp), %r13
jmp 0xb234
movq $0x1, 0x20(%rsp)
movl $0x4, %edi
callq 0x1130
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0xb501
movl $0x1c, %esi
movq %rbx, %rdi
callq 0xd211
movq 0x40(%rsp), %rcx
movq 0x70(%rsp), %rdx
movl %eax, (%rcx,%rdx,4)
incq %rdx
movq %rdx, 0x70(%rsp)
movq 0x8(%rbx), %r14
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xb11d
testq %rsi, %rsi
je 0xb122
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%rbx), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xb4da
movq 0x8(%r14), %rsi
jmp 0xb142
movq (%r14), %rax
jmp 0xb142
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xb4fc
xorl %esi, %esi
movq $0x0, (%rax,%rsi,8)
incq 0x8(%r14)
movq 0x8(%r12), %rsi
movq %rbx, %rdi
leaq 0x2c(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x70(%rsp), %r8
leaq 0x20(%rsp), %r9
callq 0xab62
testl %eax, %eax
je 0xb198
movl %eax, %r14d
leaq 0x50ab(%rip), %r12      # 0x10228
testl %r14d, %r14d
jne 0xb473
incq %r15
cmpq 0x8(%rbp), %r15
jb 0xabb5
jmp 0xb3a7
movslq 0x2c(%rsp), %rsi
movq %rbx, %rdi
callq 0xd30f
movq 0x40(%rsp), %rax
movslq (%rax), %rcx
movq 0x8(%rbx), %r14
movq (%r14), %rax
movl %ecx, %edx
notl %edx
addl 0x8(%r14), %edx
movslq %edx, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
leaq 0x5056(%rip), %r12      # 0x10228
jne 0xb35f
testq %rsi, %rsi
je 0xb33f
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x10(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x1160
movq 0x8(%rbx), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xb515
movq 0x8(%r14), %rsi
jmp 0xb35f
movq $0x1, 0x20(%rbx)
movl $0x28, %edi
callq 0x1130
movq %rax, 0x10(%rbx)
testq %rax, %rax
movq 0x8(%rsp), %r13
je 0xb510
xorl %ecx, %ecx
leaq (%rcx,%rcx,4), %rcx
movq 0x60(%rsp), %rdx
movq %rdx, 0x20(%rax,%rcx,8)
movaps 0x40(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movups %xmm1, 0x10(%rax,%rcx,8)
movups %xmm0, (%rax,%rcx,8)
movq 0x8(%rbx), %r14
movq 0x18(%rbx), %r12
leaq 0x1(%r12), %rax
movq %rax, 0x18(%rbx)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
jne 0xb29f
testq %rsi, %rsi
je 0xb2a4
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%rbx), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xb4ec
movq 0x8(%r14), %rsi
jmp 0xb2c4
movq (%r14), %rax
jmp 0xb2c4
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xb50b
xorl %esi, %esi
movq $0x4, (%rax,%rsi,8)
movq 0x8(%r14), %rsi
incq %rsi
movq %rsi, 0x8(%r14)
cmpq 0x10(%r14), %rsi
jne 0xb32c
testq %rsi, %rsi
je 0xb30c
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x10(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x1160
movq 0x8(%rbx), %r14
movq %rax, (%r14)
testq %rax, %rax
je 0xb4f4
movq 0x8(%r14), %rsi
jmp 0xb32c
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xb506
xorl %esi, %esi
movslq %r12d, %rcx
movq %rcx, (%rax,%rsi,8)
incq 0x8(%r14)
xorl %r14d, %r14d
jmp 0xb176
movq $0x1, 0x10(%r14)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xb51d
xorl %esi, %esi
movq $0x0, (%rax,%rsi,8)
incq 0x8(%r14)
cmpq $0x2, 0x70(%rsp)
movq 0x40(%rsp), %rdi
jb 0xb39a
movl $0x1, %ecx
movslq (%rdi,%rcx,4), %rdx
movl %edx, %esi
notl %esi
addl 0x8(%r14), %esi
movslq %esi, %rsi
movq %rsi, (%rax,%rdx,8)
incq %rcx
cmpq 0x70(%rsp), %rcx
jb 0xb37d
callq 0x1030
xorl %r14d, %r14d
jmp 0xb17d
movq 0x28(%rbx), %rax
decq %rax
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rax
xorl %r14d, %r14d
testq %rax, %rax
je 0xb473
movq 0x10(%rbx), %rcx
leaq (%rax,%rax,4), %rax
movq -0x8(%rcx,%rax,8), %rax
cmpq 0x28(%rbx), %rax
jbe 0xb473
movq 0x8(%rbx), %r15
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
jne 0xb412
testq %rsi, %rsi
je 0xb417
leaq (%rsi,%rsi), %rax
movq %rax, 0x10(%r15)
movq (%r15), %rdi
shlq $0x4, %rsi
callq 0x1160
movq 0x8(%rbx), %r15
movq %rax, (%r15)
testq %rax, %rax
je 0xb488
movq 0x8(%r15), %rsi
jmp 0xb433
movq (%r15), %rax
jmp 0xb433
movq $0x1, 0x10(%r15)
movl $0x8, %edi
callq 0x1130
movq %rax, (%r15)
testq %rax, %rax
je 0xb490
xorl %esi, %esi
movq $0x0, (%rax,%rsi,8)
incq 0x8(%r15)
movq 0x18(%rbx), %rax
decq %rax
movq %rax, 0x18(%rbx)
jne 0xb3c2
jmp 0xb473
movl %eax, %r14d
jmp 0xb473
movl $0xfffffffc, %r14d      # imm = 0xFFFFFFFC
jmp 0xb465
movl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
movq (%rax), %rax
movups (%rax), %xmm0
movups %xmm0, 0x40(%rbx)
movl %r14d, 0x58(%rbx)
movl %r14d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x2a37
callq 0x2a6f
callq 0x2a14
movq %r14, %rdi
callq 0x2600
movq %r14, %rdi
callq 0x280b
movq 0x10(%rsp), %rdi
callq 0x2669
movq %r14, %rdi
callq 0x2843
callq 0x2638
callq 0x28ac
callq 0x26a0
callq 0x287b
leaq 0x20(%rsp), %rdi
callq 0x26d1
movq %r14, %rdi
callq 0x2708
movq 0x68(%rsp), %rdi
callq 0x28dd
movq %r14, %rdi
callq 0x2911
movq %r14, %rdi
callq 0x2949
callq 0x27a9
callq 0x27da
callq 0x2981
callq 0x29b2
callq 0x29e3
movq %r14, %rdi
callq 0x2740
callq 0x2778