LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::afficherClient(int)
void Magasin::afficherClient(int identifiantClient) {
    std::cout << "Les clients dont l'identifiant est " << std::to_string(identifiantClient) << " est :" << std::endl;
    for (Client *client : this->listeClients) {
        if (client->getIdentifiantClient() == identifiantClient) {
            std::cout << "Le client est : " << std::endl << *client << std::endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq 0x9bfa(%rip), %rdi      # 0x17fd0
leaq 0x46b6(%rip), %rsi      # 0x12a93
movl $0x23, %edx
callq 0x3280
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0xe442
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xe439
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xe43f
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xe442
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xe406
addl $-0x3, %r15d
jmp 0xe442
addl $-0x2, %r15d
jmp 0xe442
decl %r15d
movl %ebx, %r12d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x3290
addq (%r13), %r12
movq %r12, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x9b57
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x9b48(%rip), %r15      # 0x17fd0
movq %r15, %rdi
callq 0x3280
movq %rax, %r12
leaq 0x4633(%rip), %rsi      # 0x12acd
movl $0x6, %edx
movq %rax, %rdi
callq 0x3280
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xe4eb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x50(%r14), %r13
movq 0x58(%r14), %rbp
cmpq %rbp, %r13
je 0xe58c
leaq 0x4562(%rip), %r14      # 0x12a65
movq (%r13), %r12
movq %r12, %rdi
callq 0x6d60
cmpl %ebx, %eax
jne 0xe57f
movl $0x10, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3280
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %rax, %rdi
movq %r12, %rsi
callq 0x1014f
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
addq $0x8, %r13
cmpq %rbp, %r13
jne 0xe503
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xe5ba
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x58(%rsp), %rdi
movq %rax, %rsi
callq 0x6c32
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x6c32
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0xd89e
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xe9db
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0xe9f2
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3230
testq %r14, %r14
je 0xeacc
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x6dc4
movq (%r12), %r15
movq 0x8(%r12), %r12
testq %r15, %r15
je 0xea2c
movq 0x88(%rsp), %rsi
subq %r15, %rsi
movq %r15, %rdi
callq 0x3230
cmpq %r12, %r15
je 0xeacc
movl $0xd8, %edi
callq 0x3220
movq %rax, %r15
movl 0x84(%rbx), %ebp
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6dc4
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x6dd6
movb $0x1, %r12b
leaq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xa4f8
leaq 0x68(%rbx), %rdi
leaq 0x78(%rsp), %rsi
movq %r15, (%rsi)
xorl %r12d, %r12d
callq 0x108f8
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xeaa7
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xeabe
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq %r14, %rdi
callq 0x726c
incl 0x84(%rbx)
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xeb33
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
jmp 0xeb33
movq %rax, %rbx
jmp 0xeb33
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xeb17
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xeb2e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
testb %r12b, %r12b
je 0xeb73
movl $0xd8, %esi
movq %r15, %rdi
jmp 0xeb6e
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xeb5c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0xeb5c
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0xeb73
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::afficherCommandeAvecNom(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::afficherCommandeAvecNom(std::string nomClient, std::string prenomClient) {
    std::cout << "La liste des commandes dont le nom du client est " << nomClient << " est :" << std::endl;
    for (Commande *commande : this->listeCommandes) {
        if (commande->getClientCommande()->getNomClient() == nomClient) {
            std::cout << "La commande est : " << std::endl << *commande << std::endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x92f3(%rip), %r14      # 0x17fd0
leaq 0x3e03(%rip), %rsi      # 0x12ae7
movl $0x31, %edx
movq %r14, %rdi
callq 0x3280
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x3280
movq %rax, %r12
leaq 0x3dc3(%rip), %rsi      # 0x12acd
movl $0x6, %edx
movq %rax, %rdi
callq 0x3280
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq 0x68(%r15), %r12
movq 0x70(%r15), %r15
cmpq %r15, %r12
je 0xee3d
movq (%r12), %r13
movq %r13, %rdi
callq 0xa340
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x6d96
movq 0x10(%rsp), %rdx
cmpq 0x8(%rbx), %rdx
jne 0xed91
movq 0x8(%rsp), %rbp
testq %rdx, %rdx
je 0xed9b
movq (%rbx), %rsi
movq %rbp, %rdi
callq 0x3240
testl %eax, %eax
sete %r14b
jmp 0xed9e
movq 0x8(%rsp), %rbp
xorl %r14d, %r14d
jmp 0xed9e
movb $0x1, %r14b
leaq 0x18(%rsp), %rax
cmpq %rax, %rbp
je 0xedb8
movq 0x18(%rsp), %rsi
incq %rsi
movq %rbp, %rdi
callq 0x3230
testb %r14b, %r14b
je 0xee34
movl $0x12, %edx
movq 0x9207(%rip), %r14      # 0x17fd0
movq %r14, %rdi
leaq 0x3d01(%rip), %rsi      # 0x12ad4
callq 0x3280
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %rax, %rdi
movq %r13, %rsi
callq 0x102fa
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
addq $0x8, %r12
jmp 0xed47
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::initialiserPanierClient(Client*)
void Magasin::initialiserPanierClient(Client *client) {
    std::vector<Produit*> listeProduitsSelectionnesParLeClient;
    for (int i = 0; i < client->getListeNomProduitsSelectionnes().size(); i++) {
        Produit *produit = this->getProduitAvecNomProduit(client->getListeNomProduitsSelectionnes().at(i));
        if (produit) {
            listeProduitsSelectionnesParLeClient.push_back(produit);
        }
        client->initialiserListeProduitSelectionnes(listeProduitsSelectionnesParLeClient);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq %rdi, 0x38(%rsp)
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movl $0x8, %ebp
xorl %r14d, %r14d
leaq 0x60(%rsp), %r13
leaq 0x18(%rsp), %r12
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6dec
movq 0x68(%rsp), %r15
subq 0x60(%rsp), %r15
sarq $0x5, %r15
movq %r13, %rdi
callq 0x97ee
cmpq %r14, %r15
jbe 0xef94
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6dec
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r14, %rdx
jbe 0xefb9
movq %r12, %r15
leaq 0x28(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6c32
movq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0xd7f0
movq %rax, %r15
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xef21
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3230
movq %r13, %rdi
callq 0x97ee
movq %r15, 0x58(%rsp)
testq %r15, %r15
je 0xef57
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0xef4a
movq %r15, (%rsi)
addq $0x8, 0x8(%rsp)
jmp 0xef57
movq %rsp, %rdi
leaq 0x58(%rsp), %rdx
callq 0x9d6e
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x9664
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
callq 0x76b2
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xef88
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
incq %r14
addq $0x20, %rbp
jmp 0xee85
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xefaa
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x382e(%rip), %rdi      # 0x127ee
movq %r14, %rsi
xorl %eax, %eax
callq 0x3320
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xf00e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0xf00e
jmp 0xf01c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xf01f
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
jmp 0xf01f
jmp 0xf00b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x97ee
jmp 0xf01f
jmp 0xf01c
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xf035
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::initialiserCompteurClient()
void Magasin::initialiserCompteurClient() {
    int maximumIdentifiantClient = 0;
    for (Client *client : this->listeClients) {
        if (maximumIdentifiantClient < client->getIdentifiantClient()) {
            maximumIdentifiantClient = client->getIdentifiantClient();
        }
    }
    this->compteurClients = maximumIdentifiantClient + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %r15
movq 0x58(%rdi), %r12
cmpq %r12, %r15
je 0xf348
xorl %ebp, %ebp
movq (%r15), %r14
movq %r14, %rdi
callq 0x6d60
cmpl %eax, %ebp
jge 0xf33b
movq %r14, %rdi
callq 0x6d60
movl %eax, %ebp
addq $0x8, %r15
cmpq %r12, %r15
jne 0xf322
incl %ebp
jmp 0xf34d
movl $0x1, %ebp
movl %ebp, 0x80(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::initialiserCompteurCommande()
void Magasin::initialiserCompteurCommande() {
    int maximumIdentifiantCommande = 0;
    for (Commande *commande : this->listeCommandes) {
        if (maximumIdentifiantCommande < commande->getIdentifiantCommande()) {
            maximumIdentifiantCommande = commande->getIdentifiantCommande();
        }
    }
    this->compteurCommandes = maximumIdentifiantCommande + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %r15
movq 0x70(%rdi), %r12
cmpq %r12, %r15
je 0xf39c
xorl %ebp, %ebp
movq (%r15), %r14
movq %r14, %rdi
callq 0xa338
cmpl %eax, %ebp
jge 0xf38f
movq %r14, %rdi
callq 0xa338
movl %eax, %ebp
addq $0x8, %r15
cmpq %r12, %r15
jne 0xf376
incl %ebp
jmp 0xf3a1
movl $0x1, %ebp
movl %ebp, 0x84(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/pc260533[P]ITC313-TP2/./client.h
// Function: operator<<(std::ostream&, Client const&)
std::ostream& operator<< (std::ostream& out, const Client &client){
        out << client.affichageCourt() << std::endl;
        out << "La liste des produits du panier sont : " << std::endl;
        for (int i = 0; i < client.listeProduitsSelectionnes.size(); i++) {
            out << "Quantite : " << client.listeQuantitesProduitsSelectionnes.at(i) << " " << *client.listeProduitsSelectionnes.at(i);
        }
        return out;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x76bc
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x3280
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x101c4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x29bd(%rip), %rsi      # 0x12b88
movl $0x27, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq 0x88(%r14), %rax
cmpq 0x80(%r14), %rax
je 0x102b1
xorl %r15d, %r15d
leaq 0x2993(%rip), %r12      # 0x12bb0
leaq 0x2950(%rip), %r13      # 0x12b74
movl $0xb, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3280
movq 0x98(%r14), %rax
movq 0xa0(%r14), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r15, %rdx
jbe 0x102c3
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0x33d0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x3280
movq 0x80(%r14), %rax
movq 0x88(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0x102c3
movq (%rax,%r15,8), %rsi
movq %rbp, %rdi
callq 0xff01
incq %r15
movq 0x88(%r14), %rax
subq 0x80(%r14), %rax
sarq $0x3, %rax
cmpq %r15, %rax
ja 0x10224
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2524(%rip), %rdi      # 0x127ee
movq %r15, %rsi
xorl %eax, %eax
callq 0x3320
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x102f2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/pc260533[P]ITC313-TP2/serializer.cpp
// Function: Serializer::serializeObjetISerializable[abi:cxx11](ISerializable*)
std::string Serializer::serializeObjetISerializable(ISerializable *objetISerializable) {
    std::string objetISerializableSerialize = "";
    try {
        objetISerializableSerialize = objetISerializable->serializerObjet();
    }
    catch (std::exception &exception) {
        throw ExceptionSerialization();
    }
    return objetISerializableSerialize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0xf8f(%rip), %rdx       # 0x12b36
movq %rdx, %rsi
callq 0x6cc8
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq *0x18(%rax)
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32b0
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11be7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x11c46
movq %r14, %rdi
callq 0x30f0
movl $0x8, %edi
callq 0x3120
movq %rax, %r15
movq %rax, %rdi
callq 0x11ea8
leaq 0x615e(%rip), %rsi      # 0x17d80
leaq 0x28b(%rip), %rdx       # 0x11eb4
movq %r15, %rdi
callq 0x33c0
movq %rax, %r14
jmp 0x11c41
movq %rax, %r14
movq %r15, %rdi
callq 0x3190
callq 0x33a0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x11c67
movq (%r12), %rsi
incq %rsi
callq 0x3230
jmp 0x11c67
movq %rax, %rdi
callq 0x6c27
movq %rax, %r14
movq %r14, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/pc260533[P]ITC313-TP2/serializer.cpp
// Function: Serializer::deserializeObjetISerializable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ISerializable*)
void Serializer::deserializeObjetISerializable(std::string objetISerilizableString, ISerializable *objetISerilizable) {
    try {
        objetISerilizable->deserialiserObjet(ObjetSerialized(objetISerilizableString));
    }
    catch (std::exception &exception) {
        throw ExceptionSerialization();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %rdi
movq %rax, %rsi
callq 0x6c32
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x10cb8
movq (%rbx), %rax
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq *0x20(%rax)
leaq 0x20(%rsp), %rdi
callq 0x10cf4
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x11cd5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %r14
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x10cf4
jmp 0x11cf7
movq %rdx, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x11d15
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x11d15
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x11d63
movq %rbx, %rdi
callq 0x30f0
movl $0x8, %edi
callq 0x3120
movq %rax, %r14
movq %rax, %rdi
callq 0x11ea8
leaq 0x6041(%rip), %rsi      # 0x17d80
leaq 0x16e(%rip), %rdx       # 0x11eb4
movq %r14, %rdi
callq 0x33c0
movq %rax, %rbx
jmp 0x11d5e
movq %rax, %rbx
movq %r14, %rdi
callq 0x3190
callq 0x33a0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0x6c27
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: FieldQuality::FieldQuality(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, unsigned long*, unsigned long*)
FieldQuality::FieldQuality(string *nm,uintb *l,uintb *h)

{
  name = *nm;
  low = *l;
  high = *h;
  signext = false;
  flow = true;
  hex = true;
  delete nm;
  delete l;
  delete h;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
callq 0xf1f0
movl (%r14), %eax
movl %eax, 0x20(%r12)
movl (%rbx), %eax
movl %eax, 0x24(%r12)
movw $0x100, 0x28(%r12)      # imm = 0x100
movb $0x1, 0x2a(%r12)
movq (%r15), %rdi
leaq 0x10(%r15), %rax
cmpq %rax, %rdi
je 0x29d93
movq (%rax), %rsi
incq %rsi
callq 0xf380
movl $0x20, %esi
movq %r15, %rdi
callq 0xf380
movl $0x8, %esi
movq %r14, %rdi
callq 0xf380
movl $0x8, %esi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf380
movq %rax, %rbx
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x29ddb
movq (%r13), %rsi
incq %rsi
callq 0xf380
movq %rbx, %rdi
callq 0xf730
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: WithBlock::set(SubtableSymbol*, PatternEquation*, std::vector<ContextChange*, std::allocator<ContextChange*>>*)
void WithBlock::set(SubtableSymbol *s, PatternEquation *pq, vector<ContextChange *> *cvec)

{
  ss = s;
  pateq = pq;
  if (pateq != (PatternEquation *)0)
    pateq->layClaim();
  if (cvec != (vector<ContextChange *> *)0) {
    for(int4 i=0;i<cvec->size();++i)
      contvec.push_back((*cvec)[i]);	// Lay claim to -cvec-s pointers, we don't clone
    delete cvec;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r14
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
testq %rdx, %rdx
je 0x29e02
incl 0x8(%rdx)
testq %rbx, %rbx
je 0x29e80
movq (%rbx), %rdx
cmpq %rdx, 0x8(%rbx)
je 0x29e56
leaq 0x10(%r14), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
addq %r12, %rdx
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0x29e34
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x18(%r14)
jmp 0x29e3c
movq %r15, %rdi
callq 0x34f5c
incq %r13
movq (%rbx), %rdx
movq 0x8(%rbx), %rax
subq %rdx, %rax
sarq $0x3, %rax
addq $0x8, %r12
cmpq %r13, %rax
ja 0x29e1a
testq %rdx, %rdx
je 0x29e6a
movq 0x10(%rbx), %rsi
subq %rdx, %rsi
movq %rdx, %rdi
callq 0xf380
movl $0x18, %esi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf380
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: WithBlock::~WithBlock()
WithBlock::~WithBlock(void)

{
  if (pateq != (PatternEquation *)0)
    PatternEquation::release(pateq);
  for(int4 i=0;i<contvec.size();++i) {
    delete contvec[i];
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x29e9f
callq 0x3dc36
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rcx
cmpq %rdi, %rcx
je 0x29edb
xorl %r14d, %r14d
movq (%rdi,%r14,8), %rax
testq %rax, %rax
je 0x29ec9
movq (%rax), %rcx
movq %rax, %rdi
callq *0x8(%rcx)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rcx
incq %r14
movq %rcx, %rax
subq %rdi, %rax
sarq $0x3, %rax
cmpq %r14, %rax
ja 0x29eaf
testq %rdi, %rdi
je 0x29ef3
movq 0x20(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf380
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x13a37
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: WithBlock::collectAndPrependPattern(std::__cxx11::list<WithBlock, std::allocator<WithBlock>> const&, PatternEquation*)
PatternEquation *WithBlock::collectAndPrependPattern(const list<WithBlock> &stack, PatternEquation *pateq)

{
  list<WithBlock>::const_iterator iter;
  for(iter=stack.begin();iter!=stack.end();++iter) {
    PatternEquation *witheq = (*iter).pateq;
    if (witheq != (PatternEquation *)0)
      pateq = new EquationAnd(witheq, pateq);
  }
  return pateq;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %r13
cmpq %rdi, %r13
je 0x29f4b
movq %rdi, %r14
movq 0x18(%r13), %r12
testq %r12, %r12
je 0x29f42
movl $0x48, %edi
callq 0xf370
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3f69e
movq %r15, %rbx
movq (%r13), %r13
cmpq %r14, %r13
jne 0x29f1b
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x48, %esi
movq %r15, %rdi
callq 0xf380
movq %rbx, %rdi
callq 0xf730
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: WithBlock::getCurrentSubtable(std::__cxx11::list<WithBlock, std::allocator<WithBlock>> const&)
SubtableSymbol *WithBlock::getCurrentSubtable(const list<WithBlock> &stack)

{
  list<WithBlock>::const_iterator iter;
  for(iter=stack.begin();iter!=stack.end();++iter) {
    if ((*iter).ss != (SubtableSymbol *)0)
      return (*iter).ss;
  }
  return (SubtableSymbol *)0;
}

// Assembly:
movq %rdi, %rcx
movq (%rcx), %rcx
cmpq %rdi, %rcx
je 0x2a0cd
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x2a0bb
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::dealWithUnnecessaryExt(OpTpl*, Constructor*)
void ConsistencyChecker::dealWithUnnecessaryExt(OpTpl *op,Constructor *ct)

{ // Deal with detected extension (SEXT or ZEXT) where the
  // input size is the same as the output size
  if (printextwarning) {
    cerr << "Unnecessary ";
    printOpName(cerr,op);
    cerr << " in constructor starting at line " << dec << ct->getLineno() << endl;
  }
  op->setOpcode(CPUI_COPY);	// Equivalent to copy
  unnecessarypcode += 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0xc(%rdi)
jne 0x2a398
movq %rdx, %r15
movq 0x62cd4(%rip), %r12     # 0x8cfe8
leaq 0x375da(%rip), %rsi     # 0x618f5
movl $0xc, %edx
movq %r12, %rdi
callq 0xf420
movq %r12, %rsi
movq %r14, %rdx
callq 0x2a3ae
leaq 0x37bf8(%rip), %rsi     # 0x61f32
movl $0x21, %edx
movq %r12, %rdi
callq 0xf420
movq (%r12), %rax
movq -0x18(%rax), %rax
movl 0x18(%r12,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r12,%rax)
movl 0x90(%r15), %esi
movq %r12, %rdi
callq 0xf6e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xf340
movsbl %al, %esi
movq %r15, %rdi
callq 0xf040
movq %rax, %rdi
callq 0xf260
movl $0x1, 0x8(%r14)
incl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::dealWithUnnecessaryTrunc(OpTpl*, Constructor*)
void ConsistencyChecker::dealWithUnnecessaryTrunc(OpTpl *op,Constructor *ct)

{
  if (printextwarning) {
    cerr << "Unnecessary ";
    printOpName(cerr,op);
    cerr << " in constructor starting at line " << dec << ct->getLineno() << endl;
  }
  op->setOpcode(CPUI_COPY);	// Equivalent to copy
  op->removeInput(1);
  unnecessarypcode += 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0xc(%rdi)
jne 0x2a7bc
movq %rdx, %r15
movq 0x628b0(%rip), %r12     # 0x8cfe8
leaq 0x371b6(%rip), %rsi     # 0x618f5
movl $0xc, %edx
movq %r12, %rdi
callq 0xf420
movq %r12, %rsi
movq %r14, %rdx
callq 0x2a3ae
leaq 0x377d4(%rip), %rsi     # 0x61f32
movl $0x21, %edx
movq %r12, %rdi
callq 0xf420
movq (%r12), %rax
movq -0x18(%rax), %rax
movl 0x18(%r12,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r12,%rax)
movl 0x90(%r15), %esi
movq %r12, %rdi
callq 0xf6e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xf340
movsbl %al, %esi
movq %r15, %rdi
callq 0xf040
movq %rax, %rdi
callq 0xf260
movl $0x1, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x24b00
incl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::checkOpMisuse(OpTpl*, Constructor*)
bool ConsistencyChecker::checkOpMisuse(OpTpl *op,Constructor *ct)

{
  switch(op->getOpcode()) {
  case CPUI_INT_LESS:
    {
      VarnodeTpl *vn = op->getIn(1);
      if (vn->getSpace().isConstSpace() && vn->getOffset().isZero()) {
	cerr << "Unsigned comparison with zero is always false in constructor starting at line " << dec << ct->getLineno() << endl;
      }
    }
    break;
  default:
    break;
  }
  return true;
}

// Assembly:
cmpl $0xf, 0x8(%rsi)
jne 0x2a884
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x10(%rsi), %rax
movq 0x8(%rax), %r14
movq %r14, %rdi
callq 0x233b0
testb %al, %al
je 0x2a87d
cmpl $0x0, 0x20(%r14)
jne 0x2a87d
cmpq $0x0, 0x30(%r14)
jne 0x2a87d
movq 0x627ce(%rip), %r14     # 0x8cfe8
leaq 0x370e1(%rip), %rsi     # 0x61902
movl $0x4e, %edx
movq %r14, %rdi
callq 0xf420
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r14,%rax)
movl 0x90(%rbx), %esi
movq %r14, %rdi
callq 0xf6e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xf340
movsbl %al, %esi
movq %rbx, %rdi
callq 0xf040
movq %rax, %rdi
callq 0xf260
addq $0x8, %rsp
popq %rbx
popq %r14
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::checkConstructorSection(Constructor*, ConstructTpl*)
bool ConsistencyChecker::checkConstructorSection(Constructor *ct,ConstructTpl *cttpl)

{ // Check all the OpTpl s within the given section for consistency, return true if all tests pass
  if (cttpl == (ConstructTpl *)0)
    return true;		// Nothing to check
  vector<OpTpl *>::const_iterator iter;
  const vector<OpTpl *> &ops(cttpl->getOpvec());
  bool testresult = true;

  for(iter=ops.begin();iter!=ops.end();++iter) {
    if (!sizeRestriction(*iter,ct))
      testresult = false;
    if (!checkOpMisuse(*iter,ct))
      testresult = false;
  }
  return testresult;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movb $0x1, %bl
testq %rdx, %rdx
je 0x2ba48
movq %rdx, %r14
movq 0x8(%rdx), %r13
cmpq 0x10(%rdx), %r13
je 0x2ba48
movq %rsi, %r15
movq %rdi, %r12
movq (%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x2a888
andb %al, %bl
movq (%r13), %rsi
movq %r15, %rdx
callq 0x2a7e0
addq $0x8, %r13
cmpq 0x10(%r14), %r13
jne 0x2ba21
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::checkVarnodeTruncation(Constructor*, int, OpTpl*, VarnodeTpl*, bool)
bool ConsistencyChecker::checkVarnodeTruncation(Constructor *ct,int4 slot,
						OpTpl *op,VarnodeTpl *vn,bool isbigendian)
{
  const ConstTpl &off( vn->getOffset() );
  if (off.getType() != ConstTpl::handle) return true;
  if (off.getSelect() != ConstTpl::v_offset_plus) return true;
  ConstTpl::const_type sztype = vn->getSize().getType();
  if ((sztype != ConstTpl::real)&&(sztype != ConstTpl::handle)) {
    printOpError(op,ct,slot,slot,"Bad truncation expression");
    return false;
  }
  int4 sz = recoverSize(off,ct); // Recover the size of the original operand
  if (sz <= 0) {
    printOpError(op,ct,slot,slot,"Could not recover size");
    return false;
  }
  bool res = vn->adjustTruncation(sz,isbigendian);
  if (!res) {
    printOpError(op,ct,slot,slot,"Truncation operator out of bounds");
    return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movb $0x1, %bpl
cmpl $0x1, 0x20(%r8)
jne 0x2bb7d
movq %r8, %r12
cmpl $0x3, 0x38(%r8)
jne 0x2bb7d
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r14
cmpl $0x2, 0x40(%r12)
jb 0x2baca
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x364d8(%rip), %rsi     # 0x61f77
leaq 0x364ea(%rip), %rdx     # 0x61f90
leaq 0x8(%rsp), %rdi
callq 0x117f6
leaq 0x8(%rsp), %r9
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x2b6fc
jmp 0x2bb64
movl %r9d, %r13d
leaq 0x20(%r12), %rsi
movq %r14, %rdx
callq 0x2a106
testl %eax, %eax
jle 0x2bb2d
movzbl %r13b, %edx
movq %r12, %rdi
movl %eax, %esi
callq 0x244dc
testb %al, %al
jne 0x2bb7d
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x364a3(%rip), %rsi     # 0x61fa8
leaq 0x364bd(%rip), %rdx     # 0x61fc9
leaq 0x8(%rsp), %rdi
callq 0x117f6
leaq 0x8(%rsp), %r9
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x2b6fc
jmp 0x2bb64
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x36453(%rip), %rsi     # 0x61f91
leaq 0x36462(%rip), %rdx     # 0x61fa7
leaq 0x8(%rsp), %rdi
callq 0x117f6
leaq 0x8(%rsp), %r9
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x2b6fc
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2bb7b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf380
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2bb96
jmp 0x2bbb2
jmp 0x2bb96
jmp 0x2bbb2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2bbb5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf380
jmp 0x2bbb5
movq %rax, %rbx
movq %rbx, %rdi
callq 0xf730
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::checkSectionTruncations(Constructor*, ConstructTpl*, bool)
bool ConsistencyChecker::checkSectionTruncations(Constructor *ct,ConstructTpl *cttpl,bool isbigendian)

{ // Check all the varnodes that have an offset_plus template
  //     adjust the plus if we are bigendian
  //     make sure the truncation is valid
  vector<OpTpl *>::const_iterator iter;
  const vector<OpTpl *> &ops(cttpl->getOpvec());
  bool testresult = true;
  
  for(iter=ops.begin();iter!=ops.end();++iter) {
    OpTpl *op = *iter;
    VarnodeTpl *outvn = op->getOut();
    if (outvn != (VarnodeTpl *)0) {
      if (!checkVarnodeTruncation(ct,-1,op,outvn,isbigendian))
	testresult = false;
    }
    for(int4 i=0;i<op->numInput();++i) {
      if (!checkVarnodeTruncation(ct,i,op,op->getIn(i),isbigendian))
	testresult = false;
    }
  }
  return testresult;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq 0x8(%rdx), %rsi
movq %rdx, 0x8(%rsp)
cmpq 0x10(%rdx), %rsi
je 0x2bc79
movq %rdi, %r15
movb $0x1, %bpl
movzbl %cl, %r12d
movq %rsi, 0x10(%rsp)
movq (%rsi), %r13
movq (%r13), %r8
testq %r8, %r8
je 0x2bc16
movq %r15, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r13, %rcx
movl %r12d, %r9d
callq 0x2ba54
andb %al, %bpl
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
testl %ecx, %ecx
jle 0x2bc5f
xorl %ebx, %ebx
movq (%rax,%rbx,8), %r8
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r13, %rcx
movl %r12d, %r9d
callq 0x2ba54
andb %al, %bpl
incq %rbx
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %rbx
jl 0x2bc2b
movq 0x10(%rsp), %rsi
addq $0x8, %rsi
movq 0x8(%rsp), %rax
cmpq 0x10(%rax), %rsi
jne 0x2bbec
jmp 0x2bc7c
movb $0x1, %bpl
andb $0x1, %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::possibleIntersection(VarnodeTpl const*, VarnodeTpl const*)
bool ConsistencyChecker::possibleIntersection(const VarnodeTpl *vn1,const VarnodeTpl *vn2)

{ // Conservatively test whether vn1 and vn2 can intersect
  if (vn1->getSpace().isConstSpace()) return false;
  if (vn2->getSpace().isConstSpace()) return false;

  bool u1 = vn1->getSpace().isUniqueSpace();
  bool u2 = vn2->getSpace().isUniqueSpace();

  if (u1 != u2) return false;

  if (vn1->getSpace().getType() != ConstTpl::spaceid) return true;
  if (vn2->getSpace().getType() != ConstTpl::spaceid) return true;
  AddrSpace *spc = vn1->getSpace().getSpace();
  if (spc != vn2->getSpace().getSpace()) return false;


  if (vn2->getOffset().getType() != ConstTpl::real) return true;
  if (vn2->getSize().getType() != ConstTpl::real) return true;

  if (vn1->getOffset().getType() != ConstTpl::real) return true;
  if (vn1->getSize().getType() != ConstTpl::real) return true;

  uintb offset = vn1->getOffset().getReal();
  uintb size = vn1->getSize().getReal();

  uintb off = vn2->getOffset().getReal();
  if (off+vn2->getSize().getReal()-1 < offset) return false;
  if (off > (offset+size-1)) return false;
  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x233b0
testb %al, %al
jne 0x2c4fe
movq %r14, %rdi
callq 0x233b0
testb %al, %al
jne 0x2c4fe
movq %rbx, %rdi
callq 0x233c4
movl %eax, %ebp
movq %r14, %rdi
callq 0x233c4
cmpb %al, %bpl
je 0x2c505
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
cmpl $0x6, (%rbx)
jne 0x2c500
cmpl $0x6, (%r14)
jne 0x2c500
movq 0x8(%rbx), %rcx
cmpq 0x8(%r14), %rcx
jne 0x2c4fe
cmpl $0x0, 0x20(%r14)
jne 0x2c500
cmpl $0x0, 0x40(%r14)
jne 0x2c500
cmpl $0x0, 0x20(%rbx)
jne 0x2c500
cmpl $0x0, 0x40(%rbx)
jne 0x2c500
movq 0x30(%rbx), %rax
movq 0x30(%r14), %rcx
movq 0x50(%r14), %rdx
addq %rcx, %rdx
decq %rdx
cmpq %rax, %rdx
jb 0x2c4fe
movq 0x50(%rbx), %rdx
addq %rdx, %rax
decq %rax
cmpq %rax, %rcx
setbe %al
jmp 0x2c500
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::readWriteInterference(VarnodeTpl const*, OpTpl const*, bool) const
bool ConsistencyChecker::readWriteInterference(const VarnodeTpl *vn,const OpTpl *op,bool checkread) const

{ // Does op potentially read vn
  // This is extremely conservative.  Basically any op where
  // we can't see exactly what might be written is considered
  // interference
  switch(op->getOpcode()) {
  case BUILD:
  case CROSSBUILD:
  case DELAY_SLOT:
  case MACROBUILD:
  case CPUI_LOAD:
  case CPUI_STORE:
  case CPUI_BRANCH:
  case CPUI_CBRANCH:
  case CPUI_BRANCHIND:
  case CPUI_CALL:
  case CPUI_CALLIND:
  case CPUI_CALLOTHER:
  case CPUI_RETURN:
  case LABELBUILD:		// Another value might jump in here
    return true;
  default:
    break;
  }

  if (checkread) {
    int4 numinputs = op->numInput();
    for(int4 i=0;i<numinputs;++i)
      if (possibleIntersection(vn,op->getIn(i)))
	return true;
  }

  // We always check for writes to -vn-
  const VarnodeTpl *vn2 = op->getOut();
  if (vn2 != (const VarnodeTpl *)0) {
	if (possibleIntersection(vn,vn2))
      return true;
  }
  return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movl 0x8(%rdx), %eax
movb $0x1, %bl
leal -0x2(%rax), %edx
cmpl $0x9, %edx
jb 0x2c58e
movq %rsi, %r14
addl $-0x3c, %eax
cmpl $0x6, %eax
ja 0x2c59a
movl $0x73, %edx
btl %eax, %edx
jae 0x2c59a
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testb %cl, %cl
je 0x2c5d5
movq 0x18(%r15), %r12
subq 0x10(%r15), %r12
shrq $0x3, %r12
testl %r12d, %r12d
jle 0x2c5d5
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
callq 0x2c4c8
testb %al, %al
jne 0x2c58e
incq %r13
cmpq %r13, %r12
jne 0x2c5b9
movq (%r15), %rsi
testq %rsi, %rsi
je 0x2c5e9
movq %r14, %rdi
callq 0x2c4c8
testb %al, %al
jne 0x2c58e
xorl %ebx, %ebx
jmp 0x2c58e
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::examineVn(std::map<unsigned long, ConsistencyChecker::OptimizeRecord, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, ConsistencyChecker::OptimizeRecord>>>&, VarnodeTpl const*, unsigned int, int, int)
void ConsistencyChecker::examineVn(map<uintb,OptimizeRecord> &recs,
				   const VarnodeTpl *vn,uint4 i,int4 inslot,int4 secnum)
{ // If varnode is a temporary,  count whether it is read or written
  if (vn == (const VarnodeTpl *)0) return;
  if (!vn->getSpace().isUniqueSpace()) return;
  if (vn->getOffset().getType() != ConstTpl::real) return;

  map<uintb,OptimizeRecord>::iterator iter;
  iter = recs.insert( pair<uint4,OptimizeRecord>(vn->getOffset().getReal(),OptimizeRecord())).first;
  if (inslot>=0) {
    (*iter).second.readop = i;
    (*iter).second.readcount += 1;
    (*iter).second.inslot = inslot;
    (*iter).second.readsection = secnum;
  }
  else {
    (*iter).second.writeop = i;
    (*iter).second.writecount += 1;
    (*iter).second.writesection = secnum;
  }
}

// Assembly:
testq %rsi, %rsi
je 0x2c678
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
callq 0x233c4
testb %al, %al
je 0x2c66c
cmpl $0x0, 0x20(%r12)
jne 0x2c66c
movl 0x30(%r12), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movaps 0x34fe8(%rip), %xmm0    # 0x61620
movups %xmm0, 0x4(%rsi)
movaps 0x34fed(%rip), %xmm0    # 0x61630
movups %xmm0, 0x14(%rsi)
movq %r15, %rdi
callq 0x3564a
testl %ebp, %ebp
js 0x2c662
movl %r14d, 0x2c(%rax)
incl 0x38(%rax)
movl %ebp, 0x30(%rax)
movl %ebx, 0x40(%rax)
jmp 0x2c66c
movl %r14d, 0x28(%rax)
incl 0x34(%rax)
movl %ebx, 0x3c(%rax)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::optimizeGather1(Constructor*, std::map<unsigned long, ConsistencyChecker::OptimizeRecord, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, ConsistencyChecker::OptimizeRecord>>>&, int) const
void ConsistencyChecker::optimizeGather1(Constructor *ct,map<uintb,OptimizeRecord> &recs,int4 secnum) const

{ // Look for reads and writes to temporaries, count how many times each temporary is read or written
  ConstructTpl *tpl;
  if (secnum < 0)
    tpl = ct->getTempl();
  else
    tpl = ct->getNamedTempl(secnum);
  if (tpl == (ConstructTpl *)0)
    return;
  const vector<OpTpl *> &ops( tpl->getOpvec() );
  for(uint4 i=0;i<ops.size();++i) {
    const OpTpl *op = ops[i];
    for(uint4 j=0;j<op->numInput();++j) {
      const VarnodeTpl *vnin = op->getIn(j);
      examineVn(recs,vnin,i,j,secnum);
    }
    const VarnodeTpl *vn = op->getOut();
    examineVn(recs,vn,i,-1,secnum);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
testl %ecx, %ecx
js 0x2c69d
movq %rsi, %rdi
movl %ebx, %esi
callq 0x4cae0
movq %rax, %r15
jmp 0x2c6a1
movq 0x60(%rsi), %r15
testq %r15, %r15
je 0x2c72e
movq 0x8(%r15), %rax
cmpq %rax, 0x10(%r15)
je 0x2c72e
xorl %r12d, %r12d
movq (%rax,%r12,8), %rbp
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
testl %ecx, %ecx
je 0x2c700
xorl %r13d, %r13d
movslq %r13d, %r13
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
movl %r12d, %edx
movl %r13d, %ecx
movl %ebx, %r8d
callq 0x2c5ee
incl %r13d
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ecx, %r13d
jb 0x2c6d1
movq (%rbp), %rsi
movq %r14, %rdi
movl %r12d, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ebx, %r8d
callq 0x2c5ee
incl %r12d
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x2c6b7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::optimizeGather2(Constructor*, std::map<unsigned long, ConsistencyChecker::OptimizeRecord, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, ConsistencyChecker::OptimizeRecord>>>&, int) const
void ConsistencyChecker::optimizeGather2(Constructor *ct,map<uintb,OptimizeRecord> &recs,int4 secnum) const

{ // Make sure any temp used by the export is not optimized away
  ConstructTpl *tpl;
  if (secnum < 0)
    tpl = ct->getTempl();
  else
    tpl = ct->getNamedTempl(secnum);
  if (tpl == (ConstructTpl *)0)
    return;
  HandleTpl *hand = tpl->getResult();
  if (hand == (HandleTpl *)0) return;
  if (hand->getPtrSpace().isUniqueSpace()) {
    if (hand->getPtrOffset().getType() == ConstTpl::real) {
      pair<map<uintb,OptimizeRecord>::iterator,bool> res;
      uintb offset = hand->getPtrOffset().getReal();
      res = recs.insert( pair<uintb,OptimizeRecord>(offset,OptimizeRecord()));
      (*res.first).second.writeop = 0;
      (*res.first).second.readop = 0;
      (*res.first).second.writecount = 2;
      (*res.first).second.readcount = 2;
      (*res.first).second.readsection = -2;
      (*res.first).second.writesection = -2;
    }
  }
  if (hand->getSpace().isUniqueSpace()) {
    if ((hand->getPtrSpace().getType() == ConstTpl::real)&&
	(hand->getPtrOffset().getType() == ConstTpl::real)) {
      pair<map<uintb,OptimizeRecord>::iterator,bool> res;
      uintb offset = hand->getPtrOffset().getReal();
      res = recs.insert( pair<uintb,OptimizeRecord>(offset,OptimizeRecord()));
      (*res.first).second.writeop = 0;
      (*res.first).second.readop = 0;
      (*res.first).second.writecount = 2;
      (*res.first).second.readcount = 2;
      (*res.first).second.readsection = -2;
      (*res.first).second.writesection = -2;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
testl %ecx, %ecx
js 0x2c75a
movq %rsi, %rdi
movl %ecx, %esi
callq 0x4cae0
jmp 0x2c75e
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x2c81e
movq 0x20(%rax), %r14
testq %r14, %r14
je 0x2c81e
leaq 0x40(%r14), %r15
movq %r15, %rdi
callq 0x233c4
testb %al, %al
je 0x2c7c8
cmpl $0x0, 0x60(%r14)
jne 0x2c7c8
movq 0x70(%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movaps 0x34e82(%rip), %xmm0    # 0x61620
movups %xmm0, 0x8(%rsi)
movaps 0x34e87(%rip), %xmm0    # 0x61630
movups %xmm0, 0x18(%rsi)
movq %rbx, %rdi
callq 0x357a0
movq $0x0, 0x28(%rax)
movaps 0x34e7c(%rip), %xmm0    # 0x61640
movups %xmm0, 0x34(%rax)
movq %r14, %rdi
callq 0x233c4
testb %al, %al
je 0x2c81e
cmpl $0x0, (%r15)
jne 0x2c81e
cmpl $0x0, 0x60(%r14)
jne 0x2c81e
movq 0x70(%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movaps 0x34e2c(%rip), %xmm0    # 0x61620
movups %xmm0, 0x8(%rsi)
movaps 0x34e31(%rip), %xmm0    # 0x61630
movups %xmm0, 0x18(%rsi)
movq %rbx, %rdi
callq 0x357a0
movq $0x0, 0x28(%rax)
movaps 0x34e26(%rip), %xmm0    # 0x61640
movups %xmm0, 0x34(%rax)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::applyOptimization(Constructor*, ConsistencyChecker::OptimizeRecord const&)
void ConsistencyChecker::applyOptimization(Constructor *ct,const OptimizeRecord &rec)

{
  vector<int4> deleteops;
  ConstructTpl *ctempl;
  if (rec.readsection < 0)
    ctempl = ct->getTempl();
  else
    ctempl = ct->getNamedTempl(rec.readsection);
  
  if (rec.opttype == 0) { // If read op is COPY
    int4 readop = rec.readop;
    OpTpl *op = ctempl->getOpvec()[ readop ];
    VarnodeTpl *vnout = new VarnodeTpl(*op->getOut()); // Make COPY output
    ctempl->setOutput(vnout,rec.writeop); // become write output
    deleteops.push_back(readop); // and then delete the read (COPY)
  }
  else if (rec.opttype == 1) { // If write op is COPY
    int4 writeop = rec.writeop;
    OpTpl *op = ctempl->getOpvec()[ writeop ];
    VarnodeTpl *vnin = new VarnodeTpl(*op->getIn(0));	// Make COPY input
    ctempl->setInput(vnin,rec.readop,rec.inslot); // become read input
    deleteops.push_back(writeop); // and then delete the write (COPY)
  }
  ctempl->deleteOps(deleteops);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl 0x18(%rdx), %eax
testl %eax, %eax
js 0x2ca29
movq %rsi, %rdi
movl %eax, %esi
callq 0x4cae0
movq %rax, %rbx
jmp 0x2ca2d
movq 0x60(%rsi), %rbx
movl 0x1c(%r14), %eax
cmpl $0x1, %eax
je 0x2ca93
testl %eax, %eax
jne 0x2cafb
movslq 0x4(%r14), %r12
movl %r12d, 0xc(%rsp)
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %r13
movl $0x68, %edi
callq 0xf370
movq %rax, %r15
movq (%r13), %rsi
movq %rax, %rdi
callq 0x24386
movl (%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2511e
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
jne 0x2cade
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35846
jmp 0x2cafb
movslq (%r14), %r12
movl %r12d, 0xc(%rsp)
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %r13
movl $0x68, %edi
callq 0xf370
movq %rax, %r15
movq 0x10(%r13), %rax
movq (%rax), %rsi
movq %r15, %rdi
callq 0x24386
movl 0x4(%r14), %edx
movl 0x8(%r14), %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x250f4
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2caec
movl %r12d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x2cafb
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35846
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x25140
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2cb1f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xf380
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2cb2f
movq %rax, %rbx
movl $0x68, %esi
movq %r15, %rdi
callq 0xf380
jmp 0x2cb48
jmp 0x2cb45
jmp 0x2cb45
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2cb5f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xf380
movq %rbx, %rdi
callq 0xf730
nop