// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d084
movl %eax, %ebx
testb %al, %al
je 0x1ba03
leaq 0x57a4(%rip), %rdi      # 0x21066
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x64b0
cmpq $0x0, 0x10(%rsp)
je 0x1b909
leaq 0x57a3(%rip), %r15      # 0x21086
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 0x1b8e6
leaq 0x5782(%rip), %rdi      # 0x21092
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x64b0
cmpq $0x0, 0x18(%rsp)
je 0x1b959
xorl %r15d, %r15d
leaq 0x577e(%rip), %r12      # 0x210b2
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 0x1b934
leaq 0x575e(%rip), %rdi      # 0x210be
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x64b0
cmpq $0x0, 0x20(%rsp)
je 0x1b9a7
leaq 0x575d(%rip), %r15      # 0x210de
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 0x1b984
leaq 0x573c(%rip), %rdi      # 0x210ea
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x64b0
cmpq $0x0, 0x30(%rsp)
je 0x1ba03
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
leaq 0x5259(%rip), %r13      # 0x20c30
movq 0x68(%rsp), %rdi
addq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1bb74
movq 0x68(%rsp), %rax
movzbl (%rax,%r12), %eax
addl (%r13,%rax,8), %r12d
movslq %r12d, %r12
cmpq 0x30(%rsp), %r12
jb 0x1b9d7
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba12
callq 0x6320
movq $0x0, 0x68(%rsp)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba2a
callq 0x6320
movq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba42
callq 0x6320
movq $0x0, 0x58(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba5a
callq 0x6320
movq $0x0, 0x50(%rsp)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1ba72
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 0xae2c
movq %rbx, %rdi
callq 0x6450