// File: /workspace/github_cpp_makefile_star2_O3/Eronana[P]strawberry/src/disassembler.cpp
// Function: disassemble(_IO_FILE*, _IO_FILE*)
bool disassemble(FILE *in,FILE *out)
{
    CodeData code_data;
    if(!code_data.load(in))return false;
    fprintf(out,"; ======[   int table  ]======\n");
    for(int i=0;i<code_data.config.int_table_size;i++)fprintf(out,"; %3d | %d\n",i,code_data.int_table[i]);
    fprintf(out,"; ======[  float table ]======\n");
    for(int i=0;i<code_data.config.float_table_size;i++)fprintf(out,"; %3d | %f\n",i,code_data.float_table[i]);
    fprintf(out,"; ======[ string table ]======\n");
    for(int i=0;i<code_data.config.string_table_size;i++)fprintf(out,"; %3d | %s\n",i,code_data.string_table[i]);
    fprintf(out,"; ======[     code     ]======\n");
    for(int i=0;i<code_data.config.code_raw_size;i+=op_length[code_data.code_raw[i]])
    {
        discode(code_data.code_raw[i],code_data,out);
    }
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rsi
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rdi
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x40(%rdi)
movq $0x0, 0x60(%rdi)
callq 0x1cabc
movl %eax, %ebx
testb %al, %al
je 0x1b40e
leaq 0x5db4(%rip), %rdi      # 0x21082
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x64b0
cmpq $0x0, 0x10(%rsp)
je 0x1b315
leaq 0x5db3(%rip), %r15      # 0x210a2
xorl %r12d, %r12d
movq 0x48(%rsp), %rax
movl (%rax,%r12,4), %ecx
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x6390
incq %r12
cmpq %r12, 0x10(%rsp)
ja 0x1b2f2
leaq 0x5d92(%rip), %rdi      # 0x210ae
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x64b0
cmpq $0x0, 0x18(%rsp)
je 0x1b365
xorl %r15d, %r15d
leaq 0x5d8e(%rip), %r12      # 0x210ce
movq 0x50(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
movq %r14, %rdi
movq %r12, %rsi
movl %r15d, %edx
movb $0x1, %al
callq 0x6390
incq %r15
cmpq %r15, 0x18(%rsp)
ja 0x1b340
leaq 0x5d6e(%rip), %rdi      # 0x210da
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x64b0
cmpq $0x0, 0x20(%rsp)
je 0x1b3b3
leaq 0x5d6d(%rip), %r15      # 0x210fa
xorl %r12d, %r12d
movq 0x58(%rsp), %rax
movq (%rax,%r12,8), %rcx
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x6390
incq %r12
cmpq %r12, 0x20(%rsp)
ja 0x1b390
leaq 0x5d4c(%rip), %rdi      # 0x21106
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x64b0
cmpq $0x0, 0x30(%rsp)
je 0x1b40e
leaq 0x8(%rsp), %r15
movq 0x60(%r15), %rdi
xorl %r12d, %r12d
leaq 0x5879(%rip), %r13      # 0x20c60
addq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1b57f
movq 0x68(%rsp), %rdi
movzbl (%rdi,%r12), %eax
addl (%r13,%rax,8), %r12d
movslq %r12d, %r12
cmpq 0x30(%rsp), %r12
jb 0x1b3e7
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1b41d
callq 0x6320
movq $0x0, 0x68(%rsp)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1b435
callq 0x6320
movq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1b44d
callq 0x6320
movq $0x0, 0x58(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1b465
callq 0x6320
movq $0x0, 0x50(%rsp)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1b47d
callq 0x6320
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xae3e
movq %rbx, %rdi
callq 0x6450