LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::startLocalGameHumanVsCPU(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool DNWindow::startLocalGameHumanVsCPU(string &nameOfPlayerOne)
{
    //    noraw();a
    struct winsize w;
    ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
    clearScreen();
    drawHeader();

    middleString("Please enter name of human player: ", w.ws_row / 2);
    
    while(true){
        inputString(nameOfPlayerOne);
        if (!nameOfPlayerOne.length()) middleString("Name cannot be empty, try again: ", w.ws_row / 2);
        else break;
    }
    
    clearScreen();
    drawHeader();
    return true;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
leaq 0x30(%rsp), %r14
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x33e0
callq 0x34a0
callq 0x3480
callq 0x76a2
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe20(%rip), %rsi       # 0x95c3
leaq 0xe3c(%rip), %rdx       # 0x95e6
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x4048
movzwl (%r14), %ebp
shrl %ebp
leaq 0x8(%rsp), %r14
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x33e0
movzwl 0x2(%r14), %esi
subq 0x8(%r12), %rsi
shrq %rsi
movq (%r12), %rcx
leaq 0xcce(%rip), %rdx       # 0x94bc
movl %ebp, %edi
xorl %eax, %eax
callq 0x33d0
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x880e
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rsi
callq 0x7db6
cmpq $0x0, 0x8(%rbx)
jne 0x88b4
leaq 0x20(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0xc85(%rip), %rbp       # 0x94bc
movq %r15, 0x10(%rsp)
movq %r12, %rdi
leaq 0xd36(%rip), %rsi       # 0x957c
leaq 0xd50(%rip), %rdx       # 0x959d
callq 0x4048
movzwl 0x30(%rsp), %r14d
shrl %r14d
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
movq %r13, %rdx
xorl %eax, %eax
callq 0x33e0
movzwl 0xa(%rsp), %esi
subq 0x18(%rsp), %rsi
shrq %rsi
movq 0x10(%rsp), %rcx
movl %r14d, %edi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x33d0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x88a5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rsi
callq 0x7db6
cmpq $0x0, 0x8(%rbx)
je 0x8837
callq 0x34a0
callq 0x3480
callq 0x76a2
movb $0x1, %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
jmp 0x88e6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x88f6
movq (%r15), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::chooseTypeOfNetworkGame(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int DNWindow::chooseTypeOfNetworkGame(string &nameOfPlayer)
{
    string input;
    clearScreen();
    drawHeader();
    drawOptionsForNetworkGame();
    refreshDN();
    return executeOptionsForNetworkgame(nameOfPlayer);
    
    
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
callq 0x34a0
callq 0x3480
callq 0x76a2
callq 0x898a
callq 0x3480
movq %rbx, %rsi
callq 0x8af2
movl %eax, %ebx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x895d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8981
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::drawOptionsForNetworkGame()
void DNWindow::drawOptionsForNetworkGame()
{
    refresh();
    struct winsize w;
    ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
    start_color();
    init_pair(1, COLOR_RED, COLOR_BLACK);

    mvprintw(w.ws_row / 3, w.ws_col / 10, "( ) Connect to Game");
    mvprintw(w.ws_row / 3 + 1, w.ws_col / 10, "( ) Create a game");
    
    mvprintw(w.ws_row / 3 + 6, w.ws_col / 10, "( ) Quit");
    

    mvaddch(w.ws_row / 3, w.ws_col / 10 + 1, '1');
    mvaddch(w.ws_row / 3 + 1, w.ws_col / 10 + 1, '2');
    mvaddch(w.ws_row / 3 + 6, w.ws_col / 10 + 1, 'Q');
    
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x3480
movq %rsp, %rbx
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x33e0
callq 0x3090
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3060
movzwl (%rbx), %eax
imull $0xaaab, %eax, %edi     # imm = 0xAAAB
shrl $0x11, %edi
movzwl 0x2(%rbx), %eax
imull $0xcccd, %eax, %esi     # imm = 0xCCCD
shrl $0x13, %esi
leaq 0xc07(%rip), %rdx       # 0x95e7
xorl %eax, %eax
callq 0x33d0
movzwl (%rbx), %eax
imull $0xaaab, %eax, %edi     # imm = 0xAAAB
shrl $0x11, %edi
incl %edi
movzwl 0x2(%rbx), %eax
imull $0xcccd, %eax, %esi     # imm = 0xCCCD
shrl $0x13, %esi
leaq 0xbf2(%rip), %rdx       # 0x95fb
xorl %eax, %eax
callq 0x33d0
movzwl (%rbx), %eax
imull $0xaaab, %eax, %edi     # imm = 0xAAAB
shrl $0x11, %edi
addl $0x6, %edi
movzwl 0x2(%rbx), %eax
imull $0xcccd, %eax, %esi     # imm = 0xCCCD
shrl $0x13, %esi
leaq 0xa80(%rip), %rdx       # 0x94b3
xorl %eax, %eax
callq 0x33d0
movq 0x458f(%rip), %r14      # 0xcfd0
movq (%r14), %rdi
movzwl (%rbx), %eax
imull $0xaaab, %eax, %esi     # imm = 0xAAAB
shrl $0x11, %esi
movzwl 0x2(%rbx), %eax
imull $0xcccd, %eax, %edx     # imm = 0xCCCD
shrl $0x13, %edx
incl %edx
callq 0x3320
cmpl $-0x1, %eax
je 0x8a76
movq (%r14), %rdi
movl $0x31, %esi
callq 0x30e0
movq (%r14), %rdi
movzwl (%rsp), %eax
imull $0xaaab, %eax, %esi     # imm = 0xAAAB
shrl $0x11, %esi
incl %esi
movzwl 0x2(%rsp), %eax
imull $0xcccd, %eax, %edx     # imm = 0xCCCD
shrl $0x13, %edx
incl %edx
callq 0x3320
cmpl $-0x1, %eax
je 0x8aaf
movq (%r14), %rdi
movl $0x32, %esi
callq 0x30e0
movq (%r14), %rdi
movzwl (%rsp), %eax
imull $0xaaab, %eax, %esi     # imm = 0xAAAB
shrl $0x11, %esi
addl $0x6, %esi
movzwl 0x2(%rsp), %eax
imull $0xcccd, %eax, %edx     # imm = 0xCCCD
shrl $0x13, %edx
incl %edx
callq 0x3320
cmpl $-0x1, %eax
je 0x8ae9
movq (%r14), %rdi
movl $0x51, %esi
callq 0x30e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::executeOptionsForNetworkgame(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int DNWindow::executeOptionsForNetworkgame(string & input)
{
    
    
    drawCommandLine();
    refreshDN();
    inputString(input);
    
    
    if (atoi(input.c_str())  == 1 || atoi(input.c_str()) == 2) {
        return atoi(input.c_str());
    }else if (input == "Q" || input == "q") {
        terminate();
    }else{
        terminateWithErrorMessage(string("Wrong input"));
    }

    return false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
callq 0x7c76
callq 0x3480
movq %rbx, %rsi
callq 0x7db6
movq (%rbx), %rdi
callq 0x3430
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x8b26
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x9f5(%rip), %rsi       # 0x9522
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
je 0x8b4c
leaq 0x9e4(%rip), %rsi       # 0x9524
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x8b58
callq 0x3390
xorl %edi, %edi
callq 0x33a0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xaa5(%rip), %rsi       # 0x960d
leaq 0xaa9(%rip), %rdx       # 0x9618
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x4048
movq %rbx, %rsi
callq 0x82c0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8b9e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::drawSymbolBetter(DNCellState, int&, int&)
void DNWindow::drawSymbolBetter(DNCellState state, int& x, int& y)
{
    if (state == CROSS) {
        mvaddch(y, x, 'X');
        beep();
        moveRight();
        moveLeft();
        this->refreshDN();
    }
    else if (state == CIRCLE) {
        mvaddch(y, x, 'O');
        beep();
        moveRight();
        moveLeft();
        this->refreshDN();
    }
    else {
        terminateWithErrorMessage(string("Fatal Error"));
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpl $0x1, %esi
je 0x8c11
cmpl $0x2, %esi
jne 0x8c58
movq 0x43d2(%rip), %rax      # 0xcfd0
movq (%rax), %rdi
movl (%rcx), %esi
movl (%rdx), %edx
callq 0x3320
movl $0x58, %esi
jmp 0x8c29
movq 0x43b8(%rip), %rax      # 0xcfd0
movq (%rax), %rdi
movl (%rcx), %esi
movl (%rdx), %edx
callq 0x3320
movl $0x4f, %esi
cmpl $-0x1, %eax
je 0x8c3d
movq 0x439b(%rip), %rax      # 0xcfd0
movq (%rax), %rdi
callq 0x30e0
callq 0x3080
callq 0x7d88
callq 0x7d56
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x3480
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9b1(%rip), %rsi       # 0x9619
leaq 0x9b5(%rip), %rdx       # 0x9624
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x4048
movq %rbx, %rsi
callq 0x82c0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8c9e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::drawSymbol(DNCellState, int&, int&)
void DNWindow::drawSymbol(DNCellState state, int & x, int &y)
{
    getsyx(y, x);
    if (state == CROSS) {
        addch('X');
        beep();
        moveRight();
        moveLeft();
    }
    else if (state == CIRCLE) {
        addch('O');
        beep();
        moveRight();
        moveLeft();
    }
    else {
        terminateWithErrorMessage(string("Fatal Error"));
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq 0x4314(%rip), %rax      # 0xcfc8
movq (%rax), %rax
testq %rax, %rax
je 0x8cd8
cmpb $0x0, 0x1a(%rax)
je 0x8ccd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rdx)
movl %eax, (%rcx)
jmp 0x8cd8
movswl (%rax), %edi
movl %edi, (%rcx)
movswl 0x2(%rax), %eax
movl %eax, (%rdx)
movl $0x58, %eax
cmpl $0x2, %esi
je 0x8cec
cmpl $0x1, %esi
jne 0x8d13
movl $0x4f, %eax
movq 0x42dd(%rip), %rcx      # 0xcfd0
movq (%rcx), %rdi
movl %eax, %esi
callq 0x30e0
callq 0x3080
callq 0x7d88
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x7d56
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x8f6(%rip), %rsi       # 0x9619
leaq 0x8fa(%rip), %rdx       # 0x9624
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x4048
movq %rbx, %rsi
callq 0x82c0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8d59
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/syky27[P]TicTacToe/src/DNWindow.cpp
// Function: DNWindow::enterServerIPAdress(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void DNWindow::enterServerIPAdress(string& ip_address)
{

    struct winsize w;
    ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
    mvprintw(w.ws_row - 1, 0, "ENTER HOST IP ADDRESS> ");
    refreshDN();
    inputString(ip_address);
    

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsp, %r14
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x33e0
movzwl (%r14), %edi
decl %edi
leaq 0x898(%rip), %rdx       # 0x9625
xorl %esi, %esi
xorl %eax, %eax
callq 0x33d0
callq 0x3480
movq %rbx, %rsi
callq 0x7db6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ctSkennerton[P]fxtract/util/gai.c
// Function: main
int main(int argc, char **argv)
{
    if (argc == 1) usage("host... -- display getaddrinfo results");

    struct addrinfo crap, *gaip = NULL, *aip,
           hint = { AI_NUMERICSERV | AI_CANONNAME, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP,
                    /*addrlen*/0, /*addr*/0, /*canonname*/0, /*next*/0 };

    while (*++argv) {
        gaip = &crap;
        int ret = getaddrinfo(*argv, 0, &hint, &gaip);
        if (ret)  {
            fprintf(stderr, "%s error:%d %s\n", *argv, ret, eainame[-ret]);
        } else if (gaip) {

            printf("%s %s\n", *argv, 
                    gaip->ai_canonname && strcmp(gaip->ai_canonname, *argv)
                        ? gaip->ai_canonname : "");

            for (aip = gaip; aip; aip = aip->ai_next) {
                IPSTR    ip = {};
                inet_ntop(aip->ai_family, 
                            aip->ai_family == AF_INET6 
                                ? (void*)&((struct sockaddr_in6*)aip->ai_addr)->sin6_addr
                                : (void*)&((struct sockaddr_in *)aip->ai_addr)->sin_addr, 
                            ip, sizeof(ip));
                printf("\t%s\n", ip);
            }

            freeaddrinfo(gaip);
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
cmpl $0x1, %edi
je 0x35ab
movq %rsi, %rbx
movq $0x0, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movl $0x402, 0x10(%rsp)      # imm = 0x402
movabsq $0x600000001, %rax      # imm = 0x600000001
movq %rax, 0x18(%rsp)
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x3597
addq $0x8, %rbx
leaq 0x1b9c(%rip), %r15      # 0x503f
leaq 0x40(%rsp), %r13
leaq 0x1b8c(%rip), %rbp      # 0x503b
leaq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %esi, %esi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x31b0
testl %eax, %eax
jne 0x358b
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3578
movq (%rbx), %r12
movq 0x20(%rax), %r14
movq %r15, %rdx
testq %r14, %r14
je 0x3503
movq %r14, %rdi
movq %r12, %rsi
callq 0x31f0
testl %eax, %eax
cmoveq %r15, %r14
movq %r14, %rdx
leaq 0x1b3d(%rip), %rdi      # 0x5047
movq %r12, %rsi
xorl %eax, %eax
callq 0x3040
movq 0x8(%rsp), %r14
testq %r14, %r14
xorps %xmm0, %xmm0
je 0x356e
movups %xmm0, 0x5e(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movl 0x4(%r14), %edi
xorl %eax, %eax
cmpl $0xa, %edi
sete %al
movq 0x18(%r14), %rcx
leaq (%rcx,%rax,4), %rsi
addq $0x4, %rsi
movq %r13, %rdx
movl $0x2e, %ecx
callq 0x3130
movq %rbp, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3040
xorps %xmm0, %xmm0
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x3521
movq 0x8(%rsp), %rdi
callq 0x31c0
movq 0x8(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x34af
jmp 0x3597
movq %rbx, %rdi
movl %eax, %esi
callq 0x32e0
jmp 0x3578
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3316
// File: /workspace/github_cpp_makefile_star2_O1/zengfenfei[P]codility/src/CyclicRotation.cpp
// Function: solution(std::vector<int, std::allocator<int>>&, int)
vector<int> solution(vector<int> &A, int K) {
	int n = A.size();
	vector<int> rotated(n);
	if (n == 0) {
		return rotated;
	}
	K = K % n;
	//Move the first part to end
	for (int i = K; i < n; i++) {
		rotated[i] = A[i - K];
	}

	//Move the shifted part to the beginning
	for (int i = 0; i < K; i++) {
		rotated[i] = A[i + n - K];
	}
	return rotated;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r13
subq (%rsi), %r13
shrq $0x2, %r13
movslq %r13d, %r12
leaq -0x29(%rbp), %rdx
movq %r12, %rsi
callq 0x14a2
testl %r12d, %r12d
je 0x12c9
movl %r15d, %eax
cltd
idivl %r13d
testl %r13d, %r13d
js 0x12a3
movq (%r14), %rax
movq (%rbx), %rcx
movslq %edx, %rsi
movl %r13d, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl (%rax), %r8d
movl %r8d, (%rcx,%rsi,4)
incq %rsi
addq $0x4, %rax
cmpq %rdi, %rsi
jl 0x1290
testl %edx, %edx
jle 0x12c9
subl %edx, %r13d
movq (%r14), %rax
movq (%rbx), %rcx
movl %edx, %edx
xorl %esi, %esi
leal (%rsi,%r13), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %edi
movl %edi, (%rcx,%rsi,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x12b4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/zengfenfei[P]codility/src/CyclicRotation.cpp
// Function: printVector(std::vector<int, std::allocator<int>>)
void printVector(vector<int> out) {
	cout << "[";
	for (int i = 0; i < out.size(); i++) {
		cout << out[i] << ",";
	}
	cout << "]";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x2ce8(%rip), %rdi      # 0x3fd8
leaq 0xd0d(%rip), %rsi       # 0x2004
movl $0x1, %edx
callq 0x10a0
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x134d
xorl %r12d, %r12d
movq 0x2cc4(%rip), %r14      # 0x3fd8
leaq 0xceb(%rip), %r15       # 0x2006
movl (%rax,%r12,4), %esi
movq %r14, %rdi
callq 0x10d0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x10a0
incq %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
ja 0x131b
movq 0x2c84(%rip), %rdi      # 0x3fd8
leaq 0xcad(%rip), %rsi       # 0x2008
movl $0x1, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10a0
// File: /workspace/github_cpp_makefile_star2_O1/zengfenfei[P]codility/src/CyclicRotation.cpp
// Function: main
int main() {
	int ints[] = { 3, 8, 9, 7, 6 };
	vector<int> a(ints, ints + sizeof(ints) / sizeof(int));
	vector<int> out = solution(a, 3);
	printVector(out);
	printVector(vector<int>());
	//9, 7, 6, 3, 8
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
movaps 0xcc3(%rip), %xmm0      # 0x2040
leaq -0x6c(%rbp), %rdx
movaps %xmm0, -0x14(%rdx)
movl $0x6, -0x4(%rdx)
leaq -0x68(%rbp), %rbx
leaq -0x80(%rbp), %rsi
leaq -0x20(%rbp), %rcx
movq %rbx, %rdi
callq 0x1536
leaq -0x20(%rbp), %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq 0x123c
leaq -0x38(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1578
leaq -0x38(%rbp), %rdi
callq 0x12db
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x13dc
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x1090
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x12db
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x1408
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x1090
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0x141d
movq -0x10(%rbp), %rsi
subq %rdi, %rsi
callq 0x1090
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x1432
movq -0x58(%rbp), %rsi
subq %rdi, %rsi
callq 0x1090
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x146a
movq -0x40(%rbp), %rsi
jmp 0x145d
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x146a
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x1090
jmp 0x146a
movq %rax, %rbx
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0x1484
movq -0x10(%rbp), %rsi
subq %rdi, %rsi
callq 0x1090
jmp 0x1484
movq %rax, %rbx
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x1499
movq -0x58(%rbp), %rsi
subq %rdi, %rsi
callq 0x1090
movq %rbx, %rdi
callq 0x10e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/document_graph.cpp
// Function: testDocarray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int
testDocarray(const std::string& base_name)
{
  RLCSA rlcsa(base_name);
  if(!(rlcsa.isOk())) { return 4; }
  DocArray docarray(rlcsa, base_name, true);
  if(!(docarray.isOk())) { return 5; }

  rlcsa.printInfo();
  rlcsa.reportSize(true);
  docarray.reportSize(true);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x880, %rsp            # imm = 0x880
movq %rdi, %r14
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6b30
movl $0x4, %ebx
cmpb $0x1, (%r15)
jne 0x6341
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x120a0
movl $0x5, %ebx
cmpb $0x0, 0x48(%rsp)
je 0x6339
leaq 0x50(%rsp), %rdi
callq 0xa0a8
leaq 0x50(%rsp), %rdi
movl $0x1, %esi
callq 0x9e00
xorl %ebx, %ebx
movq %rsp, %rdi
movl $0x1, %esi
callq 0x13fce
movq %rsp, %rdi
callq 0x123b8
leaq 0x50(%rsp), %rdi
callq 0x8018
movl %ebx, %eax
addq $0x880, %rsp            # imm = 0x880
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x636a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x123b8
leaq 0x50(%rsp), %rdi
callq 0x8018
movq %rbx, %rdi
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/document_graph.cpp
// Function: buildIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int
buildIndex(const std::string& base_name, const std::string& prefix)
{
  RLCSA rlcsa(base_name);
  if(!(rlcsa.isOk())) { return 4; }
  DocArray docarray(rlcsa, base_name, false);
  if(!(docarray.isOk())) { return 5; }

  docarray.readRules(prefix, true);
  if(!(docarray.hasGrammar())) { return 6; }
  docarray.writeTo(base_name);

  rlcsa.printInfo();
  rlcsa.reportSize(true);
  docarray.reportSize(true);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x888, %rsp            # imm = 0x888
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x6b30
movl $0x4, %ebp
cmpb $0x1, (%r15)
jne 0x642b
leaq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x120a0
movl $0x5, %ebp
cmpb $0x0, 0x50(%rsp)
je 0x6421
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x12a2e
movl $0x6, %ebp
cmpb $0x1, 0x51(%rsp)
jne 0x6421
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x13dea
leaq 0x58(%rsp), %rdi
callq 0xa0a8
leaq 0x58(%rsp), %rdi
movl $0x1, %esi
callq 0x9e00
xorl %ebp, %ebp
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x13fce
leaq 0x8(%rsp), %rdi
callq 0x123b8
leaq 0x58(%rsp), %rdi
callq 0x8018
movl %ebp, %eax
addq $0x888, %rsp            # imm = 0x888
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6457
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x123b8
leaq 0x58(%rsp), %rdi
callq 0x8018
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::STNode::~STNode()
STNode::~STNode()
{
  this->parent = 0;
  delete this->docs; this->docs = 0;
  delete this->child; this->child = 0;
  while(this->sibling != 0)
  {
    STNode* temp = this->sibling; this->sibling = this->sibling->sibling;
    temp->sibling = 0; delete temp;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0x10(%rdi)
movq 0x40(%rdi), %r14
testq %r14, %r14
je 0x10f13
movq (%r14), %rdi
testq %rdi, %rdi
je 0x10f06
movq 0x10(%r14), %rsi
subq %rdi, %rsi
callq 0x3270
movl $0x18, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x40(%rbx)
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x10f39
movq %r14, %rdi
callq 0x10eda
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x10f71
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movq $0x0, 0x20(%r14)
movq %r14, %rdi
callq 0x10eda
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
jmp 0x10f41
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::STNode::addLeaves()
void
STNode::addLeaves()
{
  if(this->child == 0) { return; }

  usint expect = this->range.first;
  STNode* prev = 0;
  for(STNode* temp = this->child; temp != 0; temp = temp->sibling)
  {
    while(expect < temp->range.first) { prev = this->addLeaf(prev, temp, expect); expect++; }
    temp->addLeaves();
    expect = temp->range.second + 1;
    prev = temp;
  }

  while(expect < this->range.second + 1) { prev = this->addLeaf(prev, 0, expect); expect++; }
}

// Assembly:
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x11111
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x18(%rdi), %r12
movq %rdi, (%rsp)
movl 0x4(%rdi), %eax
xorl %ebp, %ebp
movq (%rsp), %rbx
movq %rcx, %r14
cmpl 0x4(%rcx), %eax
jae 0x1107e
movl %eax, %r15d
movq %r15, %r13
movabsq $0x100000001, %rax      # imm = 0x100000001
imulq %rax, %r13
movl $0x48, %edi
callq 0x3260
xorps %xmm0, %xmm0
leaq 0x20(%rbp), %rcx
testq %rbp, %rbp
movl $0x0, (%rax)
movq %r13, 0x4(%rax)
movq $0x0, 0x40(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x29(%rax)
cmoveq %r12, %rcx
movq %rbx, 0x10(%rax)
movq %rax, (%rcx)
movq %r14, 0x20(%rax)
incq %r15
movl 0x4(%r14), %ecx
movabsq $0x100000001, %rdx      # imm = 0x100000001
addq %rdx, %r13
movq %rax, %rbp
cmpq %rcx, %r15
jb 0x11021
movq %r14, %rdi
callq 0x10fdc
movl 0x8(%r14), %edx
leal 0x1(%rdx), %eax
movq 0x20(%r14), %rcx
movq %r14, %rbp
testq %rcx, %rcx
jne 0x11005
movq (%rsp), %rbp
movl 0x8(%rbp), %r12d
leal 0x1(%r12), %ecx
cmpl %ecx, %eax
movabsq $0x100000001, %rbx      # imm = 0x100000001
jae 0x11103
movl %eax, %r15d
imulq %rbx, %r15
subl %edx, %r12d
xorl %r13d, %r13d
movl $0x48, %edi
callq 0x3260
movl $0x0, (%rax)
movq %r15, 0x4(%rax)
movq %r13, 0x40(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x29(%rax)
movq %rbp, 0x10(%rax)
movq %rax, 0x20(%r14)
movq %r13, 0x20(%rax)
addq %rbx, %r15
movq %rax, %r14
decl %r12d
jne 0x110c5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::STNode::addLeaf(CSA::STNode*, CSA::STNode*, unsigned int)
STNode*
STNode::addLeaf(STNode* left, STNode* right, usint pos)
{
  STNode* leaf = new STNode(0, pair_type(pos, pos));
  leaf->parent = this;
  if(left == 0) { this->child = leaf; }
  else          { left->sibling = leaf; }
  leaf->sibling = right;
  return leaf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x48, %edi
callq 0x3260
movl %ebx, %ecx
movq %rcx, %rdx
shlq $0x20, %rdx
orq %rcx, %rdx
movl $0x0, (%rax)
movq %rdx, 0x4(%rax)
movq $0x0, 0x40(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq %r12, 0x10(%rax)
leaq 0x20(%r15), %rcx
addq $0x18, %r12
testq %r15, %r15
cmovneq %rcx, %r12
movups %xmm0, 0x29(%rax)
movq %rax, (%r12)
movq %r14, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::operator<<(std::ostream&, CSA::STNode const&)
std::ostream&
operator<<(std::ostream& stream, const STNode& data)
{
  stream << "(depth = " << data.string_depth << ", range = " << data.range << ", parent = " << data.parent;

  stream << ", siblings = (";
  for(STNode* curr = data.sibling; curr != 0; curr = curr->sibling)
  {
    if(curr != data.sibling) { stream << ", "; }
    stream << curr;
  }
  stream << ")";

  stream << ", children = (";
  for(STNode* curr = data.child; curr != 0; curr = curr->sibling)
  {
    if(curr != data.child) { stream << ", "; }
    stream << curr;
  }
  stream << ")";

  stream << ")";
  return stream;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xd587(%rip), %rsi      # 0x1e926
movl $0x9, %edx
callq 0x32b0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x3180
movq %rax, %r15
leaq 0xd572(%rip), %rsi      # 0x1e930
movl $0xa, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x4(%r14), %rsi
movq %r15, %rdi
callq 0x14419
movq %rax, %r15
leaq 0xd55a(%rip), %rsi      # 0x1e93b
movl $0xb, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x31e0
leaq 0xd546(%rip), %rsi      # 0x1e947
movl $0xe, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x20(%r14), %r15
testq %r15, %r15
je 0x11448
leaq 0xd5f3(%rip), %r12      # 0x1ea11
cmpq 0x20(%r14), %r15
je 0x11434
movl $0x2, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31e0
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0x1141e
leaq 0xceec(%rip), %rsi      # 0x1e33b
movl $0x1, %edx
movq %rbx, %rdi
callq 0x32b0
leaq 0xd4f3(%rip), %rsi      # 0x1e956
movl $0xe, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x18(%r14), %r15
testq %r15, %r15
je 0x114aa
leaq 0xd591(%rip), %r12      # 0x1ea11
cmpq 0x18(%r14), %r15
je 0x11496
movl $0x2, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31e0
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0x11480
leaq 0xce8a(%rip), %r14      # 0x1e33b
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32b0
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::STNode::remove()
void
STNode::remove()
{
  if(this->child == 0 || this->parent == 0) { return; }  // Cannot remove root or leaves.

  STNode* curr;
  for(curr = this->child; curr != 0; curr = curr->sibling) { curr->parent = this->parent; }
  if(this == this->parent->child) { this->parent->child = this->child; }
  else
  {
    for(curr = this->parent->child; curr->sibling != this; curr = curr->sibling);
    curr->sibling = this->child;
  }
  for(curr = this->child; curr->sibling != 0; curr = curr->sibling);
  curr->sibling = this->sibling;

  this->parent = this->child = this->sibling = 0;
}

// Assembly:
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x11553
cmpq $0x0, 0x10(%rdi)
je 0x11553
leaq 0x10(%rdi), %rax
movq %rcx, %rdx
movq (%rax), %rsi
movq %rsi, 0x10(%rdx)
movq 0x20(%rdx), %rdx
testq %rdx, %rdx
jne 0x114f7
movq 0x10(%rdi), %rdx
movq 0x18(%rdx), %rsi
cmpq %rdi, %rsi
je 0x11526
movq %rsi, %rdx
movq 0x20(%rsi), %rsi
cmpq %rdi, %rsi
jne 0x11514
addq $0x20, %rdx
jmp 0x1152a
addq $0x18, %rdx
movq %rcx, (%rdx)
movq 0x18(%rdi), %rdx
movq %rdx, %rcx
movq 0x20(%rdx), %rdx
testq %rdx, %rdx
jne 0x11531
movq 0x20(%rdi), %rdx
movq %rdx, 0x20(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::STNode::determineSize(unsigned int&, unsigned int&)
void
STNode::determineSize(uint& nodes, uint& leaves)
{
  nodes++;
  if(this->child == 0) { leaves++; }
  else { this->child->determineSize(nodes, leaves); }
  if(this->sibling != 0) { this->sibling->determineSize(nodes, leaves); }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
incl (%r14)
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x1157b
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11554
jmp 0x1157d
incl (%rbx)
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0x11562
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::STNode::computeStoredDocuments(unsigned int*)
void
STNode::computeStoredDocuments(usint* documents)
{
  this->stored_documents = 0;
  delete this->docs; this->docs = 0;
  if(this->child == 0)
  {
    this->docs = new std::vector<uint>(documents + this->range.first, documents + this->range.second + 1);
  }
  else
  {
    this->docs = new std::vector<uint>;
    for(STNode* curr = this->child; curr != 0; curr = curr->sibling)
    {
      this->docs->insert(this->docs->end(), curr->docs->begin(), curr->docs->end());
      this->stored_documents += curr->stored_documents;
    }
  }
  removeDuplicates(this->docs, (this->docs->size() >= 65536));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x0, 0x30(%rdi)
movq 0x40(%rdi), %r15
testq %r15, %r15
je 0x115cb
movq (%r15), %rdi
testq %rdi, %rdi
je 0x115be
movq 0x10(%r15), %rsi
subq %rdi, %rsi
callq 0x3270
movl $0x18, %esi
movq %r15, %rdi
callq 0x3270
movq $0x0, 0x40(%rbx)
movq 0x18(%rbx), %r12
movl $0x18, %edi
callq 0x3260
movq %rax, %r15
testq %r12, %r12
je 0x1162a
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq %r15, 0x40(%rbx)
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x1164d
movq 0x40(%rbx), %rdi
movq 0x8(%rdi), %rsi
movq 0x40(%r14), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0x14d26
movl 0x30(%r14), %eax
addl %eax, 0x30(%rbx)
movq 0x20(%r14), %r14
jmp 0x11600
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %ecx
leaq (%r14,%rax,4), %rsi
leaq (%r14,%rcx,4), %rdx
addq $0x4, %rdx
leaq 0x7(%rsp), %rcx
movq %r15, %rdi
callq 0x143d8
movq %r15, 0x40(%rbx)
movq 0x40(%rbx), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
xorl %esi, %esi
cmpq $0x3fffd, %rax          # imm = 0x3FFFD
setae %sil
callq 0xb6ae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::STNode::containsAllDocuments()
void
STNode::containsAllDocuments()
{
  if(this->docs != 0)
  {
    this->stored_documents = this->docs->size();
    delete this->docs; this->docs = 0;
  }
  for(STNode* curr = this; curr != 0; curr = curr->parent)
  {
    curr->contains_all = true;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %r14
testq %r14, %r14
je 0x116d5
movq (%r14), %rdi
movq 0x8(%r14), %rax
subq %rdi, %rax
shrq $0x2, %rax
movl %eax, 0x30(%rbx)
testq %rdi, %rdi
je 0x116c0
movq 0x10(%r14), %rsi
subq %rdi, %rsi
callq 0x3270
movl $0x18, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x40(%rbx)
movb $0x1, 0x38(%rbx)
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x116d5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::DocArray::~DocArray()
DocArray::~DocArray()
{
  delete this->leaf_ranges; this->leaf_ranges = 0;
  delete this->first_children; this->first_children = 0;
  delete this->parents; this->parents = 0;
  delete this->next_leaves; this->next_leaves = 0;

  delete this->rule_borders; this->rule_borders = 0;
  delete this->rules; this->rules = 0;

  delete this->block_borders; this->block_borders = 0;
  delete this->blocks; this->blocks = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x123dd
movq %r14, %rdi
callq 0x18432
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x12403
movq %r14, %rdi
callq 0x1a5e0
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x12429
movq %r14, %rdi
callq 0x16c96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x1244f
movq %r14, %rdi
callq 0x16c96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x12475
movq %r14, %rdi
callq 0x1a5e0
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x28(%rbx)
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0x1249b
movq %r14, %rdi
callq 0x16c96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x30(%rbx)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x124c1
movq %r14, %rdi
callq 0x1a5e0
movl $0x48, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0x124e7
movq %r14, %rdi
callq 0x16c96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::parseLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::vector<unsigned int, std::allocator<unsigned int>>&, int, std::vector<unsigned int, std::allocator<unsigned int>>&)
void
parseLine(std::string& row, std::vector<usint>& before, int separator, std::vector<usint>& after)
{
  bool found = false, num = false;
  usint value = 0;
  for(usint i = 0; i < row.length(); i++)
  {
    if(isdigit(row[i])) { value = 10 * value + row[i] - '0'; num = true; }
    else if(num)
    {
      if(found) { after.push_back(value); }
      else      { before.push_back(value); }
      value = 0; num = false;
    }
    if(row[i] == separator) { found = true; }
  }
  if(num)
  {
    if(found) { after.push_back(value); }
    else      { before.push_back(value); }
    value = 0; num = false;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r8
movq %rsi, %r9
movl $0x0, 0x4(%rsp)
cmpq $0x0, 0x8(%rdi)
je 0x125ec
movl %edx, %ebp
movq %rdi, %r15
movl $0x1, %r12d
xorl %r14d, %r14d
movl $0x1, %ebx
xorl %eax, %eax
xorl %r13d, %r13d
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movq (%r15), %rcx
movsbl (%rcx,%r14), %ecx
leal -0x30(%rcx), %edx
cmpl $0x9, %edx
ja 0x12565
movl 0x4(%rsp), %eax
leal (%rax,%rax,4), %eax
leal (%rcx,%rax,2), %eax
addl $-0x30, %eax
movl %eax, 0x4(%rsp)
movb $0x1, %al
jmp 0x125c9
testb $0x1, %al
je 0x125c9
testb $0x1, %r13b
je 0x12589
movq 0x8(%r8), %rsi
cmpq 0x10(%r8), %rsi
je 0x125a3
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r8)
jmp 0x125bf
movq 0x8(%r9), %rsi
cmpq 0x10(%r9), %rsi
je 0x125a8
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r9)
jmp 0x125bf
movq %r8, %rdi
jmp 0x125ab
movq %r9, %rdi
leaq 0x4(%rsp), %rdx
callq 0xbd24
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movl $0x0, 0x4(%rsp)
xorl %eax, %eax
movq (%r15), %rcx
movsbl (%rcx,%r14), %ecx
cmpl %ebp, %ecx
movzbl %r13b, %r13d
cmovel %r12d, %r13d
movl %ebx, %r14d
incl %ebx
cmpq %r14, 0x8(%r15)
ja 0x12540
jmp 0x125f1
xorl %r13d, %r13d
xorl %eax, %eax
testb $0x1, %al
je 0x1264e
testb $0x1, %r13b
je 0x12615
movq 0x8(%r8), %rsi
cmpq 0x10(%r8), %rsi
je 0x1262f
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r8)
jmp 0x12646
movq 0x8(%r9), %rsi
cmpq 0x10(%r9), %rsi
je 0x12639
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r9)
jmp 0x12646
leaq 0x4(%rsp), %rdx
movq %r8, %rdi
jmp 0x12641
leaq 0x4(%rsp), %rdx
movq %r9, %rdi
callq 0xbd24
movl $0x0, 0x4(%rsp)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::DocArray::writeTo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
void
DocArray::writeTo(const std::string& base_name) const
{
  std::string output_name = base_name + DOCUMENT_EXTENSION;
  std::ofstream output(output_name.c_str(), std::ios_base::binary);
  if(!output)
  {
    std::cerr << "DocArray: Error creating output file " << output_name << "!" << std::endl;
    return;
  }

  usint flags = 0; if(this->usesRLE()) { flags |= RLE_FLAG; }
  output.write((char*)(&flags), sizeof(flags));

  this->leaf_ranges->writeTo(output);
  this->first_children->writeTo(output);
  this->parents->writeBuffer(output);
  this->next_leaves->writeBuffer(output);

  if(this->hasGrammar())
  {
    this->rule_borders->writeTo(output);
    this->rules->writeBuffer(output);
    this->block_borders->writeTo(output);
    this->blocks->writeBuffer(output);
  }

  output.close();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
leaq 0x14aca(%rip), %rdx     # 0x288c8
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xb2f7
movq (%r14), %rsi
leaq 0x28(%rsp), %rdi
movl $0x4, %edx
callq 0x32a0
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rsp,%rax)
je 0x13e9e
movq 0x141bc(%rip), %rdi     # 0x27ff0
leaq 0xac79(%rip), %rsi      # 0x1eab4
movl $0x25, %edx
callq 0x32b0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x1419a(%rip), %rdi     # 0x27ff0
callq 0x32b0
movq %rax, %rbx
leaq 0xaa0b(%rip), %rsi      # 0x1e870
movl $0x1, %edx
movq %rax, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
jmp 0x13f3e
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
movzbl 0x4a(%rbx), %eax
movl %eax, (%rsi)
leaq 0x28(%rsp), %rdi
movl $0x4, %edx
callq 0x3300
movq 0x8(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x17b30
movq 0x10(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1a5e6
movq 0x18(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x16cb0
movq 0x20(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x16cb0
cmpb $0x1, 0x49(%rbx)
jne 0x13f34
movq 0x28(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1a5e6
movq 0x30(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x16cb0
movq 0x38(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1a5e6
movq 0x40(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x16cb0
leaq 0x28(%rsp), %rdi
callq 0x3330
movq 0x1407b(%rip), %rax     # 0x27fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0x3210
leaq 0x120(%rsp), %rdi
callq 0x30d0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13f8b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0x13faa
jmp 0x13f9d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3350
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13fc5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3270
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::DocArray::listDocuments(std::pair<unsigned int, unsigned int>) const
std::vector<usint>*
DocArray::listDocuments(pair_type range) const
{
  if(isEmpty(range) || range.second >= this->getSize()) { return 0; }

  std::vector<usint>* result = this->documentListing<usint>(range);
  if(result != 0) { removeDuplicates(result, false); }

  return result;
}

// Assembly:
pushq %rbx
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %esi
ja 0x142c5
movq (%rdi), %rcx
cmpl %eax, 0x4(%rcx)
jbe 0x142c5
callq 0x144de
movq %rax, %rbx
testq %rax, %rax
je 0x142c7
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb6ae
jmp 0x142c7
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::DocArray::listDocumentsRLE(std::pair<unsigned int, unsigned int>) const
std::vector<pair_type>*
DocArray::listDocumentsRLE(pair_type range) const
{
  if(isEmpty(range) || range.second >= this->getSize()) { return 0; }

  std::vector<pair_type>* result = this->documentListing<pair_type>(range);
  if(result != 0) { mergeRanges(result, false); }

  return result;
}

// Assembly:
pushq %rbx
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %esi
ja 0x14311
movq (%rdi), %rcx
cmpl %eax, 0x4(%rcx)
jbe 0x14311
callq 0x14838
movq %rax, %rbx
testq %rax, %rax
je 0x14313
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1c56b
jmp 0x14313
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::DocArray::directListing(std::pair<unsigned int, unsigned int>) const
std::vector<usint>*
DocArray::directListing(pair_type range) const
{
  if(isEmpty(range) || range.second >= this->getSize()) { return 0; }
  std::vector<usint>* result = new std::vector<usint>;
  this->processRange(range, *result);
  removeDuplicates(result, false);
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %r14d
ja 0x1436c
movq %rdi, %r15
movq (%rdi), %rcx
cmpl %eax, 0x4(%rcx)
jbe 0x1436c
movl $0x18, %edi
callq 0x3260
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x14b92
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb6ae
jmp 0x1436e
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::DocArray::directListingRLE(std::pair<unsigned int, unsigned int>) const
std::vector<pair_type>*
DocArray::directListingRLE(pair_type range) const
{
  if(isEmpty(range) || range.second >= this->getSize()) { return 0; }
  std::vector<pair_type>* result = new std::vector<pair_type>;
  this->processRange(range, *result);
  mergeRanges(result, false);
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rsi, %rax
shrq $0x20, %rax
cmpl %eax, %r14d
ja 0x143cc
movq %rdi, %r15
movq (%rdi), %rcx
cmpl %eax, 0x4(%rcx)
jbe 0x143cc
movl $0x18, %edi
callq 0x3260
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x14c20
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1c56b
jmp 0x143ce
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/./docarray.h
// Function: void CSA::DocArray::processRange<unsigned int>(std::pair<unsigned int, unsigned int>, std::vector<unsigned int, std::allocator<unsigned int>>&) const
void
    processRange(pair_type range, std::vector<T>& result) const
    {
      if(isEmpty(range)) { return; }

      usint* res = this->rlcsa.locate(range);
      this->rlcsa.getSequenceForPosition(res, length(range));
      for(usint i = 0; i < length(range); i++)
      {
        this->addItem(res[i], result);
      }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r12
shrq $0x20, %r12
subl %esi, %r12d
jb 0x14c11
movq %rdx, %rbx
movq %rdi, %r15
movq (%rdi), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x881e
movq %rax, %r14
movq (%r15), %rdi
leal 0x1(%r12), %edx
movq %rax, %rsi
callq 0x9a5c
incl %r12d
je 0x14c11
movl %r12d, %r12d
xorl %r13d, %r13d
leaq 0xc(%rsp), %r15
movl (%r14,%r13,4), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x14bfe
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x14c09
movq %rbx, %rdi
movq %r15, %rdx
callq 0xbd24
incq %r13
cmpq %r13, %r12
jne 0x14be0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/succinctvector.cpp
// Function: CSA::SuccinctVector::SuccinctVector(std::basic_ifstream<char, std::char_traits<char>>&)
SuccinctVector::SuccinctVector(std::ifstream& file) :
  BitVector()
{
  this->readHeader(file);
  this->readArray(file);

  this->integer_bits = length(this->size);
  this->indexForRank();
  this->indexForSelect();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x17a9e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1700e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17066
movl (%rbx), %eax
bsrl %eax, %ecx
xorl $-0x20, %ecx
addl $0x21, %ecx
testl %eax, %eax
cmovel %eax, %ecx
movl %ecx, 0x20(%rbx)
movq %rbx, %rdi
callq 0x1a010
movq %rbx, %rdi
callq 0x1a174
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x17ab2
movq %r14, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/bits/succinctvector.cpp
// Function: CSA::SuccinctVector::indexForRank()
void
SuccinctVector::indexForRank()
{
  delete this->rank_index; this->rank_index = 0;

  WriteBuffer buffer(this->number_of_blocks + 1, this->integer_bits);
  const usint* data = this->array;

  buffer.writeItem(0);
  usint bitcount = 0;
  for(usint block = 0; block < this->number_of_blocks; block++)
  {
    for(usint word = 0; word < this->block_size; word++, ++data) { bitcount += popcount(*data); }
    buffer.writeItem(bitcount);
  }

  this->rank_index = buffer.getReadBuffer();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0x1a038
movq %r14, %rdi
callq 0x16c96
movl $0x28, %esi
movq %r14, %rdi
callq 0x3270
movq $0x0, 0x28(%rbx)
movl 0x14(%rbx), %esi
movl 0x20(%rbx), %edx
incl %esi
movq %rsp, %r14
movq %r14, %rdi
callq 0x16d92
movl 0xc(%r14), %eax
movl %eax, %ecx
subl 0x1c(%r14), %ecx
jb 0x1a06d
incl 0x18(%rsp)
movl $0x20, 0x1c(%rsp)
movl %ecx, %eax
testl %eax, %eax
je 0x1a075
subl %eax, 0x1c(%rsp)
movq 0x8(%rbx), %rsi
incl 0x20(%rsp)
cmpl $0x0, 0x14(%rbx)
je 0x1a144
xorl %edi, %edi
movq (%rsp), %r8
movl $0x33333333, %r9d       # imm = 0x33333333
xorl %r10d, %r10d
movl 0x10(%rbx), %eax
testl %eax, %eax
je 0x1a0d9
movl (%rsi), %ecx
movl %ecx, %edx
shrl %edx
andl $0x55555555, %edx       # imm = 0x55555555
subl %edx, %ecx
movl %ecx, %edx
andl %r9d, %edx
shrl $0x2, %ecx
andl %r9d, %ecx
addl %edx, %ecx
movl %ecx, %edx
shrl $0x4, %edx
addl %ecx, %edx
andl $0xf0f0f0f, %edx        # imm = 0xF0F0F0F
imull $0x1010101, %edx, %ecx  # imm = 0x1010101
shrl $0x18, %ecx
addl %ecx, %r10d
addq $0x4, %rsi
decl %eax
jne 0x1a09d
movl 0xc(%rsp), %ecx
movl 0x1c(%rsp), %edx
movl %ecx, %eax
subl %edx, %eax
jb 0x1a10f
movl %r10d, %r11d
movl %eax, %ecx
shrl %cl, %r11d
negb %dl
movl %edx, %ecx
shll %cl, %r11d
shrl %cl, %r11d
movl 0x18(%rsp), %ecx
orl %r11d, (%r8,%rcx,4)
incl 0x18(%rsp)
movl $0x20, 0x1c(%rsp)
movl %eax, %ecx
testl %ecx, %ecx
je 0x1a135
movl 0x18(%rsp), %edx
movl 0x1c(%rsp), %eax
subl %ecx, %eax
negb %cl
movl %r10d, %r11d
shll %cl, %r11d
shrl %cl, %r11d
movl %eax, %ecx
shll %cl, %r11d
movl %eax, 0x1c(%rsp)
orl %r11d, (%r8,%rdx,4)
incl 0x20(%rsp)
incl %edi
cmpl 0x14(%rbx), %edi
jb 0x1a096
movq %rsp, %rdi
callq 0x16e56
movq %rax, 0x28(%rbx)
movq %rsp, %rdi
callq 0x16e42
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x16e42
movq %rbx, %rdi
callq 0x3460
nop