LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x940d(%rip), %r14      # 0x17fd0
leaq 0x3f1d(%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 0x3edd(%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), %rbp
movq 0x70(%r15), %r12
cmpq %r12, %rbp
je 0xed16
movq (%rbp), %r13
movq %r13, %rdi
callq 0xa270
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x6cf2
movq 0x10(%rsp), %rdx
cmpq 0x8(%rbx), %rdx
jne 0xec74
testq %rdx, %rdx
je 0xec79
movq (%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x3240
testl %eax, %eax
sete %r15b
jmp 0xec7c
xorl %r15d, %r15d
jmp 0xec7c
movb $0x1, %r15b
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xec98
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
testb %r15b, %r15b
je 0xed0d
movl $0x12, %edx
movq %r14, %rdi
leaq 0x3e28(%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 0x101ce
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, %rbp
jmp 0xec2d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6d48
movq 0x68(%rsp), %r15
subq 0x60(%rsp), %r15
sarq $0x5, %r15
movq %r13, %rdi
callq 0x9710
cmpq %r14, %r15
jbe 0xee6e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6d48
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r14, %rdx
jbe 0xee93
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 0x6b9c
movq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0xd720
movq %rax, %r15
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xedfb
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3230
movq %r13, %rdi
callq 0x9710
movq %r15, 0x58(%rsp)
testq %r15, %r15
je 0xee31
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0xee24
movq %r15, (%rsi)
addq $0x8, 0x8(%rsp)
jmp 0xee31
movq %rsp, %rdi
leaq 0x58(%rsp), %rdx
callq 0x9c64
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x9586
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
callq 0x75cc
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xee62
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
incq %r14
addq $0x20, %rbp
jmp 0xed5f
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xee84
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 0x3954(%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 0xeee8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0xeee8
jmp 0xeef6
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xeef9
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
jmp 0xeef9
jmp 0xeee5
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x9710
jmp 0xeef9
jmp 0xeef6
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xef0f
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xf222
xorl %ebp, %ebp
movq (%r15), %r14
movq %r14, %rdi
callq 0x6cbc
cmpl %eax, %ebp
jge 0xf215
movq %r14, %rdi
callq 0x6cbc
movl %eax, %ebp
addq $0x8, %r15
cmpq %r12, %r15
jne 0xf1fc
incl %ebp
jmp 0xf227
movl $0x1, %ebp
movl %ebp, 0x80(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xf276
xorl %ebp, %ebp
movq (%r15), %r14
movq %r14, %rdi
callq 0xa268
cmpl %eax, %ebp
jge 0xf269
movq %r14, %rdi
callq 0xa268
movl %eax, %ebp
addq $0x8, %r15
cmpq %r12, %r15
jne 0xf250
incl %ebp
jmp 0xf27b
movl $0x1, %ebp
movl %ebp, 0x84(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x75d6
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 0x10098
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x2ae9(%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 0x10185
xorl %r15d, %r15d
leaq 0x2abf(%rip), %r12      # 0x12bb0
leaq 0x2a7c(%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 0x10197
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 0x10197
movq (%rax,%r15,8), %rsi
movq %rbp, %rdi
callq 0xfdd5
incq %r15
movq 0x88(%r14), %rax
subq 0x80(%r14), %rax
sarq $0x3, %rax
cmpq %r15, %rax
ja 0x100f8
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2650(%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 0x101c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10bf(%rip), %rdx      # 0x12b36
movq %rdx, %rsi
callq 0x6c2c
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 0x11ab7
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 0x11b16
movq %r14, %rdi
callq 0x30f0
movl $0x8, %edi
callq 0x3120
movq %rax, %r15
movq %rax, %rdi
callq 0x11d78
leaq 0x628e(%rip), %rsi      # 0x17d80
leaq 0x28b(%rip), %rdx       # 0x11d84
movq %r15, %rdi
callq 0x33c0
movq %rax, %r14
jmp 0x11b11
movq %rax, %r14
movq %r15, %rdi
callq 0x3190
callq 0x33a0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x11b37
movq (%r12), %rsi
incq %rsi
callq 0x3230
jmp 0x11b37
movq %rax, %rdi
callq 0x6b90
movq %rax, %r14
movq %r14, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6b9c
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x10b7a
movq (%rbx), %rax
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq *0x20(%rax)
leaq 0x20(%rsp), %rdi
callq 0x10bbc
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x11ba5
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 0x10bbc
jmp 0x11bc7
movq %rdx, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x11be5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x11be5
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x11c33
movq %rbx, %rdi
callq 0x30f0
movl $0x8, %edi
callq 0x3120
movq %rax, %r14
movq %rax, %rdi
callq 0x11d78
leaq 0x6171(%rip), %rsi      # 0x17d80
leaq 0x16e(%rip), %rdx       # 0x11d84
movq %r14, %rdi
callq 0x33c0
movq %rax, %rbx
jmp 0x11c2e
movq %rax, %rbx
movq %r14, %rdi
callq 0x3190
callq 0x33a0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0x6b90
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: SeqNum::SeqNum(Address::mach_extreme)
Address::Address(mach_extreme ex)

{
  if (ex == m_minimal) {
    base = (AddrSpace *)0;
    offset = 0;
  }
  else {
    base = (AddrSpace *) ~((uintp)0);
    offset = ~((uintb)0);
  }
}

// Assembly:
testl %esi, %esi
je 0x1008c
pcmpeqd %xmm0, %xmm0
jmp 0x10090
pxor %xmm0, %xmm0
movdqu %xmm0, (%rdi)
xorl %eax, %eax
negl %esi
sbbl %eax, %eax
movl %eax, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
callq 0xf1f0
movq $0x0, 0x20(%rbx)
movl $0x1, 0x28(%rbx)
movb $0x0, 0x2c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x29e8f
movq (%r15), %rsi
incq %rsi
callq 0xf380
movq %r14, %rdi
callq 0xf730
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x29ef9
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 0x29f41
movq (%r13), %rsi
incq %rsi
callq 0xf380
movq %rbx, %rdi
callq 0xf730
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x29f68
incl 0x8(%rdx)
testq %rbx, %rbx
je 0x29fe6
movq (%rbx), %rdx
cmpq %rdx, 0x8(%rbx)
je 0x29fbc
leaq 0x10(%r14), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
addq %r12, %rdx
movq 0x18(%r14), %rsi
cmpq 0x20(%r14), %rsi
je 0x29f9a
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x18(%r14)
jmp 0x29fa2
movq %r15, %rdi
callq 0x35324
incq %r13
movq (%rbx), %rdx
movq 0x8(%rbx), %rax
subq %rdx, %rax
sarq $0x3, %rax
addq $0x8, %r12
cmpq %r13, %rax
ja 0x29f80
testq %rdx, %rdx
je 0x29fd0
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_O1/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 0x2a005
callq 0x3df16
movq 0x10(%rbx), %rdi
cmpq %rdi, 0x18(%rbx)
je 0x2a038
xorl %r14d, %r14d
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x2a021
movq (%rdi), %rax
callq *0x8(%rax)
incq %r14
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
cmpq %r14, %rax
ja 0x2a012
testq %rdi, %rdi
je 0x2a050
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 0x13ad1
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2a0a7
movq %rdi, %r14
movq 0x18(%r13), %r12
testq %r12, %r12
je 0x2a09e
movl $0x48, %edi
callq 0xf370
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3f8ac
movq %r15, %rbx
movq (%r13), %r13
cmpq %r14, %r13
jne 0x2a077
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_O1/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 0x2a225
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x2a213
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2a50a
movq %rdx, %r15
movq 0x62b62(%rip), %r12     # 0x8cfe8
leaq 0x37418(%rip), %rsi     # 0x618a5
movl $0xc, %edx
movq %r12, %rdi
callq 0xf420
movq %r12, %rsi
movq %r14, %rdx
callq 0x2a520
leaq 0x37a36(%rip), %rsi     # 0x61ee2
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_O1/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 0x2a92e
movq %rdx, %r15
movq 0x6273e(%rip), %r12     # 0x8cfe8
leaq 0x36ff4(%rip), %rsi     # 0x618a5
movl $0xc, %edx
movq %r12, %rdi
callq 0xf420
movq %r12, %rsi
movq %r14, %rdx
callq 0x2a520
leaq 0x37612(%rip), %rsi     # 0x61ee2
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 0x24c28
incl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2a9f6
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x10(%rsi), %rax
movq 0x8(%rax), %r14
movq %r14, %rdi
callq 0x234a8
testb %al, %al
je 0x2a9ef
cmpl $0x0, 0x20(%r14)
jne 0x2a9ef
cmpq $0x0, 0x30(%r14)
jne 0x2a9ef
movq 0x6265c(%rip), %r14     # 0x8cfe8
leaq 0x36f1f(%rip), %rsi     # 0x618b2
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_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %bl
testq %rdx, %rdx
je 0x2bbc6
movq %rdx, %r14
movq 0x8(%rdx), %r13
cmpq 0x10(%rdx), %r13
je 0x2bbc6
movq %rsi, %r15
movq %rdi, %r12
movb $0x1, %bl
xorl %ebp, %ebp
movq (%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x2a9fa
movzbl %bl, %ebx
testb %al, %al
cmovel %ebp, %ebx
movq (%r13), %rsi
movq %r15, %rdx
callq 0x2a952
addq $0x8, %r13
cmpq 0x10(%r14), %r13
jne 0x2bb99
andb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2bd1c
movq %r8, %r12
cmpl $0x3, 0x38(%r8)
jne 0x2bd1c
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r14
cmpl $0x2, 0x40(%r12)
jb 0x2bc50
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x36302(%rip), %rsi     # 0x61f27
leaq 0x36314(%rip), %rdx     # 0x61f40
leaq 0x8(%rsp), %rdi
callq 0x1183c
leaq 0x8(%rsp), %r9
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x2b86e
jmp 0x2bd03
movl %r9d, %r13d
leaq 0x20(%r12), %rsi
movq %r14, %rdx
callq 0x2a25e
testl %eax, %eax
jle 0x2bccc
movzbl %r13b, %edx
movq %r12, %rdi
movl %eax, %esi
callq 0x245fe
movl %eax, %ebp
testb %al, %al
jne 0x2bd1c
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x362cb(%rip), %rsi     # 0x61f58
leaq 0x362e5(%rip), %rdx     # 0x61f79
leaq 0x8(%rsp), %rdi
callq 0x1183c
leaq 0x8(%rsp), %r9
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x2b86e
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2bd1c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf380
jmp 0x2bd1c
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x36264(%rip), %rsi     # 0x61f41
leaq 0x36273(%rip), %rdx     # 0x61f57
leaq 0x8(%rsp), %rdi
callq 0x1183c
leaq 0x8(%rsp), %r9
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x2b86e
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2bd1a
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 0x2bd35
jmp 0x2bd51
jmp 0x2bd35
jmp 0x2bd51
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2bd54
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf380
jmp 0x2bd54
movq %rax, %rbx
movq %rbx, %rdi
callq 0xf730
// File: /workspace/github_cpp_makefile_star2_O1/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, %r15
movq 0x8(%rdx), %rsi
movq %rdx, 0x8(%rsp)
cmpq 0x10(%rdx), %rsi
je 0x2be25
movq %rdi, %r12
movb $0x1, %bl
movzbl %cl, %ebp
movq %rsi, 0x10(%rsp)
movq (%rsi), %r13
movq (%r13), %r8
testq %r8, %r8
je 0x2bdb9
movq %r12, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r13, %rcx
movl %ebp, %r9d
callq 0x2bbda
xorl %ecx, %ecx
movzbl %bl, %ebx
testb %al, %al
cmovel %ecx, %ebx
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
testl %ecx, %ecx
jle 0x2be0b
xorl %r14d, %r14d
movq (%rax,%r14,8), %r8
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
movq %r13, %rcx
movl %ebp, %r9d
callq 0x2bbda
xorl %ecx, %ecx
movzbl %bl, %ebx
testb %al, %al
cmovel %ecx, %ebx
incq %r14
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r14
jl 0x2bdcf
movq 0x10(%rsp), %rsi
addq $0x8, %rsi
movq 0x8(%rsp), %rax
cmpq 0x10(%rax), %rsi
jne 0x2bd88
jmp 0x2be27
movb $0x1, %bl
andb $0x1, %bl
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x234a8
testb %al, %al
jne 0x2c6d0
movq %r14, %rdi
callq 0x234a8
testb %al, %al
jne 0x2c6d0
movq %rbx, %rdi
callq 0x234bc
movl %eax, %ebp
movq %r14, %rdi
callq 0x234bc
cmpb %al, %bpl
je 0x2c6d7
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
cmpl $0x6, (%rbx)
jne 0x2c6d2
cmpl $0x6, (%r14)
jne 0x2c6d2
movq 0x8(%rbx), %rcx
cmpq 0x8(%r14), %rcx
jne 0x2c6d0
cmpl $0x0, 0x20(%r14)
jne 0x2c6d2
cmpl $0x0, 0x40(%r14)
jne 0x2c6d2
cmpl $0x0, 0x20(%rbx)
jne 0x2c6d2
cmpl $0x0, 0x40(%rbx)
jne 0x2c6d2
movq 0x30(%rbx), %rax
movq 0x30(%r14), %rcx
movq 0x50(%r14), %rdx
addq %rcx, %rdx
decq %rdx
cmpq %rax, %rdx
jb 0x2c6d0
movq 0x50(%rbx), %rdx
addq %rdx, %rax
decq %rax
cmpq %rax, %rcx
setbe %al
jmp 0x2c6d2
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl 0x8(%rdx), %eax
movb $0x1, %bl
leal -0x2(%rax), %edx
cmpl $0x9, %edx
jb 0x2c762
movq %rsi, %r14
addl $-0x3c, %eax
cmpl $0x6, %eax
ja 0x2c773
movl $0x73, %edx
btl %eax, %edx
jae 0x2c773
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %cl, %cl
je 0x2c7d7
movq 0x18(%r15), %r12
subq 0x10(%r15), %r12
shrq $0x3, %r12
testl %r12d, %r12d
setg %bpl
jle 0x2c7d7
movq 0x10(%r15), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x2c69a
testb %al, %al
jne 0x2c7d2
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
leaq -0x1(%r12), %rbp
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x2c7d7
movq 0x10(%r15), %rax
movq 0x8(%rax,%r13,8), %rsi
movq %r14, %rdi
callq 0x2c69a
incq %r13
testb %al, %al
je 0x2c7ae
cmpq %r12, %r13
setb %bpl
testb %bpl, %bpl
jne 0x2c762
movq (%r15), %rsi
testq %rsi, %rsi
je 0x2c7ef
movq %r14, %rdi
callq 0x2c69a
testb %al, %al
jne 0x2c762
xorl %ebx, %ebx
jmp 0x2c762
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2c880
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 0x234bc
testb %al, %al
je 0x2c874
cmpl $0x0, 0x20(%r12)
jne 0x2c874
movl 0x30(%r12), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movaps 0x34d90(%rip), %xmm0    # 0x615d0
movups %xmm0, 0x4(%rsi)
movaps 0x34d95(%rip), %xmm0    # 0x615e0
movups %xmm0, 0x14(%rsi)
movq %r15, %rdi
callq 0x35a0a
testl %ebp, %ebp
js 0x2c86a
movl %r14d, 0x2c(%rax)
incl 0x38(%rax)
movl %ebp, 0x30(%rax)
movl %ebx, 0x40(%rax)
jmp 0x2c874
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_O1/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 0x2c8a5
movq %rsi, %rdi
movl %ebx, %esi
callq 0x4cf22
movq %rax, %r15
jmp 0x2c8a9
movq 0x60(%rsi), %r15
testq %r15, %r15
je 0x2c936
movq 0x8(%r15), %rax
cmpq %rax, 0x10(%r15)
je 0x2c936
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 0x2c908
xorl %r13d, %r13d
movslq %r13d, %r13
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
movl %r12d, %edx
movl %r13d, %ecx
movl %ebx, %r8d
callq 0x2c7f6
incl %r13d
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ecx, %r13d
jb 0x2c8d9
movq (%rbp), %rsi
movq %r14, %rdi
movl %r12d, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ebx, %r8d
callq 0x2c7f6
incl %r12d
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x2c8bf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2c962
movq %rsi, %rdi
movl %ecx, %esi
callq 0x4cf22
jmp 0x2c966
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x2ca26
movq 0x20(%rax), %r14
testq %r14, %r14
je 0x2ca26
leaq 0x40(%r14), %r15
movq %r15, %rdi
callq 0x234bc
testb %al, %al
je 0x2c9d0
cmpl $0x0, 0x60(%r14)
jne 0x2c9d0
movq 0x70(%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movaps 0x34c2a(%rip), %xmm0    # 0x615d0
movups %xmm0, 0x8(%rsi)
movaps 0x34c2f(%rip), %xmm0    # 0x615e0
movups %xmm0, 0x18(%rsi)
movq %rbx, %rdi
callq 0x35b60
movq $0x0, 0x28(%rax)
movaps 0x34c24(%rip), %xmm0    # 0x615f0
movups %xmm0, 0x34(%rax)
movq %r14, %rdi
callq 0x234bc
testb %al, %al
je 0x2ca26
cmpl $0x0, (%r15)
jne 0x2ca26
cmpl $0x0, 0x60(%r14)
jne 0x2ca26
movq 0x70(%r14), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movaps 0x34bd4(%rip), %xmm0    # 0x615d0
movups %xmm0, 0x8(%rsi)
movaps 0x34bd9(%rip), %xmm0    # 0x615e0
movups %xmm0, 0x18(%rsi)
movq %rbx, %rdi
callq 0x35b60
movq $0x0, 0x28(%rax)
movaps 0x34bce(%rip), %xmm0    # 0x615f0
movups %xmm0, 0x34(%rax)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl 0x18(%rdx), %eax
testl %eax, %eax
js 0x2cc7f
movq %rsi, %rdi
movl %eax, %esi
callq 0x4cf22
movq %rax, %rbx
jmp 0x2cc83
movq 0x60(%rsi), %rbx
movl 0x1c(%r14), %eax
cmpl $0x1, %eax
je 0x2cce8
testl %eax, %eax
jne 0x2cd53
movslq 0x4(%r14), %rax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rcx
movq (%rcx,%rax,8), %r12
movl $0x68, %edi
callq 0xf370
movq %rax, %r15
movq (%r12), %rsi
movq %rax, %rdi
callq 0x244a4
movl (%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2527e
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
jne 0x2cd33
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35c06
jmp 0x2cd53
movslq (%r14), %rax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rcx
movq (%rcx,%rax,8), %r12
movl $0x68, %edi
callq 0xf370
movq %rax, %r15
movq 0x10(%r12), %rax
movq (%rax), %rsi
movq %r15, %rdi
callq 0x244a4
movl 0x4(%r14), %edx
movl 0x8(%r14), %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x25254
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2cd44
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x2cd53
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x35c06
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x252a0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2cd77
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xf380
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2cd85
movq %rax, %rbx
movl $0x68, %esi
movq %r15, %rdi
callq 0xf380
jmp 0x2cd9e
jmp 0x2cd9b
jmp 0x2cd9b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2cdb5
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xf380
movq %rbx, %rdi
callq 0xf730
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18(%rdx), %r12
addq $0x8, %rbx
cmpq %rbx, %r12
je 0x2ceed
movq %rsi, %r14
movq %rdi, %r15
movq 0x601fe(%rip), %r13     # 0x8cfe8
cmpl $0x0, 0x38(%r12)
je 0x2ce69
cmpl $0x0, 0x34(%r12)
jne 0x2ced9
movl $0x49, %edx
movq %r13, %rdi
leaq 0x35278(%rip), %rsi     # 0x62085
callq 0xf420
movq (%r13), %rax
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r13,%rax)
movl 0x90(%r14), %esi
movq %r13, %rdi
callq 0xf6e0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0xf340
movsbl %al, %esi
movq %rbp, %rdi
callq 0xf040
movq %rax, %rdi
callq 0xf260
incl 0x4(%r15)
jmp 0x2ced9
cmpb $0x1, 0xd(%r15)
jne 0x2ced5
movl $0x4b, %edx
movq %r13, %rdi
leaq 0x351ba(%rip), %rsi     # 0x62039
callq 0xf420
movq (%r13), %rax
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r13,%rax)
movl 0x90(%r14), %esi
movq %r13, %rdi
callq 0xf6e0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0xf340
movsbl %al, %esi
movq %rbp, %rdi
callq 0xf040
movq %rax, %rdi
callq 0xf260
incl 0x8(%r15)
movq %r12, %rdi
callq 0xf430
movq %rax, %r12
cmpq %rbx, %rax
jne 0x2cdea
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: ConsistencyChecker::optimize(Constructor*)
void ConsistencyChecker::optimize(Constructor *ct)

{
  OptimizeRecord *currec;
  map<uintb,OptimizeRecord> recs;
  int4 numsections = ct->getNumSections();
  do {
    recs.clear();
    for(int4 i=-1;i<numsections;++i) {
      optimizeGather1(ct,recs,i);
      optimizeGather2(ct,recs,i);
    }
    currec = findValidRule(ct,recs);
    if (currec != (OptimizeRecord *)0)
      applyOptimization(ct,*currec);
  } while(currec != (OptimizeRecord *)0);
  checkUnusedTemps(ct,recs);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x70(%rsi), %r12
subq 0x68(%rsi), %r12
shrq $0x3, %r12
movq %rsp, %r15
movq %r15, %rdi
callq 0x35ce2
testl %r12d, %r12d
js 0x2cf6d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2c882
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2c946
incl %ebp
cmpl %ebp, %r12d
jne 0x2cf4c
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2ca30
testq %rax, %rax
je 0x2cf8a
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2cc4a
jmp 0x2cf3a
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2cdbe
movq %rsp, %rdi
callq 0x349e8
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2cfb1
jmp 0x2cfb1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x349e8
movq %rbx, %rdi
callq 0xf730