// File: pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::deserialiserObjet(ObjetSerialized)
void Magasin::deserialiserObjet(ObjetSerialized objetSerialized) {
    std::vector<std::string> listeProduitsSerialisesString = objetSerialized.getObjetStringEncapsule("produit");
    for (int i = 0; i < listeProduitsSerialisesString.size(); i++) {
        Produit *produit = new Produit();
        produit->deserialiserObjet(ObjetSerialized(listeProduitsSerialisesString.at(i)));
        this->listeProduits.push_back(produit);
    }
    std::vector<std::string> listeClientsSerialisesString = objetSerialized.getObjetStringEncapsule("client");
    for (int i = 0; i < listeClientsSerialisesString.size(); i++) {
        Client *client = new Client();
        client->deserialiserObjet(ObjetSerialized(listeClientsSerialisesString.at(i)));
        this->listeClients.push_back(client);
        this->initialiserPanierClient(client);
    }
    this->initialiserCompteurClient();
    std::vector<std::string> listeCommandesSerialisesString = objetSerialized.getObjetStringEncapsule("commande");
    for (int i = 0; i < listeCommandesSerialisesString.size(); i++) {
        Commande *commande = new Commande();
        commande->deserialiserObjet(ObjetSerialized(listeCommandesSerialisesString.at(i)));
        this->listeCommandes.push_back(commande);
        this->initialiserClientEtListeProduitsCommandesCommande(commande);
    }
    this->initialiserCompteurCommande();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rsi, -0x260(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x4510
movq -0x250(%rbp), %rdx
leaq 0x6054(%rip), %rsi      # 0x1cb37
leaq -0x48(%rbp), %rdi
callq 0x7da0
jmp 0x16aee
movq -0x260(%rbp), %rsi
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x19fc0
jmp 0x16b04
leaq -0x48(%rbp), %rdi
callq 0x4200
leaq -0x49(%rbp), %rdi
callq 0x4330
movl $0x0, -0x60(%rbp)
movslq -0x60(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xd560
movq %rax, %rcx
movq -0x268(%rbp), %rax
cmpq %rcx, %rax
jae 0x16cad
movl $0x88, %edi
callq 0x42d0
movq %rax, -0x270(%rbp)
jmp 0x16b57
movq -0x270(%rbp), %rdi
callq 0x13150
jmp 0x16b65
movq -0x270(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x280(%rbp)
movslq -0x60(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x17b70
movq %rax, -0x278(%rbp)
jmp 0x16b91
movq -0x278(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x4150
jmp 0x16ba6
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x19960
jmp 0x16bbb
movq -0x280(%rbp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
leaq -0xb8(%rbp), %rsi
callq *%rax
jmp 0x16bd4
leaq -0xb8(%rbp), %rdi
callq 0x199b0
leaq -0xd8(%rbp), %rdi
callq 0x4200
movq -0x258(%rbp), %rdi
addq $0x38, %rdi
leaq -0x68(%rbp), %rsi
callq 0xb1b0
jmp 0x16c02
jmp 0x16c04
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x16b1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x16c35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4200
leaq -0x49(%rbp), %rdi
callq 0x4330
jmp 0x17174
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1716b
movq -0x270(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
movl $0x88, %esi
callq 0x42e0
jmp 0x1716b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x16c9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x199b0
leaq -0xd8(%rbp), %rdi
callq 0x4200
jmp 0x1716b
leaq -0x111(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0x4510
movq -0x288(%rbp), %rdx
leaq 0x5e71(%rip), %rsi      # 0x1cb3f
leaq -0x110(%rbp), %rdi
callq 0x7da0
jmp 0x16cdc
movq -0x260(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rdx
callq 0x19fc0
jmp 0x16cf8
leaq -0x110(%rbp), %rdi
callq 0x4200
leaq -0x111(%rbp), %rdi
callq 0x4330
movl $0x0, -0x118(%rbp)
movslq -0x118(%rbp), %rax
movq %rax, -0x290(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xd560
movq %rax, %rcx
movq -0x290(%rbp), %rax
cmpq %rcx, %rax
jae 0x16ee0
movl $0xc8, %edi
callq 0x42d0
movq %rax, -0x298(%rbp)
jmp 0x16d5a
movq -0x298(%rbp), %rdi
callq 0x8710
jmp 0x16d68
movq -0x298(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movslq -0x118(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x17b70
movq %rax, -0x2a0(%rbp)
jmp 0x16da0
movq -0x2a0(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x4150
jmp 0x16db5
leaq -0x170(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x19960
jmp 0x16dca
movq -0x2a8(%rbp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
leaq -0x170(%rbp), %rsi
callq *%rax
jmp 0x16de3
leaq -0x170(%rbp), %rdi
callq 0x199b0
leaq -0x190(%rbp), %rdi
callq 0x4200
movq -0x258(%rbp), %rdi
addq $0x50, %rdi
leaq -0x120(%rbp), %rsi
callq 0x17bb0
jmp 0x16e14
movq -0x258(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0x16010
jmp 0x16e29
jmp 0x16e2b
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
jmp 0x16d1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x16e65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x4200
leaq -0x111(%rbp), %rdi
callq 0x4330
jmp 0x1716b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1715f
movq -0x298(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
movl $0xc8, %esi
callq 0x42e0
jmp 0x1715f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x16ecf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x199b0
leaq -0x190(%rbp), %rdi
callq 0x4200
jmp 0x1715f
movq -0x258(%rbp), %rdi
callq 0x16490
jmp 0x16eee
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x4510
movq -0x2b0(%rbp), %rdx
leaq 0x5c37(%rip), %rsi      # 0x1cb46
leaq -0x1c8(%rbp), %rdi
callq 0x7da0
jmp 0x16f1d
movq -0x260(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rdx
callq 0x19fc0
jmp 0x16f39
leaq -0x1c8(%rbp), %rdi
callq 0x4200
leaq -0x1c9(%rbp), %rdi
callq 0x4330
movl $0x0, -0x1d0(%rbp)
movslq -0x1d0(%rbp), %rax
movq %rax, -0x2b8(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0xd560
movq %rax, %rcx
movq -0x2b8(%rbp), %rax
cmpq %rcx, %rax
jae 0x1711b
movl $0xd8, %edi
callq 0x42d0
movq %rax, -0x2c0(%rbp)
jmp 0x16f9b
movq -0x2c0(%rbp), %rdi
callq 0x10cd0
jmp 0x16fa9
movq -0x2c0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movslq -0x1d0(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x17b70
movq %rax, -0x2c8(%rbp)
jmp 0x16fe1
movq -0x2c8(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x4150
jmp 0x16ff6
leaq -0x228(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x19960
jmp 0x1700b
movq -0x2d0(%rbp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
leaq -0x228(%rbp), %rsi
callq *%rax
jmp 0x17024
leaq -0x228(%rbp), %rdi
callq 0x199b0
leaq -0x248(%rbp), %rdi
callq 0x4200
movq -0x258(%rbp), %rdi
addq $0x68, %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x17c20
jmp 0x17055
movq -0x258(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x161f0
jmp 0x1706a
jmp 0x1706c
movl -0x1d0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1d0(%rbp)
jmp 0x16f5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x170a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x4200
leaq -0x1c9(%rbp), %rdi
callq 0x4330
jmp 0x1715f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x17153
movq -0x2c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
movl $0xd8, %esi
callq 0x42e0
jmp 0x17153
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1710d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x199b0
leaq -0x248(%rbp), %rdi
callq 0x4200
jmp 0x17153
movq -0x258(%rbp), %rdi
callq 0x16540
jmp 0x17129
leaq -0x1a8(%rbp), %rdi
callq 0xb090
leaq -0xf0(%rbp), %rdi
callq 0xb090
leaq -0x28(%rbp), %rdi
callq 0xb090
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
leaq -0x1a8(%rbp), %rdi
callq 0xb090
leaq -0xf0(%rbp), %rdi
callq 0xb090
leaq -0x28(%rbp), %rdi
callq 0xb090
movq -0x58(%rbp), %rdi
callq 0x4500
nopl (%rax)