// File: /workspace/github_cpp_makefile_star2_O3/Eronana[P]strawberry/src/assembler.cpp
// Function: load_asmfile(char const*)
bool load_asmfile(const char *filename)
{
    ifstream asms(filename);
    if(!asms)return false;
    string line;
    for(int lines=0;;)
    {
        int read_lines=get_asm_line(asms,line);
        if(read_lines<0)break;
        lines+=read_lines;
        int pos=line.find(' ');
        string oper=line.substr(0,pos);
        toUpperCase(oper);
        string opnd;
        if(pos!=string::npos)
        {
            opnd=line.substr(pos+1);
            if(opnd.length()&&opnd[0]!='\''&&opnd[0]!='"')toUpperCase(opnd);
        }
        if(opnd.empty()&&*oper.rbegin()==':')
        {
            string label=string(oper,0,oper.size()-1);
            labels[toUpperCase(label)]=s_code.size();
        }
        else
        {
            s_code.push_back({lines,oper,opnd});
        }
    }
    asms.close();
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdi, %rsi
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x6480
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0xd0(%rsp,%rax), %eax
testb $0x5, %al
jne 0x19319
movl %eax, 0x24(%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x38(%rsp), %r15
xorl %r13d, %r13d
leaq 0x90(%rsp), %r12
leaq 0x48(%rsp), %rbp
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x188e4
movl %eax, %ebx
testl %eax, %eax
js 0x192e3
movq %r12, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x6330
movq %rax, %r14
movslq %r14d, %rcx
movq %rsp, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x6250
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
je 0x1909c
xorl %eax, %eax
movq (%rsp), %rdx
movb (%rdx,%rax), %sil
leal -0x61(%rsi), %edi
cmpb $0x19, %dil
ja 0x19092
addb $-0x20, %sil
movb %sil, (%rdx,%rax)
movq 0x8(%rsp), %rcx
incq %rax
cmpq %rax, %rcx
ja 0x19074
jmp 0x1909e
xorl %ecx, %ecx
addl %ebx, %r13d
shlq $0x20, %r14
movq %r15, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
cmpq %rax, %r14
je 0x19145
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r14
sarq $0x20, %r14
movq %rbp, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq $-0x1, %rcx
callq 0x6250
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0x62e0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x19116
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6230
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x19140
movq 0x28(%rsp), %rcx
movzbl (%rcx), %ecx
cmpl $0x22, %ecx
je 0x19136
cmpl $0x27, %ecx
jne 0x191dd
movq 0x8(%rsp), %rcx
jmp 0x19214
movq 0x8(%rsp), %rcx
movq (%rsp), %rsi
cmpb $0x3a, -0x1(%rsi,%rcx)
jne 0x19218
decq %rcx
movq %rbp, %rdi
movq %rsp, %rsi
xorl %edx, %edx
callq 0x6090
movq 0x1691d(%rip), %rbx     # 0x2fa88
subq 0x1690e(%rip), %rbx     # 0x2fa80
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x191a5
xorl %ecx, %ecx
movq 0x48(%rsp), %rdx
movb (%rdx,%rcx), %sil
leal -0x61(%rsi), %edi
cmpb $0x19, %dil
ja 0x1919d
addb $-0x20, %sil
movb %sil, (%rdx,%rcx)
movq 0x50(%rsp), %rax
incq %rcx
cmpq %rcx, %rax
ja 0x1917e
leaq 0x16784(%rip), %rdi     # 0x2f930
movq %rbp, %rsi
callq 0xd504
shrq $0x3, %rbx
imull $0x38e38e39, %ebx, %ecx # imm = 0x38E38E39
movl %ecx, (%rax)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x192a8
movq 0x58(%rsp), %rsi
jmp 0x192a0
xorl %ecx, %ecx
movq 0x28(%rsp), %rdx
movb (%rdx,%rcx), %sil
leal -0x61(%rsi), %edi
cmpb $0x19, %dil
ja 0x191fe
addb $-0x20, %sil
movb %sil, (%rdx,%rcx)
movq 0x30(%rsp), %rax
incq %rcx
cmpq %rcx, %rax
ja 0x191df
movq 0x8(%rsp), %rcx
testq %rax, %rax
je 0x19145
movq (%rsp), %rsi
movl %r13d, 0x48(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
addq %rsi, %rcx
leaq 0x50(%rsp), %rdi
movq %rcx, %rdx
callq 0x7ce4
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x7ce4
leaq 0x1681e(%rip), %rdi     # 0x2fa80
movq %rbp, %rsi
callq 0x1a98c
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x1928c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6230
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x192a8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6230
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x192bf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6230
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1902c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6230
jmp 0x1902c
leaq 0xb0(%rsp), %rdi
callq 0x6080
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x19315
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x6230
movl 0x24(%rsp), %eax
testb $0x5, %al
sete %bl
leaq 0xb0(%rsp), %rdi
callq 0x60a0
movl %ebx, %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x193ca
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x19394
movq 0x58(%rsp), %rsi
jmp 0x19387
jmp 0x19391
jmp 0x19391
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x19b2c
jmp 0x19394
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x19394
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6230
jmp 0x19394
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x193ab
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6230
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x193cd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6230
jmp 0x193cd
jmp 0x193ca
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x193f2
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x6230
leaq 0xb0(%rsp), %rdi
callq 0x60a0
movq %rbx, %rdi
callq 0x6450