LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_server.cpp
// Function: chat_session::deliver(chat_message const&)
void deliver(const chat_message& msg)
  {
    bool write_in_progress = !write_msgs_.empty();
    write_msgs_.push_back(msg);
    if (!write_in_progress)
    {
      boost::asio::async_write(socket_,
          boost::asio::buffer(write_msgs_.front().data(),
            write_msgs_.front().length()),
          boost::bind(&chat_session::handle_write, shared_from_this(),
            boost::asio::placeholders::error));
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq 0x290(%rdi), %r15
movq 0x2b0(%rdi), %r14
movq $-0x210, %rax           # imm = 0xFDF0
addq 0x2c0(%rdi), %rax
cmpq %rax, %r14
je 0xc0fb
movl $0x210, %edx            # imm = 0x210
movq %r14, %rdi
callq 0x5280
addq $0x210, 0x2b0(%rbx) # imm = 0x210
jmp 0xc107
leaq 0x280(%rbx), %rdi
callq 0xc44c
cmpq %r15, %r14
jne 0xc18a
movq 0x290(%rbx), %rax
movq 0x208(%rax), %rcx
addq $0x4, %rcx
movq %rax, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
leaq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xc402
leaq 0x188(%rip), %rsi       # 0xc2c8
leaq -0xfe(%rip), %r8        # 0xc049
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0xc22f
addq $0x18, %rbx
leaq 0x48(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x7(%rsp), %rcx
callq 0xc676
leaq 0x40(%rsp), %rdi
callq 0xbe30
leaq 0x10(%rsp), %rdi
callq 0xbe30
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbe30
jmp 0xc1a6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbe30
movq %rbx, %rdi
callq 0x54f0
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_server.cpp
// Function: chat_session::handle_write(boost::system::error_code const&)
void handle_write(const boost::system::error_code& error)
  {
    if (!error)
    {
      write_msgs_.pop_front();
      if (!write_msgs_.empty())
      {
        boost::asio::async_write(socket_,
            boost::asio::buffer(write_msgs_.front().data(),
              write_msgs_.front().length()),
            boost::bind(&chat_session::handle_write, shared_from_this(),
              boost::asio::placeholders::error));
      }
    }
    else
    {
      room_.leave(shared_from_this());
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x4(%rsi)
je 0xc331
movq 0x68(%rbx), %r15
addq $0x8, %rbx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xc402
leaq 0x58(%rsp), %r14
leaq 0x18(%rsp), %rbx
movaps -0x8(%rbx), %xmm0
movaps %xmm0, -0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rbx)
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0xd638
movq %r15, %rdi
movq %rax, %rsi
callq 0xd6bc
movq %r14, %rdi
callq 0xbe30
movq %rbx, %rdi
jmp 0xc3bf
leaq 0x280(%rbx), %rdi
callq 0xd5e4
movq 0x290(%rbx), %rax
cmpq %rax, 0x2b0(%rbx)
je 0xc3c4
movq 0x208(%rax), %rcx
addq $0x4, %rcx
movq %rax, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
leaq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0xc402
leaq -0xb2(%rip), %rsi       # 0xc2c8
leaq -0x338(%rip), %r8       # 0xc049
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0xc22f
addq $0x18, %rbx
leaq 0x68(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0xc676
leaq 0x28(%rsp), %rdi
callq 0xbe30
leaq 0x38(%rsp), %rdi
callq 0xbe30
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0xbe30
jmp 0xc3e0
movq %rax, %r15
leaq 0x38(%rsp), %rdi
jmp 0xc3f5
movq %rax, %r15
movq %r14, %rdi
callq 0xbe30
movq %rbx, %rdi
callq 0xbe30
movq %r15, %rdi
callq 0x54f0
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_server.cpp
// Function: chat_session::start()
void start()
  {
    room_.join(shared_from_this());
    boost::asio::async_read(socket_,
        boost::asio::buffer(read_msg_.data(), chat_message::header_length),
        boost::bind(
          &chat_session::handle_read_header, shared_from_this(),
          boost::asio::placeholders::error));
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movq 0x68(%rdi), %r13
leaq 0x8(%rdi), %r14
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xc402
leaq 0x58(%rsp), %r12
leaq 0x18(%rsp), %r15
movaps -0x8(%r15), %xmm0
movaps %xmm0, -0x8(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r15)
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0xe9b6
movq %r12, %rdi
callq 0xbe30
movq %r15, %rdi
callq 0xbe30
leaq 0x70(%rbx), %rax
movq %rax, 0x40(%rsp)
movq $0x4, 0x48(%rsp)
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xc402
leaq 0x192(%rip), %rsi       # 0xeabc
leaq -0x28e8(%rip), %r8      # 0xc049
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0xc22f
addq $0x18, %rbx
leaq 0x68(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0xee66
leaq 0x28(%rsp), %rdi
callq 0xbe30
leaq 0x38(%rsp), %rdi
callq 0xbe30
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbe30
jmp 0xe994
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0xe9a9
movq %rax, %rbx
movq %r12, %rdi
callq 0xbe30
movq %r15, %rdi
callq 0xbe30
movq %rbx, %rdi
callq 0x54f0
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_server.cpp
// Function: chat_session::handle_read_header(boost::system::error_code const&)
void handle_read_header(const boost::system::error_code& error)
  {
    if (!error && read_msg_.decode_header())
    {
      boost::asio::async_read(socket_,
          boost::asio::buffer(read_msg_.body(), read_msg_.body_length()),
          boost::bind(&chat_session::handle_read_body, shared_from_this(),
            boost::asio::placeholders::error));
    }
    else
    {
      room_.leave(shared_from_this());
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x4(%rsi)
jne 0xeb7a
leaq 0x70(%rbx), %rsi
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movl %r15d, (%r14)
movb $0x0, 0x4(%r14)
movl $0x4, %edx
movq %r14, %rdi
callq 0x5210
movq %r14, %rdi
callq 0x54a0
cmpl $0x201, %eax            # imm = 0x201
cmovbl %eax, %r15d
movq %r15, 0x278(%rbx)
jae 0xeb7a
leaq 0x74(%rbx), %rax
movq %rax, 0x40(%rsp)
movq %r15, 0x48(%rsp)
leaq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0xc402
leaq 0xcfb(%rip), %rsi       # 0xf82e
leaq -0x2af1(%rip), %r8      # 0xc049
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0xc22f
addq $0x18, %rbx
leaq 0x68(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0xee66
leaq 0x28(%rsp), %rdi
callq 0xbe30
leaq 0x38(%rsp), %rdi
jmp 0xebcc
movq 0x68(%rbx), %r15
addq $0x8, %rbx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xc402
leaq 0x58(%rsp), %r14
leaq 0x18(%rsp), %rbx
movaps -0x8(%rbx), %xmm0
movaps %xmm0, -0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rbx)
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0xd638
movq %r15, %rdi
movq %rax, %rsi
callq 0xd6bc
movq %r14, %rdi
callq 0xbe30
movq %rbx, %rdi
callq 0xbe30
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0xbe30
jmp 0xebed
movq %rax, %r15
leaq 0x38(%rsp), %rdi
jmp 0xec02
movq %rax, %r15
movq %r14, %rdi
callq 0xbe30
movq %rbx, %rdi
callq 0xbe30
movq %r15, %rdi
callq 0x54f0
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_server.cpp
// Function: chat_session::handle_read_body(boost::system::error_code const&)
void handle_read_body(const boost::system::error_code& error)
  {
    if (!error)
    {
      room_.deliver(read_msg_);
      boost::asio::async_read(socket_,
          boost::asio::buffer(read_msg_.data(), chat_message::header_length),
          boost::bind(&chat_session::handle_read_header, shared_from_this(),
            boost::asio::placeholders::error));
    }
    else
    {
      room_.leave(shared_from_this());
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movq 0x68(%rdi), %r14
cmpb $0x0, 0x4(%rsi)
je 0xf894
addq $0x8, %rbx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xc402
leaq 0x58(%rsp), %r15
leaq 0x18(%rsp), %rbx
movaps -0x8(%rbx), %xmm0
movaps %xmm0, -0x8(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rbx)
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0xd638
movq %r14, %rdi
movq %rax, %rsi
callq 0xd6bc
movq %r15, %rdi
callq 0xbe30
movq %rbx, %rdi
jmp 0xf90e
leaq 0x70(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xf952
movq %r15, 0x40(%rsp)
movq $0x4, 0x48(%rsp)
leaq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0xc402
leaq -0xe0d(%rip), %rsi      # 0xeabc
leaq -0x3887(%rip), %r8      # 0xc049
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0xc22f
addq $0x18, %rbx
leaq 0x68(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0xee66
leaq 0x28(%rsp), %rdi
callq 0xbe30
leaq 0x38(%rsp), %rdi
callq 0xbe30
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0xbe30
jmp 0xf92f
movq %rax, %r14
leaq 0x38(%rsp), %rdi
jmp 0xf944
movq %rax, %r14
movq %r15, %rdi
callq 0xbe30
movq %rbx, %rdi
callq 0xbe30
movq %r14, %rdi
callq 0x54f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/jflemer[P]boost-chat-server/chat_server.cpp
// Function: chat_room::deliver(chat_message const&)
void deliver(const chat_message& msg)
  {
    recent_msgs_.push_back(msg);
    while (recent_msgs_.size() > max_recent_msgs)
      recent_msgs_.pop_front();

    std::for_each(participants_.begin(), participants_.end(),
        boost::bind(&chat_participant::deliver, _1, boost::ref(msg)));
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rdi), %r15
movq 0x60(%rdi), %rdi
movq $-0x210, %rax           # imm = 0xFDF0
addq 0x70(%r14), %rax
cmpq %rax, %rdi
je 0xf98f
movl $0x210, %edx            # imm = 0x210
movq %rbx, %rsi
callq 0x5280
addq $0x210, 0x60(%r14)      # imm = 0x210
jmp 0xf99a
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc44c
movabsq $0xf83e0f83e0f83e1, %r12 # imm = 0xF83E0F83E0F83E1
movq 0x78(%r14), %rax
movq %rax, %rcx
subq 0x58(%r14), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
movq 0x50(%r14), %rax
movq 0x60(%r14), %rdx
subq 0x68(%r14), %rdx
sarq $0x4, %rdx
imulq %r12, %rdx
addq %rcx, %rdx
subq 0x40(%r14), %rax
sarq $0x4, %rax
imulq %r12, %rax
addq %rdx, %rax
cmpq $0x65, %rax
jb 0xf9f1
movq %r15, %rdi
callq 0xd5e4
jmp 0xf9a4
movq 0x18(%r14), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0xfa1b
movq 0x20(%r15), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
movq %r15, %rdi
callq 0x5370
movq %rax, %r15
cmpq %r14, %rax
jne 0xf9fe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: process_SOI(std::basic_ifstream<char, std::char_traits<char>>&)
bool process_SOI(ifstream& jpegfile) {
    char c1, c2;
    jpegfile.read(&c1, 1);
    jpegfile.read(&c2, 1);

    /* test file format is jpeg */
    if (to_uint(c1) == TAG && to_uint(c2) == SOI) {
        if (debug)
            cout << "[SOI]" << endl;
        return 0;
    } else {
        cout << "[Error] invalid file format." << endl;
        return 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x1a(%rbp), %r14
movl $0x1, %edx
movq %r14, %rsi
callq 0x2220
leaq -0x19(%rbp), %r15
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2220
movb (%r14), %al
notb %al
movb (%r15), %cl
xorb $-0x28, %cl
orb %al, %cl
setne %bl
je 0x29dc
movq 0x6602(%rip), %rdi      # 0x8fd0
leaq 0x3701(%rip), %rsi      # 0x60d6
movl $0x1c, %edx
jmp 0x29f8
cmpb $0x1, 0x6817(%rip)      # 0x91fa
jne 0x2a2b
movq 0x65e4(%rip), %rdi      # 0x8fd0
leaq 0x36dd(%rip), %rsi      # 0x60d0
movl $0x5, %edx
callq 0x2210
movq 0x65cc(%rip), %r14      # 0x8fd0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: init_qtable()
qtable_t init_qtable() {
    qtable_t qtable = new uint8_t*[4];
    for (int i = 0; i < 4; i++) {
        qtable[i] = new uint8_t[64];
    }
    return qtable;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0x20, %edi
callq 0x2030
movq %rax, %rbx
xorl %r14d, %r14d
movl $0x40, %edi
callq 0x2030
movq %rax, (%rbx,%r14,8)
incq %r14
cmpq $0x4, %r14
jne 0x2a4f
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: print_DQT(unsigned char**)
void print_DQT(qtable_t qtable) {
    cout << "[Quantization Table]" << endl;
    int rows = 8, cols = 8;
    
    for (int i = 0; i < 4; i++) {
        cout << "  qid = " << i << endl;
        
        for (int r = 0; r < rows; r++) {
            cout << "    ";
            
            for (int c = 0; c < cols; c++) {
                printf("%2d ", (int)qtable[i][r * cols + c]);
            }
            cout << endl;
        }
    }
    cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x654a(%rip), %rbx      # 0x8fd0
leaq 0x3666(%rip), %rsi      # 0x60f3
movl $0x14, %edx
movq %rbx, %rdi
callq 0x2210
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x364e(%rip), %r13      # 0x6116
xorl %r15d, %r15d
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x362e(%rip), %rsi      # 0x6108
callq 0x2210
movq %rbx, %rdi
movl %r15d, %esi
callq 0x22e0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
xorl %r12d, %r12d
xorl %eax, %eax
movq %rax, -0x30(%rbp)
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x35e5(%rip), %rsi      # 0x6111
callq 0x2210
xorl %ebx, %ebx
movq (%r14,%r15,8), %rax
addq %r12, %rax
movzbl (%rbx,%rax), %esi
movq %r13, %rdi
xorl %eax, %eax
callq 0x2050
incq %rbx
cmpq $0x8, %rbx
jne 0x2b33
movq 0x6478(%rip), %rbx      # 0x8fd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq -0x30(%rbp), %rax
incq %rax
addq $0x8, %r12
cmpq $0x8, %rax
jne 0x2b19
incq %r15
cmpq $0x4, %r15
jne 0x2acb
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2120
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: process_DQT(std::basic_ifstream<char, std::char_traits<char>>&, unsigned char**)
bool process_DQT(ifstream& jpegfile, qtable_t qtable) {
    unsigned int pointer = 0;
    char c1, c2;

    /* DQT Length */
    jpegfile.read(&c1, 1); pointer++;
    jpegfile.read(&c2, 1); pointer++;

    unsigned int len = to_num(c1, c2);

    if (debug)
        cout << "[DQT] len = " << len << endl;

    /* Fill in Quantization Table */
    while (pointer < len) {
        char c;
        jpegfile.read(&c, 1); pointer += 1;

        c = to_uint(c);
        unsigned int precision = c >> 4;
        unsigned int qid = c & 0x0F;

        for (int i = 0; i < 64; i++) {
            jpegfile.read(&c, 1); pointer += 1;
            qtable[qid][i] = (uint8_t)to_uint(c);
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x2b(%rbp), %r15
movl $0x1, %edx
movq %r15, %rsi
callq 0x2220
leaq -0x2a(%rbp), %r12
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2220
movzbl (%r15), %r13d
movzbl (%r12), %eax
shll $0x8, %r13d
orl %eax, %r13d
cmpb $0x1, 0x65d5(%rip)      # 0x91fa
jne 0x2c77
movq 0x63a2(%rip), %r15      # 0x8fd0
leaq 0x34e6(%rip), %rsi      # 0x611b
movl $0xc, %edx
movq %r15, %rdi
callq 0x2210
movl %r13d, %esi
movq %r15, %rdi
callq 0x2110
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
cmpl $0x3, %r13d
jb 0x2cdc
movl $0x2, %eax
leaq -0x29(%rbp), %r15
movl %r13d, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movzbl -0x29(%rbp), %r13d
andl $0xf, %r13d
xorl %r12d, %r12d
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movb -0x29(%rbp), %al
movq (%rbx,%r13,8), %rcx
movb %al, (%rcx,%r12)
incq %r12
cmpq $0x40, %r12
jne 0x2ca9
movl -0x34(%rbp), %eax
addl $0x41, %eax
movl -0x30(%rbp), %r13d
cmpl %r13d, %eax
jb 0x2c8a
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: init_image(int, int, int)
image_t init_image(int d1, int d2, int d3) {
    image_t image = new int16_t**[d1];

    for (int i = 0; i < d1; i++) {
        image[i] = new int16_t*[d2];

        for (int j = 0; j < d2; j++) {
            image[i][j] = new int16_t[d3];
        }
    }

    return image;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r13d
movl %esi, -0x2c(%rbp)
movl %edi, %r15d
movl %edi, %eax
movq %rax, -0x48(%rbp)
leaq (,%rax,8), %rdi
testl %r15d, %r15d
movq $-0x1, %r14
cmovsq %r14, %rdi
callq 0x2030
movq %rax, -0x38(%rbp)
testl %r15d, %r15d
jle 0x39ca
movl -0x2c(%rbp), %eax
movl %eax, %ebx
leaq (,%rbx,8), %rcx
testl %eax, %eax
cmovsq %r14, %rcx
movq %rcx, -0x40(%rbp)
movl %r13d, %r12d
addq %r12, %r12
testl %r13d, %r13d
cmovsq %r14, %r12
xorl %r14d, %r14d
movq -0x40(%rbp), %rdi
callq 0x2030
movq %rax, %r13
movq -0x38(%rbp), %rax
movq %r13, (%rax,%r14,8)
cmpl $0x0, -0x2c(%rbp)
jle 0x39c1
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x2030
movq %rax, (%r13,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x39ac
incq %r14
cmpq -0x48(%rbp), %r14
jne 0x398f
movq -0x38(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: delete_image(short***, int, int, int)
void delete_image(image_t image, int d1, int d2, int d3) {
    for (int i = 0; i < d1; i++) {
        for (int j = 0; j < d2; j++) {
            delete[] image[i][j];
        }
        delete[] image[i];
    }
    delete[] image;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jle 0x3a3e
movl %esi, %eax
movq %rax, -0x30(%rbp)
movl %edx, %r12d
xorl %r13d, %r13d
movl %edx, %r15d
testl %edx, %edx
jle 0x3a22
xorl %r14d, %r14d
movq (%rbx,%r13,8), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x3a1a
callq 0x2230
incq %r14
cmpq %r14, %r12
jne 0x3a08
movq (%rbx,%r13,8), %rdi
testq %rdi, %rdi
je 0x3a30
callq 0x2230
incq %r13
cmpq -0x30(%rbp), %r13
movl %r15d, %edx
jne 0x39fe
jmp 0x3a43
testq %rbx, %rbx
je 0x3a59
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2230
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: to_bitmap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, short***, sof&)
void to_bitmap(string filename, image_t rgb, sof_t& sof){
    bitmap_image bmp(sof.X, sof.Y);

    for (unsigned int py = 0; py < sof.Y; py++) {
        for (unsigned int px = 0; px < sof.X; px++) {
            bmp.set_pixel(
                px, py,
                (uint8_t)rgb[R][py][px],
                (uint8_t)rgb[G][py][px],
                (uint8_t)rgb[B][py][px]
            );
        }
    }

    size_t dot_i = filename.find_last_of(".");
    bmp.save_image(filename.substr(0, dot_i) + ".bmp");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdx), %edx
movl 0x8(%r14), %esi
leaq -0xa8(%rbp), %rdi
callq 0x4e6c
movl 0x4(%r14), %ecx
testl %ecx, %ecx
je 0x3b25
movl 0x8(%r14), %edx
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %edx
je 0x3b1b
xorl %ecx, %ecx
movq (%r15), %rdx
movq 0x8(%r15), %rsi
movq (%rdx,%rax,8), %rdx
movb (%rdx,%rcx,2), %dl
movq (%rsi,%rax,8), %rsi
movb (%rsi,%rcx,2), %sil
movq 0x10(%r15), %rdi
movq (%rdi,%rax,8), %rdi
movb (%rdi,%rcx,2), %dil
movl -0x80(%rbp), %r8d
imull %eax, %r8d
movl -0x7c(%rbp), %r9d
imull %ecx, %r9d
leal (%r9,%r8), %r10d
movq -0x70(%rbp), %r11
movb %dil, (%r11,%r10)
leal (%r9,%r8), %edi
incl %edi
movq -0x70(%rbp), %r10
movb %sil, (%r10,%rdi)
leal (%r9,%r8), %esi
addl $0x2, %esi
movq -0x70(%rbp), %rdi
movb %dl, (%rdi,%rsi)
incq %rcx
movl 0x8(%r14), %edx
cmpq %rdx, %rcx
jb 0x3ab1
movl 0x4(%r14), %ecx
incq %rax
movl %ecx, %esi
cmpq %rsi, %rax
jb 0x3aa6
leaq 0x2775(%rip), %rsi      # 0x62a1
movl $0x1, %ecx
movq %rbx, %rdi
movq $-0x1, %rdx
callq 0x2320
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x21d0
leaq 0x26e0(%rip), %rsi      # 0x6238
leaq -0x58(%rbp), %rdi
callq 0x2310
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3b85
movq %rdx, -0x38(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x28(%rbp)
jmp 0x3b8c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x38(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xa8(%rbp), %rdi
callq 0x4f0a
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x3bc1
callq 0x21a0
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bd3
callq 0x21a0
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x3be1
callq 0x21a0
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bf6
callq 0x21a0
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x3c1a
callq 0x21a0
jmp 0x3c1a
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c31
callq 0x21a0
jmp 0x3c31
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x5234
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: process_EOI(bool&)
bool process_EOI(bool &eoi) {
    if (debug)
        cout << "[EOI]" << endl;
    eoi = true;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x4869(%rip)      # 0x91fa
jne 0x49d5
movq 0x4636(%rip), %r14      # 0x8fd0
leaq 0x1935(%rip), %rsi      # 0x62d6
movl $0x5, %edx
movq %r14, %rdi
callq 0x2210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movb $0x1, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/qhan1028[P]JPEG-Decoder/jpeg-decoder.cpp
// Function: process_other(std::basic_ifstream<char, std::char_traits<char>>&, unsigned int)
void process_other(ifstream& jpegfile, unsigned int opt) {
    switch (opt) {
        case 0xE0: case 0xE1: case 0xE2: case 0xE3:
        case 0xE4: case 0xE5: case 0xE6: case 0xE7:
        case 0xE8: case 0xE9: case 0xEA: case 0xEB:
        case 0xEC: case 0xED: case 0xEE: case 0xEF:
            if (debug)
                cout << "[APP" << to_uint(opt) % 16 << "] len = ";
            skip(jpegfile);
            break;
        
        case COM:
            if (debug)
                cout << "[COM] len = ";
            skip(jpegfile);
            break;
        
        case DRI:
            if (debug)
                cout << "[DRI] len = ";
            skip(jpegfile);
            USE_RST = true;
            break;

        default:
            printf("[Error] unknown tag: %04X\n", opt);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leal -0xe0(%r14), %eax
cmpl $0x10, %eax
jae 0x4a54
cmpb $0x1, 0x47f8(%rip)      # 0x91fa
jne 0x4a42
movq 0x45c5(%rip), %r15      # 0x8fd0
leaq 0x18ca(%rip), %rsi      # 0x62dc
movl $0x4, %edx
movq %r15, %rdi
callq 0x2210
andl $0xf, %r14d
movq %r15, %rdi
movq %r14, %rsi
callq 0x2110
leaq 0x1755(%rip), %rsi      # 0x618a
movl $0x8, %edx
movq %rax, %rdi
callq 0x2210
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x249c
cmpl $0xdd, %r14d
je 0x4a84
cmpl $0xfe, %r14d
jne 0x4abf
cmpb $0x1, 0x478d(%rip)      # 0x91fa
jne 0x4a42
movq 0x455a(%rip), %rdi      # 0x8fd0
leaq 0x1864(%rip), %rsi      # 0x62e1
movl $0xc, %edx
jmp 0x4a3d
cmpb $0x1, 0x476f(%rip)      # 0x91fa
jne 0x4aa5
movq 0x453c(%rip), %rdi      # 0x8fd0
leaq 0x1853(%rip), %rsi      # 0x62ee
movl $0xc, %edx
callq 0x2210
movq %rbx, %rdi
callq 0x249c
movb $0x1, 0x4747(%rip)      # 0x91fb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1835(%rip), %rdi      # 0x62fb
movl %r14d, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/algoritmos.cc
// Function: make_root(char*)
Nodo* make_root(int8 estado[16]){
  Nodo* n= new Nodo();

  for(int i=0; i<16;i++){
    n->estado[i]= estado[i];
  }
  n->distancia= 0;
  n->predecesor= NULL;

  return n;  
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0x2180
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movups (%rbx), %xmm0
movups %xmm0, (%rax)
movq %rcx, 0x18(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/algoritmos.cc
// Function: extract_solution[abi:cxx11](Nodo*)
std::list<Nodo*> extract_solution(Nodo* n){
  std::list<Nodo*> camino;
  while(n!= NULL){
    camino.push_front(n);
    n= n->predecesor;
  }
  return camino;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
movq $0x0, 0x10(%rdi)
testq %rsi, %rsi
je 0x3609
movq %rsi, %r14
movq (%rbx), %r15
movl $0x18, %edi
callq 0x2180
movq %r14, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x2050
incq 0x10(%rbx)
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x35e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x3632
movq (%rdi), %r15
movl $0x18, %esi
callq 0x2190
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x361d
movq %r14, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/algoritmos.cc
// Function: is_goal(Nodo*)
bool is_goal(Nodo* n){
  bool r = true;
  for (int i = 0; i<16 && r; i++) {
    r = r && matrizR[i]==n->estado[i];
  }
  return r;
}

// Assembly:
xorl %eax, %eax
leaq 0x5b4d(%rip), %rcx      # 0x92a0
movb (%rdi,%rax), %dl
movb (%rax,%rcx), %sil
cmpq $0xe, %rax
ja 0x3768
incq %rax
cmpb %dl, %sil
je 0x3753
cmpb %dl, %sil
sete %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/basepatrones.cc
// Function: compactar(char*, bool*)
int compactar(char estado[16], bool set[16]) {

  int res = 0;
  int p[6];
  int indice = 0;

  for (int i = 0; i < 16; i++) {
    if (i != 0 and !set[i]) continue;

    for (int j = 0; j <16; j++) {
      if (estado[j] == i) {
	p[indice] = j;
	indice++;
      }
    }
  }

  for (int i = 0; i< 6; i++) {
    res = (p[i] | res) << 4;
  }
  res = res >> 4;

  return res;
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
testq %rax, %rax
je 0x377f
cmpb $0x1, (%rsi,%rax)
jne 0x37a0
xorl %edx, %edx
movsbq (%rdi,%rdx), %r8
movl %r8d, %r8d
cmpq %r8, %rax
jne 0x3797
movslq %ecx, %rcx
movl %edx, -0x18(%rsp,%rcx,4)
incl %ecx
incq %rdx
cmpq $0x10, %rdx
jne 0x3781
incq %rax
cmpq $0x10, %rax
jne 0x3774
xorl %ecx, %ecx
xorl %eax, %eax
orl -0x18(%rsp,%rcx,4), %eax
shll $0x4, %eax
incq %rcx
cmpq $0x6, %rcx
jne 0x37ad
sarl $0x4, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/basepatrones.cc
// Function: puedeMoverse(int, int)
bool puedeMoverse(int dist, int posicion_cero) {
  if (posicion_cero + dist > 15 or posicion_cero + dist < 0) return false;

  switch (posicion_cero) {
  case 4:
  case 8:
  case 12:
    return dist != -1;
    break;
  case 3:
  case 7:
  case 11:
    return dist != 1;
  }

  return true;
}

// Assembly:
leal (%rsi,%rdi), %eax
cmpl $0xf, %eax
jbe 0x37cc
xorl %eax, %eax
retq
movb $0x1, %al
cmpl $0xc, %esi
ja 0x37cb
movl $0x888, %ecx            # imm = 0x888
btl %esi, %ecx
jb 0x37ec
movl $0x1110, %ecx           # imm = 0x1110
btl %esi, %ecx
jae 0x37cb
cmpl $-0x1, %edi
jmp 0x37ef
cmpl $0x1, %edi
setne %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/basepatrones.cc
// Function: h_static55_M(char*)
int h_static55_M(int8 estado[16]) {
  // Busca el estado actual en dos bases de datos
  int res = bd1[compactar(estado, set1)] + bd2[compactar(estado, set2)];
  // A eso le suma la distancia manhattan del resto de las fichas
  for (int i = 0; i < 16; i++) {
    if (!set3[i]) continue;
    for (int j = 0; j < 16; j++) {
      if (estado[j] == i) {
	res += matrizH[i][j];
      }
    }
  }
  return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5586(%rip), %rsi      # 0x92b0
callq 0x3770
cltq
leaq 0x55f8(%rip), %rcx      # 0x9330
movzbl (%rax,%rcx), %ebp
leaq 0x557d(%rip), %rsi      # 0x92c0
movq %rbx, %rdi
callq 0x3770
cltq
leaq 0x10055dc(%rip), %rcx   # 0x1009330
movzbl (%rax,%rcx), %eax
addl %ebp, %eax
leaq 0x543f(%rip), %rcx      # 0x91a0
xorl %edx, %edx
leaq 0x5566(%rip), %rsi      # 0x92d0
cmpb $0x1, (%rdx,%rsi)
jne 0x3d8b
xorl %edi, %edi
movsbq (%rbx,%rdi), %r8
movl %r8d, %r8d
cmpq %r8, %rdx
jne 0x3d82
addl (%rcx,%rdi,4), %eax
incq %rdi
cmpq $0x10, %rdi
jne 0x3d72
incq %rdx
addq $0x40, %rcx
cmpq $0x10, %rdx
jne 0x3d6a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/basepatrones.cc
// Function: h_static5_M(char*)
int h_static5_M(int8 estado[16]) {
  // Busca el estado actual en la primera base de datos y suma la distancia
  // manhattan del resto de las fichas.
  int res = bd1[compactar(estado, set1)];
  for (int i = 0; i < 16; i++) {
    if (set1[i]) continue;
    for (int j = 0; j < 16; j++) {
      if (estado[j] == i) {
	res += matrizH[i][j];
      }
    }
  }
  return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5503(%rip), %r14      # 0x92b0
movq %r14, %rsi
callq 0x3770
cltq
leaq 0x5572(%rip), %rcx      # 0x9330
movzbl (%rax,%rcx), %eax
leaq 0x53d7(%rip), %rcx      # 0x91a0
xorl %edx, %edx
cmpb $0x0, (%rdx,%r14)
jne 0x3dec
xorl %esi, %esi
movsbq (%rbx,%rsi), %rdi
movl %edi, %edi
cmpq %rdi, %rdx
jne 0x3de3
addl (%rcx,%rsi,4), %eax
incq %rsi
cmpq $0x10, %rsi
jne 0x3dd4
incq %rdx
addq $0x40, %rcx
cmpq $0x10, %rdx
jne 0x3dcb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/conflictos.cc
// Function: h_conflictos(char*)
int h_conflictos(int8 estado[16]) {
  int res = heuristicaManhattan(estado);
  for (int i = 0; i < 4; i++) {
    for (int j = i; j < 4; j++) {
      res += conflictos[estado[i]][estado[j]][i][j];
    }
  }
  for (int i = 4; i < 8; i++) {
    for (int j = i; j < 8; j++) {
      res += conflictos[estado[i]][estado[j]][i][j];
    }
  }
  for (int i = 8; i < 12; i++) {
    for (int j = i; j < 12; j++) {
      res += conflictos[estado[i]][estado[j]][i][j];
    }
  }
  for (int i = 8; i < 16; i++) {
    for (int j = i; j < 16; j++) {
      res += conflictos[estado[i]][estado[j]][i][j];
    }
  }

  return res;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3642
leaq 0x3004eb9(%rip), %rcx   # 0x3009340
xorl %edx, %edx
movq %rbx, %rsi
movsbq (%rbx,%rdx), %rdi
shlq $0xe, %rdi
addq %rcx, %rdi
xorl %r8d, %r8d
movsbq (%rsi,%r8), %r9
shlq $0xa, %r9
addq %rdi, %r9
addl (%r9,%r8,4), %eax
leaq (%rdx,%r8), %r9
incq %r9
incq %r8
cmpq $0x4, %r9
jne 0x449b
incq %rdx
incq %rsi
addq $0x44, %rcx
cmpq $0x4, %rdx
jne 0x448c
movl $0x4, %ecx
leaq 0x3004f79(%rip), %rdx   # 0x3009450
xorl %esi, %esi
movsbq (%rbx,%rcx), %rdi
shlq $0xe, %rdi
addq %rdx, %rdi
movq %rsi, %r8
movsbq 0x4(%rbx,%r8), %r9
shlq $0xa, %r9
addl (%rdi,%r9), %eax
incq %r8
addq $0x4, %rdi
cmpq $0x4, %r8
jne 0x44e8
incq %rcx
incq %rsi
addq $0x44, %rdx
cmpq $0x8, %rcx
jne 0x44d9
movl $0x8, %ecx
leaq 0x3005041(%rip), %rdx   # 0x3009560
xorl %esi, %esi
movsbq (%rbx,%rcx), %rdi
shlq $0xe, %rdi
addq %rdx, %rdi
movq %rsi, %r8
movsbq 0x8(%rbx,%r8), %r9
shlq $0xa, %r9
addl (%rdi,%r9), %eax
incq %r8
addq $0x4, %rdi
cmpq $0x4, %r8
jne 0x4530
incq %rcx
incq %rsi
addq $0x44, %rdx
cmpq $0xc, %rcx
jne 0x4521
movl $0x8, %ecx
leaq 0x3004ff9(%rip), %rdx   # 0x3009560
xorl %esi, %esi
movsbq (%rbx,%rcx), %rdi
shlq $0xe, %rdi
addq %rdx, %rdi
movq %rsi, %r8
movsbq 0x8(%rbx,%r8), %r9
shlq $0xa, %r9
addl (%rdi,%r9), %eax
incq %r8
addq $0x4, %rdi
cmpq $0x8, %r8
jne 0x4578
incq %rcx
incq %rsi
addq $0x44, %rdx
cmpq $0x10, %rcx
jne 0x4569
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/ida_estrella.cc
// Function: DFS_acotado(int, int, int (*)(char*))
std::pair<Nodo*,int> DFS_acotado(int nodo,int t,int (*h)(int8 estado[16])){
  //std::cout << (int) n->distancia << std::endl;
  Nodo* n = &nodos[nodo];

  int c = n->distancia + peso*(*h)(n->estado);
  if ( c > t ){
    return std::pair<Nodo*,int>(NULL,c);
  }

  if (is_goal(n)) {
    return std::pair<Nodo*,int>(n,n->distancia);
  }

  int nueva_t = 1000;

  int posCero;
  //buscar posicion del cero
  for(int i = 0; i < 16; i++){
    if(n->estado[i]==0){
      posCero=i;
      break;
    }
  }
  
  for(int i=0; i<4 ;i++){

    if(!puedeMoverse(movimientos[i],posCero)) continue;

    int8* nuevoEstado = nodos[nodo+1].estado;
 
    // Generar el nuevo estado
    memcpy(nuevoEstado,n->estado,sizeof(int8)*16);
    nuevoEstado[posCero]= nuevoEstado[posCero+movimientos[i]];
    nuevoEstado[posCero+movimientos[i]]=0;

    num_nodos++;
   
    //	  if (num_nodos == 500000000) { std::exit(0); }
    //std::cout << num_nodos << "\n";

    nodos[nodo+1].distancia = nodos[nodo].distancia + 1;
    nodos[nodo+1].predecesor = n;

    std::pair<Nodo*,int> par= DFS_acotado(nodo+1, t,h);
    if (par.first!=NULL) return par;
    nueva_t= std::min(nueva_t,par.second);
  }
  return std::pair<Nodo*,int>(NULL,nueva_t);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r13d
movl %edi, %r14d
movslq %edi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x3044d86(%rip), %rcx   # 0x3049350
leaq (%rcx,%rax,8), %rbx
movsbl 0x10(%rbx), %ebp
movl 0x3044d6b(%rip), %r15d  # 0x3049344
movq %rbx, %rdi
movq %rdx, 0x10(%rsp)
callq *%rdx
movl %eax, %r12d
imull %r15d, %r12d
addl %ebp, %r12d
movl %r13d, 0xc(%rsp)
cmpl %r13d, %r12d
jg 0x46bd
movq %rbx, %rdi
callq 0x374a
testb %al, %al
je 0x4611
movsbl 0x10(%rbx), %r12d
jmp 0x46bf
xorl %eax, %eax
cmpb $0x0, (%rbx,%rax)
je 0x4627
incq %rax
cmpq $0x10, %rax
jne 0x4613
movl $0x10, %eax
incl %r14d
movl %r14d, 0x8(%rsp)
movslq %r14d, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq 0x3044d13(%rip), %rdx   # 0x3049350
leaq (%rdx,%rcx,8), %rbp
movl %eax, %r13d
movl $0x3e8, %r12d           # imm = 0x3E8
xorl %r15d, %r15d
leaq 0x1a9c(%rip), %rax      # 0x60f0
movl (%r15,%rax), %r14d
movl %r14d, %edi
movl %r13d, %esi
callq 0x37c1
testb %al, %al
je 0x46b3
movups (%rbx), %xmm0
movups %xmm0, (%rbp)
addl %r13d, %r14d
movslq %r14d, %rax
movb (%rbp,%rax), %cl
movb %cl, (%rbp,%r13)
movb $0x0, (%rbp,%rax)
incq 0x3044cbf(%rip)         # 0x3049348
movb 0x10(%rbx), %al
incb %al
movb %al, 0x10(%rbp)
movq %rbx, 0x18(%rbp)
movl 0x8(%rsp), %edi
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x45a8
testq %rax, %rax
jne 0x46d4
cmpl %r12d, %edx
cmovll %edx, %r12d
addq $0x4, %r15
cmpq $0x10, %r15
jne 0x464d
xorl %ebx, %ebx
movq %rbx, %rax
movl %r12d, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl %edx, %r12d
jmp 0x46bf
// File: /workspace/github_cpp_makefile_star2_O3/jenniferdr[P]proyectoIAI/ida_estrella.cc
// Function: ida_estrella[abi:cxx11](char*, int (*)(char*))
std::list<Nodo*> ida_estrella(int8 estado[16], int (*h)(int8 inicial[16])){
  // Por eficiencia todos los nodos estaran en nodos[]
  
  // Atributos del nodo raiz
  for (int i = 0; i < 16; i++) {
    nodos[0].estado[i] = estado[i];
  }
  nodos[0].distancia = 0;
  nodos[0].predecesor = NULL;

  // (*h) es la funcion heuristica
  int t = (*h)((&nodos[0])->estado)*peso;
  Nodo* solucion;
  std::pair<Nodo*,int> par;

  while (solucion==NULL and t<1000){
    num_nodos=0;
    par = DFS_acotado(0,t,h);
    solucion= par.first;
    t= par.second;
    std::cout << " " << t;
  }
  std::cout <<" "<< num_nodos;
  return extract_solution(solucion);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x3044c64(%rip), %rcx   # 0x3049350
movb (%rsi,%rax), %dil
movb %dil, (%rax,%rcx)
incq %rax
cmpq $0x10, %rax
jne 0x46ec
movb $0x0, 0x3044c5c(%rip)   # 0x3049360
leaq 0x3044c45(%rip), %rdi   # 0x3049350
movq $0x0, 0x3044c52(%rip) # 0x3049368
callq *%rdx
movq 0x48b9(%rip), %r14      # 0x8fd8
leaq 0x1a4f(%rip), %rsi      # 0x6175
movl $0x1, %edx
movq %r14, %rdi
callq 0x21a0
movq 0x3044c0e(%rip), %rsi   # 0x3049348
movq %r14, %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x35c1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/big-integers.h
// Function: efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u>::bigIntegers(long long)
bigIntegers(Ts pInteger) : negative(pInteger < Ts(0)), cell(0) {
    if (pInteger == Ts(0)) {
      negative = false;
    } else {
      cellType v[cellsPerLong];
      Tu q = ((pInteger < Ts(0)) ? -pInteger : pInteger);
      cellType s = 0;

      for (cellType i = 0; (q != 0) && (i < cellsPerLong); i++) {
        v[i] = cellType(q & lowMask);
        q >>= cellBitCount;
        if (v[i] != 0) {
          s = i + 1;
        }
      }

      cell.resize(s);

      for (cellType i = 0; i < s; i++) {
        cell[i] = v[i];
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rax
shrq $0x3f, %rax
movb %al, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
testq %rsi, %rsi
je 0x9cec
leaq 0x8(%rbx), %r14
leaq 0x4(%rsp), %rax
movq %rsi, %rcx
negq %rcx
cmovsq %rsi, %rcx
xorl %ebp, %ebp
movl $0x1, %esi
movq %rsp, %rdi
movb $0x1, %dl
movl %ebp, %r8d
movl %ecx, %r9d
movl %ecx, (%rdi)
shrq $0x20, %rcx
testl %r9d, %r9d
movl %esi, %ebp
cmovel %r8d, %ebp
testq %rcx, %rcx
je 0x9cc6
movl $0x2, %esi
movq %rax, %rdi
testb $0x1, %dl
movl $0x0, %edx
jne 0x9c9a
movl %ebp, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x183d2
testl %ebp, %ebp
je 0x9cef
movq (%r14), %rdi
shlq $0x2, %r15
movq %rsp, %rsi
movq %r15, %rdx
callq 0x4200
jmp 0x9cef
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x9d11
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x4260
movq %r15, %rdi
callq 0x43f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/big-integers.h
// Function: efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u>::operator<<=(unsigned int const&)
bigIntegers &operator<<=(const cellType &b) {
    if (*this == zero()) {
      return *this;
    }

    if (b == zero()) {
      return *this;
    }

    if ((cell.size() * cellBitCount + b) <= longBitCount) {
      *this = bigIntegers((*this).toInteger() << b, false);
      return *this;
    }

    if (b < cellBitCount) {
      const cellType &q = b;
      const cellType negQ = (cellBitCount - q);
      const cellType mask = ((1 << q) - 1) << negQ;

      if ((cell[(cell.size() - 1)] & mask) == 0) {
        /* no additional cells needed */
        cellType overflow = 0;

        for (cellType i = 0; i < cell.size(); i++) {
          cellType newContent = (cell[i] << q) | overflow;
          overflow = (cell[i] & mask) >> negQ;
          cell[i] = newContent;
        }

        return *this;
      }
    }

    return (*this = (*this << b));
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
je 0x9e05
movl (%rdx), %eax
testq %rax, %rax
je 0x9e05
leaq 0x8(%rbx), %r14
movq %rsi, %r8
sarq $0x2, %r8
leaq (%rax,%rsi,8), %rcx
cmpq $0x40, %rcx
ja 0x9da6
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl (%rdi,%rdx,4), %r9d
shlq %cl, %r9
orq %r9, %rsi
incq %rdx
movl %edx, %r9d
addl $0x20, %ecx
cmpq %r9, %r8
ja 0x9d61
movl %eax, %ecx
shlq %cl, %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x18782
cmpq %rbx, %r15
je 0x9dee
leaq 0x10(%rsp), %rsi
movb -0x8(%rsi), %al
movb %al, (%rbx)
movq %r14, %rdi
callq 0x18a7a
jmp 0x9dee
cmpl $0x1f, %eax
ja 0x9dc7
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r9d
notl %r9d
movl %eax, %ecx
negl %ecx
shll %cl, %r9d
testl %r9d, -0x4(%rdi,%rsi)
je 0x9e13
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1883e
cmpq %rbx, %r15
je 0x9dee
leaq 0x10(%rsp), %rsi
movb -0x8(%rsi), %al
movb %al, (%rbx)
movq %r14, %rdi
callq 0x18a7a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9e05
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %esi
subl %eax, %esi
xorl %eax, %eax
xorl %r10d, %r10d
movl (%rdi,%rax,4), %r11d
movb (%rdx), %cl
movl %r11d, %ebp
shll %cl, %ebp
orl %r10d, %ebp
andl %r9d, %r11d
movl %esi, %ecx
shrl %cl, %r11d
movl %ebp, (%rdi,%rax,4)
incq %rax
movl %eax, %ecx
movl %r11d, %r10d
cmpq %rcx, %r8
ja 0x9e1f
jmp 0x9e05
jmp 0x9e49
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9e63
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
movq %rbx, %rdi
callq 0x43f0
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/big-integers.h
// Function: efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u>::bigIntegers(unsigned long long, bool)
bigIntegers(Tu pInteger, bool pNegative)
      : cell(0), negative((pInteger == 0) ? false : pNegative) {
    if (pInteger == Tu(0)) {
      negative = false;
    } else {
      cellType v[cellsPerLong];
      Tu q = pInteger;

      cellType s = 0;

      for (cellType i = 0; (q != 0) && (i < cellsPerLong); i++) {
        v[i] = cellType(q & lowMask);
        q >>= cellBitCount;
        if (v[i] != 0) {
          s = i + 1;
        }
      }

      cell.resize(s);

      for (cellType i = 0; i < s; i++) {
        cell[i] = v[i];
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
setne %al
andb %dl, %al
movb %al, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
testq %rsi, %rsi
je 0x18811
leaq 0x8(%rbx), %r14
leaq 0x4(%rsp), %rax
xorl %ebp, %ebp
movl $0x1, %edx
movq %rsp, %rdi
movb $0x1, %cl
movl %ebp, %r8d
movl %esi, %r9d
movl %esi, (%rdi)
shrq $0x20, %rsi
testl %r9d, %r9d
movl %edx, %ebp
cmovel %r8d, %ebp
testq %rsi, %rsi
je 0x187eb
movl $0x2, %edx
movq %rax, %rdi
testb $0x1, %cl
movl $0x0, %ecx
jne 0x187bf
movl %ebp, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x183d2
testl %ebp, %ebp
je 0x18814
movq (%r14), %rdi
shlq $0x2, %r15
movq %rsp, %rsi
movq %r15, %rdx
callq 0x4200
jmp 0x18814
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x18836
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x4260
movq %r15, %rdi
callq 0x43f0
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/big-integers.h
// Function: efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u>::shrink()
void shrink(void) {
    cellType i = cell.size();
    cellType rem = 0;

    if (i == 0) {
      negative = false;
      return;
    }

    while (i > 0) {
      i--;

      if (cell[i] == cellType(0)) {
        rem++;
      } else {
        break;
      }
    }

    if (rem == 0) {
      return;
    }

    cell.resize(cell.size() - rem);

    if (cell.size() == 0) {
      negative = false;
    }
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rsi
subq %rax, %rsi
sarq $0x2, %rsi
testl %esi, %esi
je 0x18bb0
leaq 0x8(%rbx), %rdi
movl %esi, %ecx
leaq (%rax,%rcx,4), %rdx
addq $-0x4, %rdx
xorl %eax, %eax
cmpl $0x0, (%rdx)
jne 0x18b98
incq %rax
addq $-0x4, %rdx
cmpq %rax, %rcx
jne 0x18b85
movl %esi, %eax
testl %eax, %eax
je 0x18bb3
movl %eax, %eax
subq %rax, %rsi
callq 0x183d2
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x18bb3
movb $0x0, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/include/ef.gy/big-integers.h
// Function: efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u>::operator>(efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u> const&) const
bool operator>(const bigIntegers &b) const {
    if (!negative && b.negative) {
      return true;
    }

    if (!negative && !b.negative) {
      if (cell.size() > b.cell.size()) {
        return true;
      }

      if (cell.size() < b.cell.size()) {
        return false;
      }

      for (cellType j = cell.size(); j > 0; j--) {
        const cellType &i = (j - 1);

        if (cell[i] > b.cell[i]) {
          return true;
        }
        if (cell[i] < b.cell[i]) {
          return false;
        }
      }

      return false;
    }

    if (negative && b.negative) {
      if (cell.size() < b.cell.size()) {
        return true;
      }

      if (cell.size() > b.cell.size()) {
        return false;
      }

      for (cellType j = cell.size(); j > 0; j--) {
        const cellType &i = (j - 1);

        if (cell[i] < b.cell[i]) {
          return true;
        }
        if (cell[i] > b.cell[i]) {
          return false;
        }
      }

      return false;
    }

    return false;
  }

// Assembly:
movb (%rsi), %al
cmpb $0x0, (%rdi)
je 0x19298
testb %al, %al
je 0x192c4
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
subq %rcx, %rax
sarq $0x2, %rax
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rsi
subq %rdx, %rsi
sarq $0x2, %rsi
cmpq %rsi, %rax
jb 0x192bf
ja 0x192c4
movl %eax, %esi
xorl %eax, %eax
subq $0x1, %rsi
jb 0x192c4
movl (%rcx,%rsi,4), %edi
movl (%rdx,%rsi,4), %r8d
cmpl %r8d, %edi
jb 0x192bf
cmpl %r8d, %edi
jbe 0x19280
retq
testb %al, %al
jne 0x192bf
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
subq %rcx, %rax
sarq $0x2, %rax
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rsi
subq %rdx, %rsi
sarq $0x2, %rsi
cmpq %rsi, %rax
jbe 0x192c2
movb $0x1, %al
retq
jae 0x192c7
xorl %eax, %eax
retq
movl %eax, %esi
xorl %eax, %eax
subq $0x1, %rsi
jb 0x192c4
movl (%rcx,%rsi,4), %edi
movl (%rdx,%rsi,4), %r8d
cmpl %r8d, %edi
ja 0x192bf
cmpl %r8d, %edi
jae 0x192cb
jmp 0x19297