// File: pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::validerCommandeDUnClient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Magasin::validerCommandeDUnClient(std::string nomClient, std::string prenomClient) {
    Client *client = this->getClientAvecNomPrenomClient(nomClient, prenomClient);
    if (client) {
        if (!client->getListeProduitsSelectionnes().empty()) {
            this->listeCommandes.push_back(new Commande(this->compteurCommandes, client, client->getListeProduitsSelectionnes(), client->getListeQuantitesProduitsSelectionnes()));
            client->validerLePanier();
            this->compteurCommandes++;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4150
movq -0xd0(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x4150
jmp 0x15b94
movq -0xd8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x14930
movq %rax, -0xe0(%rbp)
jmp 0x15bb1
leaq -0x60(%rbp), %rdi
callq 0x4200
leaq -0x40(%rbp), %rdi
callq 0x4200
movq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x15da0
movq -0x20(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x8650
leaq -0x88(%rbp), %rdi
callq 0x17790
xorb $-0x1, %al
movb %al, -0xe1(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xb150
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x15c18
jmp 0x15d9e
movq -0xd8(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x108(%rbp)
movl $0xd8, %edi
callq 0x42d0
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x100(%rbp)
movb $0x1, -0xc1(%rbp)
movl 0x84(%rax), %eax
movl %eax, -0xf4(%rbp)
movq -0x20(%rbp), %rsi
movq %rsi, -0xf0(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x8650
jmp 0x15c71
movq -0x20(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x8690
jmp 0x15c83
movq -0xf0(%rbp), %rdx
movl -0xf4(%rbp), %esi
movq -0x100(%rbp), %rdi
leaq -0xa8(%rbp), %rcx
leaq -0xc0(%rbp), %r8
callq 0x10df0
jmp 0x15cac
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rax
movb $0x0, -0xc1(%rbp)
movq %rax, -0x90(%rbp)
leaq -0x90(%rbp), %rsi
callq 0x177d0
jmp 0x15cd6
leaq -0xc0(%rbp), %rdi
callq 0xb0f0
leaq -0xa8(%rbp), %rdi
callq 0xb150
movq -0x20(%rbp), %rdi
callq 0x8bd0
movq -0xd8(%rbp), %rax
movl 0x84(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x84(%rax)
jmp 0x15d9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x15d35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4200
leaq -0x40(%rbp), %rdi
callq 0x4200
jmp 0x15da9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x15d80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x15d74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xb0f0
leaq -0xa8(%rbp), %rdi
callq 0xb150
testb $0x1, -0xc1(%rbp)
jne 0x15d8b
jmp 0x15d9c
movq -0x100(%rbp), %rdi
movl $0xd8, %esi
callq 0x42e0
jmp 0x15da9
jmp 0x15da0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x4500
nopw %cs:(%rax,%rax)