LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/khashl/./../common-block.c
// Function: murmur3_32
uint32_t murmur3_32(const uint8_t* key, size_t len, uint32_t seed) // from wiki
{
	uint32_t h = seed;
    uint32_t k;
	size_t i;
    for (i = len >> 2; i; i--) {
        memcpy(&k, key, sizeof(uint32_t));
        key += sizeof(uint32_t);
        h ^= murmur_32_scramble(k);
        h = (h << 13) | (h >> 19);
        h = h * 5 + 0xe6546b64;
    }
    k = 0;
    for (i = len & 3; i; i--) {
        k <<= 8;
        k |= key[i - 1];
    }
    h ^= murmur_32_scramble(k);
	h ^= len;
	h ^= h >> 16;
	h *= 0x85ebca6b;
	h ^= h >> 13;
	h *= 0xc2b2ae35;
	h ^= h >> 16;
	return h;
}

// Assembly:
cmpq $0x4, %rsi
jb 0x16d4
movq %rsi, %rcx
shrq $0x2, %rcx
movq %rsi, %rax
andq $-0x4, %rax
xorl %r8d, %r8d
movl (%rdi,%r8,4), %r9d
imull $0xcc9e2d51, %r9d, %r10d # imm = 0xCC9E2D51
imull $0x16a88000, %r9d, %r9d # imm = 0x16A88000
shrl $0x11, %r10d
orl %r9d, %r10d
imull $0x1b873593, %r10d, %r9d # imm = 0x1B873593
xorl %edx, %r9d
roll $0xd, %r9d
leal (%r9,%r9,4), %edx
addl $0xe6546b64, %edx       # imm = 0xE6546B64
incq %r8
cmpq %r8, %rcx
jne 0x1698
addq %rax, %rdi
movq %rsi, %rcx
xorl %eax, %eax
andq $0x3, %rcx
je 0x16f0
shll $0x8, %eax
movzbl -0x1(%rdi,%rcx), %r8d
orl %r8d, %eax
decq %rcx
jne 0x16df
imull $0xcc9e2d51, %eax, %ecx # imm = 0xCC9E2D51
imull $0x16a88000, %eax, %eax # imm = 0x16A88000
shrl $0x11, %ecx
orl %eax, %ecx
imull $0x1b873593, %ecx, %eax # imm = 0x1B873593
xorl %esi, %edx
xorl %eax, %edx
movl %edx, %eax
shrl $0x10, %eax
xorl %edx, %eax
imull $0x85ebca6b, %eax, %eax # imm = 0x85EBCA6B
movl %eax, %ecx
shrl $0xd, %ecx
xorl %eax, %ecx
imull $0xc2b2ae35, %ecx, %ecx # imm = 0xC2B2AE35
movl %ecx, %eax
shrl $0x10, %eax
xorl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/gchen98[P]macs/simulator.cpp
// Function: Configuration::~Configuration()
Configuration::~Configuration(){
    cerr<<"Configuration destructor\n";
    delete pEventList;
    if (bSNPAscertainment){
        AlleleFreqBinPtrSet::iterator it;
        for (it=pAlleleFreqBinPtrSet->begin();it!=pAlleleFreqBinPtrSet->end();++it){
            delete(*it);
        }
        delete pAlleleFreqBinPtrSet;
    }
    if (bVariableRecomb){
        HotSpotBinPtrList::iterator it;
        for(it=pHotSpotBinPtrList->begin();it!=pHotSpotBinPtrList->end();++it){
            delete(*it);
        }
        delete pHotSpotBinPtrList;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x1b87d(%rip), %rdi     # 0x1fff0
leaq 0x132e6(%rip), %rsi     # 0x17a60
movl $0x19, %edx
callq 0x32a0
movq 0x80(%rbx), %r14
testq %r14, %r14
je 0x4798
movq %r14, %rdi
callq 0x871c
movl $0x18, %esi
movq %r14, %rdi
callq 0x3270
cmpb $0x1, 0x49(%rbx)
jne 0x4817
movq 0x90(%rbx), %r15
movq 0x18(%r15), %r14
leaq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x47fd
movq 0x20(%r14), %r15
testq %r15, %r15
je 0x47d0
movq %r15, %rdi
callq 0x11e74
movl $0x20, %esi
movq %r15, %rdi
callq 0x3270
movq %r14, %rdi
callq 0x32b0
movq %rax, %r14
movq 0x90(%rbx), %r15
leaq 0x8(%r15), %rax
cmpq %rax, %r14
jne 0x47bf
testq %r15, %r15
je 0x4807
movq %r15, %rdi
callq 0x8760
jmp 0x480a
xorl %r15d, %r15d
movl $0x30, %esi
movq %r15, %rdi
callq 0x3270
cmpb $0x1, 0x4b(%rbx)
jne 0x487d
movq 0x88(%rbx), %r14
movq (%r14), %r15
cmpq %r14, %r15
je 0x484e
movq 0x10(%r15), %rdi
movl $0x18, %esi
callq 0x3270
movq 0x88(%rbx), %r14
movq (%r15), %r15
cmpq %r14, %r15
jne 0x482c
testq %r14, %r14
je 0x486d
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x4870
movq (%rdi), %r15
movl $0x18, %esi
callq 0x3270
movq %r15, %rdi
cmpq %r14, %r15
jne 0x4856
jmp 0x4870
xorl %r14d, %r14d
movl $0x18, %esi
movq %r14, %rdi
callq 0x3270
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x4892
movq 0x78(%rbx), %rsi
subq %rdi, %rsi
callq 0x3270
addq $0x50, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x8248
movq %rax, %rdi
callq 0x823d
nop
// File: /workspace/github_cpp_makefile_star2_O3/gchen98[P]macs/simulator.cpp
// Function: Simulator::beginSimulation()
void Simulator::beginSimulation(){
    try{
        RandNumGenerator * rg = new RandNumGenerator(pConfig->iRandomSeed);
        cout<<SEED<<"\t"<<pConfig->iRandomSeed<<endl;
        for(unsigned int i=0;i<pConfig->iIterations;++i){
            if (pConfig->bDebug){
                cerr<<"Iteration: "<<i<<endl;
            }
            GraphBuilder graphBuilder = GraphBuilder(pConfig,rg);
            graphBuilder.build();
            graphBuilder.printHaplotypes();

        }
        delete rg;
    }catch(const char* message){
        cerr<<"Simulator caught exception with message:"<<endl<<message<<endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %r14
movl $0x8, %edi
callq 0x3260
movq %rax, %rbx
movq (%r14), %rax
movq 0x40(%rax), %rsi
movq %rbx, %rdi
callq 0x424c
movq 0x186fd(%rip), %rsi     # 0x20290
movq 0x186fe(%rip), %rdx     # 0x20298
movq 0x1842f(%rip), %rdi     # 0x1ffd0
callq 0x32a0
movq %rax, %r15
leaq 0xf56d(%rip), %rsi      # 0x1711d
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq (%r14), %rax
movq 0x40(%rax), %rsi
movq %r15, %rdi
callq 0x3230
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq (%r14), %rsi
cmpl $0x0, 0x34(%rsi)
je 0x7c99
xorl %r15d, %r15d
movq 0x183e3(%rip), %r12     # 0x1fff0
leaq 0x8(%rsp), %rbp
cmpb $0x1, 0x48(%rsi)
jne 0x7c64
movl $0xb, %edx
movq %r12, %rdi
leaq 0x10da0(%rip), %rsi     # 0x189c7
callq 0x32a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x31a0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq (%r14), %rsi
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x127b0
movq %rbp, %rdi
callq 0xfeb0
movq %rbp, %rdi
callq 0x14262
movq %rbp, %rdi
callq 0x12520
incq %r15
movq (%r14), %rsi
movl 0x34(%rsi), %eax
cmpq %rax, %r15
jb 0x7c12
movq %rbx, %rdi
callq 0x42da
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3270
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movq %rax, %r14
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3270
jmp 0x7cf1
jmp 0x7ceb
jmp 0x7ceb
movq %rdx, %r15
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x12520
jmp 0x7cf1
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0x7d4b
movq %r14, %rdi
callq 0x30d0
movq %rax, %rbx
movq 0x182e7(%rip), %rdi     # 0x1fff0
leaq 0x10cc3(%rip), %rsi     # 0x189d3
movl $0x28, %edx
callq 0x32a0
movq 0x182cf(%rip), %rdi     # 0x1fff0
callq 0x30f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x30f0
callq 0x3390
jmp 0x7cae
movq %rax, %r14
callq 0x3390
movq %r14, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/gchen98[P]macs/algorithm.cpp
// Function: GraphBuilder::pruneEdgesBelow(boost::shared_ptr<Edge>&)
void GraphBuilder::pruneEdgesBelow(EdgePtr & selectedEdge){
    NodePtr & bottomNode = selectedEdge->getBottomNodeRef();
    if (bottomNode->getType()==Node::COAL){
        // this is the terminating condition and should be the new
        // lower MRCA
        grandMRCA = bottomNode;
        grandMRCA->clearTopEdges();
    }else{
        // we didn't find a coalescent node (MRCA) so keep searching down
        bottomNode->removeEvent();
        EdgePtr bottomEdge = bottomNode->getBottomEdgeByIndex(0);
        pruneEdgesBelow(bottomEdge);
    }
    deleteEdge(selectedEdge);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq (%rsi), %rsi
testq %rsi, %rsi
je 0xa6b7
movq 0x20(%rsi), %rcx
testq %rcx, %rcx
je 0xa698
movq %rdi, %r14
cmpl $0x0, 0x64(%rcx)
je 0xa644
cmpb $0x1, 0x60(%rcx)
jne 0xa613
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0xa6d6
movb $0x1, 0x10(%rax)
movq $0x0, (%rsp)
movq 0x48(%rcx), %rdx
movq %rdx, 0x8(%rsp)
testq %rdx, %rdx
je 0xa66b
movl 0x8(%rdx), %eax
testl %eax, %eax
je 0xa662
leal 0x1(%rax), %esi
lock
cmpxchgl %esi, 0x8(%rdx)
jne 0xa62c
movq 0x40(%rcx), %rax
movq %rax, (%rsp)
jmp 0xa66b
addq $0x20, %rsi
leaq 0x38(%r14), %rdi
callq 0x10770
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xa698
movw $0x0, 0x68(%rax)
jmp 0xa683
movq $0x0, 0x8(%rsp)
leaq 0x8(%rsp), %r15
movq %rsp, %rsi
movq %r14, %rdi
callq 0xa5ce
movq %r15, %rdi
callq 0x10d5e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13da2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xe459(%rip), %rdi      # 0x18af8
leaq 0xe45a(%rip), %rsi      # 0x18b00
leaq 0xee4e(%rip), %rcx      # 0x194fb
movl $0xc7, %edx
callq 0x3170
leaq 0xe43a(%rip), %rdi      # 0x18af8
leaq 0xeda1(%rip), %rsi      # 0x19466
leaq 0xedc6(%rip), %rcx      # 0x19492
movl $0x2d8, %edx            # imm = 0x2D8
callq 0x3170
leaq 0xe41b(%rip), %rdi      # 0x18af8
leaq 0xe41c(%rip), %rsi      # 0x18b00
leaq 0xe444(%rip), %rcx      # 0x18b2f
jmp 0xa6ad
movq %rax, %rbx
movq %r15, %rdi
callq 0x10d5e
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O3/gchen98[P]macs/algorithm.cpp
// Function: GraphBuilder::markCurrentTree()
void GraphBuilder::markCurrentTree(){
    iTotalTreeEdges = 0;
    unsigned int iTotalSamples=pConfig->iSampleSize;
    for(unsigned int i=0;i<iTotalSamples;++i){
        NodePtr & node = pSampleNodeArray[i];
        pTreeEdgesToCoalesceArray[i]=node->getTopEdgeByIndex(0);
    }
    unsigned int iIndex = 0;
    int iIterations = 0;
    bool bFirstSample = true;
    while(iIndex<iTotalSamples){
        EdgePtr & curEdge = pTreeEdgesToCoalesceArray[iIndex];
        if (markEdgesAbove(bFirstSample,true,curEdge,iIndex)){
            ++iIndex;
        }else{
            // start over
            iIndex = 0;
        }
        bFirstSample = false;
        ++iIterations;
    }
    #ifdef DIAG
    if (localMRCA->getBottomEdgeByIndex(0)->iGraphIteration!=
    localMRCA->getBottomEdgeByIndex(1)->iGraphIteration){
        printDataStructures();
        cerr<<"Proposed grandMRCA at :"<<localMRCA->getHeight()<<endl;
        throw "Proposed grandMRCA's edges' histories don't match";
    }
    #endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl $0x0, 0x20(%rdi)
movq 0x8(%rdi), %rax
movl 0x30(%rax), %ebp
testl %ebp, %ebp
je 0xef45
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
xorl %eax, %eax
leaq 0x8(%rsp), %r15
movq 0xc0(%rbx), %rcx
movl %eax, %r12d
movq (%rcx,%r12,8), %rcx
testq %rcx, %rcx
je 0xef52
movq $0x0, 0x10(%rsp)
movq 0x28(%rcx), %rdx
movq %rdx, 0x18(%rsp)
testq %rdx, %rdx
je 0xeea9
movl 0x8(%rdx), %eax
testl %eax, %eax
je 0xeea9
leal 0x1(%rax), %esi
lock
cmpxchgl %esi, 0x8(%rdx)
jne 0xee90
movq 0x20(%rcx), %rcx
movq 0x18(%rsp), %rax
jmp 0xeead
xorl %eax, %eax
xorl %ecx, %ecx
movq 0xb8(%rbx), %rdx
movq %r12, %rsi
shlq $0x4, %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq (%rdx,%rsi), %rdi
movq %rdi, (%rsp)
movq %rcx, (%rdx,%rsi)
movq 0x8(%rdx,%rsi), %rcx
movq %rax, 0x8(%rdx,%rsi)
movq %rcx, 0x8(%rsp)
movq %r15, %rdi
callq 0x10d5e
movq %r14, %rdi
callq 0x10d5e
leal 0x1(%r12), %eax
cmpl %ebp, %eax
jne 0xee5f
movq %rsp, %r14
movl $0x0, (%r14)
xorl %eax, %eax
movb $0x1, %dl
movl %eax, %ecx
shlq $0x4, %rcx
addq 0xb8(%rbx), %rcx
movzbl %dl, %esi
andl $0x1, %esi
movq %rbx, %rdi
movl $0x1, %edx
movq %r14, %r8
callq 0xa18e
testb %al, %al
jne 0xef34
xorl %eax, %eax
jmp 0xef39
movl (%rsp), %eax
incl %eax
movl %eax, (%rsp)
movl $0x0, %edx
cmpl %ebp, %eax
jb 0xef09
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9b9f(%rip), %rdi      # 0x18af8
leaq 0x9ba0(%rip), %rsi      # 0x18b00
leaq 0xa594(%rip), %rcx      # 0x194fb
movl $0xc7, %edx
callq 0x3170
nop
// File: /workspace/github_cpp_makefile_star2_O3/gchen98[P]macs/datastructures.cpp
// Function: Edge::setBottomNode(boost::intrusive_ptr<Node>&)
void Edge::setBottomNode(NodePtr & bottomNode){
    #ifdef DIAG
    if (topNode->getHeight()<bottomNode->getHeight())
    throw "Error in modifying edge.  Top node must be higher or equal";
    #endif
    this->dLength = topNode->getHeight() - bottomNode->getHeight();
    this->bottomNode = bottomNode;
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x11ff1
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x11ff1
movsd 0x70(%rax), %xmm0
subsd 0x70(%rcx), %xmm0
movsd %xmm0, 0x28(%rdi)
addq $0x20, %rdi
popq %rax
jmp 0x10770
leaq 0x6b00(%rip), %rdi      # 0x18af8
leaq 0x6b01(%rip), %rsi      # 0x18b00
leaq 0x74f5(%rip), %rcx      # 0x194fb
movl $0xc7, %edx
callq 0x3170
// File: /workspace/github_cpp_makefile_star2_O3/gchen98[P]macs/datastructures.cpp
// Function: GraphBuilder::initializeCurrentTree()
void GraphBuilder::initializeCurrentTree(){
    // this method does two things, traverses the edges
    // to compute the total length, and clears out the status for
    // in current tree
    dLastTreeLength = 0.0;
    dArgLength = 0.;
    if (iGraphIteration==0){
        EdgePtrList::iterator it;
        for (it=pEdgeListInARG->begin();it!=pEdgeListInARG->end();++it){
            EdgePtr curEdge=*it;
            dLastTreeLength+=curEdge->getLength();
            this->addEdgeToCurrentTree(curEdge);
            curEdge->bInCurrentTree = false;
        }
        dArgLength = dLastTreeLength;
    }else{
        EdgePtrList::iterator it1=pEdgeListInARG->begin();
        while(it1!=pEdgeListInARG->end()){
            EdgePtr curEdge = *it1;
            if (!curEdge->bDeleted){
              dArgLength+=curEdge->getLength();
              if (curEdge->bInCurrentTree){
                dLastTreeLength+=curEdge->getLength();
                curEdge->bInCurrentTree = false;
              }
              ++it1;
            }else{
              it1 = pEdgeListInARG->erase(it1);
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %r13
xorpd %xmm0, %xmm0
movupd %xmm0, 0x28(%rdi)
cmpl $0x0, 0xd0(%rdi)
movq 0x10(%rdi), %rax
movq (%rax), %r14
je 0x141ac
cmpq %rax, %r14
je 0x14221
leaq 0x8(%rsp), %r15
movq 0x10(%r14), %rax
movq %rax, (%rsp)
movq 0x18(%r14), %rcx
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
je 0x1414d
lock
incl 0x8(%rcx)
testq %rax, %rax
je 0x1422f
cmpb $0x0, 0x10(%rax)
je 0x14170
movq 0x10(%rbx), %rdi
movq (%r14), %r12
movq %r14, %rsi
callq 0x16420
movq %r12, %r14
jmp 0x1419c
movsd 0x28(%rax), %xmm0
movsd (%r13), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%r13)
cmpb $0x1, 0x12(%rax)
jne 0x14199
addsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x30(%rbx)
movb $0x0, 0x12(%rax)
movq (%r14), %r14
movq %r15, %rdi
callq 0x10d5e
cmpq 0x10(%rbx), %r14
jne 0x14133
jmp 0x14221
cmpq %rax, %r14
je 0x14217
leaq 0x8(%rsp), %r15
movq %rsp, %r12
movq 0x10(%r14), %rax
movq %rax, (%rsp)
movq 0x18(%r14), %rcx
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
je 0x141d3
lock
incl 0x8(%rcx)
testq %rax, %rax
je 0x1422f
movsd 0x28(%rax), %xmm0
addsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x30(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x14086
movq (%rsp), %rax
testq %rax, %rax
je 0x1422f
movb $0x0, 0x12(%rax)
movq %r15, %rdi
callq 0x10d5e
movq (%r14), %r14
cmpq 0x10(%rbx), %r14
jne 0x141b9
movsd 0x30(%rbx), %xmm0
jmp 0x1421b
xorpd %xmm0, %xmm0
movsd %xmm0, (%r13)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x48c2(%rip), %rdi      # 0x18af8
leaq 0x5229(%rip), %rsi      # 0x19466
leaq 0x524e(%rip), %rcx      # 0x19492
movl $0x2d8, %edx            # imm = 0x2D8
callq 0x3170
movq %rax, %rbx
movq %r15, %rdi
callq 0x10d5e
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/hoehermann[P]TypedJNI/typedjni.cpp
// Function: TypedJNI::GetStaticMethodID(JNIEnv_*, _jclass*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
jmethodID TypedJNI::GetStaticMethodID(JNIEnv *env, const jclass cls, const std::string name, const std::string & signature) {
    jmethodID mid = env->GetStaticMethodID(cls, name.c_str(), signature.c_str());
    if (mid == NULL) {
        throw TypedJNIError("Failed to find static method '"+name+"' "+signature+".");
    }
    return mid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq (%rdx), %rdx
movq (%rcx), %rcx
movq (%rdi), %rax
callq *0x388(%rax)
testq %rax, %rax
je 0x6954
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x30e0
movq %rax, %rbx
leaq 0x2c16(%rip), %rsi      # 0x957e
movq %rsp, %rdi
movq %r15, %rdx
callq 0x784a
leaq 0x2c23(%rip), %rsi      # 0x959d
movq %rsp, %rdi
callq 0x32a0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x69a3
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x69b0
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x60(%rsp), %rdi
movq %r14, %rdx
callq 0x77f0
leaq 0x2c28(%rip), %rsi      # 0x9608
leaq 0x60(%rsp), %rdi
callq 0x32a0
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6a0d
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x6a1a
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x31f0
leaq 0x61b8(%rip), %rax      # 0xcc00
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x61c4(%rip), %rsi      # 0xcc18
movq 0x656d(%rip), %rdx      # 0xcfc8
movq %rbx, %rdi
callq 0x3260
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x6a85
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x31b0
jmp 0x6a85
movq %rax, %r14
movb $0x1, %bpl
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6aa8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x31b0
jmp 0x6aa8
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x6abf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x31b0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ada
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
testb %bpl, %bpl
jne 0x6b04
jmp 0x6b0c
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6b04
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
jmp 0x6b04
movq %rax, %r14
movq %rbx, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x3280
// File: /workspace/github_cpp_makefile_star2_O3/hoehermann[P]TypedJNI/typedjni.cpp
// Function: TypedJNI::GetMethodID(JNIEnv_*, _jclass*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
jmethodID TypedJNI::GetMethodID(JNIEnv *env, const jclass cls, const std::string name, const std::string & signature) {
    jmethodID mid = env->GetMethodID(cls, name.c_str(), signature.c_str());
    if (mid == NULL) {
        throw TypedJNIError("Failed to find method '"+name+"' "+signature+".");
    }
    return mid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq (%rdx), %rdx
movq (%rcx), %rcx
movq (%rdi), %rax
callq *0x108(%rax)
testq %rax, %rax
je 0x6b4d
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x30e0
movq %rax, %rbx
leaq 0x2a3f(%rip), %rsi      # 0x95a0
movq %rsp, %rdi
movq %r15, %rdx
callq 0x784a
leaq 0x2a2a(%rip), %rsi      # 0x959d
movq %rsp, %rdi
callq 0x32a0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6b9c
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x6ba9
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x60(%rsp), %rdi
movq %r14, %rdx
callq 0x77f0
leaq 0x2a2f(%rip), %rsi      # 0x9608
leaq 0x60(%rsp), %rdi
callq 0x32a0
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6c06
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x6c13
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x31f0
leaq 0x5fbf(%rip), %rax      # 0xcc00
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x5fcb(%rip), %rsi      # 0xcc18
movq 0x6374(%rip), %rdx      # 0xcfc8
movq %rbx, %rdi
callq 0x3260
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x6c7e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x31b0
jmp 0x6c7e
movq %rax, %r14
movb $0x1, %bpl
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ca1
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x31b0
jmp 0x6ca1
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x6cb8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x31b0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cd3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
testb %bpl, %bpl
jne 0x6cfd
jmp 0x6d05
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cfd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
jmp 0x6cfd
movq %rax, %r14
movq %rbx, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x3280
nop
// File: /workspace/github_cpp_makefile_star2_O3/hoehermann[P]TypedJNI/typedjni.cpp
// Function: TypedJNIEnv::find_class(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
TypedJNIClass TypedJNIEnv::find_class(std::string name) {
    jclass cls = env->FindClass(name.c_str());
    if (cls == NULL) {
        throw TypedJNIError("Failed to find class '"+name+"'.");
    }
    return TypedJNIClass(env, cls);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq (%rsi), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
testq %rax, %rax
je 0x75e8
movq %rax, %rdx
movq 0x10(%rbx), %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x30e0
movq %rax, %rbx
leaq 0x205e(%rip), %rsi      # 0x965a
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x784a
leaq 0x1ff7(%rip), %rsi      # 0x9607
leaq 0x8(%rsp), %rdi
callq 0x32a0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x763b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x7648
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x31f0
leaq 0x558a(%rip), %rax      # 0xcc00
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x5596(%rip), %rsi      # 0xcc18
movq 0x593f(%rip), %rdx      # 0xcfc8
movq %rbx, %rdi
callq 0x3260
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x76ab
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31b0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x76c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31b0
testb %bpl, %bpl
jne 0x76f0
jmp 0x76f8
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x76f0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31b0
jmp 0x76f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x3280
// File: /workspace/github_cpp_makefile_star2_O3/SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: i2cWrite(int, int, unsigned short, int, int, unsigned char*)
int i2cWrite (int i2c_file, int i2c_addr, uint16_t sub_addr,
              int sub_addr_length, int length, uint8_t data[32])
{
	uint8_t *buffer = (uint8_t *)malloc((length * sizeof(uint8_t)) + sub_addr_length);
	int i;

	memcpy(buffer + sub_addr_length, data, length * sizeof(uint8_t));

	// Set I2C address
	if (ioctl(i2c_file, I2C_SLAVE, i2c_addr) < 0) {
		return -1;
	}

	if (sub_addr_length == 2) {
		buffer[0] = (sub_addr >> 8) & 0xFF;
		buffer[1] = sub_addr & 0xFF;
	} else {
		buffer[0] = sub_addr & 0xFF;
	}

	for (i = 0; i < I2C_CHECK_COUNT; i++) {
		// The DNA Spec allows an MCU to NAK subsequent writes when multiple
		// writes are performed, keep trying for I2C_CHECK_COUNT tries before
		// giving up.
		if (write(i2c_file, buffer, sub_addr_length + length)
		      == (length + sub_addr_length)) {
			return 0;
		}
	}

	// We gave up trying to write
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movl %ecx, %ebp
movl %edx, 0xc(%rsp)
movl %esi, 0x14(%rsp)
movl %edi, %ebx
movl %r8d, 0x10(%rsp)
movslq %r8d, %r13
movslq %ecx, %r15
leaq (%r15,%r13), %rdi
callq 0x10e0
movq %rax, %r14
addq %rax, %r15
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10a0
movl $0x703, %esi            # imm = 0x703
movl %ebx, %edi
movl 0x14(%rsp), %edx
xorl %eax, %eax
callq 0x1110
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x1338
cmpl $0x2, %ebp
jne 0x1308
movzwl 0xc(%rsp), %eax
movb %al, 0x1(%r14)
shrl $0x8, %eax
jmp 0x130c
movl 0xc(%rsp), %eax
movb %al, (%r14)
movl 0x10(%rsp), %eax
addl %ebp, %eax
movslq %eax, %r15
movl $0x7d0, %ebp            # imm = 0x7D0
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1060
cmpq %r15, %rax
je 0x1335
decl %ebp
jne 0x131d
jmp 0x1338
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: i2cRead(int, int, unsigned short, int, int, unsigned char*)
int i2cRead (int i2c_file, int i2c_addr, uint16_t sub_addr,
             int sub_addr_length, int length, uint8_t data[32])
{
	uint8_t temp_buf[2];

	// Set I2C address
	if (ioctl(i2c_file, I2C_SLAVE, i2c_addr) < 0) {
		return -1;
	}

	if (sub_addr_length == 2) {
		temp_buf[0] = (sub_addr >> 8) & 0xFF;
		temp_buf[1] = sub_addr & 0xFF;
	} else {
		temp_buf[0] = sub_addr & 0xFF;
	}

	if (write(i2c_file, temp_buf, sub_addr_length) != sub_addr_length) {
		return -1;
	}

	if (read(i2c_file, data, length) != length) {
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %edx
movl %edi, %r14d
movl $0x703, %esi            # imm = 0x703
xorl %eax, %eax
callq 0x1110
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x13c8
cmpl $0x2, %r12d
jne 0x138f
movzwl %r13w, %r13d
movb %r13b, 0x7(%rsp)
shrl $0x8, %r13d
leaq 0x6(%rsp), %rsi
movb %r13b, (%rsi)
movslq %r12d, %r12
movl %r14d, %edi
movq %r12, %rdx
callq 0x1060
cmpq %r12, %rax
jne 0x13c8
movslq %ebp, %r12
movl %r14d, %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1120
xorl %r15d, %r15d
cmpq %r12, %rax
setne %r15b
negl %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: writeMCU(int, unsigned short, int, unsigned char*, int)
int writeMCU (int i2c_file, uint16_t port_addr, int sub_addr, uint8_t *data,
              int length)
{
	int temp_length, current_sub_addr;

	// Useful for debug
	//printf("Writing %d bytes to 0x%X, sub-address 0x%X\n", length, port_addr, sub_addr);

	current_sub_addr = sub_addr;

	while (length > 0) {
		temp_length = (length > 32) ? 32 : length;

		if (i2cWrite(i2c_file, port_addr, current_sub_addr, 2, temp_length,
		             &data[(current_sub_addr - sub_addr)]) != 0) {
			return -1;
		}

		current_sub_addr += temp_length;
		length -= temp_length;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
xorl %eax, %eax
testl %r8d, %r8d
jle 0x1443
movl %r8d, %ebp
movl %edx, %r14d
movl %edi, %r12d
movzwl %si, %r13d
movl %edx, %r15d
cmpl $0x20, %ebp
movl $0x20, %ebx
cmovbl %ebp, %ebx
movl %r15d, %eax
subl %r14d, %eax
movslq %eax, %r9
addq (%rsp), %r9
movzwl %r15w, %edx
movl %r12d, %edi
movl %r13d, %esi
movl $0x2, %ecx
movl %ebx, %r8d
callq 0x1294
testl %eax, %eax
jne 0x143e
addl %ebx, %r15d
subl %ebx, %ebp
jg 0x1400
xorl %eax, %eax
jmp 0x1443
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: readMCU(int, unsigned short, int, unsigned char*, int)
int readMCU (int i2c_file, uint16_t port_addr, int sub_addr, uint8_t *data,
             int length)
{
	int current_sub_addr, temp_length;

	// Useful for debug
	//printf("Reading %d bytes from 0x%X, sub-address 0x%X\n", length, port_addr, sub_addr);

	current_sub_addr = sub_addr;

	while (length > 0) {
		temp_length = (length > 32) ? 32 : length;

		if (i2cRead(i2c_file, port_addr, current_sub_addr, 2, temp_length,
		            &data[(current_sub_addr - sub_addr)]) != 0) {
			return -1;
		}

		current_sub_addr += temp_length;
		length -= temp_length;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
xorl %eax, %eax
testl %r8d, %r8d
jle 0x14bb
movl %r8d, %ebp
movl %edx, %r14d
movl %edi, %r12d
movzwl %si, %r13d
movl %edx, %r15d
cmpl $0x20, %ebp
movl $0x20, %ebx
cmovbl %ebp, %ebx
movl %r15d, %eax
subl %r14d, %eax
movslq %eax, %r9
addq (%rsp), %r9
movzwl %r15w, %edx
movl %r12d, %edi
movl %r13d, %esi
movl $0x2, %ecx
movl %ebx, %r8d
callq 0x134a
testl %eax, %eax
jne 0x14b6
addl %ebx, %r15d
subl %ebx, %ebp
jg 0x1478
xorl %eax, %eax
jmp 0x14bb
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: printHelp(char*)
void printHelp (char *progname)
{
	printf("Usage: %s [option [argument]] <i2c device>\n", progname);
	printf("  <i2c device> is required for all commands. It must contain the\n");
	printf("               path to the Linux i2c device\n");
	printf("\n");
	printf("  Exactly one of the following options must be specified:\n");
	printf("    -h - print this text\n");
	printf("    -w <filename> - write a binary DNA to a peripheral, takes the DNA filename\n");
	printf("                    as an argument\n");
	printf("    -d <filename> - dump the DNA from a peripheral to a binary file, takes the\n");
	printf("                    DNA filename as an argument\n");
	printf("\n");
	printf("  Examples:\n");
	printf("    Dump DNA from the MCU on Port 1:\n");
	printf("      %s -d seq_file.bin -p 1 /dev/i2c-1\n", progname);
	printf("    Set VIO1 to 3.3V:\n");
	printf("      %s -s -1 330 /dev/i2c-1\n", progname);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xb0e(%rip), %rdi       # 0x2004
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
leaq 0xd8e(%rip), %rdi       # 0x2295
callq 0x1130
leaq 0xdc3(%rip), %rdi       # 0x22d6
callq 0x1130
movl $0xa, %edi
callq 0x10f0
leaq 0xdd9(%rip), %rdi       # 0x2302
callq 0x1130
leaq 0xe07(%rip), %rdi       # 0x233c
callq 0x1130
leaq 0xe14(%rip), %rdi       # 0x2355
callq 0x1130
leaq 0xe57(%rip), %rdi       # 0x23a4
callq 0x1130
leaq 0xe6e(%rip), %rdi       # 0x23c7
callq 0x1130
leaq 0xeb1(%rip), %rdi       # 0x2416
callq 0x1130
movl $0xa, %edi
callq 0x10f0
leaq 0xecb(%rip), %rdi       # 0x2446
callq 0x1130
leaq 0xecb(%rip), %rdi       # 0x2452
callq 0x1130
leaq 0xa9d(%rip), %rdi       # 0x2030
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
leaq 0xed3(%rip), %rdi       # 0x2477
callq 0x1130
leaq 0xaaa(%rip), %rdi       # 0x205a
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
jmp 0x1030
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, unsigned long long)
void sprint1(String_Buffer *buffer, unsigned long long x)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%llu", x);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x10(%rdi), %rax
movq 0x8(%rdi), %rdi
addq %rax, %rdi
subq %rax, %rsi
leaq 0x7eb7(%rip), %rdx      # 0x93c9
xorl %eax, %eax
callq 0x1140
cltq
addq 0x10(%rbx), %rax
movq (%rbx), %rcx
decq %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
movq %rcx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, long)
void sprint1(String_Buffer *buffer, long int x)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%ld", x);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x10(%rdi), %rax
movq 0x8(%rdi), %rdi
addq %rax, %rdi
subq %rax, %rsi
leaq 0x7da4(%rip), %rdx      # 0x93d8
xorl %eax, %eax
callq 0x1140
cltq
addq 0x10(%rbx), %rax
movq (%rbx), %rcx
decq %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
movq %rcx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./aids.hpp
// Function: aids::print1(_IO_FILE*, aids::Escape)
void print1(FILE *stream, Escape escape)
    {
        for (size_t i = 0; i < escape.unwrap.count; ++i) {
            switch (escape.unwrap.data[i]) {
            case '\a': print(stream, "\\a"); break;
            case '\b': print(stream, "\\b"); break;
            case '\f': print(stream, "\\f"); break;
            case '\n': print(stream, "\\n"); break;
            case '\r': print(stream, "\\r"); break;
            case '\t': print(stream, "\\t"); break;
            case '\v': print(stream, "\\v"); break;
            default: print(stream, escape.unwrap.data[i]);
            }
        }
    }

// Assembly:
testq %rsi, %rsi
je 0x19f0
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
leaq 0x76e8(%rip), %r12      # 0x9010
movzbl (%rbx,%r13), %eax
leal -0x7(%rax), %ecx
cmpl $0x6, %ecx
ja 0x198a
movslq (%r12,%rcx,4), %rax
addq %r12, %rax
jmpq *%rax
movl $0x1, %esi
movl $0x2, %edx
leaq 0x7a98(%rip), %rdi      # 0x93e7
jmp 0x19ce
movl $0x1, %esi
movl $0x2, %edx
leaq 0x7a97(%rip), %rdi      # 0x93f9
jmp 0x19ce
movl $0x1, %esi
movl $0x2, %edx
leaq 0x7a81(%rip), %rdi      # 0x93f6
jmp 0x19ce
movl $0x1, %esi
movl $0x2, %edx
leaq 0x7a68(%rip), %rdi      # 0x93f0
jmp 0x19ce
movsbl %al, %edi
movq %r15, %rsi
callq 0x1100
jmp 0x19d6
movl $0x1, %esi
movl $0x2, %edx
leaq 0x7a42(%rip), %rdi      # 0x93ea
jmp 0x19ce
movl $0x1, %esi
movl $0x2, %edx
leaq 0x7a32(%rip), %rdi      # 0x93ed
jmp 0x19ce
movl $0x1, %esi
movl $0x2, %edx
leaq 0x7a25(%rip), %rdi      # 0x93f3
movq %r15, %rcx
callq 0x1190
incq %r13
cmpq %r13, %r14
jne 0x1928
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::type_of_name(unsigned long, aids::String_View) const
Type Type_Checker::type_of_name(size_t offset, String_View name) const
{
    auto scope0 = scope;

    while (scope0) {
        Args_List *args_list = scope0->args_list;
        while (args_list) {
            if (name == args_list->var_def.name) {
                return args_list->var_def.type;
            }
            args_list = args_list->next;
        }
        scope0 = scope0->next;
    }

    reporter.fail(offset, "Could not find name `", name, "` in the current scope");
    return Type::Unchecked;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, -0x30(%rbp)
movq %rdi, %r12
movq 0x28(%rdi), %r13
testq %r13, %r13
je 0x1be0
movq (%r13), %r15
testq %r15, %r15
je 0x1bc7
cmpq %r14, (%r15)
jne 0x1bc1
movq 0x8(%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x10c0
testl %eax, %eax
je 0x1bcd
movq 0x18(%r15), %r15
jmp 0x1ba4
movq 0x8(%r13), %r13
jmp 0x1b9b
movl 0x10(%r15), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %r12
leaq 0x7811(%rip), %rdx      # 0x93fc
leaq 0x7820(%rip), %r9       # 0x9412
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x6e08
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::push_var_def(Var_Def)
void Type_Checker::push_var_def(Var_Def var_def)
{
    assert(scope);
    auto args_list = memory->alloc<Args_List>();
    args_list->var_def = var_def;
    args_list->next = scope->args_list;
    scope->args_list = args_list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x28(%rdi)
je 0x1cac
movq %rdi, %rbx
leaq 0x10(%rbp), %r14
movq (%rdi), %rdi
movl $0x1, %esi
callq 0x6ebe
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq 0x28(%rbx), %rcx
movq (%rcx), %rdx
movq %rdx, 0x18(%rax)
movq %rax, (%rcx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7770(%rip), %rdi      # 0x9423
leaq 0x776f(%rip), %rsi      # 0x9429
leaq 0x77a2(%rip), %rcx      # 0x9463
movl $0x26, %edx
callq 0x1090
nop
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::cast_expression_to(Expression*, Type)
Expression *Type_Checker::cast_expression_to(Expression *expression, Type type)
{
    Expression *cast_expression = memory->alloc<Expression>();
    cast_expression->kind = Expression_Kind::Type_Cast;
    cast_expression->type = type;
    cast_expression->offset = expression->offset;
    cast_expression->type_cast.type = cast_expression->type;
    cast_expression->type_cast.expression = expression;
    return cast_expression;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq (%rdi), %rdi
movl $0x1, %esi
callq 0x6f46
movl $0x4, (%rax)
movl %ebx, 0x4(%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
movl %ebx, 0x10(%rax)
movq %r14, 0x18(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: is_expression_implicitly_convertible_to(Expression*, Type)
bool is_expression_implicitly_convertible_to(Expression *expression, Type target_type)
{
    assert(expression->type != Type::Unchecked && "Unchecked type in a checked context");
    assert(target_type != Type::Unchecked && "Unchecked type in a checked context");

    for (size_t i = 0; i < implicit_conversion_table_count; ++i) {
        const size_t SOURCE = 0;
        const size_t TARGET = 1;
        if (implicit_conversion_table[i][SOURCE] == expression->type &&
            implicit_conversion_table[i][TARGET] == target_type) {
            return true;
        }
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4(%rdi), %ecx
testl %ecx, %ecx
je 0x1d3f
testl %esi, %esi
je 0x1d5e
movb $0x1, %al
xorl %edi, %edi
leaq 0x7644(%rip), %rdx      # 0x9360
cmpl %ecx, (%rdx,%rdi,8)
jne 0x1d27
cmpl %esi, 0x4(%rdx,%rdi,8)
je 0x1d3b
cmpq $0xa, %rdi
leaq 0x1(%rdi), %r8
setb %al
movq %r8, %rdi
cmpq $0xb, %r8
jne 0x1d1c
andb $0x1, %al
popq %rbp
retq
leaq 0x7746(%rip), %rdi      # 0x948c
leaq 0x76dc(%rip), %rsi      # 0x9429
leaq 0x7785(%rip), %rcx      # 0x94d9
movl $0x55, %edx
callq 0x1090
leaq 0x77b5(%rip), %rdi      # 0x951a
leaq 0x76bd(%rip), %rsi      # 0x9429
leaq 0x7766(%rip), %rcx      # 0x94d9
movl $0x56, %edx
callq 0x1090
nop
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::try_implicitly_convert_expression_to(Expression*, Type)
Expression *Type_Checker::try_implicitly_convert_expression_to(Expression *expression, Type cast_type)
{
    if (is_expression_implicitly_convertible_to(expression, cast_type)) {
        return cast_expression_to(expression, cast_type);
    } else {
        reporter.fail(expression->offset, "Expression of type `", expression->type, "` is not convertable to `", cast_type, "`");
    }

    return expression;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movl %edx, %esi
callq 0x1d02
testb %al, %al
je 0x1dce
movq (%r15), %rdi
movl $0x1, %esi
callq 0x6f46
movl $0x4, (%rax)
movl %ebx, 0x4(%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
movl %ebx, 0x10(%rax)
movq %r14, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %r15
movq 0x8(%r14), %rsi
movl 0x4(%r14), %ecx
leaq 0x78c0(%rip), %rax      # 0x96a1
movq %rax, (%rsp)
leaq 0x7776(%rip), %rdx      # 0x9562
leaq 0x7784(%rip), %r8       # 0x9577
movq %r15, %rdi
movl %ebx, %r9d
callq 0x6fce
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::check_types_of_local_var_def(Local_Var_Def*, Type)
void Type_Checker::check_types_of_local_var_def(Local_Var_Def *local_var_def, Type expected_type)
{
    local_var_def->value = try_implicitly_convert_expression_to(
        check_types_of_expression(local_var_def->value),
        local_var_def->def.type);

    const auto TYPE_OF_LOCAL_VAR_DEF = Type::U0;

    if (expected_type != TYPE_OF_LOCAL_VAR_DEF) {
        // TODO: use offset of the local_var_def itself instead of its value;
        reporter.fail(local_var_def->value->offset, "Expected statement of type `", expected_type, "`, but local variable definition has the type `", TYPE_OF_LOCAL_VAR_DEF, "`");
    }

    push_var_def(local_var_def->def);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rsi), %r12
movq %r12, %rsi
callq 0x1e94
movl 0x10(%r15), %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1d7e
movq %rax, 0x18(%r15)
cmpl $0x1, %r14d
jne 0x1e61
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x1c68
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %rbx
movq 0x8(%rax), %rsi
leaq 0x7831(%rip), %rax      # 0x96a1
movq %rax, (%rsp)
leaq 0x7716(%rip), %rdx      # 0x9591
leaq 0x772c(%rip), %r8       # 0x95ae
movq %rbx, %rdi
movl %r14d, %ecx
movl $0x1, %r9d
callq 0x6fce
nop
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::check_types_of_while(While*, Type)
void Type_Checker::check_types_of_while(While *hwile, Type expected_type)
{
    hwile->condition = try_implicitly_convert_expression_to(
        check_types_of_expression(hwile->condition),
        Type::Bool);
    // TODO: use offset of the hwile body itself instead of its condition
    check_types_of_block(hwile->condition->offset, hwile->body, Type::U0);

    const auto TYPE_OF_WHILE = Type::U0;
    if (expected_type != TYPE_OF_WHILE) {
        // TODO: use offset of the hwile itself instead of its condition;
        reporter.fail(hwile->condition->offset, "Expected statement of type `", expected_type, "`, but while-loop construction has the type `", TYPE_OF_WHILE, "`");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %r12
movq %r12, %rsi
callq 0x1e94
movq %r14, %rdi
movq %r12, %rsi
movl $0x5, %edx
callq 0x1d7e
movq %rax, (%r15)
movq 0x8(%rax), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
movl $0x1, %ecx
callq 0x2206
cmpl $0x1, %ebx
jne 0x21d2
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %r14
movq (%r15), %rax
movq 0x8(%rax), %rsi
leaq 0x74bd(%rip), %rax      # 0x96a1
movq %rax, (%rsp)
leaq 0x73a2(%rip), %rdx      # 0x9591
leaq 0x73e8(%rip), %r8       # 0x95de
movq %r14, %rdi
movl %ebx, %ecx
movl $0x1, %r9d
callq 0x6fce
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::check_types_of_block(unsigned long, Block*, Type)
void Type_Checker::check_types_of_block(size_t offset, Block *block, Type expected_type)
{
    push_scope();

    if (!block) {
        const Type TYPE_OF_EMPTY_BLOCK = Type::U0;
        if (expected_type != TYPE_OF_EMPTY_BLOCK) {
            reporter.fail(offset, "Expected type `", expected_type, "` but empty block has type `", TYPE_OF_EMPTY_BLOCK, "`");
        }
    }

    while (block && block->next != nullptr) {
        check_types_of_statement(&block->statement, Type::U0);
        block = block->next;
    }

    if (block) {
        check_types_of_statement(&block->statement, expected_type);
    }

    pop_scope();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x1, %esi
callq 0x6e36
movq $0x0, (%rax)
movq 0x28(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x28(%rbx)
testq %r15, %r15
sete %al
cmpl $0x1, %r14d
setne %cl
testb %cl, %al
jne 0x22a0
testq %r15, %r15
je 0x2282
cmpq $0x0, 0x30(%r15)
je 0x2274
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x2480
movq 0x30(%r15), %r15
jmp 0x2252
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2480
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x22d1
movq 0x8(%rax), %rax
movq %rax, 0x28(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %rbx
leaq 0x73f6(%rip), %rax      # 0x96a1
movq %rax, (%rsp)
leaq 0x74bb(%rip), %rdx      # 0x9771
leaq 0x74c4(%rip), %r8       # 0x9781
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %ecx
movl $0x1, %r9d
callq 0x6fce
leaq 0x714b(%rip), %rdi      # 0x9423
leaq 0x714a(%rip), %rsi      # 0x9429
leaq 0x715e(%rip), %rcx      # 0x9444
movl $0x20, %edx
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::check_types_of_if(If*, Type)
void Type_Checker::check_types_of_if(If *iph, Type expected_type)
{
    iph->condition = try_implicitly_convert_expression_to(
        check_types_of_expression(iph->condition),
        Type::Bool);
    // TODO: use offsets of the `then` and `else` blocks themselves instead of the if condition
    check_types_of_block(iph->condition->offset, iph->then, expected_type);
    check_types_of_block(iph->condition->offset, iph->elze, expected_type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %r12
movq %r12, %rsi
callq 0x1e94
movq %r15, %rdi
movq %r12, %rsi
movl $0x5, %edx
callq 0x1d7e
movq %rax, (%r14)
movq 0x8(%rax), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
movl %ebx, %ecx
callq 0x2206
movq (%r14), %rax
movq 0x10(%r14), %rdx
movq 0x8(%rax), %rsi
movq %r15, %rdi
movl %ebx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2206