LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x60(%rsp), %rdi
callq 0x7c58
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x7c6a
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
movq %r15, %rdi
callq 0x9d9c
movq %rax, %r14
movq %r15, 0x18(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x3110
leaq 0x60(%rsp), %rdi
callq 0x3110
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
testq %r14, %r14
je 0xac15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7efc
xorl %r15d, %r15d
leaq 0x28(%rsp), %r12
leaq 0x98(%rsp), %r13
leaq 0x80(%rsp), %rbp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7c80
movq 0x30(%rsp), %r14
subq 0x28(%rsp), %r14
sarq $0x5, %r14
movq %r12, %rdi
callq 0x6df8
cmpq %r15, %r14
jbe 0xacd1
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7c80
movq %r12, %rdi
movq %r15, %rsi
callq 0xb7ca
movq %r13, %rdi
movq %rax, %rsi
callq 0x32a0
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x9d30
movq %rax, %r14
movq %r13, %rdi
callq 0x3110
movq %r12, %rdi
callq 0x6df8
movq %r14, 0x20(%rsp)
testq %r14, %r14
je 0xacab
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6e1a
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x6d08
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x7f02
movq %rbp, %rdi
callq 0x7348
incq %r15
jmp 0xac2d
movq %rsp, %rdi
callq 0x7348
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xad33
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3110
jmp 0xacff
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3110
jmp 0xad4d
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x3110
jmp 0xad3b
jmp 0xad33
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x7348
jmp 0xad45
jmp 0xad33
movq %rax, %rbx
jmp 0xad45
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6df8
movq %rsp, %rdi
callq 0x7348
movq %rbx, %rdi
callq 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %ebp, %ebp
cmpq %r12, %r15
je 0xad8f
movq (%r15), %r14
movq %r14, %rdi
callq 0x558c
cmpl %eax, %ebp
jge 0xad89
movq %r14, %rdi
callq 0x558c
movl %eax, %ebp
addq $0x8, %r15
jmp 0xad6b
incl %ebp
movl %ebp, 0x80(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %ebp, %ebp
cmpq %r12, %r15
je 0xadd9
movq (%r15), %r14
movq %r14, %rdi
callq 0x7c0c
cmpl %eax, %ebp
jge 0xadd3
movq %r14, %rdi
callq 0x7c0c
movl %eax, %ebp
addq $0x8, %r15
jmp 0xadb5
incl %ebp
movl %ebp, 0x84(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pc260533[P]ITC313-TP2/magasin.cpp
// Function: Magasin::serializerObjet[abi:cxx11]()
std::string Magasin::serializerObjet() {
    std::string res = "";
    for (Produit *produit : this->listeProduits) {
        res += "produit\n" + produit->serializerObjet() + "_produit\n";
    }
    for (Client *client : this->listeClients) {
        res += "client\n" + client->serializerObjet() + "_client\n";
    }
    for (Commande *commande : this->listeCommandes) {
        res += "commande\n" + commande->serializerObjet() + "_commande\n";
    }
    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2d2f(%rip), %rsi      # 0xdb36
leaq 0x48(%rsp), %r15
movq %r15, %rdx
callq 0x52be
movq 0x38(%r14), %r13
movq %r14, (%rsp)
movq 0x40(%r14), %r14
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %rbp
cmpq %r14, %r13
je 0xae89
movq (%r13), %rsi
movq (%rsi), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq %rbp, %rdi
leaq 0x2cd4(%rip), %rsi      # 0xdb1a
movq %r12, %rdx
callq 0x7072
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x2cbe(%rip), %rdx      # 0xdb19
callq 0x7053
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3410
movq %r15, %rdi
callq 0x3110
movq %rbp, %rdi
callq 0x3110
movq %r12, %rdi
callq 0x3110
addq $0x8, %r13
jmp 0xae2a
movq (%rsp), %rax
movq 0x50(%rax), %r12
movq 0x58(%rax), %rbp
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r13
leaq 0x48(%rsp), %r14
cmpq %rbp, %r12
je 0xaf03
movq (%r12), %rsi
movq (%rsi), %rax
movq %r15, %rdi
callq *0x18(%rax)
movq %r13, %rdi
leaq 0x2c64(%rip), %rsi      # 0xdb24
movq %r15, %rdx
callq 0x7072
movq %r14, %rdi
movq %r13, %rsi
leaq 0x2c4e(%rip), %rdx      # 0xdb23
callq 0x7053
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3410
movq %r14, %rdi
callq 0x3110
movq %r13, %rdi
callq 0x3110
movq %r15, %rdi
callq 0x3110
addq $0x8, %r12
jmp 0xaea4
movq (%rsp), %rax
movq 0x68(%rax), %r15
movq 0x70(%rax), %r13
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r12
leaq 0x48(%rsp), %rbp
cmpq %r13, %r15
je 0xaf7c
movq (%r15), %rsi
movq (%rsi), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq %r12, %rdi
leaq 0x2bf4(%rip), %rsi      # 0xdb2d
movq %r14, %rdx
callq 0x7072
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x2bde(%rip), %rdx      # 0xdb2c
callq 0x7053
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3410
movq %rbp, %rdi
callq 0x3110
movq %r12, %rdi
callq 0x3110
movq %r14, %rdi
callq 0x3110
addq $0x8, %r15
jmp 0xaf1e
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xaf9e
jmp 0xafa3
jmp 0xafa8
jmp 0xafad
jmp 0xaf9e
jmp 0xafa3
jmp 0xafa8
jmp 0xafad
movq %rax, %r14
jmp 0xafce
movq %rax, %r14
jmp 0xafc4
movq %rax, %r14
jmp 0xafba
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x3110
leaq 0x28(%rsp), %rdi
callq 0x3110
leaq 0x8(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x3110
movq %r14, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5c22
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31f0
movq %rax, %rdi
callq 0x3120
leaq 0x8(%rsp), %rdi
callq 0x3110
leaq 0x265c(%rip), %rsi      # 0xdb88
movq %rbx, %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3120
leaq 0x80(%r14), %r15
leaq 0x98(%r14), %r12
xorl %r13d, %r13d
movq 0x88(%r14), %rax
subq 0x80(%r14), %rax
sarq $0x3, %rax
cmpq %r13, %rax
jbe 0xb5b8
movq %rbx, %rdi
leaq 0x2642(%rip), %rsi      # 0xdbb0
callq 0x3200
movq %rax, %rbp
movq %r12, %rdi
movq %r13, %rsi
callq 0xb828
movl (%rax), %esi
movq %rbp, %rdi
callq 0x3390
movq %rax, %rdi
leaq 0x25df(%rip), %rsi      # 0xdb74
callq 0x3200
movq %rax, %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0xb84a
movq (%rax), %rsi
movq %rbp, %rdi
callq 0xb3dc
incq %r13
jmp 0xb54d
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O2/pc260533[P]ITC313-TP2/./commande.h
// Function: operator<<(std::ostream&, Commande const&)
std::ostream& operator<< (std::ostream& out, const Commande &commande){
        out << "Le client de la commande est : "  << std::endl << commande.getClientCommande()->affichageCourt() << std::endl;
        std::string statutLivreeCommande = "non livree";
        if (commande.getStatutLivreeCommande()) {
            statutLivreeCommande = "livree";
        }
        out << "La statut de la commande est : " << statutLivreeCommande << "." << std::endl;
        out << "La liste des produits de la commande sont : " << std::endl;
        for (int i = 0; i < commande.getListeProduitsCommandes().size(); i++) {
            out << "Quantite : " << commande.getListeQuantitesProduitsCommandes().at(i) << " " << *commande.getListeProduitsCommandes().at(i);
        }
        return out;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x25c2(%rip), %rsi      # 0xdbbc
callq 0x3200
movq %rax, %rdi
callq 0x3120
movq %rax, %r15
movq %r14, %rdi
callq 0x7c14
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x5c22
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f0
movq %rax, %rdi
callq 0x3120
leaq 0x8(%rsp), %rdi
callq 0x3110
leaq 0x2596(%rip), %rsi      # 0xdbdc
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x52be
movq %r14, %rdi
callq 0x7c4e
testb %al, %al
je 0xb672
leaq 0x2578(%rip), %rsi      # 0xdbe0
leaq 0x8(%rsp), %rdi
callq 0x33f0
leaq 0x256e(%rip), %rsi      # 0xdbe7
movq %rbx, %rdi
callq 0x3200
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x31f0
leaq 0x1dad(%rip), %rsi      # 0xd442
movq %rax, %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3120
leaq 0x255b(%rip), %rsi      # 0xdc07
movq %rbx, %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3120
xorl %r15d, %r15d
leaq 0x28(%rsp), %r12
leaq 0x40(%rsp), %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0x7c20
movq 0x30(%rsp), %rbp
subq 0x28(%rsp), %rbp
sarq $0x3, %rbp
movq %r12, %rdi
callq 0x7348
cmpq %r15, %rbp
jbe 0xb76c
movq %rbx, %rdi
leaq 0x24b7(%rip), %rsi      # 0xdbb0
callq 0x3200
movq %rax, %rbp
movq %r12, %rdi
movq %r14, %rsi
callq 0x7c3c
movq %r12, %rdi
movq %r15, %rsi
callq 0x6e5a
movl (%rax), %esi
movq %rbp, %rdi
callq 0x3390
movq %rax, %rdi
leaq 0x2449(%rip), %rsi      # 0xdb74
callq 0x3200
movq %rax, %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0x7c20
movq %r13, %rdi
movq %r15, %rsi
callq 0x6e38
movq (%rax), %rsi
movq %rbp, %rdi
callq 0xb3dc
movq %r13, %rdi
callq 0x7348
movq %r12, %rdi
callq 0x73de
incq %r15
jmp 0xb6c9
leaq 0x8(%rsp), %rdi
callq 0x3110
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xb7c2
jmp 0xb797
jmp 0xb797
jmp 0xb797
jmp 0xb797
jmp 0xb7ab
movq %rax, %rbx
jmp 0xb7b8
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x7348
jmp 0xb7ae
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x73de
leaq 0x8(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x118c(%rip), %rsi      # 0xdb36
movq %rsp, %rdx
callq 0x52be
movq (%r14), %rax
movq %rsp, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3270
movq %r14, %rdi
callq 0x3110
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0xca2f
movq %r14, %rdi
callq 0x30e0
pushq $0x8
popq %rdi
callq 0x3130
movq %rax, %r15
movq %rax, %rdi
callq 0xcc1c
leaq 0x7375(%rip), %rsi      # 0x13d80
leaq 0x216(%rip), %rdx       # 0xcc28
movq %r15, %rdi
callq 0x3380
movq %rax, %r14
jmp 0xca2a
movq %rax, %r14
movq %r15, %rdi
callq 0x31a0
callq 0x3360
movq %rbx, %rdi
callq 0x3110
jmp 0xca44
movq %rax, %rdi
callq 0x5322
movq %rax, %r14
movq %r14, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
leaq 0x8(%rsp), %rdi
callq 0x32a0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xbef2
movq (%rbx), %rax
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq *0x20(%rax)
leaq 0x28(%rsp), %rdi
callq 0xbf1a
leaq 0x8(%rsp), %rdi
callq 0x3110
addq $0x78, %rsp
popq %rbx
popq %r14
retq
movq %rdx, %r14
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf1a
jmp 0xcab1
movq %rdx, %r14
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3110
jmp 0xcac3
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0xcb0f
movq %rbx, %rdi
callq 0x30e0
pushq $0x8
popq %rdi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
callq 0xcc1c
leaq 0x7295(%rip), %rsi      # 0x13d80
leaq 0x136(%rip), %rdx       # 0xcc28
movq %r14, %rdi
callq 0x3380
movq %rax, %rbx
jmp 0xcb0a
movq %rax, %rbx
movq %r14, %rdi
callq 0x31a0
callq 0x3360
movq %rbx, %rdi
callq 0x33a0
movq %rax, %rdi
callq 0x5322
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: SpaceQuality::SpaceQuality(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
SpaceQuality::SpaceQuality(const string &nm)

{				// Default space qualities
  name = nm;
  type = ramtype;
  size = 0;
  wordsize = 1;
  isdefault = false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
callq 0xf210
andq $0x0, 0x20(%rbx)
movl $0x1, 0x28(%rbx)
movb $0x0, 0x2c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xf1a0
movq %r14, %rdi
callq 0xf6e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
callq 0xf210
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
callq 0xf1a0
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0xf380
pushq $0x8
popq %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xf380
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf380
movq %rax, %rbx
movq %r12, %rdi
callq 0xf1a0
movq %rbx, %rdi
callq 0xf6e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
testq %rdx, %rdx
je 0x26a03
incl 0x8(%rdx)
testq %rbx, %rbx
je 0x26a57
addq $0x10, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
cmpq %r12, %rax
jbe 0x26a39
addq %r15, %rsi
movq %r14, %rdi
callq 0x2ea08
incq %r12
addq $0x8, %r15
jmp 0x26a12
movq %rbx, %rdi
callq 0x2fa7c
pushq $0x18
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf380
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x26a7a
callq 0x37f18
leaq 0x10(%rbx), %r14
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x26aa9
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x26aa4
movq (%rdi), %rax
callq *0x8(%rax)
incq %r15
jmp 0x26a81
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2fa7c
movq %rax, %rdi
callq 0x1178d
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x48
popq %r14
movq %rdi, %rbp
movq (%rbp), %rbp
cmpq %rbx, %rbp
je 0x26b06
movq 0x18(%rbp), %r13
testq %r13, %r13
je 0x26ad6
movq %r14, %rdi
callq 0xf370
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x39274
movq %r12, %r15
jmp 0x26ad6
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x48
popq %rsi
movq %r12, %rdi
callq 0xf380
movq %rbx, %rdi
callq 0xf6e0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x26c41
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x26c2f
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x26e8b
movq %rdx, %r15
movq 0x611ba(%rip), %r12     # 0x87ff0
leaq 0x2fa88(%rip), %rsi     # 0x568c5
movq %r12, %rdi
callq 0xf350
movq %r12, %rsi
movq %r14, %rdx
callq 0x26ea2
leaq 0x300ab(%rip), %rsi     # 0x56f02
movq %r12, %rdi
callq 0xf350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x90(%r15), %esi
movq %rax, %rdi
callq 0xf6a0
movq %rax, %rdi
callq 0xf1c0
movl $0x1, 0x8(%r14)
incl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x27211
movq %rdx, %r15
movq 0x60e34(%rip), %r12     # 0x87ff0
leaq 0x2f702(%rip), %rsi     # 0x568c5
movq %r12, %rdi
callq 0xf350
movq %r12, %rsi
movq %r14, %rdx
callq 0x26ea2
leaq 0x2fd25(%rip), %rsi     # 0x56f02
movq %r12, %rdi
callq 0xf350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x90(%r15), %esi
movq %rax, %rdi
callq 0xf6a0
movq %rax, %rdi
callq 0xf1c0
movl $0x1, 0x8(%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x22288
incl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x272a6
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x10(%rsi), %rax
movq 0x8(%rax), %r14
movq %r14, %rdi
callq 0x20e20
testb %al, %al
je 0x2729f
cmpl $0x0, 0x20(%r14)
jne 0x2729f
cmpq $0x0, 0x30(%r14)
jne 0x2729f
movq 0x60d88(%rip), %rdi     # 0x87ff0
leaq 0x2f663(%rip), %rsi     # 0x568d2
callq 0xf350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x90(%rbx), %esi
movq %rax, %rdi
callq 0xf6a0
movq %rax, %rdi
callq 0xf1c0
addq $0x8, %rsp
popq %rbx
popq %r14
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
testq %rdx, %rdx
je 0x281ba
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x8(%rdx), %r13
movb $0x1, %bl
cmpq 0x10(%r14), %r13
je 0x281bc
movq (%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x272aa
andb %al, %bl
movq (%r13), %rsi
movq %r15, %rdx
callq 0x27232
addq $0x8, %r13
jmp 0x28191
movb $0x1, %bl
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rcx, 0x10(%rsp)
movb $0x1, %bpl
cmpl $0x1, 0x20(%r8)
jne 0x282d5
movq %r8, %r13
cmpl $0x3, 0x38(%r8)
jne 0x282d5
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
cmpl $0x2, 0x40(%r13)
jb 0x2823f
leaq 0x2ed36(%rip), %rsi     # 0x56f47
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x10c3a
leaq 0x18(%rsp), %r9
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x27f78
jmp 0x282c9
movl %r9d, %r15d
leaq 0x20(%r13), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x26c7e
testl %eax, %eax
jle 0x28299
movzbl %r15b, %edx
movq %r13, %rdi
movl %eax, %esi
callq 0x21c94
testb %al, %al
jne 0x282d5
leaq 0x2ed0a(%rip), %rsi     # 0x56f78
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x10c3a
leaq 0x18(%rsp), %r9
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x27f78
jmp 0x282c9
leaq 0x2ecc1(%rip), %rsi     # 0x56f61
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x10c3a
leaq 0x18(%rsp), %r9
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x27f78
leaq 0x18(%rsp), %rdi
callq 0xf1a0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x282ee
jmp 0x282fd
jmp 0x282ee
jmp 0x282fd
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xf1a0
jmp 0x28300
movq %rax, %rbx
movq %rbx, %rdi
callq 0xf6e0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %r15
movq %rdx, 0x8(%rsp)
movq 0x8(%rdx), %rdx
movb $0x1, %bpl
movzbl %cl, %r12d
movq 0x8(%rsp), %rax
cmpq 0x10(%rax), %rdx
je 0x283a2
movq %rdx, 0x10(%rsp)
movq (%rdx), %r13
movq (%r13), %r8
testq %r8, %r8
je 0x2835f
movq %r15, %rdi
movq %r14, %rsi
pushq $-0x1
popq %rdx
movq %r13, %rcx
movl %r12d, %r9d
callq 0x281cc
andb %al, %bpl
xorl %ebx, %ebx
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %rbx
jge 0x28397
movq (%rax,%rbx,8), %r8
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r13, %rcx
movl %r12d, %r9d
callq 0x281cc
andb %al, %bpl
incq %rbx
jmp 0x28361
movq 0x10(%rsp), %rdx
addq $0x8, %rdx
jmp 0x2832c
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_O2/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 0x20e20
testb %al, %al
jne 0x28916
movq %r14, %rdi
callq 0x20e20
testb %al, %al
jne 0x28916
movq %rbx, %rdi
callq 0x20e34
movl %eax, %ebp
movq %r14, %rdi
callq 0x20e34
cmpb %al, %bpl
je 0x2891d
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
cmpl $0x6, (%rbx)
jne 0x28918
cmpl $0x6, (%r14)
jne 0x28918
movq 0x8(%rbx), %rcx
cmpq 0x8(%r14), %rcx
jne 0x28916
cmpl $0x0, 0x20(%r14)
jne 0x28918
cmpl $0x0, 0x40(%r14)
jne 0x28918
cmpl $0x0, 0x20(%rbx)
jne 0x28918
cmpl $0x0, 0x40(%rbx)
jne 0x28918
movq 0x30(%rbx), %rax
movq 0x30(%r14), %rcx
movq 0x50(%r14), %rdx
addq %rcx, %rdx
decq %rdx
cmpq %rax, %rdx
jb 0x28916
movq 0x50(%rbx), %rdx
addq %rdx, %rax
decq %rax
cmpq %rax, %rcx
setbe %al
jmp 0x28918
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x289a4
movq %rsi, %r14
addl $-0x3c, %eax
cmpl $0x6, %eax
ja 0x289b0
pushq $0x73
popq %rdx
btl %eax, %edx
jae 0x289b0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testb %cl, %cl
je 0x289e8
movq 0x18(%r15), %r12
subq 0x10(%r15), %r12
shrq $0x3, %r12
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x289e8
movq 0x10(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
callq 0x288e0
incq %r13
testb %al, %al
je 0x289ca
jmp 0x289a4
movq (%r15), %rsi
testq %rsi, %rsi
je 0x289fc
movq %r14, %rdi
callq 0x288e0
testb %al, %al
jne 0x289a4
xorl %ebx, %ebx
jmp 0x289a4
// File: /workspace/github_cpp_makefile_star2_O2/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 0x28a8a
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 0x20e34
testb %al, %al
je 0x28a7e
cmpl $0x0, 0x20(%r12)
jne 0x28a7e
movl 0x30(%r12), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movaps 0x2dba6(%rip), %xmm0    # 0x565f0
movups %xmm0, 0x4(%rsi)
movaps 0x2dbab(%rip), %xmm0    # 0x56600
movups %xmm0, 0x14(%rsi)
movq %r15, %rdi
callq 0x30426
testl %ebp, %ebp
js 0x28a74
movl %r14d, 0x2c(%rax)
incl 0x38(%rax)
movl %ebp, 0x30(%rax)
movl %ebx, 0x40(%rax)
jmp 0x28a7e
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_O2/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 0x28aaf
movq %rsi, %rdi
movl %ebx, %esi
callq 0x4443a
movq %rax, %r15
jmp 0x28ab3
movq 0x60(%rsi), %r15
testq %r15, %r15
je 0x28b24
xorl %r12d, %r12d
movl %r12d, %r12d
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x28b24
movq (%rax,%r12,8), %rbp
xorl %r13d, %r13d
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ecx, %r13d
jae 0x28b0a
movslq %r13d, %rcx
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
movl %r12d, %edx
movl %r13d, %ecx
movl %ebx, %r8d
callq 0x28a00
incl %r13d
jmp 0x28ad9
movq (%rbp), %rsi
movq %r14, %rdi
movl %r12d, %edx
pushq $-0x1
popq %rcx
movl %ebx, %r8d
callq 0x28a00
incl %r12d
jmp 0x28abb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x28b50
movq %rsi, %rdi
movl %ecx, %esi
callq 0x4443a
jmp 0x28b54
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x28c0e
movq 0x20(%rax), %r14
testq %r14, %r14
je 0x28c0e
leaq 0x40(%r14), %r15
movq %r15, %rdi
callq 0x20e34
testb %al, %al
je 0x28bbb
cmpl $0x0, 0x60(%r14)
jne 0x28bbb
movq 0x70(%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movaps 0x2da5c(%rip), %xmm0    # 0x565f0
movups %xmm0, 0x8(%rsi)
movaps 0x2da61(%rip), %xmm0    # 0x56600
movups %xmm0, 0x18(%rsi)
movq %rbx, %rdi
callq 0x305bc
andq $0x0, 0x28(%rax)
movaps 0x2da59(%rip), %xmm0    # 0x56610
movups %xmm0, 0x34(%rax)
movq %r14, %rdi
callq 0x20e34
testb %al, %al
je 0x28c0e
cmpl $0x0, (%r15)
jne 0x28c0e
cmpl $0x0, 0x60(%r14)
jne 0x28c0e
movq 0x70(%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movaps 0x2da09(%rip), %xmm0    # 0x565f0
movups %xmm0, 0x8(%rsi)
movaps 0x2da0e(%rip), %xmm0    # 0x56600
movups %xmm0, 0x18(%rsi)
movq %rbx, %rdi
callq 0x305bc
andq $0x0, 0x28(%rax)
movaps 0x2da06(%rip), %xmm0    # 0x56610
movups %xmm0, 0x34(%rax)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movl 0x18(%rdx), %eax
testl %eax, %eax
js 0x28dfa
movq %rsi, %rdi
movl %eax, %esi
callq 0x4443a
movq %rax, %rbx
jmp 0x28dfe
movq 0x60(%rsi), %rbx
movl 0x1c(%r14), %eax
cmpl $0x1, %eax
je 0x28e55
testl %eax, %eax
jne 0x28ea1
movslq 0x4(%r14), %rax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rcx
movq (%rcx,%rax,8), %r12
pushq $0x68
popq %rdi
callq 0xf370
movq %rax, %r15
movq (%r12), %rsi
movq %rax, %rdi
callq 0x21b40
movl (%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x227c6
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x2ea94
jmp 0x28ea1
movslq (%r14), %rax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rcx
movq (%rcx,%rax,8), %r12
pushq $0x68
popq %rdi
callq 0xf370
movq %rax, %r15
movq 0x10(%r12), %rax
movq (%rax), %rsi
movq %r15, %rdi
callq 0x21b40
movl 0x4(%r14), %edx
movl 0x8(%r14), %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2279e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x2ea94
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x227e6
leaq 0x10(%rsp), %rdi
callq 0x30138
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x28ec6
movq %rax, %rbx
pushq $0x68
popq %rsi
movq %r15, %rdi
callq 0xf380
jmp 0x28edd
jmp 0x28eda
jmp 0x28eda
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x30138
movq %rbx, %rdi
callq 0xf6e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::checkUnusedTemps(Constructor*, std::map<unsigned long, ConsistencyChecker::OptimizeRecord, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, ConsistencyChecker::OptimizeRecord>>> const&)
void ConsistencyChecker::checkUnusedTemps(Constructor *ct,const map<uintb,OptimizeRecord> &recs)

{
  map<uintb,OptimizeRecord>::const_iterator iter;
  iter = recs.begin();
  while(iter != recs.end()) {
    const OptimizeRecord &currec( (*iter).second );
    if (currec.readcount == 0) {
      if (printdeadwarning)
	cerr << "Warning: temporary is written but not read in constructor starting at line " << dec << ct->getLineno() << endl;
      writenoread += 1;
    }
    else if (currec.writecount == 0) {
      cerr << "Error: temporary is read but not written in constructor starting at line " << dec << ct->getLineno() << endl;
      readnowrite += 1;
    }
    ++iter;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdx), %r13
addq $0x8, %rbx
movq 0x5f0dd(%rip), %r12     # 0x87ff0
leaq 0x2e18b(%rip), %rbp     # 0x570a5
cmpq %rbx, %r13
je 0x28fc8
cmpl $0x0, 0x38(%r13)
je 0x28f72
cmpl $0x0, 0x34(%r13)
jne 0x28fb8
movq %r12, %rdi
movq %rbp, %rsi
callq 0xf350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x90(%r14), %esi
movq %rax, %rdi
callq 0xf6a0
movq %rax, %rdi
callq 0xf1c0
incl 0x4(%r15)
jmp 0x28fb8
cmpb $0x1, 0xd(%r15)
jne 0x28fb4
movq %r12, %rdi
leaq 0x2e0d6(%rip), %rsi     # 0x57059
callq 0xf350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x90(%r14), %esi
movq %rax, %rdi
callq 0xf6a0
movq %rax, %rdi
callq 0xf1c0
incl 0x8(%r15)
movq %r13, %rdi
callq 0xf400
movq %rax, %r13
jmp 0x28f1a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::test()
bool ConsistencyChecker::test(void)

{ // Main entry point for size consistency check
  setPostOrder(root_symbol);
  bool testresult = true;

  for(int4 i=0;i<postorder.size();++i) {
    SubtableSymbol *sym = postorder[i];
    if (!checkSubtable(sym))
      testresult = false;
  }
  return testresult;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
callq 0x286a4
movb $0x1, %bpl
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x290e6
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x283b8
andb %al, %bpl
incq %r14
jmp 0x290be
andb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::testTruncations(bool)
bool ConsistencyChecker::testTruncations(bool isbigendian)

{
  // Now that the sizemap is calculated, we can check/adjust the offset_plus templates
  bool testresult = true;
  for(int4 i=0;i<postorder.size();++i) {
    SubtableSymbol *sym = postorder[i];
    int4 numconstruct = sym->getNumConstructors();
    Constructor *ct;
    for(int4 j=0;j<numconstruct;++j) {
      ct = sym->getConstructor(j);

      int4 numsections = ct->getNumSections();
      for(int4 k=-1;k<numsections;++k) {
	ConstructTpl *tpl;
	if (k < 0)
	  tpl = ct->getTempl();
	else
	  tpl = ct->getNamedTempl(k);
	if (tpl == (ConstructTpl *)0)
	  continue;
	if (!checkSectionTruncations(ct,tpl,isbigendian))
	  testresult = false;
      }
    }
  }
  return testresult;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movb $0x1, %bl
movzbl %sil, %ebp
xorl %edx, %edx
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rdx, %rcx
jbe 0x291c5
movq (%rax,%rdx,8), %rax
movq 0x48(%rax), %rcx
movq %rax, 0x8(%rsp)
subq 0x40(%rax), %rcx
shrq $0x3, %rcx
testl %ecx, %ecx
movl $0x0, %eax
cmovlel %eax, %ecx
movq %rcx, 0x18(%rsp)
xorl %ecx, %ecx
movq %rdx, 0x10(%rsp)
cmpq 0x18(%rsp), %rcx
je 0x291bd
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rax
movq %rcx, 0x20(%rsp)
movq (%rax,%rcx,8), %r15
movq 0x70(%r15), %r13
subq 0x68(%r15), %r13
shrq $0x3, %r13
pushq $-0x1
popq %r12
cmpl %r13d, %r12d
jge 0x291ae
testl %r12d, %r12d
js 0x2918e
movq %r15, %rdi
movl %r12d, %esi
callq 0x4443a
jmp 0x29192
movq 0x60(%r15), %rax
testq %rax, %rax
je 0x291a9
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x28308
andb %al, %bl
incl %r12d
jmp 0x29177
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x10(%rsp), %rdx
jmp 0x2914e
incq %rdx
jmp 0x2910b
andb $0x1, %bl
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop