// File: /workspace/github_cpp_makefile_star2_O1/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 0x198b7
movl %eax, 0x24(%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r13d, %r13d
leaq 0xb0(%rsp), %r15
leaq 0x90(%rsp), %r12
leaq 0x48(%rsp), %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x18eb4
movl %eax, %r14d
testl %eax, %eax
js 0x19878
movq %r12, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x6330
movq %rax, %rbx
movslq %ebx, %rcx
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x6250
cmpq $0x0, 0x30(%rsp)
je 0x1964e
xorl %eax, %eax
movq 0x28(%rsp), %rcx
movb (%rcx,%rax), %dl
leal -0x61(%rdx), %esi
cmpb $0x19, %sil
ja 0x19644
addb $-0x20, %dl
movb %dl, (%rcx,%rax)
incq %rax
cmpq %rax, 0x30(%rsp)
ja 0x1962d
shlq $0x20, %rbx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
cmpq %rax, %rbx
je 0x19704
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %rbx
sarq $0x20, %rbx
movq %rbp, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x6250
movq %rsp, %rdi
movq %rbp, %rsi
callq 0x62e0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x196c9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6230
cmpq $0x0, 0x8(%rsp)
je 0x19704
movq (%rsp), %rax
movzbl (%rax), %eax
cmpl $0x22, %eax
je 0x19704
cmpl $0x27, %eax
je 0x19704
xorl %eax, %eax
movq (%rsp), %rcx
movb (%rcx,%rax), %dl
leal -0x61(%rdx), %esi
cmpb $0x19, %sil
ja 0x196fa
addb $-0x20, %dl
movb %dl, (%rcx,%rax)
incq %rax
cmpq %rax, 0x8(%rsp)
ja 0x196e4
addl %r14d, %r13d
cmpq $0x0, 0x8(%rsp)
jne 0x197ab
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpb $0x3a, -0x1(%rax,%rcx)
jne 0x197ab
decq %rcx
movq %rbp, %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x6090
movq 0x16347(%rip), %rbx     # 0x2fa88
subq 0x16338(%rip), %rbx     # 0x2fa80
cmpq $0x0, 0x50(%rsp)
je 0x19773
xorl %eax, %eax
movq 0x48(%rsp), %rcx
movb (%rcx,%rax), %dl
leal -0x61(%rdx), %esi
cmpb $0x19, %sil
ja 0x19769
addb $-0x20, %dl
movb %dl, (%rcx,%rax)
incq %rax
cmpq %rax, 0x50(%rsp)
ja 0x19752
leaq 0x161b6(%rip), %rdi     # 0x2f930
movq %rbp, %rsi
callq 0xd518
shrq $0x3, %rbx
imull $0x38e38e39, %ebx, %ecx # imm = 0x38E38E39
movl %ecx, (%rax)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x19841
movq 0x58(%rsp), %rsi
jmp 0x19839
movl %r13d, 0x48(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x7ce8
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x7ce8
leaq 0x16285(%rip), %rdi     # 0x2fa80
movq %rbp, %rsi
callq 0x1af88
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x19825
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x6230
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x19841
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6230
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1985c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x19878
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6230
testl %r14d, %r14d
jns 0x195e9
leaq 0xb0(%rsp), %rdi
callq 0x6080
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x198b3
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 0x1996d
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x19932
movq 0x58(%rsp), %rsi
jmp 0x1992a
jmp 0x1990e
jmp 0x1990e
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x1a0e8
jmp 0x19932
movq %rax, %rbx
jmp 0x19932
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x19932
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6230
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1994d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x19970
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6230
jmp 0x19970
jmp 0x1996d
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x19995
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x6230
leaq 0xb0(%rsp), %rdi
callq 0x60a0
movq %rbx, %rdi
callq 0x6450