// File: /workspace/github_cpp_makefile_star2_O1/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 0x43fe
movq 0x90(%rsp), %rsi
leaq 0x218(%rsp), %rdi
movl $0x10, %edx
callq 0x2200
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x516a
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 0xf53(%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 0x51d0
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x51d7
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 0x5226
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x522e
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 0x525d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x527e
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 0x43fe
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x46a2
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x52c5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%rbx), %r14
movq 0x8(%rbx), %r15
movabsq $-0x3333333333333333, %rbp # imm = 0xCCCCCCCCCCCCCCCD
cmpq %r15, %r14
je 0x530c
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
imulq %rbp, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x5526
movq %r14, %rdi
movq %r15, %rsi
callq 0x5603
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x5382
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 0x5325
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x5399
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x4c08(%rip), %rsi      # 0x9fa8
leaq 0x90(%rsp), %rdi
callq 0x2140
leaq 0x110(%rsp), %rdi
callq 0x2090
movq 0x4bff(%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 0x540e
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 0x54b4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x54b4
jmp 0x54b1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5461
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x5461
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54cb
movq 0x80(%rsp), %rsi
jmp 0x54c3
jmp 0x547e
movq %rax, %rbx
jmp 0x54cb
movq %rax, %rbx
jmp 0x54ec
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x54f9
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x54f9
movq %rax, %rbx
jmp 0x54f9
jmp 0x54b1
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x54cb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x4ad6(%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 0x5515
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x22f0
nop