LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/xx01cyx[P]LSM-Tree/kvstore.cc
// Function: KVStore::reconstructL0()
void KVStore::reconstructL0() {
    vector<SSTPtr> L0SST = *ssTables[0];
    for (const auto& sst : L0SST)
        removeSSTFromDisk(sst);
    ssTables[0]->clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
addq $0x20, %rbx
movq %rsp, %rsi
movq $0x0, (%rsi)
movq %rbx, %rdi
callq 0xd658
movq (%rax), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xcf10
movq (%r15), %r14
movq 0x8(%r15), %r15
cmpq %r15, %r14
je 0xaddc
movq %r14, %rdi
callq 0xc698
addq $0x10, %r14
jmp 0xadc9
movq %rsp, %rsi
movq $0x0, (%rsi)
movq %rbx, %rdi
callq 0xd658
movq (%rax), %rdi
callq 0xd184
leaq 0x8(%rsp), %rdi
callq 0xce64
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0xae0c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xce64
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O3/xx01cyx[P]LSM-Tree/kvstore.cc
// Function: KVStore::getCompactSSTs(unsigned long, unsigned int)
vector<SSTPtr> KVStore::getCompactSSTs(size_t level, uint32_t overflowNumber) {

    vector<SSTPtr> levelSSTs = *ssTables[level];
    SSTTimeStampPriorComparator sstComparator;
    sort(levelSSTs.begin(), levelSSTs.end(), sstComparator);

    vector<SSTPtr> compactSSTs;
    for (uint32_t i = 0; i < overflowNumber; ++i)
        compactSSTs.push_back(levelSSTs[i]);

    return compactSSTs;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rdx, (%rax)
leaq 0x20(%rsi), %rdi
movq %rax, %rsi
callq 0xe280
movq (%rax), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xcf10
movq (%r15), %r14
movq 0x8(%r15), %r15
cmpq %r15, %r14
je 0xae8e
movq %r15, %rax
subq %r14, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xe9f6
movq %r14, %rdi
movq %r15, %rsi
callq 0xeaa9
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
testl %ebp, %ebp
je 0xaec3
movl %ebp, %r14d
shlq $0x4, %r14
xorl %r15d, %r15d
movq 0x8(%rsp), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0xcdc6
addq $0x10, %r15
cmpq %r15, %r14
jne 0xaeaa
leaq 0x8(%rsp), %rdi
callq 0xce64
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xaeeb
movq %rax, %r14
movq %rbx, %rdi
callq 0xce64
leaq 0x8(%rsp), %rdi
callq 0xce64
movq %r14, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O3/xx01cyx[P]LSM-Tree/kvstore.cc
// Function: KVStore::reconstructUpperLevel(unsigned long, std::vector<std::shared_ptr<SSTable>, std::allocator<std::shared_ptr<SSTable>>> const&)
void KVStore::reconstructUpperLevel(size_t upperLevel, const vector<SSTPtr> &compactSSTs) {
    vector<SSTPtr> levelSSTs = *ssTables[upperLevel];
    for (const auto& compactSST : compactSSTs) {
        auto delIt = find(ssTables[upperLevel]->begin(), ssTables[upperLevel]->end(), compactSST);
        if (delIt != ssTables[upperLevel]->end()) {
            removeSSTFromDisk(*delIt);
            ssTables[upperLevel]->erase(delIt);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movq %rdi, %rbx
movq %rsp, %rax
movq %rsi, (%rax)
addq $0x20, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe280
movq (%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0xcf10
movq (%r15), %r14
movq 0x8(%r15), %r13
cmpq %r13, %r14
je 0xb1fe
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe280
movq (%rax), %rax
movq (%rax), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe280
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0xf611
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe280
movq (%rax), %rax
cmpq 0x8(%rax), %r12
je 0xb1f5
movq %r12, %rdi
callq 0xc698
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe280
movq (%rax), %rdi
movq %r12, %rsi
callq 0xf6bc
addq $0x10, %r14
cmpq %r13, %r14
jne 0xb192
leaq 0x8(%rsp), %rdi
callq 0xce64
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xb218
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xce64
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O3/xx01cyx[P]LSM-Tree/kvstore.cc
// Function: KVStore::getMaxTimeStamp(std::shared_ptr<SSTable> const&, std::vector<std::shared_ptr<SSTable>, std::allocator<std::shared_ptr<SSTable>>> const&)
TimeStamp KVStore::getMaxTimeStamp(const SSTPtr& oneSST, const vector<SSTPtr> &SSTs) {
    TimeStamp maxTimeStamp = oneSST->getTimeStamp();
    for (const auto& SST : SSTs) {
        TimeStamp currentTimeStamp = SST->getTimeStamp();
        if (currentTimeStamp > maxTimeStamp)
            maxTimeStamp = currentTimeStamp;
    }
    return maxTimeStamp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq (%rdi), %rdi
callq 0x6860
movq %rax, %rbx
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0xb2c6
movq (%r15), %rdi
callq 0x6860
cmpq %rbx, %rax
cmovaq %rax, %rbx
addq $0x10, %r15
jmp 0xb2ac
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/xx01cyx[P]LSM-Tree/./SSTable.h
// Function: SSTTimeStampPriorComparator::operator()(std::shared_ptr<SSTable> const&, std::shared_ptr<SSTable> const&)
bool operator() (const SSTPtr& sst1, const SSTPtr& sst2) {
        TimeStamp stamp1 = sst1->getTimeStamp();
        TimeStamp stamp2 = sst2->getTimeStamp();
        LsmKey minKey1 = sst1->getMinKey();
        LsmKey minKey2 = sst2->getMinKey();
        if (stamp1 != stamp2)
            return stamp1 < stamp2;
        return minKey1 < minKey2;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rdi
callq 0x6860
movq %rax, %r15
movq (%rbx), %rdi
callq 0x6860
movq %rax, %r12
movq (%r14), %rdi
callq 0x6866
movq %rax, %r14
movq (%rbx), %rdi
callq 0x6866
xorl %ecx, %ecx
cmpq %rax, %r14
setb %cl
xorl %eax, %eax
cmpq %r12, %r15
setb %al
cmovnel %eax, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Computer-Kids-Club[P]screenshare-pro-backend/base64.c
// Function: base64_encode_blockend(char*, base64_encodestate*)
int base64_encode_blockend(char *code_out, base64_encodestate *state_in) {
    char *codechar = code_out;

    switch (state_in->step) {
        case step_B:
            *codechar++ = base64_encode_value(state_in->result);
            *codechar++ = '=';
            *codechar++ = '=';
            break;
        case step_C:
            *codechar++ = base64_encode_value(state_in->result);
            *codechar++ = '=';
            break;
        case step_A:
            break;
    }
    *codechar++ = '\n';

    return codechar - code_out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rsi), %ecx
cmpl $0x2, %ecx
je 0x5d80
movq %rdi, %rax
cmpl $0x1, %ecx
jne 0x5da8
movsbq 0x4(%rsi), %rax
movb $0x3d, %cl
cmpq $0x3f, %rax
jg 0x5d6f
leaq 0x17de(%rip), %rcx      # 0x754a
movb (%rax,%rcx), %cl
movb %cl, (%rdi)
leaq 0x2(%rdi), %rcx
movb $0x3d, 0x1(%rdi)
movl $0x3, %eax
jmp 0x5da2
movsbq 0x4(%rsi), %rcx
movb $0x3d, %al
cmpq $0x3f, %rcx
jg 0x5d97
leaq 0x17b6(%rip), %rax      # 0x754a
movb (%rcx,%rax), %al
leaq 0x1(%rdi), %rcx
movb %al, (%rdi)
movl $0x2, %eax
addq %rdi, %rax
movb $0x3d, (%rcx)
movb $0xa, (%rax)
subl %edi, %eax
incl %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/Computer-Kids-Club[P]screenshare-pro-backend/sha1.c
// Function: SHA1Result(SHA1Context*)
int SHA1Result(SHA1Context *context)
{

    if (context->Corrupted)
    {
        return 0;
    }

    if (!context->Computed)
    {
        SHA1PadMessage(context);
        context->Computed = 1;
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
cmpl $0x0, 0x64(%rdi)
jne 0x6246
movq %rdi, %r14
movl $0x1, %ebx
cmpl $0x0, 0x60(%rdi)
jne 0x6246
movq %r14, %rdi
callq 0x624d
movl $0x1, 0x60(%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Computer-Kids-Club[P]screenshare-pro-backend/sha1.c
// Function: SHA1PadMessage(SHA1Context*)
void SHA1PadMessage(SHA1Context *context)
{
    /*
     *  Check to see if the current message block is too small to hold
     *  the initial padding bits and length.  If so, we will pad the
     *  block, process it, and then continue padding into a second
     *  block.
     */
    if (context->Message_Block_Index > 55)
    {
        context->Message_Block[context->Message_Block_Index++] = 0x80;
        while(context->Message_Block_Index < 64)
        {
            context->Message_Block[context->Message_Block_Index++] = 0;
        }

        SHA1ProcessMessageBlock(context);

        while(context->Message_Block_Index < 56)
        {
            context->Message_Block[context->Message_Block_Index++] = 0;
        }
    }
    else
    {
        context->Message_Block[context->Message_Block_Index++] = 0x80;
        while(context->Message_Block_Index < 56)
        {
            context->Message_Block[context->Message_Block_Index++] = 0;
        }
    }

    /*
     *  Store the message length as the last 8 octets
     */
    context->Message_Block[56] = (context->Length_High >> 24) & 0xFF;
    context->Message_Block[57] = (context->Length_High >> 16) & 0xFF;
    context->Message_Block[58] = (context->Length_High >> 8) & 0xFF;
    context->Message_Block[59] = (context->Length_High) & 0xFF;
    context->Message_Block[60] = (context->Length_Low >> 24) & 0xFF;
    context->Message_Block[61] = (context->Length_Low >> 16) & 0xFF;
    context->Message_Block[62] = (context->Length_Low >> 8) & 0xFF;
    context->Message_Block[63] = (context->Length_Low) & 0xFF;

    SHA1ProcessMessageBlock(context);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x5c(%rdi), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x5c(%rdi)
cmpq $0x38, %rax
jl 0x62af
movb $-0x80, 0x1c(%rbx,%rax)
movl 0x5c(%rbx), %eax
cmpl $0x3f, %eax
jg 0x6288
leal 0x1(%rax), %ecx
movl %ecx, 0x5c(%rbx)
cltq
movb $0x0, 0x1c(%rbx,%rax)
movl 0x5c(%rbx), %eax
cmpl $0x40, %eax
jl 0x6273
movq %rbx, %rdi
callq 0x6368
movl 0x5c(%rbx), %eax
cmpl $0x37, %eax
jg 0x62d1
leal 0x1(%rax), %ecx
movl %ecx, 0x5c(%rbx)
cltq
movb $0x0, 0x1c(%rbx,%rax)
movl 0x5c(%rbx), %eax
cmpl $0x38, %eax
jl 0x6298
jmp 0x62d1
movb $-0x80, 0x1c(%rbx,%rax)
movl 0x5c(%rbx), %eax
cmpl $0x37, %eax
jg 0x62d1
leal 0x1(%rax), %ecx
movl %ecx, 0x5c(%rbx)
cltq
movb $0x0, 0x1c(%rbx,%rax)
movl 0x5c(%rbx), %eax
cmpl $0x38, %eax
jl 0x62bc
movl 0x14(%rbx), %eax
movl 0x18(%rbx), %ecx
bswapl %ecx
movl %ecx, 0x54(%rbx)
bswapl %eax
movl %eax, 0x58(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6368
// File: /workspace/github_cpp_makefile_star2_O3/Computer-Kids-Club[P]screenshare-pro-backend/sha1.c
// Function: SHA1Input(SHA1Context*, unsigned char const*, unsigned int)
void SHA1Input(     SHA1Context         *context,
                    const unsigned char *message_array,
                    unsigned            length)
{
    if (!length)
    {
        return;
    }

    if (context->Computed || context->Corrupted)
    {
        context->Corrupted = 1;
        return;
    }

    while(length-- && !context->Corrupted)
    {
        context->Message_Block[context->Message_Block_Index++] =
                                                (*message_array & 0xFF);

        context->Length_Low += 8;
        /* Force it to 32 bits */
        context->Length_Low &= 0xFFFFFFFF;
        if (context->Length_Low == 0)
        {
            context->Length_High++;
            /* Force it to 32 bits */
            context->Length_High &= 0xFFFFFFFF;
            if (context->Length_High == 0)
            {
                /* Message is too long */
                context->Corrupted = 1;
            }
        }

        if (context->Message_Block_Index == 64)
        {
            SHA1ProcessMessageBlock(context);
        }

        message_array++;
    }
}

// Assembly:
testl %edx, %edx
je 0x631c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x60(%rdi)
jne 0x630d
cmpl $0x0, 0x64(%rbx)
je 0x631d
movl $0x1, 0x64(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
cmpl $0x0, 0x64(%rbx)
jne 0x6314
movb (%r14,%r12), %al
movslq 0x5c(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x5c(%rbx)
movb %al, 0x1c(%rbx,%rcx)
addl $0x8, 0x14(%rbx)
jne 0x6350
incl 0x18(%rbx)
jne 0x6350
movl $0x1, 0x64(%rbx)
cmpl $0x40, 0x5c(%rbx)
jne 0x635e
movq %rbx, %rdi
callq 0x6368
incq %r12
cmpl %r12d, %r15d
jne 0x6326
jmp 0x6314
// File: /workspace/github_cpp_makefile_star2_O3/Computer-Kids-Club[P]screenshare-pro-backend/utils.cpp
// Function: get_file_contents[abi:cxx11](char const*)
std::string get_file_contents(const char *filename) {
    std::ifstream in(filename, std::ios::in | std::ios::binary);
    if (in) {
        return (std::string((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>()));
    }
    throw(errno);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
leaq -0x218(%rbp), %r14
movq %r14, %rdi
movl $0xc, %edx
callq 0x2350
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f8(%rbp,%rax)
jne 0x65e1
movq -0x130(%rbp,%rax), %rsi
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x6622
leaq -0x218(%rbp), %rdi
callq 0x2090
movq %rbx, %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
movl $0x4, %edi
callq 0x2120
movq %rax, %rbx
callq 0x2030
movl (%rax), %eax
movl %eax, (%rbx)
movq 0x39ca(%rip), %rsi      # 0x9fc8
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2310
jmp 0x660a
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/Computer-Kids-Club[P]screenshare-pro-backend/websocket.c
// Function: ws_compute_handshake(char const*, char*, unsigned long*)
int ws_compute_handshake(const char *key, char *out, size_t *out_sz) {
    unsigned char *buffer, sha1_output[20];
    char magic[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
    SHA1Context ctx;
    base64_encodestate b64_ctx;
    int pos, i;

    // websocket handshake
    size_t key_sz = key ? strlen(key) : 0, buffer_sz = key_sz + sizeof(magic) - 1;
    buffer = (unsigned char *)calloc(buffer_sz, 1);

    // concatenate key and guid in buffer
    memcpy(buffer, key, key_sz);
    memcpy(buffer + key_sz, magic, sizeof(magic) - 1);

    // compute sha-1
    SHA1Reset(&ctx);
    SHA1Input(&ctx, buffer, buffer_sz);
    SHA1Result(&ctx);
    for (i = 0; i < 5; ++i) {  // put in correct byte order before memcpy.
        ctx.Message_Digest[i] = ntohl(ctx.Message_Digest[i]);
    }
    memcpy(sha1_output, (unsigned char *)ctx.Message_Digest, 20);

    // encode `sha1_output' in base 64, into `out'.
    base64_init_encodestate(&b64_ctx);
    pos = base64_encode_block((const char *)sha1_output, 20, out, &b64_ctx);
    base64_encode_blockend(out + pos, &b64_ctx);

    // compute length, without \n
    *out_sz = strlen(out);
    if (out[*out_sz - 1] == '\n')
        (*out_sz)--;

    free(buffer);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %r12
testq %rdi, %rdi
je 0x6a18
movq %r12, %rdi
callq 0x2100
movq %rax, %rbx
jmp 0x6a1a
xorl %ebx, %ebx
leaq 0x24(%rbx), %r13
movl $0x1, %esi
movq %r13, %rdi
callq 0x2170
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x21b0
movaps 0xb6d(%rip), %xmm0      # 0x75b0
movups %xmm0, (%r15,%rbx)
movaps 0xb71(%rip), %xmm0      # 0x75c0
movups %xmm0, 0x10(%r15,%rbx)
movl $0x31314235, 0x20(%r15,%rbx) # imm = 0x31314235
leaq -0xb8(%rbp), %rbx
movq %rbx, %rdi
callq 0x61f0
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x62ef
movq %rbx, %rdi
callq 0x6219
xorl %eax, %eax
movl -0xb8(%rbp,%rax,4), %ecx
bswapl %ecx
movl %ecx, -0xb8(%rbp,%rax,4)
incq %rax
cmpq $0x5, %rax
jne 0x6a85
movl -0xa8(%rbp), %eax
leaq -0x50(%rbp), %rbx
movl %eax, 0x10(%rbx)
movups -0xb8(%rbp), %xmm0
movaps %xmm0, (%rbx)
leaq -0x3c(%rbp), %r12
movq %r12, %rdi
callq 0x5be4
movq %rbx, %rdi
movl $0x14, %esi
movq %r14, %rdx
movq %r12, %rcx
callq 0x5c11
movslq %eax, %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x5d45
movq %r14, %rdi
callq 0x2100
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
cmpb $0xa, -0x1(%r14,%rax)
jne 0x6aff
decq %rax
movq %rax, (%rcx)
movq %r15, %rdi
callq 0x2260
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: between(vec const&, vec const&, vec const&)
static int orientation(const PointType &p, const PointType &q, const PointType &r)
{
    // See https://www.geeksforgeeks.org/orientation-3-ordered-points/
    // for details of below formula.
    double val =
            (q.y - p.y) * (r.x - q.x) -
            (q.x - p.x) * (r.y - q.y);
  
    if (val == 0.0) return 0;  // colinear
    //if (abs(val) <= 1e-7f) return 0;  // colinear
  
    return (val > 0) ? 1: 2; // clock or counterclock wise
}

// Assembly:
movaps %xmm3, %xmm6
subss %xmm1, %xmm6
movaps %xmm4, %xmm7
subss %xmm2, %xmm7
mulss %xmm6, %xmm7
movaps %xmm2, %xmm6
subss %xmm0, %xmm6
movaps %xmm5, %xmm8
subss %xmm3, %xmm8
mulss %xmm6, %xmm8
subss %xmm8, %xmm7
xorps %xmm6, %xmm6
ucomiss %xmm6, %xmm7
jne 0x2507
jp 0x2507
ucomiss %xmm2, %xmm0
jb 0x24e7
ucomiss %xmm0, %xmm4
jb 0x24e7
ucomiss %xmm3, %xmm1
jb 0x24e7
movb $0x1, %al
ucomiss %xmm1, %xmm5
jb 0x24e7
retq
cmpleps %xmm0, %xmm4
cmpleps %xmm2, %xmm0
ucomiss %xmm5, %xmm1
andps %xmm4, %xmm0
setae %cl
ucomiss %xmm1, %xmm3
movd %xmm0, %edx
setae %al
andb %cl, %al
andb %dl, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyLine::HasCommonIdxPoints(PolyLine const&) const
bool PolyLine::HasCommonIdxPoints(const PolyLine &line) const
{
    return
        aIdx == line.aIdx ||
        aIdx == line.bIdx ||
        bIdx == line.aIdx ||
        bIdx == line.bIdx;
}

// Assembly:
movl 0x80(%rdi), %r8d
movl 0x80(%rsi), %ecx
movb $0x1, %al
cmpl %ecx, %r8d
je 0x2925
movl 0x84(%rsi), %edx
cmpl %edx, %r8d
je 0x2925
movl 0x84(%rdi), %eax
cmpl %ecx, %eax
sete %cl
cmpl %edx, %eax
sete %al
orb %cl, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyDetector::newLine(unsigned int, unsigned int, PolyLine&)
PolyLine PolyDetector::newLine(uint32_t i, uint32_t j, PolyLine &origLine)
{
    PolyLine l;
    
    l.aIdx = origLine.intersections[i];
    l.bIdx = origLine.intersections[j];
    l.a = intersectionPoints[l.aIdx];
    l.b = intersectionPoints[l.bIdx];
    l.origLine = origLine.id;
    l.lastDissolveStep = origLine.lastDissolveStep;
    l.attr0 = origLine.attr0;
    l.calcCenter();
    
    return l;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
addq $0x30, %rdi
movl %eax, 0x30(%rbx)
movq %rax, 0x38(%rbx)
movq %rdi, 0x40(%rbx)
movq %rdi, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movaps 0xd61b(%rip), %xmm1     # 0x10010
movups %xmm1, 0x60(%rbx)
movl $0xffffffff, 0x70(%rbx) # imm = 0xFFFFFFFF
movb $0x0, 0x74(%rbx)
movups %xmm0, 0x78(%rbx)
movl %eax, 0x88(%rbx)
movl %edx, %eax
movq 0x10(%r8), %rdx
movl (%rdx,%rax,4), %eax
movl %eax, 0x80(%rbx)
movl %ecx, %ecx
movl (%rdx,%rcx,4), %ecx
movl %ecx, 0x84(%rbx)
movq 0xc8(%rsi), %rdx
movq (%rdx,%rax,8), %rax
movq %rax, (%rbx)
movq (%rdx,%rcx,8), %rax
movq %rax, 0x8(%rbx)
movl 0x60(%r8), %eax
movl %eax, 0x6c(%rbx)
movl 0x88(%r8), %eax
movl %eax, 0x88(%rbx)
movl 0x70(%r8), %eax
movl %eax, 0x70(%rbx)
movq %rbx, %rdi
callq 0x54f0
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
addps %xmm0, %xmm1
mulps 0xd5ac(%rip), %xmm1     # 0x10020
movlps %xmm1, 0x58(%rbx)
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyLine::calcCenter()
void PolyLine::calcCenter()
{
    CalculateFirstAndLastPoint();
    center = a;
    center.add(b);
    center.mul(0.5f);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x54f0
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
addps %xmm0, %xmm1
mulps 0xd586(%rip), %xmm1     # 0x10020
movlps %xmm1, 0x58(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyDetector::addPointToLine(unsigned int, unsigned int)
bool PolyDetector::addPointToLine(uint32_t pid, uint32_t lid)
{
    auto &v = pointToLines[pid];
    if (std::find(v.begin(), v.end(), lid) == v.end())
    {
        v.push_back(lid);
        return true;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
leaq 0x8(%rsp), %r14
movl %edx, (%r14)
addq $0xe0, %rdi
movq %rax, %rsi
callq 0xb536
movq %rax, %rbx
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r14, %rdx
callq 0xca0e
movq %rax, %r14
movq 0x8(%rbx), %r15
cmpq %r15, %rax
jne 0x54e0
cmpq 0x10(%rbx), %r14
je 0x54d0
movl 0x8(%rsp), %eax
movl %eax, (%r15)
leaq 0x4(%r15), %rax
movq %rax, 0x8(%rbx)
jmp 0x54e0
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xcab4
cmpq %r15, %r14
sete %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyLine::CalculateFirstAndLastPoint()
void PolyLine::CalculateFirstAndLastPoint()
{
    if (!bComparePointOrder(a, b))
    {
        std::swap(a.x, b.x);
        std::swap(a.y, b.y);
        
        std::swap(aIdx, bIdx);
    }
}

// Assembly:
movups (%rdi), %xmm0
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
movaps %xmm0, %xmm2
shufps $0xff, %xmm0, %xmm2     # xmm2 = xmm2[3,3],xmm0[3,3]
ucomiss %xmm1, %xmm2
ja 0x5519
ucomiss %xmm2, %xmm1
jne 0x551a
jp 0x551a
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
ucomiss %xmm0, %xmm1
jbe 0x551a
retq
shufps $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movups %xmm0, (%rdi)
movq 0x80(%rdi), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x80(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyDetector::findLine(unsigned int, bool)
PolyLine *PolyDetector::findLine(uint32_t id, bool useIgnore)
{
    auto search = lineIdToIdx.find(id);
    if (search != lineIdToIdx.end())
    {
        //assert(search->second >= 0 && search->second < lines.size());
        auto &l = lines[search->second];
        if (useIgnore && l.ignore)
        {
            //logoutf("line id %u is ignored!", id);
            return nullptr;
        }
        
        return &l;
    }
    if (search == lineIdToIdx.end())
    {
        logoutf("WARN: line %u can't be found in lineIdToIdx! szFast:%u szLines:%u v:%d", id,
                uint32_t(lineIdToIdx.size()),
                uint32_t(lines.size()),
                search != lineIdToIdx.end() ? search->second : -2);
    }
    
    return nullptr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %r14
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
addq $0x110, %rdi            # imm = 0x110
movq %rax, %rsi
callq 0xe864
testq %rax, %rax
je 0x5889
movslq 0xc(%rax), %rax
leaq (%rax,%rax,8), %rbx
shlq $0x4, %rbx
addq 0x30(%r14), %rbx
testb %bpl, %bpl
je 0x58bc
cmpb $0x0, 0x74(%rbx)
je 0x58bc
xorl %ebx, %ebx
jmp 0x58bc
movl 0xc(%rsp), %esi
movl 0x128(%r14), %edx
movq 0x38(%r14), %rax
subq 0x30(%r14), %rax
shrq $0x4, %rax
imull $0x38e38e39, %eax, %ecx # imm = 0x38E38E39
leaq 0xb01d(%rip), %rdi      # 0x108ca
xorl %ebx, %ebx
movl $0xfffffffe, %r8d       # imm = 0xFFFFFFFE
xorl %eax, %eax
callq 0x2030
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyLine::betweenNeighbors(PolyDetector&, PolyLine const&, PolyLine const&) const
bool PolyLine::betweenNeighbors(PolyDetector &pd, const PolyLine &l1, const PolyLine &l2) const
{
    auto cpid = commonPid(l1);
    if (cpid < 0)
    {
        //logoutf("l1: cpid %d between %u and %u", cpid, id, l1.id);
        //logoutf("%s %s", toString(pd).c_str(), l1.toString(pd).c_str());
        return false;
    }
    auto cpid2 = commonPid(l2);
    if (cpid != cpid2)
    {
        //logoutf("l2: cpid %d between %u and %u", cpid2, id, l2.id);
        return false;
    }
    
    //auto &p1 =  pd.intersectionPoints[l1.otherPid(cpid)];
    //auto &p2 =  pd.intersectionPoints[l2.otherPid(cpid)];
    
    vec cp = pd.intersectionPoints[cpid];
    vec p = pd.intersectionPoints[otherPid(cpid)];

    //bool ret = obb::Line(cp, cp.sub(p).normalize()).Intersects(obb::LineSegment(l1.center, l2.center));
    bool ret = doIntersect(cp, p, l1.center, l2.center);
    
    if (ret)
    {
        if (pd.verbose > 2)
        {
            //logoutf("line %s is between %s and %s (commonP: P%d)", toString(pd).c_str(), l1.toString(pd).c_str(), l2.toString(pd).c_str(), cpid);
            logoutf("line %u is between %u and %u (commonP: P%d)", id, l1.id, l2.id, cpid);
        }
    }
    else
    {
        //logoutf("line %u is NOT between %u and %u (commonP: P%d)", id, l1.id, l2.id, cpid);
    }
    
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl 0x80(%rdi), %eax
movl 0x80(%rdx), %ecx
movl %eax, %ebp
cmpl %ecx, %eax
je 0x7664
movl 0x84(%r14), %edx
movl %eax, %ebp
cmpl %edx, %eax
je 0x7664
movl 0x84(%r15), %ebp
cmpl %ecx, %ebp
setne %cl
cmpl %edx, %ebp
setne %dl
testb %dl, %cl
jne 0x7704
testl %ebp, %ebp
js 0x7704
movl 0x80(%rbx), %ecx
movl %eax, %edx
cmpl %ecx, %eax
je 0x769a
movl 0x84(%rbx), %esi
movl %eax, %edx
cmpl %esi, %eax
je 0x769a
movl 0x84(%r15), %edi
cmpl %esi, %edi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmovel %edi, %edx
cmpl %ecx, %edi
cmovel %edi, %edx
cmpl %edx, %ebp
jne 0x7704
movl %ebp, %ecx
movq 0xc8(%r12), %rdx
movq (%rdx,%rcx,8), %rcx
leaq 0x10(%rsp), %rdi
movq %rcx, (%rdi)
cmpl %ebp, %eax
cmovel 0x84(%r15), %eax
movq (%rdx,%rax,8), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x58(%r14), %rdx
leaq 0x58(%rbx), %rcx
callq 0x251f
movl %eax, %r13d
testb %al, %al
je 0x7707
cmpl $0x3, 0x60(%r12)
jb 0x7707
movl 0x60(%r15), %esi
movl 0x60(%r14), %edx
movl 0x60(%rbx), %ecx
leaq 0x93b2(%rip), %rdi      # 0x10aaa
movl %ebp, %r8d
xorl %eax, %eax
callq 0x2030
jmp 0x7707
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyLine::compareNeigh(PolyDetector&, unsigned int, unsigned int) const
bool PolyLine::compareNeigh(PolyDetector &pd, uint32_t nid1, uint32_t nid2) const
{
    auto nl1 = pd.findLine(nid1);
    auto nl2 = pd.findLine(nid2);
    if (!nl1 || !nl2)
    {
        assert(false);
        return true;
    }
    
#if 1
    auto dl1 = nl1->center.squaredist(center);
    auto dl2 = nl2->center.squaredist(center);
    return dl1 < dl2;
#elif 0
    return PolyLine::bCompareLineOrder(*nl1, *nl2);
#else
    return angle(pd, *nl1) < angle(pd, *nl2);
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
movl $0x1, %edx
callq 0x5842
movq %rax, %r14
movq %r15, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x5842
testq %r14, %r14
je 0x80a3
testq %rax, %rax
je 0x80a3
movups 0x58(%rbx), %xmm0
movups 0x5c(%rbx), %xmm1
movss 0x58(%rax), %xmm2
movss 0x5c(%rax), %xmm3
movss 0x58(%r14), %xmm4
unpcklps %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
movss 0x5c(%r14), %xmm2
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
subps %xmm0, %xmm4
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
subps %xmm1, %xmm2
mulps %xmm2, %xmm2
mulps %xmm4, %xmm4
addps %xmm2, %xmm4
movaps %xmm4, %xmm0
shufps $0x55, %xmm4, %xmm0     # xmm0 = xmm0[1,1],xmm4[1,1]
ucomiss %xmm4, %xmm0
seta %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8a2d(%rip), %rdi      # 0x10ad7
leaq 0x808f(%rip), %rsi      # 0x10140
leaq 0x8a25(%rip), %rcx      # 0x10add
movl $0x7a0, %edx            # imm = 0x7A0
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyLine::sortNeigh(PolyDetector&) const
bool PolyLine::sortNeigh(PolyDetector &pd) const
{
    auto &neigh = pd._neighbors[id];
    std::sort(neigh.begin(), neigh.end(), [this, &pd](uint32_t nid1, uint32_t nid2)
    {
        return compareNeigh(pd, nid1, nid2);
    });
    
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsi), %rdi
leaq 0x60(%r14), %rsi
callq 0xb536
movq (%rax), %r12
movq 0x8(%rax), %r15
cmpq %r15, %r12
je 0x815b
movq %r15, %r13
subq %r12, %r13
movq %r13, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x994b
cmpq $0x41, %r13
jl 0x814a
leaq 0x40(%r12), %r13
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9cc3
cmpq %r15, %r13
je 0x815b
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9d65
addq $0x4, %r13
jmp 0x8131
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9cc3
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyPol::addPointChecked(vec const&)
bool PolyPol::addPointChecked(const PointType &v)
{
    for (auto &pt : p)
        if (!pointsDiffer(pt, v))
            return false;
    p.push_back(v);
    return true;
}

// Assembly:
pushq %rax
movq %rsi, %rdx
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
cmpq %rsi, %rax
je 0x8454
movss (%rdx), %xmm0
movss 0x4(%rdx), %xmm1
movss 0x7c67(%rip), %xmm2     # 0x10090
movss (%rax), %xmm3
subss %xmm0, %xmm3
movss 0x4(%rax), %xmm4
subss %xmm1, %xmm4
mulss %xmm4, %xmm4
mulss %xmm3, %xmm3
addss %xmm4, %xmm3
ucomiss %xmm2, %xmm3
jb 0x8467
addq $0x8, %rax
cmpq %rsi, %rax
jne 0x8429
cmpq 0x10(%rdi), %rsi
je 0x846b
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x8470
xorl %eax, %eax
jmp 0x8472
callq 0xe1ae
movb $0x1, %al
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyLine::setIgnore(PolyDetector&, char const*)
void PolyLine::setIgnore(PolyDetector &pd, const char *msg)
{
    if (ignore)
        return;
    
    if (pd.verbose)
        logoutf("[%s] ignore line %s", msg, toString(pd).c_str());
    
    ignore = true;
}

// Assembly:
cmpb $0x0, 0x74(%rdi)
jne 0x8c33
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %rdx
movq %rdi, %rbx
cmpl $0x0, 0x60(%rsi)
je 0x8c26
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4e48
movq (%r15), %rdx
leaq 0x825e(%rip), %rdi      # 0x10e68
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8c26
callq 0x2140
movb $0x1, 0x74(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyDetector::dissolveCollinearLine(PolyLine&)
bool PolyDetector::dissolveCollinearLine(PolyLine &l)
{
    for (auto id : {l.aIdx, l.bIdx})
    {
        uint32_t nValid = 0;
        PolyLine *l1 = nullptr;
        for (auto &n : pointToLines[id])
        {
            if (n != l.id)
            {
                auto lPtr = findLine(n);
                if (lPtr)
                {
                    if (lPtr->took < 2)
                    //if (lPtr->took == 0)
                    //if (lPtr->numNeigh(*this) < 2)
                    {
                        l1 = lPtr;
                        nValid++;
                    }
                }
            }
        }
        //if (nValid == 1)
        //if (nValid > 0)
        //{
        //    logoutf("CollinearIdx[P%u](%s, %s)) = %d. nValid:%u", id, l.toString(*this).c_str(), l1->toString(*this).c_str(), CollinearIdx(l, *l1), nValid);
        //}
        if (nValid == 1 && CollinearIdx(l, *l1))
        {
            if (verbose)
                logoutf("line %s -> P%u has 2 intersections. otherLine:%u", l.toString(*this).c_str(), id, l1->id);
            return dissolveCollinear(l, *l1);
        }
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq 0x80(%rsi), %rax
movq %rax, 0x20(%rsp)
movq %rdi, %rbp
leaq 0xe0(%rdi), %rax
movq %rax, 0x10(%rsp)
xorl %r14d, %r14d
movl 0x20(%rsp,%r14), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xb536
movq (%rax), %r13
movq 0x8(%rax), %r12
cmpq %r12, %r13
je 0x8ce5
movq %r14, 0x18(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
movl (%r13), %esi
cmpl 0x60(%rbx), %esi
je 0x8cbe
movq %rbp, %rdi
movl $0x1, %edx
callq 0x5842
testq %rax, %rax
je 0x8cbe
movl 0x78(%rax), %ecx
cmpl $0x2, %ecx
adcl $0x0, %r14d
cmpl $0x2, %ecx
cmovbq %rax, %r15
addq $0x4, %r13
cmpq %r12, %r13
jne 0x8c92
cmpl $0x1, %r14d
movq 0x18(%rsp), %r14
jne 0x8ce5
movl 0x60(%rbx), %esi
movl 0x60(%r15), %edx
movq %rbp, %rdi
callq 0x8ff8
testb %al, %al
jne 0x8cf7
addq $0x4, %r14
cmpq $0x8, %r14
jne 0x8c63
xorl %eax, %eax
jmp 0x8d4f
cmpl $0x0, 0x60(%rbp)
je 0x8d3d
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x4e48
movq (%r12), %rsi
movl 0xc(%rsp), %edx
movl 0x60(%r15), %ecx
leaq 0x8050(%rip), %rdi      # 0x10d73
xorl %eax, %eax
callq 0x2030
movq (%r12), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8d3d
callq 0x2140
movq %rbp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x85cc
movl %eax, %ecx
movb $0x1, %al
andb %cl, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyDetector::CollinearIdx(unsigned int, unsigned int)
bool PolyDetector::CollinearIdx(uint32_t l1, uint32_t l2)
{
    auto search = collinearLineMap.find(l1);
    if (search == collinearLineMap.end())
        return false;
    return std::find(search->second.begin(), search->second.end(), l2) != search->second.end();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edx, 0xc(%rsp)
movq 0xa8(%rdi), %rax
testq %rax, %rax
je 0x9037
addq $0xa0, %rdi
movq %rdi, %rbx
xorl %ecx, %ecx
cmpl %esi, 0x20(%rax)
setb %cl
cmovaeq %rax, %rbx
movq 0x10(%rax,%rcx,8), %rax
testq %rax, %rax
jne 0x9017
cmpq %rdi, %rbx
je 0x9037
cmpl %esi, 0x20(%rbx)
jbe 0x903f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rsi
leaq 0xc(%rsp), %rdx
callq 0xca0e
cmpq 0x30(%rbx), %rax
setne %al
jmp 0x9039
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyDetector::reset()
void PolyDetector::reset()
{
    _cycles.clear();
    //processed.clear();
    origLines.clear();
    lines.clear();
    polys.clear();
    _neighbors.clear();
    collinearLineMap.clear();
    intersectionPoints.clear();
    pointToLines.clear();
    dissolveCount = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x8(%rdi), %r12
cmpq %r15, %r12
je 0x9377
movq %r15, %r14
movq %r14, %rdi
callq 0xc2b6
addq $0x40, %r14
cmpq %r12, %r14
jne 0x9362
movq %r15, 0x8(%rbx)
leaq 0x18(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0xc2ca
leaq 0x30(%rbx), %rdi
movq 0x30(%rbx), %rsi
callq 0xc2ca
leaq 0x48(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0xe4f0
leaq 0x68(%rbx), %rdi
callq 0xcbcc
leaq 0x98(%rbx), %rdi
callq 0xcbcc
movq 0xc8(%rbx), %rax
cmpq %rax, 0xd0(%rbx)
je 0x93ca
movq %rax, 0xd0(%rbx)
leaq 0xe0(%rbx), %rdi
callq 0xcbcc
movl $0x0, 0x148(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/realuptime[P]PolyDetector/./PolyDetector.h
// Function: PolyCycle::idxToString[abi:cxx11]() const
std::string idxToString() const
    {
        std::string str;
        for (auto &n : idx)
        {
            str += std::to_string(n) + " ";
        }
        if (!str.empty())
            str.pop_back();
        return str;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbp
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x18(%rsi), %r15
addq $0x8, %rsi
movq %rsi, 0x50(%rsp)
cmpq %rsi, %r15
je 0xb741
movq %rax, 0x48(%rsp)
leaq 0x8(%rsp), %r13
movl $0xd1b71759, %ebx       # imm = 0xD1B71759
movq %rbp, %r12
movl 0x20(%r15), %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0xb661
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xb65a
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xb65f
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xb661
movl %ecx, %edx
imulq %rbx, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xb629
addl $-0x3, %eax
jmp 0xb661
addl $-0x2, %eax
jmp 0xb661
decl %eax
movl %eax, %esi
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r13, %rdi
xorl %edx, %edx
callq 0x2190
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %esi
movl %ebp, %edx
callq 0xbfed
movq %r13, %r14
movq %r13, %rdi
leaq 0x53f0(%rip), %rsi      # 0x10a84
callq 0x2220
leaq 0x38(%rsp), %r13
movq %r13, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %r12, %rbp
je 0xb6c4
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xb6cc
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbp, %rdi
callq 0x2060
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0xb705
callq 0x2140
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xb719
callq 0x2140
movq %r15, %rdi
callq 0x2180
movq %rax, %r15
cmpq 0x50(%rsp), %rax
movq %r14, %r13
jne 0xb611
cmpq $0x0, 0x8(%rbp)
je 0xb741
movq %rbp, %rdi
callq 0x21a0
movq %rbp, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xb783
movq %rax, %r14
jmp 0xb76f
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0xb76f
callq 0x2140
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xb783
callq 0x2140
movq (%r12), %rdi
cmpq 0x48(%rsp), %rdi
je 0xb793
callq 0x2140
movq %r14, %rdi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/bloom.c
// Function: bloom_create
BLOOM *
bloom_create(int hash_bits, int npoints, int point_bits)
{
    if (hash_bits <= 0 || npoints <= 0 || npoints & (npoints - 1)
        || point_bits > 8 || point_bits & (point_bits - 1))
        return NULL;
        //XXX for bitfields change calloc(npoints,1) to calloc(npoints*point_bits/8 + 1,1)
    int wid = bitwid(npoints);
    BLOOM *bp = (BLOOM *) malloc(sizeof *bp);
    *bp = (BLOOM){ hash_bits, npoints, point_bits, wid, (1 << wid) - 1,
                   (1 << point_bits) - 1, (uint8_t *) calloc(npoints,1), MIN_OVFL_LIMIT, 0,
                   (OVFL *) calloc(MIN_OVFL_LIMIT, sizeof(OVFL)) };
    return bp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %edi, %edi
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
je 0x38b0
xorl %r15d, %r15d
jmp 0x3997
movl %edx, %ebx
xorl %r15d, %r15d
cmpl $0x8, %edx
jg 0x3997
movl %esi, %r14d
leal 0x7fffffff(%r14), %eax
andl %esi, %eax
jne 0x3997
movl %ebx, %eax
shrl %eax
andl $0x55555555, %eax       # imm = 0x55555555
movl %ebx, %ecx
subl %eax, %ecx
movl $0x33333333, %eax       # imm = 0x33333333
movl %ecx, %edx
andl %eax, %edx
shrl $0x2, %ecx
andl %eax, %ecx
addl %edx, %ecx
movl %ecx, %eax
shrl $0x4, %eax
addl %ecx, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
imull $0x1010101, %eax, %eax  # imm = 0x1010101
shrl $0x18, %eax
cmpl $0x1, %eax
ja 0x3997
movl %edi, %ebp
movl %r14d, %edi
callq 0x4189
movl %eax, %r15d
movl %eax, 0xc(%rsp)
movl $0x30, %edi
callq 0x3240
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r15d, %ecx
shll %cl, %r13d
movl %ebx, %ecx
shll %cl, %r12d
movq %rax, %r15
notl %r13d
notl %r12d
movl %r14d, %edi
movl $0x1, %esi
callq 0x3110
movq %rax, 0x10(%rsp)
movl $0x7, %edi
movl $0x8, %esi
callq 0x3110
movl %ebp, (%r15)
movl %r14d, 0x4(%r15)
movl %ebx, 0x8(%r15)
movl 0xc(%rsp), %ecx
movl %ecx, 0xc(%r15)
movl %r13d, 0x10(%r15)
movl %r12d, 0x14(%r15)
movq 0x10(%rsp), %rcx
movq %rcx, 0x18(%r15)
movq $0x7, 0x20(%r15)
movq %rax, 0x28(%r15)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/bloom.c
// Function: bloom_add
void
bloom_add(BLOOM *bp, char const *hash)
{
    int bitoff;
    FOR_CHUNKS(bitoff, bp) {
        int pt = CHUNK(bp, hash, bitoff);
        if (point_val(bp, pt) < bp->point_max)
            point_inc(bp, pt);
        else ovfl_inc(bp, pt);
    }
}

// Assembly:
movl (%rdi), %eax
cmpl 0xc(%rdi), %eax
jl 0x3b37
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
movl %ebp, %eax
sarl $0x3, %eax
cltq
movl (%rbx,%rax), %eax
movl %ebp, %ecx
andb $0x7, %cl
shrl %cl, %eax
movl 0x4(%r14), %r12d
decl %r12d
andl 0x10(%r14), %r12d
andl %eax, %r12d
movq 0x18(%r14), %rax
movslq %r12d, %rcx
movzbl (%rax,%rcx), %edx
cmpl %edx, 0x14(%r14)
jle 0x3a26
incb %dl
movb %dl, (%rax,%rcx)
jmp 0x3b16
movl 0x24(%r14), %eax
leal (%rax,%rax,4), %ecx
leal (%rax,%rax,4), %eax
addl $0x3, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
movl 0x20(%r14), %r13d
sarl $0x2, %eax
movq 0x28(%r14), %r15
cmpl %eax, %r13d
jg 0x3acc
leal 0x1(,%r13,2), %eax
movl %eax, 0x20(%r14)
movslq %eax, %rdi
movl $0x8, %esi
callq 0x3110
movq %rax, 0x28(%r14)
testl %r13d, %r13d
js 0x3abc
movq 0x28(%r14), %rax
movl (%r15,%r13,8), %ecx
movl 0x20(%r14), %esi
movl %esi, %edx
andl %ecx, %edx
movslq %edx, %rdi
cmpl $0x0, 0x4(%rax,%rdi,8)
je 0x3aa8
leaq (%rax,%rdi,8), %r8
cmpl %ecx, (%r8)
je 0x3aa5
incl %edx
andl %esi, %edx
movslq %edx, %rdi
leaq (%rax,%rdi,8), %r8
cmpl $0x0, 0x4(%r8)
jne 0x3a8c
jmp 0x3aa8
movslq %edx, %rdi
movq (%r15,%r13,8), %rcx
movq %rcx, (%rax,%rdi,8)
leaq -0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
jg 0x3a6e
movq %r15, %rdi
callq 0x3210
movl 0x20(%r14), %r13d
movq 0x28(%r14), %r15
movl %r13d, %eax
andl %r12d, %eax
movslq %eax, %rcx
cmpl $0x0, 0x4(%r15,%rcx,8)
je 0x3afd
leaq (%r15,%rcx,8), %rdx
cmpl %r12d, (%rdx)
je 0x3afa
incl %eax
andl %r13d, %eax
movslq %eax, %rcx
leaq (%r15,%rcx,8), %rdx
cmpl $0x0, 0x4(%rdx)
jne 0x3ae1
jmp 0x3afd
movslq %eax, %rcx
movl 0x4(%r15,%rcx,8), %eax
leal 0x1(%rax), %edx
movl %edx, 0x4(%r15,%rcx,8)
testl %eax, %eax
jne 0x3b16
movl %r12d, (%r15,%rcx,8)
incl 0x24(%r14)
movl (%r14), %eax
movl 0xc(%r14), %ecx
addl %ecx, %ebp
subl %ecx, %eax
cmpl %eax, %ebp
jle 0x39ec
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/bloom.c
// Function: bloom_del
void
bloom_del(BLOOM *bp, char const *hash)
{
    int bitoff;
    FOR_CHUNKS(bitoff, bp) {
        int pt = CHUNK(bp, hash, bitoff);
        if (point_val(bp, pt) < bp->point_max || ovfl_dec(bp, pt))
            point_dec(bp, pt);
    }
}

// Assembly:
movl (%rdi), %eax
cmpl 0xc(%rdi), %eax
jl 0x3c69
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
movl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movl (%rsi,%rcx), %edx
movl %eax, %ecx
andb $0x7, %cl
shrl %cl, %edx
movl 0x4(%rdi), %ebx
decl %ebx
andl 0x10(%rdi), %ebx
andl %edx, %ebx
movq 0x18(%rdi), %r9
movslq %ebx, %r10
movzbl (%r9,%r10), %r11d
cmpl %r11d, 0x14(%rdi)
jg 0x3c4c
movl 0x20(%rdi), %r8d
movq 0x28(%rdi), %rdx
movl %r8d, %ecx
andl %ebx, %ecx
movslq %ecx, %r14
cmpl $0x0, 0x4(%rdx,%r14,8)
je 0x3bb5
leaq (%rdx,%r14,8), %r15
cmpl %ebx, (%r15)
je 0x3bb2
incl %ecx
andl %r8d, %ecx
movslq %ecx, %r14
leaq (%rdx,%r14,8), %r15
cmpl $0x0, 0x4(%r15)
jne 0x3b98
jmp 0x3bb5
movslq %ecx, %r14
movl 0x4(%rdx,%r14,8), %ebx
testl %ebx, %ebx
je 0x3c4c
decl %ebx
movl %ebx, 0x4(%rdx,%r14,8)
jne 0x3c53
decl 0x24(%rdi)
incl %ecx
andl %r8d, %ecx
movslq %ecx, %r9
cmpl $0x0, 0x4(%rdx,%r9,8)
je 0x3c53
leaq (%rdx,%r9,8), %r10
movl (%r10), %ebx
movl %ebx, %r11d
andl %r8d, %r11d
movslq %r11d, %r14
cmpl $0x0, 0x4(%rdx,%r14,8)
je 0x3c17
leaq (%rdx,%r14,8), %r14
cmpl %ebx, (%r14)
je 0x3c17
incl %r11d
andl %r8d, %r11d
movslq %r11d, %r14
leaq (%rdx,%r14,8), %r14
cmpl $0x0, 0x4(%r14)
jne 0x3bfe
cmpl %ecx, %r11d
je 0x3c37
movslq %r11d, %r8
movq (%r10), %r10
movq %r10, (%rdx,%r8,8)
movq 0x28(%rdi), %rdx
movl $0x0, 0x4(%rdx,%r9,8)
movl 0x20(%rdi), %r8d
incl %ecx
andl %r8d, %ecx
movslq %ecx, %r9
leaq (%rdx,%r9,8), %r10
cmpl $0x0, 0x4(%r10)
jne 0x3be6
jmp 0x3c53
decb %r11b
movb %r11b, (%r9,%r10)
movl (%rdi), %ecx
movl 0xc(%rdi), %edx
addl %edx, %eax
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x3b4a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/bloom.c
// Function: bloom_chk
int
bloom_chk(BLOOM const*bp, char const *hash)
{
    int bitoff;
    FOR_CHUNKS(bitoff, bp)
        if (!point_val(bp, CHUNK(bp, hash, bitoff)))
            return 0;
    return 1;
}

// Assembly:
movl (%rdi), %edx
movl 0xc(%rdi), %r8d
subl %r8d, %edx
movl $0x1, %eax
js 0x3cb6
movl 0x4(%rdi), %r9d
decl %r9d
andl 0x10(%rdi), %r9d
movq 0x18(%rdi), %rdi
xorl %r10d, %r10d
movl %r10d, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movl (%rsi,%rcx), %r11d
movl %r10d, %ecx
andb $0x7, %cl
shrl %cl, %r11d
andl %r9d, %r11d
movslq %r11d, %rcx
cmpb $0x0, (%rdi,%rcx)
je 0x3cb7
addl %r8d, %r10d
cmpl %edx, %r10d
jle 0x3c8c
retq
xorl %eax, %eax
retq