// File: /workspace/github_cpp_makefile_star2_O3/FabienBounoir[P]JustePrix-CLI/meilleurScore.cpp
// Function: MeilleurScore::sauvegarderScore(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void MeilleurScore::sauvegarderScore(int nbCoups, string nom)
{
    string ligneFichierScore;
    ofstream fichierScore(this->getFichierDifficulte().c_str());
    
    stringstream stringNbCoups;
    stringNbCoups << nbCoups;

    string creationScore = stringNbCoups.str() + " " + nom;
    this->donneeFichier.push_back(make_pair(nbCoups, creationScore));
    sort(donneeFichier.begin(), donneeFichier.end());

    for(unsigned int i=0;i < donneeFichier.size(); i++)
    {
        fichierScore << donneeFichier[i].second << endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
addq %rsi, %rdx
leaq 0x90(%rsp), %rdi
callq 0x43d2
movq 0x90(%rsp), %rsi
leaq 0x218(%rsp), %rdi
movl $0x10, %edx
callq 0x2200
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x5156
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x90(%rsp), %rdi
callq 0x2110
leaq 0xa0(%rsp), %rdi
movl %ebp, %esi
callq 0x22e0
leaq 0xa8(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x2290
leaq 0xf67(%rip), %rsi       # 0x60f2
leaq 0x70(%rsp), %rdi
callq 0x2330
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x51bc
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x51c3
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x2080
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5212
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x521a
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5249
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x526a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x10(%rsp), %rdi
movl %ebp, -0x8(%rdi)
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
callq 0x43d2
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x467a
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x52b1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x5372
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rbp # imm = 0xCCCCCCCCCCCCCCCD
imulq %rbp, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x5516
movq %r14, %rdi
movq %r15, %rsi
callq 0x55f3
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x5372
movl $0x1, %r12d
xorl %ecx, %ecx
leaq 0x218(%rsp), %r14
leaq (%rcx,%rcx,4), %rcx
movq 0x8(%rax,%rcx,8), %rsi
movq 0x10(%rax,%rcx,8), %rdx
movq %r14, %rdi
callq 0x2210
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movl %r12d, %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
incl %r12d
cmpq %rcx, %rdx
ja 0x5315
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x5389
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x4c18(%rip), %rsi      # 0x9fa8
leaq 0x90(%rsp), %rdi
callq 0x2140
leaq 0x110(%rsp), %rdi
callq 0x2090
movq 0x4c0f(%rip), %rax      # 0x9fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x220(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x218(%rsp,%rcx)
callq 0x2180
leaq 0x310(%rsp), %rdi
callq 0x2090
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x53fe
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x54a4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x54a4
jmp 0x54a1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5451
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x5451
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54bb
movq 0x80(%rsp), %rsi
jmp 0x54b3
jmp 0x546e
movq %rax, %rbx
jmp 0x54bb
movq %rax, %rbx
jmp 0x54dc
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x54e9
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x54e9
movq %rax, %rbx
jmp 0x54e9
jmp 0x54a1
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x54bb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x4ae6(%rip), %rsi      # 0x9fa8
leaq 0x90(%rsp), %rdi
callq 0x2140
leaq 0x110(%rsp), %rdi
callq 0x2090
leaq 0x218(%rsp), %rdi
callq 0x2260
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x5505
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x22f0
nop