// File: Teris45[P]Maze-Game/HighScore.cpp
// Function: HighScore::toStr()
char* HighScore::toStr() {
    string str;
    for(int i=0;i<5;i++){
        if(score[i]==-1) {
            continue;
        }
        else {
            if (str.empty()) {
                str = name[i].name + to_string(score[i]) + "\n";
                cout<<str;
            }
            else {
                string str2;
                str2 = name[i].name + to_string(score[i]) + "\n";
                str.append(str2);
            }
        }
    }

    cout<<str;

    char *writeable = new char[str.size() + 1];
    copy(str.begin(),str.end(),writeable);
    writeable[str.size()] = '\0';
    return writeable;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3320
movl $0x0, -0x2c(%rbp)
cmpl $0x5, -0x2c(%rbp)
jge 0xcc0f
movq -0x140(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $-0x1, 0x34(%rax,%rcx,4)
jne 0xc9ab
jmp 0xcc01
leaq -0x28(%rbp), %rdi
callq 0x33e0
testb $0x1, %al
jne 0xc9bd
jmp 0xcac5
movq -0x140(%rbp), %rax
movslq -0x2c(%rbp), %rcx
leaq (%rcx,%rcx,4), %rdx
leaq (%rax,%rdx,2), %rdx
movq %rdx, -0x148(%rbp)
movl 0x34(%rax,%rcx,4), %esi
leaq -0x90(%rbp), %rdi
callq 0xcd50
jmp 0xc9e9
movq -0x148(%rbp), %rsi
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0xcf20
jmp 0xca02
leaq 0x1648(%rip), %rdx      # 0xe051
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xced0
jmp 0xca18
leaq -0x28(%rbp), %rdi
movq %rdi, -0x150(%rbp)
leaq -0x50(%rbp), %rsi
movq %rsi, -0x158(%rbp)
callq 0x32d0
movq -0x158(%rbp), %rdi
callq 0x3160
leaq -0x70(%rbp), %rdi
callq 0x3160
leaq -0x90(%rbp), %rdi
callq 0x3160
movq -0x150(%rbp), %rsi
movq 0x7576(%rip), %rdi      # 0x13fd8
callq 0x3200
jmp 0xca69
jmp 0xcbfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xccde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xcab4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3160
leaq -0x90(%rbp), %rdi
callq 0x3160
jmp 0xccde
leaq -0xc0(%rbp), %rdi
callq 0x3320
movq -0x140(%rbp), %rax
movslq -0x2c(%rbp), %rcx
leaq (%rcx,%rcx,4), %rdx
leaq (%rax,%rdx,2), %rdx
movq %rdx, -0x160(%rbp)
movl 0x34(%rax,%rcx,4), %esi
leaq -0x120(%rbp), %rdi
callq 0xcd50
jmp 0xcafd
movq -0x160(%rbp), %rsi
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rdx
callq 0xcf20
jmp 0xcb19
leaq 0x1531(%rip), %rdx      # 0xe051
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xced0
jmp 0xcb35
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x168(%rbp)
leaq -0xe0(%rbp), %rsi
movq %rsi, -0x170(%rbp)
callq 0x32d0
movq -0x170(%rbp), %rdi
callq 0x3160
leaq -0x100(%rbp), %rdi
callq 0x3160
leaq -0x120(%rbp), %rdi
callq 0x3160
movq -0x168(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x3480
jmp 0xcb8c
leaq -0xc0(%rbp), %rdi
callq 0x3160
jmp 0xcbfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xcbec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xcbe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x3160
leaq -0x120(%rbp), %rdi
callq 0x3160
leaq -0xc0(%rbp), %rdi
callq 0x3160
jmp 0xccde
jmp 0xcbff
jmp 0xcc01
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xc98a
movq 0x73c2(%rip), %rdi      # 0x13fd8
leaq -0x28(%rbp), %rsi
callq 0x3200
jmp 0xcc21
leaq -0x28(%rbp), %rdi
callq 0x3180
movq %rax, %rdi
incq %rdi
callq 0x3030
movq %rax, -0x178(%rbp)
jmp 0xcc3e
movq -0x178(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x31e0
movq -0x180(%rbp), %rdi
movq %rax, -0x130(%rbp)
callq 0x3140
movq %rax, -0x138(%rbp)
movq -0x128(%rbp), %rdx
movq -0x130(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0xce70
jmp 0xcc92
movq -0x128(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3180
movq %rax, %rcx
movq -0x190(%rbp), %rax
movb $0x0, (%rax,%rcx)
movq -0x128(%rbp), %rax
movq %rax, -0x188(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3160
movq -0x188(%rbp), %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x3160
movq -0x98(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)