LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/utils__test.cpp
// Function: test_move_to_str()
void test_move_to_str() {
    move mv = to_move(PAWN,C7,C5);
    char buffer[6];
    move_to_str(mv,buffer);
    assert(!strcmp("c7c5",buffer));

    mv = to_move(KNIGHT,B8,C6);
    move_to_str(mv,buffer);
    assert(!strcmp("b8c6",buffer));

    mv = to_move(PAWN,C7,C8);
    set_promopiece(&mv,QUEEN);
    move_to_str(mv,buffer);
    assert(!strcmp("c7c8q",buffer));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x1, %edi
movl $0xa, %esi
movl $0x1a, %edx
callq 0x775c
leaq 0x2(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe09f
movl $0x35633763, %eax       # imm = 0x35633763
xorl (%rbx), %eax
movzbl 0x4(%rbx), %ecx
orl %eax, %ecx
jne 0x276ee
movl $0x2, %edi
movl $0x1, %esi
movl $0x12, %edx
callq 0x775c
leaq 0x2(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe09f
movl $0x36633862, %eax       # imm = 0x36633862
xorl (%rbx), %eax
movzbl 0x4(%rbx), %ecx
orl %eax, %ecx
jne 0x2770d
movl $0x1, %edi
movl $0xa, %esi
movl $0x2, %edx
callq 0x775c
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
movl $0x5, %esi
callq 0x7824
movq (%rbx), %rdi
leaq 0x2(%rsp), %rbx
movq %rbx, %rsi
callq 0xe09f
movl $0x38633763, %eax       # imm = 0x38633763
xorl (%rbx), %eax
movzwl 0x4(%rbx), %ecx
xorl $0x71, %ecx
orl %eax, %ecx
jne 0x2772c
addq $0x10, %rsp
popq %rbx
retq
leaq 0x10a44(%rip), %rdi     # 0x38139
leaq 0x1092b(%rip), %rsi     # 0x38027
leaq 0x10a4d(%rip), %rcx     # 0x38150
movl $0x2a, %edx
callq 0x20d0
leaq 0x10a59(%rip), %rdi     # 0x3816d
leaq 0x1090c(%rip), %rsi     # 0x38027
leaq 0x10a2e(%rip), %rcx     # 0x38150
movl $0x2e, %edx
callq 0x20d0
leaq 0x10a57(%rip), %rdi     # 0x3818a
leaq 0x108ed(%rip), %rsi     # 0x38027
leaq 0x10a0f(%rip), %rcx     # 0x38150
movl $0x33, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/utils__test.cpp
// Function: test_is_in_move_list()
void test_is_in_move_list() {
    move mv_list[5];
    mv_list[0] = to_move(PAWN,E2,E4);
    mv_list[1] = to_move(PAWN,E2,E3);
    mv_list[2] = to_move(KNIGHT,G1,F3);
    mv_list[3] = to_move(BISHOP,B1,D3);
    mv_list[4] = to_move(PAWN,D4,E5);
    set_capture(&mv_list[4],PAWN);

    assert(is_in_move_list(to_move(PAWN,E2,E4),mv_list,&mv_list[5]));
    assert(!is_in_move_list(to_move(PAWN,D2,D3),mv_list,&mv_list[5]));
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0x775c
leaq 0x20(%rsp), %rbx
movq %rax, -0x20(%rbx)
movl $0x1, %edi
movl $0x34, %esi
movl $0x2c, %edx
callq 0x775c
movq %rax, -0x18(%rbx)
movl $0x2, %edi
movl $0x3e, %esi
movl $0x2d, %edx
callq 0x775c
movq %rax, -0x10(%rbx)
movl $0x3, %edi
movl $0x39, %esi
movl $0x2b, %edx
callq 0x775c
movq %rax, -0x8(%rbx)
movl $0x1, %edi
movl $0x23, %esi
movl $0x1c, %edx
callq 0x775c
movq %rax, (%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x77c0
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0x775c
leaq 0x28(%rsp), %rbx
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
je 0x27ca7
movl $0x1, %edi
movl $0x33, %esi
movl $0x2b, %edx
callq 0x775c
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xe682
testb %al, %al
jne 0x27cc6
addq $0x30, %rsp
popq %rbx
retq
leaq 0x1058c(%rip), %rdi     # 0x3823a
leaq 0x10372(%rip), %rsi     # 0x38027
leaq 0x105b7(%rip), %rcx     # 0x38273
movl $0x81, %edx
callq 0x20d0
leaq 0x105c2(%rip), %rdi     # 0x3828f
leaq 0x10353(%rip), %rsi     # 0x38027
leaq 0x10598(%rip), %rcx     # 0x38273
movl $0x82, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/utils__test.cpp
// Function: test_is_legal_move()
void test_is_legal_move() {
    position pos;
    reset_pos(&pos);

    move legal = to_move(PAWN,E2,E4);
    assert(is_legal_move(legal,&pos));

    move illegal = to_move(PAWN,E2,E5);
    assert(!is_legal_move(illegal,&pos));
}

// Assembly:
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xaa51
movl $0x1, %edi
movl $0x34, %esi
movl $0x24, %edx
callq 0x775c
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe559
testb %al, %al
je 0x27d4b
movl $0x1, %edi
movl $0x34, %esi
movl $0x1c, %edx
callq 0x775c
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xe559
testb %al, %al
jne 0x27d6a
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
retq
leaq 0x10577(%rip), %rdi     # 0x382c9
leaq 0x102ce(%rip), %rsi     # 0x38027
leaq 0x10583(%rip), %rcx     # 0x382e3
movl $0x8a, %edx
callq 0x20d0
leaq 0x1058c(%rip), %rdi     # 0x382fd
leaq 0x102af(%rip), %rsi     # 0x38027
leaq 0x10564(%rip), %rcx     # 0x382e3
movl $0x8d, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/utils__test.cpp
// Function: test_gs_draw50()
void test_gs_draw50() {
    reset_pos(&gpos);

    gpos.fifty_counter=gpos.move_counter=49;
    assert(get_game_status()==INPROGRESS);

    gpos.fifty_counter=gpos.move_counter=50;
    assert(get_game_status()==INPROGRESS);

    gpos.fifty_counter=gpos.move_counter=51;
    assert(get_game_status()==INPROGRESS);

    gpos.fifty_counter=gpos.move_counter=100;
    assert(get_game_status()==DRAW_BY_50);
}

// Assembly:
pushq %rbx
leaq 0xa0783(%rip), %rbx     # 0xc8920
movq %rbx, %rdi
callq 0xaa51
movabsq $0x3100000031, %rax     # imm = 0x3100000031
movq %rax, 0x144(%rbx)
callq 0xe781
testl %eax, %eax
jne 0x28210
movabsq $0x3200000032, %rax     # imm = 0x3200000032
movq %rax, 0x144(%rbx)
callq 0xe781
testl %eax, %eax
jne 0x2822f
movabsq $0x3300000033, %rax     # imm = 0x3300000033
movq %rax, 0x144(%rbx)
callq 0xe781
testl %eax, %eax
jne 0x2824e
movabsq $0x6400000064, %rax     # imm = 0x6400000064
movq %rax, 0x144(%rbx)
callq 0xe781
cmpl $0x4, %eax
jne 0x2826d
popq %rbx
retq
leaq 0x102ac(%rip), %rdi     # 0x384c3
leaq 0xfe09(%rip), %rsi      # 0x38027
leaq 0x103f5(%rip), %rcx     # 0x3861a
movl $0xd5, %edx
callq 0x20d0
leaq 0x1028d(%rip), %rdi     # 0x384c3
leaq 0xfdea(%rip), %rsi      # 0x38027
leaq 0x103d6(%rip), %rcx     # 0x3861a
movl $0xd8, %edx
callq 0x20d0
leaq 0x1026e(%rip), %rdi     # 0x384c3
leaq 0xfdcb(%rip), %rsi      # 0x38027
leaq 0x103b7(%rip), %rcx     # 0x3861a
movl $0xdb, %edx
callq 0x20d0
leaq 0x103bc(%rip), %rdi     # 0x38630
leaq 0xfdac(%rip), %rsi      # 0x38027
leaq 0x10398(%rip), %rcx     # 0x3861a
movl $0xde, %edx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/test/utils__test.cpp
// Function: test_utils()
void test_utils() {
    test_opposite_player();
    test_str_to_sq();
    test_sq_to_str();
    test_move_to_str();
    test_str_to_move();
    test_is_in_move_list();
    test_is_legal_move();
    test_is_white_piece();
    test_is_black_piece();
    test_is_not_white_piece();
    test_is_not_black_piece();

    test_gs_initial_pos();
    test_gs_checkmate_foolsmate();
    test_gs_checkmate_byrnefischer();
    test_gs_checkmate_simplemate();
    test_gs_stalemate();
    test_gs_stalemate_burnpilsbury();
    test_gs_stalemate_2();
    test_gs_stalemate_3();
    test_gs_draw50();
    test_gs_no_material();
    test_gs_no_material_one_pawn();
    test_gs_no_material_one_knight();
    test_gs_no_material_one_bishop();
    test_gs_no_material_one_rook();
    test_gs_no_material_one_queen();
    test_gs_no_material_just_kings();
    test_gs_no_material_two_white_knights();
    test_gs_no_material_two_opposing_knights();
    test_gs_no_material_two_bishops_different_colors();
    test_gs_no_material_two_bishops_same_color();
    test_gs_no_material_bishop_vs_knight();
    test_gs_draw_by_rep();
}

// Assembly:
pushq %rax
callq 0x27440
callq 0x2749b
callq 0x2755d
callq 0x2762e
callq 0x2774b
callq 0x27bc2
callq 0x27ce5
callq 0x27d89
callq 0x27e10
callq 0x27e97
callq 0x27f1e
callq 0x27fa5
callq 0x27fdc
callq 0x2801b
callq 0x2805a
callq 0x28099
callq 0x280d8
callq 0x28117
callq 0x28156
callq 0x28195
callq 0x2828c
callq 0x282cb
callq 0x2830a
callq 0x28349
callq 0x28388
callq 0x283c7
callq 0x28406
callq 0x28445
callq 0x28484
callq 0x284c3
callq 0x28502
callq 0x28541
popq %rax
jmp 0x28580
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parse()
void ObjParser<Stream>::parse()
{
    nextToken();
    while(true)
    {
        if(accept(TokenType::COMMENT));
        else if(parseVertex());
        else if(parseNormal());
        else if(parseTexCo());
        else if(parseFace());
        else if(parseUseMtl());
        else if(parseMtlLib());
        else if(parseObject());
        else if(parseGroup());
        else if(parseShade());
        if(!accept(TokenType::END_OF_LINE))
        {
            expect(TokenType::END_OF_FILE);
            break;
        }
    }
    done = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5a26
cmpl $0x0, 0xe0(%rbx)
je 0x483d
movq %rbx, %rdi
callq 0x5fac
testb %al, %al
jne 0x4845
movq %rbx, %rdi
callq 0x6112
testb %al, %al
jne 0x4845
movq %rbx, %rdi
callq 0x61f0
testb %al, %al
jne 0x4845
movq %rbx, %rdi
callq 0x6348
testb %al, %al
jne 0x4845
movq %rbx, %rdi
callq 0x6968
testb %al, %al
jne 0x4845
movq %rbx, %rdi
callq 0x69ea
testb %al, %al
jne 0x4845
movq %rbx, %rdi
callq 0x6a6c
testb %al, %al
jne 0x4845
movq %rbx, %rdi
callq 0x6aee
testb %al, %al
jne 0x4845
movq %rbx, %rdi
callq 0x6b70
jmp 0x4845
movq %rbx, %rdi
callq 0x5a26
cmpl $0xf, 0xe0(%rbx)
jne 0x4856
movq %rbx, %rdi
jmp 0x47c5
movq %rbx, %rdi
movl $0xc, %esi
callq 0x6c36
movb $0x1, 0x99(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseVertex()
bool parseVertex()
    {
        if(accept(TokenType::VERTEX))
        {
            tmat::Vector4f vertex;
            int index = 0;

            while(expect(TokenType::NUMBER))
            {
                vertex[index] = stof(token);
                index ++;
                if(index >= 3)
                    break;
            }

            if(accept(TokenType::NUMBER))
            {
                vertex[index] = stof(token);
                index ++;
            }

            /* Add the vertex to the list of vertices. */
            vertices.push_back(vertex);
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x1, 0xe0(%rdi)
jne 0x60bd
movq %rdi, %rbx
callq 0x5a26
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0xb, %esi
callq 0x6c36
testb %al, %al
je 0x6045
movq 0xa0(%rbx), %r12
callq 0x3040
movq %rax, %r15
movl (%rax), %r14d
movl $0x0, (%rax)
movq %r12, %rdi
leaq -0x38(%rbp), %rsi
callq 0x3300
cmpq %r12, -0x38(%rbp)
je 0x60ce
movl (%r15), %eax
testl %eax, %eax
je 0x602c
cmpl $0x22, %eax
jne 0x602f
jmp 0x60da
movl %r14d, (%r15)
movss %xmm0, -0x50(%rbp,%r13,4)
incq %r13
cmpq $0x3, %r13
jne 0x5fdc
movl $0x3, %r13d
cmpl $0xb, 0xe0(%rbx)
jne 0x60ad
movq %rbx, %rdi
callq 0x5a26
movq 0xa0(%rbx), %r15
callq 0x3040
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
leaq -0x38(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3300
cmpq %r15, (%r12)
je 0x60e6
movl (%r14), %eax
testl %eax, %eax
je 0x609e
cmpl $0x22, %eax
jne 0x60a4
leaq 0x24a8(%rip), %rdi      # 0x8541
callq 0x3330
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movl %r13d, %eax
movss %xmm0, -0x50(%rbp,%rax,4)
addq $0x8, %rbx
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x6d10
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x246c(%rip), %rdi      # 0x8541
callq 0x3160
leaq 0x2460(%rip), %rdi      # 0x8541
callq 0x3330
leaq 0x2454(%rip), %rdi      # 0x8541
callq 0x3160
cmpl $0x0, (%r14)
jne 0x6109
movl -0x2c(%rbp), %ecx
movl %ecx, (%r14)
jmp 0x6109
cmpl $0x0, (%r15)
jne 0x6109
movl %r14d, (%r15)
movq %rax, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseNormal()
bool parseNormal()
    {
        if(accept(TokenType::NORMAL))
        {
            tmat::Vector3f vertex;
            int index = 0;

            while(expect(TokenType::NUMBER))
            {
                vertex[index] = stof(token);
                index ++;
                if(index >= 3)
                    break;
            }
            
            /* Add the normal to the list of normals. */
            normals.push_back(vertex);
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x2, 0xe0(%rdi)
jne 0x61b6
movq %rdi, %rbx
callq 0x5a26
movl $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0xb, %esi
callq 0x6c36
testb %al, %al
je 0x61a6
movq 0xa0(%rbx), %r12
callq 0x3040
movq %rax, %r15
movl (%rax), %r14d
movl $0x0, (%rax)
movq %r12, %rdi
leaq -0x40(%rbp), %rsi
callq 0x3300
cmpq %r12, -0x40(%rbp)
je 0x61c7
movl (%r15), %eax
testl %eax, %eax
je 0x6193
cmpl $0x22, %eax
jne 0x6196
jmp 0x61d3
movl %r14d, (%r15)
movss %xmm0, -0x38(%rbp,%r13,4)
incq %r13
cmpq $0x3, %r13
jne 0x614a
addq $0x20, %rbx
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x6ebe
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2373(%rip), %rdi      # 0x8541
callq 0x3160
leaq 0x2367(%rip), %rdi      # 0x8541
callq 0x3330
cmpl $0x0, (%r15)
jne 0x61e8
movl %r14d, (%r15)
movq %rax, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseTexCo()
bool parseTexCo()
    {
        if(accept(TokenType::TEXCO))
        {
            tmat::Vector2f vertex;
            int index = 0;

            while(expect(TokenType::NUMBER))
            {
                vertex[index] = stof(token);
                index ++;
                if(index >= 1)
                    break;
            }

            if(accept(TokenType::NUMBER))
            {
                vertex[index] = stof(token);
                index ++;
            }

            /* Add the texco to the list of texcos. */
            texCos.push_back(vertex);
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x3, 0xe0(%rdi)
jne 0x6300
movq %rdi, %rbx
callq 0x5a26
movq $0x0, -0x38(%rbp)
movq %rbx, %rdi
movl $0xb, %esi
callq 0x6c36
testb %al, %al
je 0x6278
movq 0xa0(%rbx), %r15
callq 0x3040
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3300
cmpq %r15, (%r12)
je 0x6311
movl (%r14), %eax
testl %eax, %eax
je 0x627e
cmpl $0x22, %eax
jne 0x6281
leaq 0x22ce(%rip), %rdi      # 0x8541
callq 0x3330
leaq -0x38(%rbp), %r13
jmp 0x628b
movl %r13d, (%r14)
leaq -0x34(%rbp), %r13
movss %xmm0, -0x4(%r13)
cmpl $0xb, 0xe0(%rbx)
jne 0x62f0
movq %rbx, %rdi
callq 0x5a26
movq 0xa0(%rbx), %r15
callq 0x3040
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%r14)
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3300
cmpq %r15, (%r12)
je 0x631d
movl (%r14), %eax
testl %eax, %eax
je 0x62e4
cmpl $0x22, %eax
jne 0x62ea
leaq 0x2262(%rip), %rdi      # 0x8541
callq 0x3330
movl -0x2c(%rbp), %eax
movl %eax, (%r14)
movss %xmm0, (%r13)
addq $0x38, %rbx
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x709e
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2229(%rip), %rdi      # 0x8541
callq 0x3160
leaq 0x221d(%rip), %rdi      # 0x8541
callq 0x3160
cmpl $0x0, (%r14)
jne 0x6340
movl -0x2c(%rbp), %ecx
movl %ecx, (%r14)
jmp 0x6340
cmpl $0x0, (%r14)
jne 0x6340
movl %r13d, (%r14)
movq %rax, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseUseMtl()
bool parseUseMtl()
    {
        if(accept(TokenType::USEMTL))
        {
            parseString();
            expect(TokenType::STRING);
            std::string name = token;

            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl 0xe0(%rdi), %r14d
cmpl $0x5, %r14d
jne 0x69d8
movq %rdi, %rbx
callq 0x5a26
movq %rbx, %rdi
callq 0x7384
movq %rbx, %rdi
movl $0xe, %esi
callq 0x6c36
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0xa0(%rbx), %rsi
movq 0xa8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x747e
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x69d8
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x3250
cmpl $0x5, %r14d
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseMtlLib()
bool parseMtlLib()
    {
        if(accept(TokenType::MTLLIB))
        {
            parseString();
            expect(TokenType::STRING);
            std::string path = token;
            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl 0xe0(%rdi), %r14d
cmpl $0x6, %r14d
jne 0x6a5a
movq %rdi, %rbx
callq 0x5a26
movq %rbx, %rdi
callq 0x7384
movq %rbx, %rdi
movl $0xe, %esi
callq 0x6c36
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0xa0(%rbx), %rsi
movq 0xa8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x747e
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x6a5a
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x3250
cmpl $0x6, %r14d
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseObject()
bool parseObject()
    {
        if(accept(TokenType::OBJECT))
        {
            parseString();
            expect(TokenType::STRING);
            std::string name = token;

            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl 0xe0(%rdi), %r14d
cmpl $0x7, %r14d
jne 0x6adc
movq %rdi, %rbx
callq 0x5a26
movq %rbx, %rdi
callq 0x7384
movq %rbx, %rdi
movl $0xe, %esi
callq 0x6c36
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0xa0(%rbx), %rsi
movq 0xa8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x747e
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x6adc
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x3250
cmpl $0x7, %r14d
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseShade()
bool parseShade()
    {
        if(accept(TokenType::SHADE))
        {
            if(accept(TokenType::NUMBER))
            {
                if(token == "1")
                    smooth = true;
                else
                {
                    error() << "unknown shade type '" << token << "'.";
                }
            }
            else
            {
                expect(TokenType::OFF);
                smooth = false;
            }
            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0xe0(%rdi), %r15d
cmpl $0x9, %r15d
jne 0x6c23
movq %rdi, %rbx
callq 0x5a26
cmpl $0xb, 0xe0(%rbx)
jne 0x6c06
movq %rbx, %rdi
callq 0x5a26
leaq 0xa0(%rbx), %rdi
leaq 0x1ac4(%rip), %rsi      # 0x8676
callq 0x3090
testl %eax, %eax
je 0x6c1c
movq %rbx, %rdi
callq 0x751c
movq %rax, %r14
leaq 0x1aab(%rip), %rsi      # 0x8678
movl $0x14, %edx
movq %rax, %rdi
callq 0x32a0
movq 0xa0(%rbx), %rsi
movq 0xa8(%rbx), %rdx
movq %r14, %rdi
callq 0x32a0
leaq 0x1a96(%rip), %rsi      # 0x868d
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
jmp 0x6c23
movq %rbx, %rdi
movl $0x11, %esi
callq 0x6c36
movb $0x0, 0x98(%rbx)
jmp 0x6c23
movb $0x1, 0x98(%rbx)
cmpl $0x9, %r15d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::expect(ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::TokenType)
bool expect(TokenType type)
    {
        if(accept(type))
            return true;
        else
        {
            error() << "expected '" <<
                tokenStrings[type] << "' got '" << tokenStrings[token_type] <<
                "'." << std::endl;
        }
        assert(false);
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0xe0(%rdi)
jne 0x6c57
movq %rbx, %rdi
callq 0x5a26
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movl %esi, %r14d
movq %rbx, %rdi
callq 0x751c
leaq 0x1a3e(%rip), %rsi      # 0x86a7
movq %rax, %rdi
callq 0x3230
movl %r14d, %esi
shlq $0x5, %rsi
leaq 0x45e1(%rip), %r14      # 0xb260
addq %r14, %rsi
movq %rax, %rdi
callq 0x3210
leaq 0x1a21(%rip), %rsi      # 0x86b2
movq %rax, %rdi
callq 0x3230
movl 0xe0(%rbx), %esi
shlq $0x5, %rsi
addq %r14, %rsi
movq %rax, %rdi
callq 0x3210
leaq 0x19d8(%rip), %rsi      # 0x868d
movq %rax, %rdi
callq 0x3230
movq %rax, %rdi
callq 0x3120
leaq 0x19ee(%rip), %rdi      # 0x86ba
leaq 0x18b0(%rip), %rsi      # 0x8583
leaq 0x19e6(%rip), %rcx      # 0x86c0
movl $0xe8, %edx
callq 0x3170
// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseString()
void parseString()
    {
        int c;
        std::stringstream s;
        while((c = stream.get()) != '\n' && c != '\r')
        {
            s << (char) c;
        }
        stream.unget();

        token = s.str();
        token_type = TokenType::STRING;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
leaq -0x1c0(%rbp), %rdi
callq 0x31a0
leaq -0x1b0(%rbp), %r14
leaq -0x38(%rbp), %r15
movq (%rbx), %rdi
callq 0x32c0
cmpl $0xa, %eax
je 0x73d5
cmpl $0xd, %eax
je 0x73d5
movb %al, -0x38(%rbp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x32a0
jmp 0x73ae
movq (%rbx), %rdi
callq 0x30b0
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x3380
leaq 0xa0(%rbx), %rdi
leaq -0x38(%rbp), %r14
movq %r14, %rsi
callq 0x32d0
movq (%r14), %rdi
leaq -0x28(%rbp), %rax
cmpq %rax, %rdi
je 0x7418
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x3250
movl $0xe, 0xe0(%rbx)
movq 0x3b87(%rip), %rsi      # 0xafb0
leaq -0x1c0(%rbp), %rdi
callq 0x31c0
leaq -0x140(%rbp), %rdi
callq 0x30c0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7453
jmp 0x7453
movq %rax, %rbx
movq 0x3b53(%rip), %rsi      # 0xafb0
leaq -0x1c0(%rbp), %rdi
callq 0x31c0
leaq -0x140(%rbp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/Main.cpp
// Function: processAlgorithm(int, unsigned long)
Result processAlgorithm(int algorithmId, PackedState initialState) {
    switch (algorithmId) {
        case InputReader::BFS_ID:
            return BFS().execute(initialState);
        case InputReader::GREEDY_ID:
            return GreedyBestFirstSearch().execute(initialState);
        case InputReader::ASTAR_ID:
            return AStar().execute(initialState);
        case InputReader::IDFS_ID:
            return IDFS().execute(initialState);
        case InputReader::IDASTAR_ID:
            return IDAStar().execute(initialState);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movl %esi, %eax
leaq 0x68b0(%rip), %rcx      # 0x9004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x685c
jmp 0x27df
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x8402
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8652
leaq 0x8(%rsp), %rdi
callq 0x8426
jmp 0x27df
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7c1c
jmp 0x27df
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x81f0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x831e
leaq 0x8(%rsp), %rdi
callq 0x8214
jmp 0x27df
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x731c
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8214
jmp 0x2808
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8426
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/Main.cpp
// Function: currentTime[abi:cxx11]()
string currentTime(){
    time_t     now = time(0);
    struct tm  tstruct;
    char       buf[80];
    tstruct = *localtime(&now);
    strftime(buf, sizeof(buf), "%d-%m-%Y-%H", &tstruct);
    string str(buf);
    for(int i = 0; i < str.length(); i++){
        if(str.at(i) == ':')
            str.at(i) = '_';
    }
    return str;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x21e0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x2160
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
leaq 0x60(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm1, 0x10(%rcx)
movaps %xmm2, 0x20(%rcx)
movq 0x30(%rax), %rax
movq %rax, 0x30(%rcx)
leaq 0x67bd(%rip), %rdx      # 0x9018
leaq 0x10(%rsp), %r14
movl $0x50, %esi
movq %r14, %rdi
callq 0x2180
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x20d0
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d36
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x28b6
movq (%rbx), %rcx
xorl %edx, %edx
cmpb $0x3a, (%rcx,%rdx)
jne 0x28ae
movb $0x5f, (%rcx,%rdx)
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
incq %rdx
cmpq %rdx, %rax
ja 0x289d
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/ManhattanDistance.cpp
// Function: ManhattanDistance::calculate(unsigned long)
int ManhattanDistance :: calculate(PackedState state) {
    int distance = 0;
    uint64_t mask = 15;
    for (int i = 0; i < numberOfTiles*numberOfTiles; i++) {
        uint64_t currentNumber = state & mask;
        currentNumber = currentNumber >> 4*i;
        int intNumber = currentNumber;
        if (intNumber > 0) {
            int expectedPosition = getExpectedPositionForNumber(intNumber);
            int currentDistance = calculateDistanceBeetwenPositions(expectedPosition, i);
            distance += currentDistance;
        }
        mask = mask << 4;
    }
    return distance;
}

// Assembly:
movl (%rdi), %r10d
testl %r10d, %r10d
je 0x2fbf
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r10d, %r11d
imull %r10d, %r11d
cmpl $0x1, %r11d
movl %r11d, %ebx
adcl $0x0, %ebx
shlq $0x2, %rbx
movl $0xf, %r14d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %edi, %edi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r14, %r15
andq %rsi, %r15
shrq %cl, %r15
testl %r15d, %r15d
jle 0x2fa4
movl %r15d, %eax
notl %eax
addl %r11d, %eax
cltd
idivl %r10d
movl %eax, %r9d
movl %edi, %eax
cltd
idivl %r10d
movl %r9d, %edx
subl %eax, %edx
movl %edx, %r12d
negl %r12d
cmovsl %edx, %r12d
addl %r10d, %eax
subl %r9d, %eax
imull %r10d, %eax
subl %r15d, %eax
addl %ebp, %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
addl %r8d, %r12d
addl %edx, %r12d
movl %r12d, %r8d
shlq $0x4, %r14
addq $0x4, %rcx
decl %ebp
incl %edi
cmpq %rcx, %rbx
jne 0x2f53
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2fc2
xorl %r8d, %r8d
movl %r8d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::unpack(unsigned long)
UnpackedState StateManager :: unpack(PackedState state) {
    PackedState mask = INITIAL_MASK;
    UnpackedState unpackedState;
    short numberOfTiles = getNumberOfTiles(state);
    for (int i = 0; i < numberOfTiles; i++) {
        Line line;
        for (int j = 0; j < numberOfTiles; j++) {
            uint64_t value = state & mask;
            value = value >> 4*(numberOfTiles*i+j);
            line.insert(line.begin(), value);
            mask = mask << 4;
        }   
        unpackedState.insert(unpackedState.begin(), line);
    }
    return unpackedState;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq 0x8(%rsi), %rbp
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x10(%rsp)
movq $0x0, 0x10(%rdi)
movq %rbp, %rax
shlq $0x38, %rax
movq %rbp, %rcx
shlq $0x34, %rcx
orq %rax, %rcx
andq %rdx, %rcx
cmpq $0x1, %rcx
movl $0x4, %ecx
sbbq $0x0, %rcx
leal (,%rcx,4), %eax
movq %rax, 0x40(%rsp)
xorl %r13d, %r13d
leaq 0x20(%rsp), %r15
leaq 0xe(%rsp), %r12
xorl %ebx, %ebx
movq %rcx, 0x18(%rsp)
movq %rbx, 0x48(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq %rcx, %rbx
movq %r13, 0x50(%rsp)
movq %rbp, %rax
andq %r14, %rax
movl %r13d, %ecx
shrq %cl, %rax
movq 0x20(%rsp), %rsi
movw %ax, 0xe(%rsp)
movq %r15, %rdi
movq %r12, %rdx
callq 0x3c1c
shlq $0x4, %rbp
addq $0x4, %r13
decq %rbx
jne 0x3255
movq 0x10(%rsp), %rdi
movq (%rdi), %rsi
movq %r15, %rdx
callq 0x3a16
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
movq 0x18(%rsp), %rcx
movq 0x50(%rsp), %r13
movq 0x48(%rsp), %rbx
je 0x32b6
callq 0x21f0
movq 0x18(%rsp), %rcx
incq %rbx
addq 0x40(%rsp), %r13
cmpq %rcx, %rbx
jne 0x3237
movq 0x10(%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x32dd
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x32ef
callq 0x21f0
movq 0x10(%rsp), %rdi
callq 0x2c0e
movq %r14, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::produceNextStates(State)
vector<State> StateManager :: produceNextStates(State state) {
    vector<State> neighbors;
    int blankPosition = getBlankTilePosition(state.value);
    short numberOfTiles = getNumberOfTiles(state.value);
    for (auto neighboorPosition : getNeighborsPositionsAndHeuristics(state)) {
        State newState;
        newState.value = swapValuesByPositions(state.value, blankPosition, neighboorPosition.first);
        newState.heuristic = neighboorPosition.second;
        newState.parentBlankPos = blankPosition;
        neighbors.insert(neighbors.begin(), newState);
    }
    return neighbors;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x3408
movl %eax, %ebp
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x3442
movq (%r13), %r12
movq 0x8(%r13), %r13
cmpq %r13, %r12
je 0x33c1
movl (%r12), %esi
movq 0x8(%r15), %rax
leal (,%rsi,4), %ecx
shlq %cl, %rax
movq %rax, %rdx
andq %r14, %rdx
movl %esi, %ecx
subl %ebp, %ecx
jge 0x3384
movl %ebp, %ecx
subl %esi, %ecx
shll $0x2, %ecx
shlq %cl, %rdx
jmp 0x338a
shll $0x2, %ecx
shrq %cl, %rdx
movl 0x4(%r12), %ecx
notq %rax
andq %r14, %rax
orq %rdx, %rax
movq %rax, (%rsp)
movb %cl, 0x8(%rsp)
movb %bpl, 0x9(%rsp)
movq (%rbx), %rsi
movq %rbx, %rdi
movq %rsp, %rdx
callq 0x3abc
addq $0x8, %r12
cmpq %r13, %r12
jne 0x335a
movq 0x10(%rsp), %r12
testq %r12, %r12
je 0x33ce
movq %r12, %rdi
callq 0x21f0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x33f2
callq 0x21f0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x33ff
callq 0x21f0
movq %r14, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::getBlankTilePosition(unsigned long)
int StateManager :: getBlankTilePosition(PackedState state) {
    PackedState mask = INITIAL_MASK;
    short numberOfTiles = getNumberOfTiles(state);
    for (int i = 0; i < numberOfTiles*numberOfTiles; i++) {
        uint64_t value = state & mask;
        short shortValue = value >> 4*i;
        if (shortValue == BLANK)
            return i;
        mask = mask << 4;
    }
}

// Assembly:
movq 0x8(%rdi), %rdx
movswl (%rdi), %edi
movl %edx, %eax
andl %esi, %eax
movswl %ax, %ecx
xorl %eax, %eax
cmpl %edi, %ecx
je 0x3440
movl $0x4, %ecx
xorl %eax, %eax
shlq $0x4, %rdx
movq %rdx, %r8
andq %rsi, %r8
shrq %cl, %r8
incq %rax
movswl %r8w, %r8d
addq $0x4, %rcx
cmpl %edi, %r8d
jne 0x3423
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::swapValuesByPositions(unsigned long, int, int)
PackedState StateManager :: swapValuesByPositions(PackedState state, int blankPosition, int neighborPosition) {
    
    uint64_t maskToGetNeighborValue = INITIAL_MASK;
    maskToGetNeighborValue = maskToGetNeighborValue << 4*neighborPosition;
    uint64_t neighborValue = state & maskToGetNeighborValue;
    
    // cleans neighbor position
    uint64_t maskToCleanNeighborPosition = ~maskToGetNeighborValue;
    uint64_t stateWithBlankNeighbor = state & maskToCleanNeighborPosition;
    
    // moves neighbor value to blank position
    if (neighborPosition < blankPosition)
        neighborValue = neighborValue << 4*(blankPosition-neighborPosition);
    else
        neighborValue = neighborValue >> 4*(neighborPosition-blankPosition);

    return stateWithBlankNeighbor | neighborValue;
}

// Assembly:
movl %ecx, %r8d
movq 0x8(%rdi), %rax
leal (,%r8,4), %ecx
shlq %cl, %rax
movq %rax, %rdi
andq %rsi, %rdi
movl %r8d, %ecx
subl %edx, %ecx
jge 0x3650
subl %r8d, %edx
shll $0x2, %edx
movl %edx, %ecx
shlq %cl, %rdi
jmp 0x3656
shll $0x2, %ecx
shrq %cl, %rdi
notq %rax
andq %rsi, %rax
orq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::produceNextPackedStates(unsigned long)
vector<PackedState> StateManager :: produceNextPackedStates(PackedState state) {
    vector<PackedState> neighbors;
    int blankPosition = getBlankTilePosition(state);
    short numberOfTiles = getNumberOfTiles(state);
    vector<int> neighborsPositions = getNeighborsPositions(numberOfTiles, blankPosition);
    for (auto neighboorPosition : neighborsPositions) {
        PackedState neighbor = swapValuesByPositions(state, blankPosition, neighboorPosition);
        neighbors.insert(neighbors.begin(), neighbor);
    }
    return neighbors;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x3408
movl %eax, %ebp
movq 0x8(%r15), %rax
movq %rax, %rcx
shlq $0x38, %rcx
shlq $0x34, %rax
orq %rcx, %rax
andq %r14, %rax
cmpq $0x1, %rax
movl $0x4, %edx
sbbl $0x0, %edx
leaq 0x10(%rsp), %rdi
movl %ebp, %ecx
callq 0x3776
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r13
cmpq %r13, %r12
je 0x372a
movl (%r12), %esi
movq 0x8(%r15), %rax
leal (,%rsi,4), %ecx
shlq %cl, %rax
movq %rax, %rdx
andq %r14, %rdx
movl %esi, %ecx
subl %ebp, %ecx
jge 0x36f8
movl %ebp, %ecx
subl %esi, %ecx
shll $0x2, %ecx
shlq %cl, %rdx
jmp 0x36fe
shll $0x2, %ecx
shrq %cl, %rdx
notq %rax
andq %r14, %rax
orq %rdx, %rax
movq %rax, 0x8(%rsp)
movq (%rbx), %rsi
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0x3b46
addq $0x4, %r12
cmpq %r13, %r12
jne 0x36ce
movq 0x10(%rsp), %r12
testq %r12, %r12
je 0x3737
movq %r12, %rdi
callq 0x21f0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x3760
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3760
callq 0x21f0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x376d
callq 0x21f0
movq %r14, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::getNeighborsPositions(short, int)
vector<int> StateManager :: getNeighborsPositions(short numberOfTiles, int blankPosition) {
    vector<int> neighbors;
    if (blankPosition < numberOfTiles*(numberOfTiles-1))
        neighbors.insert(neighbors.begin(), blankPosition+numberOfTiles);
    if ((blankPosition+1) % numberOfTiles != 0)
        neighbors.insert(neighbors.begin(), blankPosition+1);
    if (blankPosition % numberOfTiles != 0)
        neighbors.insert(neighbors.begin(), blankPosition-1);
    if (blankPosition > numberOfTiles-1)
        neighbors.insert(neighbors.begin(), blankPosition-numberOfTiles);
    return neighbors;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r14d
movl %edx, %r15d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leal -0x1(%r15), %eax
imull %edx, %eax
cmpl %ecx, %eax
jle 0x37b6
leal (%r15,%r14), %eax
leaq 0xc(%rsp), %rdx
movl %eax, (%rdx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x42ce
leal 0x1(%r14), %ecx
movl %ecx, %eax
cltd
idivl %r15d
testl %edx, %edx
je 0x37d6
movq (%rbx), %rsi
leaq 0xc(%rsp), %rdx
movl %ecx, (%rdx)
movq %rbx, %rdi
callq 0x42ce
movl %r14d, %eax
cltd
idivl %r15d
testl %edx, %edx
je 0x37f7
movq (%rbx), %rsi
leal -0x1(%r14), %eax
leaq 0xc(%rsp), %rdx
movl %eax, (%rdx)
movq %rbx, %rdi
callq 0x42ce
subl %r15d, %r14d
jl 0x380f
movq (%rbx), %rsi
leaq 0xc(%rsp), %rdx
movl %r14d, (%rdx)
movq %rbx, %rdi
callq 0x42ce
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3822
jmp 0x3822
jmp 0x3822
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3832
callq 0x21f0
movq %r14, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::calculateNeighborHeuristic(State, int, int)
int StateManager :: calculateNeighborHeuristic(State state, int blankPosition, int newPosition) {
    int valAtNewPosition = getValueAtPosition(state.value, newPosition);
    int expectedPosition = heuristicCalculator.getExpectedPositionForNumber(valAtNewPosition);
    int diffToSubtract = heuristicCalculator.calculateDistanceBeetwenPositions(newPosition, expectedPosition);
    int diffToAdd = heuristicCalculator.calculateDistanceBeetwenPositions(blankPosition, expectedPosition);
    return state.heuristic - diffToSubtract + diffToAdd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r14d
movl %ecx, %ebp
movq %rdx, %rbx
leal (,%r14,4), %ecx
movl $0xf, %eax
shlq %cl, %rax
movq %rdi, %r15
andq %rax, %rsi
shrq %cl, %rsi
addq $0x10, %r15
movq %r15, %rdi
callq 0x2fc6
movl %eax, %r12d
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x2fd0
movl %eax, %r14d
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x2fd0
movzbl %bl, %ecx
subl %r14d, %ecx
addl %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const&)
const vector<string> InputReader :: split(const string& input, const char& delimiter) {
	string buffer{""};
	vector<string> parts;
	
	for(auto character : input) {
		if(character != delimiter) {
            buffer += character; 
        } else if(character == delimiter && buffer != "") { 
            parts.push_back(buffer); 
            buffer = ""; 
        }
	}
	if(buffer != "") 
        parts.push_back(buffer);
	
	return parts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x3dd6(%rip), %rdx      # 0x9081
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x2d36
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, (%rsp)
movq $0x0, 0x10(%rbx)
movq 0x8(%r15), %rbp
testq %rbp, %rbp
je 0x5333
movq (%r15), %r13
xorl %ebx, %ebx
leaq 0x3da2(%rip), %r15      # 0x9081
leaq 0x8(%rsp), %r12
movb (%r13,%rbx), %al
cmpb (%r14), %al
jne 0x5320
movq %r12, %rdi
movq %r15, %rsi
callq 0x2060
testl %eax, %eax
je 0x532b
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x5c5a
movq 0x10(%rsp), %rdx
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x22d0
jmp 0x532b
movsbl %al, %esi
movq %r12, %rdi
callq 0x21b0
incq %rbx
cmpq %rbx, %rbp
jne 0x52e4
leaq 0x3d47(%rip), %rsi      # 0x9081
leaq 0x8(%rsp), %rdi
callq 0x2060
testl %eax, %eax
je 0x5356
leaq 0x8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x5c5a
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x536a
callq 0x21f0
movq (%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x537f
movq %rax, %r14
movq (%rsp), %rdi
callq 0x5c98
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x539f
callq 0x21f0
movq %r14, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::getAlgorithmId(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int InputReader :: getAlgorithmId(const string& algorithm) {
    if (algorithm == "-bfs")
        return BFS_ID;
    if (algorithm == "-gbfs")
        return GREEDY_ID;
    if (algorithm == "-astar")
        return ASTAR_ID;
    if (algorithm == "-idfs")
        return IDFS_ID;
    if (algorithm == "-idastar")
        return IDASTAR_ID;
    return INVALID_ID;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
leaq 0x3ded(%rip), %rsi      # 0x91a0
movq %rbx, %rdi
callq 0x2060
testl %eax, %eax
je 0x5414
leaq 0x3ddf(%rip), %rsi      # 0x91a5
movq %rbx, %rdi
callq 0x2060
testl %eax, %eax
je 0x5418
leaq 0x3dd2(%rip), %rsi      # 0x91ab
movq %rbx, %rdi
callq 0x2060
testl %eax, %eax
je 0x541f
leaq 0x3dc6(%rip), %rsi      # 0x91b2
movq %rbx, %rdi
callq 0x2060
testl %eax, %eax
je 0x5426
leaq 0x3db9(%rip), %rsi      # 0x91b8
movq %rbx, %rdi
callq 0x2060
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl $0x4, %eax
jmp 0x542b
xorl %eax, %eax
jmp 0x542b
movl $0x1, %eax
jmp 0x542b
movl $0x2, %eax
jmp 0x542b
movl $0x3, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::getStateFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
const UnpackedState InputReader :: getStateFromString(string str) {
    vector<string> values = split(str, ' ');
    UnpackedState state;
    Line stateLine;
    int numOfTiles = sqrt(values.size()); 
    int counter = 1;
    for (auto value : values) {
        stateLine.push_back(stoi(value));
        if (counter == numOfTiles) {
            state.push_back(stateLine);
            counter = 0;
            stateLine.clear();
        }
        counter++;
    }
    return state;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x50(%rsp), %rcx
movb $0x20, (%rcx)
leaq 0x70(%rsp), %r14
movq %r14, %rdi
callq 0x5284
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
xorpd %xmm0, %xmm0
movq %rbx, 0x30(%rsp)
movupd %xmm0, (%rbx)
movq (%r14), %r12
movq 0x8(%r14), %rax
movq %rax, 0x40(%rsp)
movq %rcx, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
subq %r12, %rax
je 0x5824
sarq $0x5, %rax
movq %rax, %xmm0
punpckldq 0x3a85(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x3a8d(%rip), %xmm0     # 0x9190
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x3c(%rsp)
movl $0x1, %ebx
leaq 0x60(%rsp), %r14
movq %r14, %r15
movq %r14, 0x50(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x2ca0
movq 0x50(%rsp), %r13
callq 0x2030
movq %rax, %rbp
movl (%rax), %r14d
movl $0x0, (%rax)
movq %r13, %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x2260
cmpq %r13, 0x48(%rsp)
je 0x5845
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x5851
movl (%rbp), %ecx
cmpl $0x22, %ecx
je 0x5851
testl %ecx, %ecx
jne 0x5799
movl %r14d, (%rbp)
movw %ax, 0xe(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x57bb
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x18(%rsp)
movq %r15, %r14
jmp 0x57cd
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
movq %r15, %r14
callq 0x3ca8
cmpl 0x3c(%rsp), %ebx
jne 0x57f5
movq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5ce2
movq 0x10(%rsp), %rax
xorl %ebx, %ebx
cmpq %rax, 0x18(%rsp)
je 0x57f5
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x5804
callq 0x21f0
incl %ebx
addq $0x20, %r12
cmpq 0x40(%rsp), %r12
jne 0x5728
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5824
callq 0x21f0
leaq 0x70(%rsp), %rdi
callq 0x5c98
movq 0x30(%rsp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x397a(%rip), %rdi      # 0x91c6
callq 0x2120
leaq 0x396e(%rip), %rdi      # 0x91c6
callq 0x2290
jmp 0x585f
movq %rax, %rbx
jmp 0x5876
movq %rax, %rbx
jmp 0x5885
movq %rax, %rbx
cmpl $0x0, (%rbp)
jne 0x5876
movl %r14d, (%rbp)
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x5885
callq 0x21f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5894
callq 0x21f0
movq 0x30(%rsp), %rdi
callq 0x2c0e
leaq 0x70(%rsp), %rdi
callq 0x5c98
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::parseStates(int, char**, bool)
vector<UnpackedState> InputReader :: parseStates(int argc, char** argv, bool isTxt) {
    string input = parseStatesToString(argc, argv, isTxt);
    vector<string> strStates;
    if(isTxt){
        strStates = split(input, '\n');
    }
    else{
        strStates = split(input, ',');
    }
    vector<UnpackedState> states;
    for (auto state : strStates) 
        states.push_back(getStateFromString(state));
    return states;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %r8d, %ebp
movq %rdi, 0x8(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x542e
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x50(%rsp), %rcx
testl %ebp, %ebp
je 0x5916
movb $0xa, (%rcx)
leaq 0x10(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x5284
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5d0e
jmp 0x593a
movb $0x2c, (%rcx)
leaq 0x10(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x5284
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5d0e
leaq 0x10(%rsp), %rdi
callq 0x5c98
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r14
cmpq %r14, %rbx
je 0x59f8
leaq 0x20(%rsp), %r13
leaq 0x78(%rsp), %rbp
leaq 0x68(%rsp), %r15
leaq 0x50(%rsp), %r12
movq %r13, 0x10(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x2ca0
movq %rbp, 0x68(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2ca0
movq %r12, %rdi
movq %r15, %rdx
callq 0x568e
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x5e7e
movq %r12, %rdi
callq 0x2c0e
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x59e0
callq 0x21f0
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x59ef
callq 0x21f0
addq $0x20, %rbx
cmpq %r14, %rbx
jne 0x597e
leaq 0x30(%rsp), %rdi
callq 0x5c98
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a18
callq 0x21f0
movq 0x8(%rsp), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5a31
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x5c98
jmp 0x5a8b
jmp 0x5a42
movq %rax, %r14
jmp 0x5a8b
movq %rax, %r14
jmp 0x5a81
movq %rax, %r14
jmp 0x5a72
movq %rax, %r14
jmp 0x5a63
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x2c0e
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5a72
callq 0x21f0
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x5a81
callq 0x21f0
movq 0x8(%rsp), %rdi
callq 0x2c54
leaq 0x30(%rsp), %rdi
callq 0x5c98
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5aab
callq 0x21f0
movq %r14, %rdi
callq 0x2320
nop