// File: pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::initialiserClientEtListeProduitsCommandesCommande(Commande*)
void Magasin::initialiserClientEtListeProduitsCommandesCommande(Commande *commande) {
    Client *clientCommande = this->getClientAvecNomPrenomClient(commande->getNomClient(), commande->getPrenomClient());
    std::vector<Produit*> listeProduitsCommandesParLeClient;
    if (clientCommande) {
        commande->initialiserClient(clientCommande);
    }
    for (int i = 0; i < commande->getListeNomProduitsCommandes().size(); i++) {
        Produit *produit = this->getProduitAvecNomProduit(commande->getListeNomProduitsCommandes().at(i));
        if (produit) {
            listeProduitsCommandesParLeClient.push_back(produit);
        }
        commande->initialiserListeProduitsCommandes(listeProduitsCommandesParLeClient);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x10c10
movq -0x10(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x10c50
jmp 0x1622a
movq -0x100(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x14930
movq %rax, -0x108(%rbp)
jmp 0x16247
leaq -0x58(%rbp), %rdi
callq 0x4200
leaq -0x38(%rbp), %rdi
callq 0x4200
movq -0x108(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xb030
cmpq $0x0, -0x18(%rbp)
je 0x162c7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x10fe0
jmp 0x16283
jmp 0x162c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x162a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x4200
leaq -0x38(%rbp), %rdi
callq 0x4200
jmp 0x16485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1647c
movl $0x0, -0x84(%rbp)
movslq -0x84(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x10c90
jmp 0x162f1
leaq -0xa0(%rbp), %rdi
callq 0xd560
movq %rax, -0x118(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0xb090
movq -0x118(%rbp), %rcx
movq -0x110(%rbp), %rax
cmpq %rcx, %rax
jae 0x1646a
movq -0x10(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x10c90
jmp 0x16339
movslq -0x84(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x17b70
movq %rax, -0x120(%rbp)
jmp 0x16355
movq -0x120(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x4150
jmp 0x1636a
movq -0x100(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x14870
movq %rax, -0x128(%rbp)
jmp 0x16386
leaq -0xc8(%rbp), %rdi
callq 0x4200
leaq -0xe0(%rbp), %rdi
callq 0xb090
movq -0x128(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x163fe
leaq -0x80(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xb1b0
jmp 0x163c8
jmp 0x163fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x163f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x4200
leaq -0xe0(%rbp), %rdi
callq 0xb090
jmp 0x1647c
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xad60
jmp 0x1641b
movq -0x130(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x11000
jmp 0x16430
leaq -0xf8(%rbp), %rdi
callq 0xb150
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x162d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0xb150
jmp 0x1647c
leaq -0x80(%rbp), %rdi
callq 0xb150
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
leaq -0x80(%rbp), %rdi
callq 0xb150
movq -0x60(%rbp), %rdi
callq 0x4500
nop