LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::GetPossbilePos(char, std::vector<StPos, std::allocator<StPos>>&)
int ChessBoard::GetPossbilePos(ChessSide side, std::vector<StPos >  &list)
{
    for(int i =1; i<=m_size; i++ )
        for(int j=1; j<=m_size; j++ )
        {
            if( m_board[i][j] !=  Chess_Empty )    
                continue;
            int dist  = m_size;
            for(int k=0; k< m_chessList.size(); k++ )
            {
                int xx = i - m_chessList[k].x;
                int yy = j - m_chessList[k].y;
                if(xx<0 ) xx = -xx;
                if(yy<0 ) yy = -yy;
                int tt = (xx>yy)?xx:yy;
                dist = (tt<dist )?tt:dist;
                if(dist <=2)
                    break;
            }
            if( dist<=2 )
            {
                StPos pos(i,j,side);
                list.push_back(pos);
            }
        }
    return  list.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movl 0x194(%rdi), %eax
testl %eax, %eax
jle 0x2b87
movl %esi, %r11d
movq %rdi, %r15
leaq 0x4(%rdi), %rcx
movq %rcx, -0x50(%rbp)
movl $0x1, %r13d
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
movq %rdi, -0x58(%rbp)
testl %eax, %eax
jle 0x2b74
movl $0x1, %r14d
leaq (,%r13,4), %rcx
addq %r13, %rcx
movq -0x50(%rbp), %rdx
leaq (%rdx,%rcx,4), %rsi
movq %rsi, -0x30(%rbp)
cmpb $0x65, (%r14,%rsi)
jne 0x2b61
movq 0x240(%r15), %rcx
movq 0x248(%r15), %rdx
subq %rcx, %rdx
je 0x2afb
sarq $0x3, %rdx
imulq %r12, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
addq $0x4, %rcx
movl %eax, %esi
movl %r13d, %edi
subl -0x4(%rcx), %edi
movl %esi, %r8d
movl %r14d, %r9d
subl (%rcx), %r9d
movl %edi, %r10d
negl %r10d
cmovsl %edi, %r10d
movl %r9d, %esi
negl %esi
cmovsl %r9d, %esi
cmpl %esi, %r10d
cmoval %r10d, %esi
cmpl %r8d, %esi
cmovgel %r8d, %esi
cmpl $0x2, %esi
jle 0x2b00
addq $0x18, %rcx
decq %rdx
jne 0x2abb
jmp 0x2b5d
cmpl $0x2, %eax
jg 0x2b61
movl %r13d, -0x48(%rbp)
movl %r14d, -0x44(%rbp)
movb %r11b, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2b34
movq -0x38(%rbp), %rax
movq %rax, 0x10(%rsi)
movups -0x48(%rbp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x8(%rbx)
jmp 0x2b56
movq %rbx, %rdi
leaq -0x48(%rbp), %rdx
movq %r12, %r15
movq %rbx, %r12
movl %r11d, %ebx
callq 0x3978
movl %ebx, %r11d
movq %r12, %rbx
movq %r15, %r12
movq -0x58(%rbp), %r15
movl 0x194(%r15), %eax
movq -0x30(%rbp), %rsi
leaq 0x1(%r14), %rcx
movslq %eax, %rdx
cmpq %rdx, %r14
movq %rcx, %r14
jl 0x2a87
leaq 0x1(%r13), %rcx
movslq %eax, %rdx
cmpq %rdx, %r13
movq %rcx, %r13
jl 0x2a62
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::CalculateOnePos(int, int, char, int)
int64_t ChessBoard::CalculateOnePos(int x, int y , ChessSide side, int flag )
{
    BoardType  res[4]={0};
    res[0] = CalculatePosHeng(x, y, side);
    res[1] = CalculatePosShu(x,y, side);
    res[2] = CalculatePosLeft(x, y, side);
    res[3] = CalculatePosRight(x, y, side);
    //printf("CaluatOne pos(%u %u)  %u \n", x, y , res[0]);
    //printf("CaluatOne pos(%u %u)  %u \n", x, y , res[1]);
    //printf("CaluatOne pos(%u %u)  %u \n", x, y , res[2]);
    //printf("CaluatOne pos(%u %u)  %u \n", x, y , res[3]);
    //memset(m_bType, 0 , sizeof(m_bType));
    //memset(m_wType, 0 , sizeof(m_wType));


    int xx = x - (1+m_size)/2;
    int yy = y - (1+m_size)/2; 
    if(xx<0 ) xx = -xx;
    if(yy<0 ) yy = -yy;
    int dist = (xx>yy )? xx:yy;


    int64_t score =   ScoreList[res[0]] + ScoreList[res[1]] + ScoreList[res[2]] 
        + ScoreList[res[3]];
    if(flag != 0 )
    {
        if(side == Chess_Black )
        {
            m_bType[res[0]] ++;
            m_bType[res[1]] ++;
            m_bType[res[2]] ++;
            m_bType[res[3]] ++;

        }
        if(side == Chess_White )
        {
            m_wType[res[0]] ++;
            m_wType[res[1]] ++;
            m_wType[res[2]] ++;
            m_wType[res[3]] ++;

        }
    }

    return score + (1+m_size)/2 - dist;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
movl %edx, %r14d
movl %esi, %ebx
movq %rdi, %r15
xorl %ecx, %ecx
callq 0x2748
movl %eax, -0x30(%rbp)
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x27a0
movl %eax, %r13d
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x281c
movl %eax, %r12d
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x2910
movl 0x194(%r15), %edi
movl -0x30(%rbp), %r8d
leaq 0x4479(%rip), %rsi      # 0x7090
movslq (%rsi,%r8,4), %rcx
movq %rcx, -0x30(%rbp)
movl %r13d, %r9d
movslq (%rsi,%r9,4), %rdx
movl %r12d, %r10d
movslq (%rsi,%r10,4), %rcx
movl %eax, %r11d
movslq (%rsi,%r11,4), %rax
cmpl $0x0, -0x38(%rbp)
je 0x2c6c
movsbl -0x34(%rbp), %r12d
cmpl $0x62, %r12d
je 0x2c53
cmpl $0x77, %r12d
jne 0x2c6c
movl $0x1ec, %r12d           # imm = 0x1EC
jmp 0x2c59
movl $0x19c, %r12d           # imm = 0x19C
addq %r12, %r15
incl (%r15,%r8,4)
incl (%r15,%r9,4)
incl (%r15,%r10,4)
incl (%r15,%r11,4)
movl %edi, %esi
incl %esi
shrl $0x1f, %esi
addl %edi, %esi
incl %esi
sarl %esi
subl %esi, %r14d
movl %r14d, %edi
negl %edi
cmovsl %r14d, %edi
subl %esi, %ebx
movl %ebx, %r8d
negl %r8d
cmovsl %ebx, %r8d
addq -0x30(%rbp), %rdx
addq %rax, %rcx
addq %rdx, %rcx
cmpl %edi, %r8d
cmovbel %edi, %r8d
movslq %esi, %rax
addq %rcx, %rax
subq %r8, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::PutHumenChessGetAI(StPos&, StPos&)
int ChessBoard:: PutHumenChessGetAI(StPos &humPos, StPos &aiPos)
{
    if( m_aiside == Chess_Black   && m_stepnum == 0 )
    {
        aiPos.x = (1+m_size)/2;
        aiPos.y = (1+m_size)/2;
        return 0;
    }
    else if( m_aiside == Chess_White && m_stepnum == 0 )
    {
        PutChess(humPos.x, humPos.y, Chess_Black);

        int x ,y;
        x = y = (1+m_size)/2;
        int k = random()%8; 
        if( k==0 ){
            aiPos.x = x-1;   aiPos.y = y-1;
        }
        if(k==1){
            aiPos.x = x-1;   aiPos.y = y ;
        }
        if(k==2){
            aiPos.x = x-1;   aiPos.y = y+1;
        }
        if(k==3){
            aiPos.x = x ;  aiPos.y = y-1;
        }
        if(k==4){
            aiPos.x = x ; aiPos.y = y+1 ;
        }
        if(k==5){
            aiPos.x = x+1; aiPos.y = y-1;
        }
        if(k==6){
            aiPos.x = x+1; aiPos.y = y;
        }
        if(k==7){
            aiPos.x = x+1; aiPos.y =  y+1;
        }
        return 0;
    }

    PutChess(humPos.x, humPos.y, m_otherside);
    
    int ret = GetNextPosMinMax(2, aiPos,MM_MIN, MM_MAX );
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movb 0x198(%rdi), %al
cmpb $0x62, %al
sete %dl
movl (%rdi), %ecx
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0x389f
movl 0x194(%r14), %eax
movl %eax, %ecx
incl %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
incl %eax
sarl %eax
movl %eax, (%rbx)
movl %eax, 0x4(%rbx)
jmp 0x3970
testl %ecx, %ecx
sete %cl
cmpb $0x77, %al
sete %dil
andb %cl, %dil
movl (%rsi), %eax
movl 0x4(%rsi), %edx
cmpb $0x1, %dil
jne 0x3912
movq %r14, %rdi
movl %eax, %esi
movl $0x62, %ecx
callq 0x128e
movl 0x194(%r14), %r14d
callq 0x1050
leaq 0x7(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
andq $-0x8, %rcx
subq %rcx, %rax
cmpq $0x7, %rax
ja 0x3970
movl %r14d, %ecx
incl %ecx
shrl $0x1f, %ecx
addl %r14d, %ecx
incl %ecx
sarl %ecx
leaq 0x16ff(%rip), %rdx      # 0x5004
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
decl %ecx
jmp 0x3956
movsbl 0x199(%r14), %ecx
movq %r14, %rdi
movl %eax, %esi
callq 0x128e
movl $0x77359400, %r8d       # imm = 0x77359400
movq %r14, %rdi
movl $0x2, %esi
movq %rbx, %rdx
movq $-0x77359400, %rcx      # imm = 0x88CA6C00
callq 0x2e8a
jmp 0x3970
movl %ecx, (%rbx)
jmp 0x394c
leal -0x1(%rcx), %eax
movl %eax, (%rbx)
incl %ecx
jmp 0x396d
movl %ecx, (%rbx)
jmp 0x3964
incl %ecx
movl %ecx, (%rbx)
jmp 0x396d
leal -0x1(%rcx), %eax
jmp 0x396b
leal 0x1(%rcx), %eax
movl %eax, (%rbx)
decl %ecx
jmp 0x396d
leal 0x1(%rcx), %eax
movl %eax, (%rbx)
movl %ecx, 0x4(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::cache_mock(long, long, long, long, long, long)
cache_mock::cache_mock(long int d, long int c, long int m, long int b, long int l, long int s) : desc(d), cache_size(c), mem_size(m), block_size(b), lru(l), set_size(s)
{
    if (d == 1)
        set_size = 1;
    else if (d == 2)
        set_size = c / b;
    no_sets = cache_size / (block_size * set_size);
    container_init();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r10
movq 0x10(%rbp), %r11
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
movq %r11, 0x20(%rdi)
movq %r9, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movq $0x0, 0x48(%rdi)
cmpq $0x1, %rsi
je 0x19bb
cmpq $0x2, %rsi
jne 0x19c2
movq %r10, %rax
cqto
idivq %r8
movq %rax, %rsi
movq %rsi, 0x20(%rdi)
movq %rsi, %r11
leaq 0x38(%rdi), %rbx
imulq %r8, %r11
movq %r10, %rax
cqto
idivq %r11
movq %rax, 0x28(%rdi)
callq 0x19f4
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2224
movq %r14, %rdi
callq 0x1180
nop
// File: /workspace/github_cpp_makefile_star2_O3/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::container_init()
void cache_mock::container_init()
{
    if (container.size())
        container.clear();
    long int size = cache_size / block_size;
    for (long int i = 0; i < size; i++)
    {
        vector<long int> block;
        block.push_back(i);
        block.push_back(-1);           //tag_bit
        block.push_back(0);            //dirty_bit
        block.push_back(i % set_size); //hierarchy
        for (long int j = 0; j < block_size; j++)
        {
            block.push_back(-1);
        }
        container.push_back(block);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x38(%rdi), %r15
movq 0x38(%rdi), %rsi
cmpq %rsi, 0x40(%rdi)
je 0x1a1e
movq %r15, %rdi
callq 0x27e6
movq 0x8(%rbx), %rax
cqto
idivq 0x18(%rbx)
movq $0x0, -0x50(%rbp)
movq %rax, -0x58(%rbp)
testq %rax, %rax
jle 0x1b6d
leaq -0x40(%rbp), %r12
leaq -0x48(%rbp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq %r12, %rdi
xorl %esi, %esi
leaq -0x50(%rbp), %rdx
callq 0x2830
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq $-0x1, -0x48(%rbp)
cmpq %rcx, %rsi
je 0x1a88
movq $-0x1, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1a9b
movq %r12, %rdi
movq %r13, %rdx
callq 0x2952
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq $0x0, -0x48(%rbp)
cmpq %rcx, %rsi
je 0x1ab9
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1acc
movq %r12, %rdi
movq %r13, %rdx
callq 0x2952
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %rax
cqto
idivq 0x20(%rbx)
movq %rdx, -0x48(%rbp)
cmpq %rcx, %rsi
je 0x1aec
movq %rdx, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1af7
movq %r12, %rdi
movq %r13, %rdx
callq 0x2952
cmpq $0x0, 0x18(%rbx)
jle 0x1b38
xorl %r14d, %r14d
movq $-0x1, -0x48(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x1b24
movq $-0x1, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1b2f
movq %r12, %rdi
movq %r13, %rdx
callq 0x2952
incq %r14
cmpq 0x18(%rbx), %r14
jl 0x1b01
movq %r15, %rdi
movq %r12, %rsi
callq 0x2448
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1b58
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10f0
movq -0x50(%rbp), %rax
incq %rax
movq %rax, -0x50(%rbp)
cmpq -0x58(%rbp), %rax
jl 0x1a45
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b84
jmp 0x1b84
jmp 0x1b84
jmp 0x1b84
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1b9c
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10f0
movq %rbx, %rdi
callq 0x1180
// File: /workspace/github_cpp_makefile_star2_O3/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::container_display()
void cache_mock::container_display()
{
    if(!desc)
        printf("Set\t");
    printf("ID\tTag\tDirty\thierarchy\tBlock-Display\n");
    for (long int i = 0; i < container.size(); i++)
    {
        if (!desc)
        {
            if(!(i % set_size))
            {
                printf("\n");
                printf("%ld",i/set_size);
            }
            printf("\t");
        }
        for (long int j = 0; j < container[i].size(); j++)
        {
            printf("%ld\t", container[i][j]);
            if (j == 3)
            {
                printf("\t");
            }
        }
        printf("\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x1c6b
leaq 0x15ec(%rip), %rdi      # 0x3250
xorl %eax, %eax
callq 0x1040
leaq 0x1606(%rip), %rdi      # 0x3278
callq 0x1150
movq 0x38(%rbx), %rax
cmpq %rax, 0x40(%rbx)
je 0x1d54
leaq 0x15cd(%rip), %r15      # 0x3259
xorl %r12d, %r12d
cmpq $0x0, (%rbx)
jne 0x1cd5
movq %r12, %rax
cqto
idivq 0x20(%rbx)
testq %rdx, %rdx
jne 0x1cc7
movl $0xa, %edi
callq 0x1120
movq %r12, %rax
cqto
idivq 0x20(%rbx)
leaq 0x1598(%rip), %rdi      # 0x3255
movq %rax, %rsi
xorl %eax, %eax
callq 0x1040
movl $0x9, %edi
callq 0x1120
movq 0x38(%rbx), %rax
leaq (%r12,%r12,2), %r14
movq (%rax,%r14,8), %rcx
cmpq %rcx, 0x8(%rax,%r14,8)
je 0x1d21
xorl %r13d, %r13d
movq (%rcx,%r13,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
cmpq $0x3, %r13
jne 0x1d05
movl $0x9, %edi
callq 0x1120
incq %r13
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rax
subq %rcx, %rax
sarq $0x3, %rax
cmpq %rax, %r13
jb 0x1ce7
movl $0xa, %edi
callq 0x1120
incq %r12
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %rcx, %r12
jb 0x1c8f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::find_hierarchy_max(long)
long int cache_mock::find_hierarchy_max(long int set)
{
    long int max = set * set_size;
    for (long int i = 0; i < set_size; i++)
    {
        if (container[set * set_size + i][3] > container[max][3])
        {
            max = set * set_size + i;
        }
    }
    return (max);
}

// Assembly:
movq 0x20(%rdi), %rdx
movq %rdx, %rcx
imulq %rsi, %rcx
testq %rdx, %rdx
jle 0x1fa3
pushq %rbp
movq %rsp, %rbp
movq 0x38(%rdi), %rdi
imulq %rdx, %rsi
leaq (%rsi,%rsi,2), %rax
leaq (%rdi,%rax,8), %rsi
movq %rcx, %r8
movq (%rsi), %rax
movq 0x18(%rax), %r9
leaq (%r8,%r8,2), %rax
movq (%rdi,%rax,8), %r10
movq %rcx, %rax
cmpq 0x18(%r10), %r9
jg 0x1f92
movq %r8, %rax
incq %rcx
addq $0x18, %rsi
movq %rax, %r8
decq %rdx
jne 0x1f77
popq %rbp
retq
movq %rcx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::find_hierarchy_min(long)
long int cache_mock::find_hierarchy_min(long int set)
{
    long int min = set * set_size;
    for (long int i = 0; i < set_size; i++)
    {
        if (container[set * set_size + i][3] < container[min][3])
        {
            min = set * set_size + i;
        }
    }
    return (min);
}

// Assembly:
movq 0x20(%rdi), %rdx
movq %rdx, %rcx
imulq %rsi, %rcx
testq %rdx, %rdx
jle 0x1ffb
pushq %rbp
movq %rsp, %rbp
movq 0x38(%rdi), %rdi
imulq %rdx, %rsi
leaq (%rsi,%rsi,2), %rax
leaq (%rdi,%rax,8), %rsi
movq %rcx, %r8
movq (%rsi), %rax
movq 0x18(%rax), %r9
leaq (%r8,%r8,2), %rax
movq (%rdi,%rax,8), %r10
movq %rcx, %rax
cmpq 0x18(%r10), %r9
jl 0x1fea
movq %r8, %rax
incq %rcx
addq $0x18, %rsi
movq %rax, %r8
decq %rdx
jne 0x1fcf
popq %rbp
retq
movq %rcx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Test.cpp
// Function: test_point()
void test_point()
{
    printf("Testing Point..\n\n");

    Point<int> p1(3, 4);
    assert(p1.length() == 5, "length");
    Point<int> p2(3, 4);
    assert(p1 == p2, "equality");
    Point<int> res(0, 0);
    assert(p1 - p2 == res, "minus");
    res.x = 6;
    res.y = 8;
    assert(p2 + p2 == res, "addition");
    res.x = 9;
    res.y = 16;
    assert(p1 * p2 == res, "times");
    res.x = 1;
    res.y = 1;
    assert(p1 / p2 == res, "divide");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x231f(%rip), %rdi      # 0xc489
callq 0x3310
leaq 0x21f0(%rip), %rsi      # 0xc366
movl $0x1, %edi
callq 0xa0e0
leaq 0x21e6(%rip), %rsi      # 0xc36d
movl $0x1, %edi
callq 0xa0e0
leaq 0x21de(%rip), %rsi      # 0xc376
movl $0x1, %edi
callq 0xa0e0
leaq 0x21d3(%rip), %rsi      # 0xc37c
movl $0x1, %edi
callq 0xa0e0
leaq 0x21cb(%rip), %rsi      # 0xc385
movl $0x1, %edi
callq 0xa0e0
leaq 0x21c0(%rip), %rsi      # 0xc38b
movl $0x1, %edi
popq %rbp
jmp 0xa0e0
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Test.cpp
// Function: test_timer()
void test_timer()
{
    printf("\nTesting Timer..\n\n");
    Timer timer(0.1, 20);

    printf("interval 0.1s ticks 20\n\n");
    while (timer.tick())
    {
        ConsoleTools::move_cursor(ConsoleTools::up, 1);
        ConsoleTools::clear_line();
        printf("%d\n", timer.get_tick_count());
    }

    timer.reset();
    printf("\n");

    Timer inf(0.05, true);
    printf("infinite ticks. break at 50. interval 0.05s\n\n");

    while (inf.tick())
    {
        ConsoleTools::move_cursor(ConsoleTools::up, 1);
        ConsoleTools::clear_line();
        printf("%d\n", inf.get_tick_count());
        if (inf.get_tick_count() >= 50)
        {
            break;
        }
    }

    TestTimerDelegate test_timer;
    test_timer.test1();
    test_timer.test2();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
leaq 0x1bfa(%rip), %rdi      # 0xc4ce
callq 0x3310
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
leaq -0x30(%rbp), %rbx
movq %rax, 0x8(%rbx)
movq $0x14, 0x10(%rbx)
movw $0x0, 0x18(%rbx)
leaq 0x1be0(%rip), %rdi      # 0xc4e0
callq 0x3310
movq %rbx, %rdi
callq 0x8a94
testb %al, %al
je 0xa94c
leaq 0x1b58(%rip), %r14      # 0xc470
movl $0x41, %edi
movl $0x1, %esi
callq 0x38d6
callq 0x38a2
movq %rbx, %rdi
callq 0x8ab8
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x3060
movq %rbx, %rdi
callq 0x8a94
testb %al, %al
jne 0xa918
leaq -0x30(%rbp), %rdi
callq 0x8b8e
movl $0xa, %edi
callq 0x32a0
movabsq $0x3fa999999999999a, %rax # imm = 0x3FA999999999999A
leaq -0x98(%rbp), %rbx
movq %rax, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movw $0x1, 0x18(%rbx)
leaq 0x1b6f(%rip), %rdi      # 0xc4f8
callq 0x3310
leaq 0x1adb(%rip), %r14      # 0xc470
movq %rbx, %rdi
callq 0x8a94
testb %al, %al
je 0xa9d6
movl $0x41, %edi
movl $0x1, %esi
callq 0x38d6
callq 0x38a2
movq %rbx, %rdi
callq 0x8ab8
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x3060
movq %rbx, %rdi
callq 0x8ab8
cmpl $0x32, %eax
jl 0xa995
leaq -0x78(%rbp), %rdi
callq 0xb3bc
leaq -0x70(%rbp), %rdi
callq 0x8b14
leaq -0x50(%rbp), %rdi
callq 0x8b14
leaq 0x6380(%rip), %rax      # 0x10d78
movq %rax, -0x78(%rbp)
leaq 0x17ee(%rip), %rdi      # 0xc1f1
callq 0x3310
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x635a(%rip), %rax      # 0x10d78
movq %rax, -0x78(%rbp)
leaq 0x17c8(%rip), %rdi      # 0xc1f1
callq 0x3310
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Test.cpp
// Function: test_view()
void test_view()
{
    printf("\nTesting views...\n");

    View *view = new View(0, 0, 600, 600);
    view->add_child(new View(0, 0, 20, 20));
    view->add_child(new View(40, 40, 30, 50));

    assert(view->get_children()->get_count() == 2, "children count");

    LOOPV(i, view)
    {
        View *v = view->get_child(i);
        assert(v->get_size().x == (i+2)*10, "iterate");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x155e(%rip), %rdi      # 0xc552
callq 0x3310
movl $0x38, %edi
callq 0x3220
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x258, %ecx            # imm = 0x258
movl $0x258, %r8d            # imm = 0x258
callq 0xb466
movl $0x38, %edi
callq 0x3220
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x14, %ecx
movl $0x14, %r8d
callq 0xb466
movq %rbx, %rdi
movq %r15, %rsi
callq 0x989e
movl $0x38, %edi
callq 0x3220
movq %rax, %r15
movq %rax, %rdi
movl $0x28, %esi
movl $0x28, %edx
movl $0x1e, %ecx
movl $0x32, %r8d
callq 0xb466
movq %rbx, %rdi
movq %r15, %rsi
callq 0x989e
movq %rbx, %rdi
callq 0x9894
xorl %edi, %edi
cmpq $0x2, 0x8(%rax)
sete %dil
leaq 0x1396(%rip), %rsi      # 0xc431
callq 0xa0e0
movq %rbx, %rdi
callq 0x9894
cmpq $0x0, 0x8(%rax)
je 0xb0fa
movl $0x14, %r12d
xorl %r14d, %r14d
leaq 0x1381(%rip), %r15      # 0xc440
movq %rbx, %rdi
movq %r14, %rsi
callq 0x98da
movq %rax, %rdi
callq 0x9a06
cltq
xorl %edi, %edi
cmpq %rax, %r12
sete %dil
movq %r15, %rsi
callq 0xa0e0
incq %r14
movq %rbx, %rdi
callq 0x9894
addq $0xa, %r12
cmpq 0x8(%rax), %r14
jb 0xb0bf
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb105
movq %rax, %r14
movq %r15, %rbx
jmp 0xb110
movq %rax, %r14
movq %rbx, %rdi
callq 0x3200
movq %r14, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Test.cpp
// Function: fexists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool fexists(std::string fname)
{
    bool exists = false;
    std::ifstream file(fname.c_str(), std::ios::binary);
    exists = file.good();
    file.close();
    return exists;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq (%rdi), %rsi
leaq -0x218(%rbp), %rbx
movq %rbx, %rdi
movl $0x4, %edx
callq 0x3400
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl -0x1f8(%rbp,%rax), %r14d
movq %rbx, %rdi
callq 0x3090
testl %r14d, %r14d
sete %bl
leaq -0x218(%rbp), %rdi
callq 0x30c0
movl %ebx, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x33d0
movq %rax, %rdi
callq 0x3a66
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Test.cpp
// Function: test_sounds()
void test_sounds()
{
    printf("\nTesting sound files (passed/failed : found/not found)\n\n");

    assert(fexists("music.wav") == true, "music.wav");
    assert(fexists("boom.wav") == true, "boom.wav");
    assert(fexists("beep.wav") == true, "beep.wav");
    assert(fexists("fire.wav") == true, "fire.wav");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
leaq 0x13b4(%rip), %rdi      # 0xc564
callq 0x3310
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1284(%rip), %rsi      # 0xc448
leaq 0x1286(%rip), %rdx      # 0xc451
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
callq 0x56ee
movq %rbx, %rdi
callq 0xb120
movzbl %al, %edi
leaq 0x125c(%rip), %rsi      # 0xc448
callq 0xa0e0
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xb202
callq 0x3200
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xf1d(%rip), %rsi       # 0xc12e
leaq 0xf1e(%rip), %rdx       # 0xc136
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
callq 0x56ee
movq %rbx, %rdi
callq 0xb120
movzbl %al, %edi
leaq 0xef8(%rip), %rsi       # 0xc12e
callq 0xa0e0
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xb249
callq 0x3200
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xea8(%rip), %rsi       # 0xc100
leaq 0xea9(%rip), %rdx       # 0xc108
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x56ee
movq %rbx, %rdi
callq 0xb120
movzbl %al, %edi
leaq 0xe83(%rip), %rsi       # 0xc100
callq 0xa0e0
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb290
callq 0x3200
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xff9(%rip), %rsi       # 0xc298
leaq 0xffa(%rip), %rdx       # 0xc2a0
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x56ee
movq %rbx, %rdi
callq 0xb120
movzbl %al, %edi
leaq 0xfd4(%rip), %rsi       # 0xc298
callq 0xa0e0
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0xb2d7
callq 0x3200
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
jmp 0xb308
movq %rax, %rbx
movq -0x50(%rbp), %rdi
jmp 0xb308
movq %rax, %rbx
movq -0x70(%rbp), %rdi
jmp 0xb308
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xb312
callq 0x3200
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Test.cpp
// Function: main
int main(int argc, char const *argv[])
{
    ConsoleTools::clear_screen();

    TextureTools::load_texture_file("textures.txt");

    test_point();
    test_array();
    test_view();
    test_textures();
    test_sounds();

    test_timer();

    ConsoleTools::set_cursor(0, ConsoleTools::get_terminal_size().y-1);
    ConsoleTools::end_color();

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
callq 0x3866
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1119(%rip), %rsi      # 0xc452
leaq 0x111e(%rip), %rdx      # 0xc45e
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x56ee
movq %rbx, %rdi
callq 0x80fa
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0xb362
callq 0x3200
callq 0xa15f
callq 0xa1d6
callq 0xafe2
callq 0xaa36
callq 0xb19b
callq 0xa8bf
callq 0x38ee
shrq $0x20, %rax
leal -0x1(%rax), %esi
xorl %edi, %edi
callq 0x388c
callq 0x3828
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0xb3b4
callq 0x3200
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Test.cpp
// Function: TestTimerDelegate::TestTimerDelegate()
TestTimerDelegate()
    {
        timer1 = Timer(0.1, 20);
        timer1.set_delegate(this);

        timer2 = Timer(0.05, true);
        timer2.set_delegate(this);

        printf("\nTesting delegate timer\n\n");
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
leaq 0x59a8(%rip), %rax      # 0x10d78
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x28(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
xorl %eax, %eax
movw %ax, 0x40(%rdi)
movq $0x0, 0x8(%rdi)
movabsq $0x3fb999999999999a, %rcx # imm = 0x3FB999999999999A
movq %rcx, 0x10(%rdi)
movq $0x14, 0x18(%rdi)
movw %ax, 0x20(%rdi)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8b78
xorl %eax, %eax
movq %rax, 0x28(%r15)
movabsq $0x3fa999999999999a, %rcx # imm = 0x3FA999999999999A
movq %rcx, 0x30(%r15)
movq %rax, 0x38(%r15)
movw $0x1, 0x40(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x8b78
leaq 0x10df(%rip), %rdi      # 0xc525
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3310
xorl %ecx, %ecx
movq %rcx, (%r14)
movq %rcx, (%rbx)
movq %rax, %rdi
callq 0x33d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Test.cpp
// Function: TestTimerDelegate::timer_did_tick(Timer*, int)
void timer_did_tick(Timer *sender, int t)
    {
        if (sender == &timer1)
        {
            ConsoleTools::move_cursor(ConsoleTools::up, 1);
            ConsoleTools::clear_line();
            printf("delegate tick 1: %d\n", t);
        }
        else if (sender == &timer2)
        {
            ConsoleTools::move_cursor(ConsoleTools::up, 1);
            ConsoleTools::clear_line();
            printf("delegate tick 2: %d\n", t);
            if (t == 15)
            {
                timer2.end();
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
leaq 0x8(%rdi), %rax
cmpq %rsi, %rax
je 0xb546
movq %rdi, %r14
addq $0x28, %r14
cmpq %rsi, %r14
jne 0xb541
movl $0x41, %edi
movl $0x1, %esi
callq 0x38d6
callq 0x38a2
leaq 0xf4d(%rip), %rdi       # 0xc474
movl %ebx, %esi
xorl %eax, %eax
callq 0x3060
cmpl $0xf, %ebx
jne 0xb541
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8b5a
popq %rbx
popq %r14
popq %rbp
retq
movl $0x41, %edi
movl $0x1, %esi
callq 0x38d6
callq 0x38a2
leaq 0xefe(%rip), %rdi       # 0xc45f
movl %ebx, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3060
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./point_cloud_segmenter.cc
// Function: PointCloudSegmenter::ExtractClusters(std::vector<Scanline, std::allocator<Scanline>>&)
std::vector<Vec3> PointCloudSegmenter::ExtractClusters( std::vector<Scanline>& scanlines ) {
  std::vector<Scanline>::iterator s_it;
  std::vector<Vec3>::iterator v_it;
  std::vector<Vec3> out_points;
  int i = 0;

  for (s_it = scanlines.begin(); s_it != scanlines.end(); s_it++, i++ ) {
    for (v_it = s_it->points.begin(); v_it != s_it->points.end(); v_it++) {
      if (v_it->label < this->rtable.size() && v_it->label != -3) {
        v_it->label = this->rtable[v_it->label];
        out_points.push_back(*v_it);
      }
    }
  }
  return out_points;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %r13
movq 0x8(%rdx), %rax
cmpq %rax, %r13
je 0x4041
movq %rdx, %r14
movq %rsi, %r15
movq 0x48(%r13), %r12
cmpq 0x50(%r13), %r12
je 0x4034
movq 0xb8(%r15), %rax
movq 0xc0(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
js 0x3f94
xorps %xmm1, %xmm1
cvtsi2ss %rcx, %xmm1
jmp 0x3fac
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
xorps %xmm1, %xmm1
cvtsi2ss %rcx, %xmm1
addss %xmm1, %xmm1
movss 0x18(%r12), %xmm0
ucomiss 0x40c6(%rip), %xmm0     # 0x8080
jne 0x3fbe
jnp 0x4022
ucomiss %xmm0, %xmm1
jbe 0x4022
cvttss2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subss 0x40ad(%rip), %xmm0     # 0x8084
cvttss2si %xmm0, %rsi
andq %rdx, %rsi
orq %rcx, %rsi
xorps %xmm0, %xmm0
cvtsi2ssl (%rax,%rsi,4), %xmm0
movss %xmm0, 0x18(%r12)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4017
movups (%r12), %xmm0
movups 0xc(%r12), %xmm1
movups %xmm1, 0xc(%rsi)
movups %xmm0, (%rsi)
addq $0x1c, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4022
movq %rbx, %rdi
movq %r12, %rdx
callq 0x5594
addq $0x1c, %r12
cmpq 0x50(%r13), %r12
jne 0x3f73
movq 0x8(%r14), %rax
addq $0x70, %r13
cmpq %rax, %r13
jne 0x3f65
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x406a
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./point_cloud_segmenter.cc
// Function: PointCloudSegmenter::FindNearestNeighbor(Scanline&, Scanline&, int, int, int)
int PointCloudSegmenter::FindNearestNeighbor(Scanline& scan_current, Scanline& scan_above, int start_index, int end_index, int point_index) {
  double conversion_factor = scan_above.points.size() / scan_current.points.size();
  int above_start = floor(start_index * conversion_factor);
  int above_end = floor(end_index * conversion_factor);

  // Determine nearest point to search at
  Vec3 current = scan_current.points[point_index];
  float query[3] = {current.x, current.y, current.z};

  // Set up KNN result set
  size_t result_index;
  float result_dist_squared;
  nanoflann::KNNResultSet<float> results(1);
  results.init(&result_index, &result_dist_squared);

  // Perform search
  scan_above.tree->findNeighbors(results, &query[0], nanoflann::SearchParams(10));

  if (result_dist_squared < this->th_merge * this->th_merge) {
    return scan_above.tree_point_cloud->get_label(result_index);
  }

  return  -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x48(%rsi), %rax
movslq %r9d, %rcx
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movq (%rax,%rdx), %rcx
movss 0x8(%rax,%rdx), %xmm0
leaq -0x3c(%rbp), %rdx
movq %rcx, (%rdx)
movss %xmm0, 0x8(%rdx)
leaq -0x60(%rbp), %rsi
movq $0x1, 0x10(%rsi)
leaq -0x20(%rbp), %rax
movq %rax, (%rsi)
leaq -0x24(%rbp), %r15
movq %r15, 0x8(%rsi)
movq $0x0, 0x18(%rsi)
movl $0x7f7fffff, (%r15)     # imm = 0x7F7FFFFF
movq 0x68(%rbx), %rdi
leaq -0x30(%rbp), %rcx
movq $0xa, (%rcx)
movb $0x1, 0x8(%rcx)
callq 0x4e56
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
movsd 0x78(%r14), %xmm1
mulsd %xmm1, %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
ucomisd %xmm0, %xmm1
jbe 0x4138
movq 0x60(%rbx), %rax
movq -0x20(%rbp), %rcx
movq (%rax), %rdx
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,4), %rcx
movq 0x20(%rax,%rcx,8), %rax
movq (%rdx), %rcx
leaq (%rax,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rax, %rdx
cvttss2si 0x18(%rcx,%rdx), %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./point_cloud_segmenter.cc
// Function: PointCloudSegmenter::ResolveMerge(int, int)
void PointCloudSegmenter::ResolveMerge(int x, int y) {
  int u = this->rtable.at(x);
  int v = this->rtable.at(y);

  if (u < v) {
    MergeOperation(u, v);
  } else if (u > v) {
    MergeOperation(v, u);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
movslq %esi, %rsi
movq 0xb8(%rdi), %r8
movq 0xc0(%rdi), %rdx
subq %r8, %rdx
sarq $0x2, %rdx
cmpq %rsi, %rdx
jbe 0x4226
cltq
cmpq %rax, %rdx
jbe 0x422f
movl (%r8,%rsi,4), %ecx
movl (%r8,%rax,4), %edx
cmpl %edx, %ecx
jge 0x41e9
movq 0x88(%rdi), %rax
cmpl $-0x1, %edx
je 0x41e3
movl %edx, %esi
movslq %esi, %rsi
movl %ecx, (%r8,%rsi,4)
movl (%rax,%rsi,4), %esi
cmpl $-0x1, %esi
jne 0x41d4
movl %ecx, %esi
movl %edx, %ecx
jmp 0x420a
jle 0x4224
movq 0x88(%rdi), %rax
cmpl $-0x1, %ecx
je 0x4208
movl %ecx, %esi
movslq %esi, %rsi
movl %edx, (%r8,%rsi,4)
movl (%rax,%rsi,4), %esi
cmpl $-0x1, %esi
jne 0x41f9
movl %edx, %esi
movslq %esi, %rdx
movq 0xa0(%rdi), %rsi
movslq (%rsi,%rdx,4), %rdi
movl %ecx, (%rax,%rdi,4)
movslq %ecx, %rax
movl (%rsi,%rax,4), %eax
movl %eax, (%rsi,%rdx,4)
popq %rbp
retq
leaq 0x3fb5(%rip), %rdi      # 0x81e2
jmp 0x4239
leaq 0x3fac(%rip), %rdi      # 0x81e2
movq %rax, %rsi
xorl %eax, %eax
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./point_cloud_segmenter.cc
// Function: PointCloudSegmenter::MergeOperation(int, int)
void PointCloudSegmenter::MergeOperation(int u, int v) {
  int i = v;

  while (i != -1) {
    this->rtable[i] = u;
    i = this->next[i];
  }

  this->next[this->tail[u]] = v;
  this->tail[u] = this->tail[v];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, %edx
je 0x426d
movq 0x88(%rdi), %rax
movq 0xb8(%rdi), %rcx
movl %edx, %r8d
movslq %r8d, %r8
movl %esi, (%rcx,%r8,4)
movl (%rax,%r8,4), %r8d
cmpl $-0x1, %r8d
jne 0x425a
jmp 0x4274
movq 0x88(%rdi), %rax
movslq %esi, %rcx
movq 0xa0(%rdi), %rsi
movslq (%rsi,%rcx,4), %rdi
movl %edx, (%rax,%rdi,4)
movslq %edx, %rax
movl (%rsi,%rax,4), %eax
movl %eax, (%rsi,%rcx,4)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/main.cc
// Function: parseInput(std::vector<Vec3, std::allocator<Vec3>>&, PointCloudSegmenter)
void parseInput(std::vector<Vec3>& in, PointCloudSegmenter seg) {
  std::ifstream infile("../velodyne_points_1/data/0000000001.txt");
  double x, y, z, v;
  int k = 0;

  while (infile >> x >> y >> z >> v)
  {
    Vec3 pt = Vec3(x, y, z);
    if (pt.r > 0) {
      if (pt.x < seg.max_x && pt.x > -seg.max_x && pt.y < seg.max_y && pt.y > -seg.max_y && pt.z > -2) {
        if (pt.theta < 3 && pt.theta > -25) {
          in.push_back(pt);
        }
      }
    }

  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, %rbx
movq %rdi, -0x50(%rbp)
leaq 0x3af2(%rip), %rsi      # 0x810f
leaq -0x278(%rbp), %rdi
movl $0x8, %edx
callq 0x22c0
leaq -0x68(%rbp), %r12
leaq -0x60(%rbp), %r13
leaq -0x58(%rbp), %r14
leaq -0x70(%rbp), %r15
leaq -0x278(%rbp), %rdi
movq %r12, %rsi
callq 0x20f0
movq %rax, %rdi
movq %r13, %rsi
callq 0x20f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x20f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x20f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4773
xorps %xmm0, %xmm0
cvtsd2ss -0x68(%rbp), %xmm0
xorps %xmm1, %xmm1
cvtsd2ss -0x60(%rbp), %xmm1
xorps %xmm2, %xmm2
cvtsd2ss -0x58(%rbp), %xmm2
leaq -0x44(%rbp), %rdi
callq 0x513e
movss -0x38(%rbp), %xmm0
ucomiss 0x39cb(%rip), %xmm0     # 0x8078
jbe 0x463e
movl 0x80(%rbx), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movss -0x44(%rbp), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x463e
negl %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x463e
movl 0x84(%rbx), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movss -0x40(%rbp), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x463e
negl %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x463e
movss -0x3c(%rbp), %xmm0
ucomiss 0x3977(%rip), %xmm0     # 0x808c
jbe 0x463e
movss -0x34(%rbp), %xmm0
movss 0x3968(%rip), %xmm1     # 0x8090
ucomiss %xmm0, %xmm1
jbe 0x463e
ucomiss 0x395c(%rip), %xmm0     # 0x8094
jbe 0x463e
movq -0x50(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x4765
movups -0x44(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups %xmm1, 0xc(%rsi)
movups %xmm0, (%rsi)
addq $0x1c, 0x8(%rdi)
jmp 0x463e
leaq -0x44(%rbp), %rdx
callq 0x5594
jmp 0x463e
leaq -0x278(%rbp), %rdi
callq 0x2040
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4793
movq %rax, %rbx
leaq -0x278(%rbp), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/main.cc
// Function: generateOutput(std::vector<Vec3, std::allocator<Vec3>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void generateOutput(std::vector<Vec3>& pts, std::string file_name) {
  std::ofstream file;
  file.open (file_name);
  std::vector<Vec3>::iterator it;
  for (it = pts.begin(); it != pts.end(); it++) {
    file << it->x << " " << it->y << " " << it->z << " " << it->label << "\n";
  }
  file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x228(%rbp), %r15
movq %r15, %rdi
callq 0x2280
movq %r15, %rdi
movq %r14, %rsi
movl $0x10, %edx
callq 0x20a0
movq (%rbx), %r14
cmpq 0x8(%rbx), %r14
je 0x489c
leaq 0x38f2(%rip), %r15      # 0x80e9
leaq 0x39e2(%rip), %r12      # 0x81e0
xorps %xmm0, %xmm0
cvtss2sd (%r14), %xmm0
leaq -0x228(%rbp), %rdi
callq 0x2250
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %r13, %rdi
callq 0x2250
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %r13, %rdi
callq 0x2250
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
xorps %xmm0, %xmm0
cvtss2sd 0x18(%r14), %xmm0
movq %r13, %rdi
callq 0x2250
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21c0
addq $0x1c, %r14
cmpq 0x8(%rbx), %r14
jne 0x47fe
leaq -0x228(%rbp), %rdi
callq 0x2200
movq 0x6709(%rip), %rax      # 0xafb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x220(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x228(%rbp,%rcx)
callq 0x2170
leaq -0x130(%rbp), %rdi
callq 0x2060
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x48f4
jmp 0x48f4
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./point_cloud_segmenter.h
// Function: ScanlinePointCloud::ScanlinePointCloud(std::vector<Vec3, std::allocator<Vec3>>&)
ScanlinePointCloud(std::vector<Vec3> & pts) : scanline_points(pts) {
    // Filter out ground labels
    for (int i = 0; i < pts.size(); i++) {
      Vec3 point = pts[i];
      if (point.label != -3) {
        ScanlinePoint wrapper(point, i);
        filtered_points.push_back(wrapper);
      }
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
cmpq %rax, %rcx
je 0x4c2a
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %rdx
movq %rdx, -0x30(%rbp)
xorl %r13d, %r13d
movabsq $0x6db6db6db6db6db7, %r12 # imm = 0x6DB6DB6DB6DB6DB7
xorl %r15d, %r15d
movq 0x10(%rax,%r13), %rdx
movq %rdx, -0x70(%rbp)
movups (%rax,%r13), %xmm0
movaps %xmm0, -0x80(%rbp)
movss 0x18(%rax,%r13), %xmm0
ucomiss 0x34cd(%rip), %xmm0     # 0x8080
jne 0x4bb7
jnp 0x4c0c
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movaps -0x80(%rbp), %xmm1
movaps %xmm1, -0x60(%rbp)
movss %xmm0, -0x48(%rbp)
movq %r15, -0x40(%rbp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x4bf8
movq -0x40(%rbp), %rax
movq %rax, 0x20(%rsi)
movaps -0x60(%rbp), %xmm0
movaps -0x50(%rbp), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x28, 0x10(%rbx)
jmp 0x4c05
movq -0x30(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x51c4
movq (%r14), %rax
movq 0x8(%r14), %rcx
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
imulq %r12, %rdx
addq $0x1c, %r13
cmpq %r15, %rdx
ja 0x4b93
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x30(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4c54
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./nanoflann.hpp
// Function: nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<float, ScanlinePointCloud, float>, ScanlinePointCloud, 3, unsigned long>::buildIndex()
void buildIndex()
		{
			init_vind();
			freeIndex();
			m_size_at_index_build = m_size;
			if(m_size == 0) return;
			computeBoundingBox(root_bbox);
			root_node = divideTree(0, m_size, root_bbox );   // construct the tree
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x6a12
movq %rbx, %rdi
callq 0x6c2c
movq 0x30(%rbx), %rax
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x4d4a
leaq 0x50(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c70
movq 0x30(%rbx), %rdx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x6de6
movq %rax, 0x48(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./nanoflann.hpp
// Function: bool nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<float, ScanlinePointCloud, float>, ScanlinePointCloud, 3, unsigned long>::findNeighbors<nanoflann::KNNResultSet<float, unsigned long, unsigned long>>(nanoflann::KNNResultSet<float, unsigned long, unsigned long>&, float const*, nanoflann::SearchParams const&) const
bool findNeighbors(RESULTSET& result, const ElementType* vec, const SearchParams& searchParams) const
		{
			assert(vec);
            if (size() == 0)
                return false;
			if (!root_node)
                throw std::runtime_error("[nanoflann] findNeighbors() called before building the index.");
			float epsError = 1+searchParams.eps;

			distance_vector_t dists; // fixed or variable-sized container (depending on DIM)
			dists.assign((DIM>0 ? DIM : dim) ,0); // Fill it with zeros.
			DistanceType distsq = computeInitialDistances(vec, dists);
			searchLevel(result, vec, root_node, distsq, dists, epsError);  // "count_leaf" parameter removed since was neither used nor returned to the user.
            return result.full();
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdx, %rdx
je 0x4ef4
movq %rdi, %r15
cmpq $0x0, 0x30(%rdi)
je 0x4ee5
cmpq $0x0, 0x48(%r15)
je 0x4f13
movq %rdx, %r14
movq %rsi, %rbx
movss 0x4(%rcx), %xmm0
leaq -0x30(%rbp), %r12
movl $0x0, 0x8(%r12)
movq $0x0, (%r12)
addss 0x31dd(%rip), %xmm0     # 0x8088
movss %xmm0, -0x24(%rbp)
movq %r15, %rdi
movq %rdx, %rsi
movq %r12, %rdx
callq 0x7576
movq 0x48(%r15), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %r8
movss -0x24(%rbp), %xmm1
callq 0x75f0
movq 0x18(%rbx), %rax
cmpq 0x10(%rbx), %rax
sete %al
jmp 0x4ee7
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3331(%rip), %rdi      # 0x822c
leaq 0x332e(%rip), %rsi      # 0x8230
leaq 0x3337(%rip), %rcx      # 0x8240
movl $0x387, %edx            # imm = 0x387
callq 0x20e0
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x3499(%rip), %rsi      # 0x83c0
movq %rax, %rdi
callq 0x2080
movq 0x60ba(%rip), %rsi      # 0xaff0
movq 0x6083(%rip), %rdx      # 0xafc0
movq %rbx, %rdi
callq 0x2290
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./vec3.h
// Function: Vec3::Vec3(float, float, float)
Vec3(float a, float b, float c) : x(a), y(b), z(c) {
      r = sqrt(x*x + y*y);
      theta = atan2(z, r) * 180 / 3.1415926;
      label = -1;
      theta_horizontal = atan2(y, x) - 3.14159265/2;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss %xmm0, (%rdi)
movss %xmm1, 0x4(%rdi)
movss %xmm2, 0x8(%rdi)
mulss %xmm1, %xmm1
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
xorps %xmm1, %xmm1
sqrtss %xmm0, %xmm1
movss %xmm1, 0xc(%rdi)
movaps %xmm2, %xmm0
callq 0x21f0
mulss 0x2f1b(%rip), %xmm0     # 0x8098
cvtss2sd %xmm0, %xmm0
divsd 0x2edf(%rip), %xmm0     # 0x8068
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rbx)
movl $0xbf800000, 0x18(%rbx) # imm = 0xBF800000
movss (%rbx), %xmm1
movss 0x4(%rbx), %xmm0
callq 0x21f0
cvtss2sd %xmm0, %xmm0
addsd 0x2ebd(%rip), %xmm0     # 0x8070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mitchellsayer[P]FastPointCloudSegmentation/src/./nanoflann.hpp
// Function: nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<float, ScanlinePointCloud, float>, ScanlinePointCloud, 3, unsigned long>::init_vind()
void init_vind()
		{
			// Create a permutable array of indices to the input vectors.
			m_size = dataset.kdtree_get_point_count();
			if (vind.size()!=m_size) vind.resize(m_size);
			for (size_t i = 0; i < m_size; i++) vind[i] = i;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x20(%rdi), %rcx
movq 0x10(%rcx), %rdx
subq 0x8(%rcx), %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rsi
movq %rsi, 0x30(%rdi)
subq (%rdi), %rax
sarq $0x3, %rax
cmpq %rsi, %rax
je 0x6a59
movq %rbx, %rdi
callq 0x6a78
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x6a70
movq (%rbx), %rax
xorl %ecx, %ecx
movq %rcx, (%rax,%rcx,8)
incq %rcx
cmpq 0x30(%rbx), %rcx
jb 0x6a63
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop