LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::close()
void
Serial::SerialImpl::close ()
{
  if (is_open_ == true) {
    if (fd_ != -1) {
      int ret;
      ret = ::close (fd_);
      if (ret == 0) {
        fd_ = -1;
      } else {
        THROW (IOException, errno);
      }
    }
    is_open_ = false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
cmpb $0x1, 0x2c(%rdi)
jne 0xbbe2
movq %rdi, %rbx
movl 0x28(%rdi), %edi
cmpl $-0x1, %edi
je 0xbbde
callq 0x8690
testl %eax, %eax
jne 0xbbef
movl $0xffffffff, 0x28(%rbx) # imm = 0xFFFFFFFF
movb $0x0, 0x2c(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x58, %edi
callq 0x81a0
movq %rax, %rbx
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x15606(%rip), %rsi     # 0x21212
leaq 0x15615(%rip), %rdx     # 0x21228
leaq -0x40(%rbp), %rdi
callq 0x9f82
callq 0x8060
movl (%rax), %ecx
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
movl $0x1d1, %edx            # imm = 0x1D1
callq 0xe614
xorl %r15d, %r15d
leaq 0x1c077(%rip), %rsi     # 0x27cb8
leaq 0x297a(%rip), %rdx      # 0xe5c2
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xbc70
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xbc70
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0xbc7d
movq %rbx, %rdi
callq 0x8250
movq %r14, %rdi
callq 0x8600
nop
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::available()
size_t
Serial::SerialImpl::available ()
{
  if (!is_open_) {
    return 0;
  }
  int count = 0;
  if (-1 == ioctl (fd_, TIOCINQ, &count)) {
      THROW (IOException, errno);
  } else {
      return static_cast<size_t> (count);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
cmpb $0x1, 0x2c(%rdi)
jne 0xc54d
leaq -0x24(%rbp), %rdx
movl $0x0, (%rdx)
movl 0x28(%rdi), %edi
movl $0x541b, %esi           # imm = 0x541B
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xc55c
movslq -0x24(%rbp), %rax
jmp 0xc54f
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x58, %edi
callq 0x81a0
movq %rax, %rbx
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x14c99(%rip), %rsi     # 0x21212
leaq 0x14ca8(%rip), %rdx     # 0x21228
leaq -0x48(%rbp), %rdi
callq 0x9f82
callq 0x8060
movl (%rax), %ecx
movb $0x1, %r15b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
movl $0x1e6, %edx            # imm = 0x1E6
callq 0xe614
xorl %r15d, %r15d
leaq 0x1b70a(%rip), %rsi     # 0x27cb8
leaq 0x200d(%rip), %rdx      # 0xe5c2
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0xc5dd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xc5dd
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0xc5ea
movq %rbx, %rdi
callq 0x8250
movq %r14, %rdi
callq 0x8600
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::waitForChange()
bool
Serial::SerialImpl::waitForChange ()
{
#ifndef TIOCMIWAIT

while (is_open_ == true) {

    int status;

    if (-1 == ioctl (fd_, TIOCMGET, &status))
    {
        stringstream ss;
        ss << "waitForChange failed on a call to ioctl(TIOCMGET): " << errno << " " << strerror(errno);
        throw(SerialException(ss.str().c_str()));
    }
    else
    {
        if (0 != (status & TIOCM_CTS)
         || 0 != (status & TIOCM_DSR)
         || 0 != (status & TIOCM_RI)
         || 0 != (status & TIOCM_CD))
        {
          return true;
        }
    }

    usleep(1000);
  }

  return false;
#else
  int command = (TIOCM_CD|TIOCM_DSR|TIOCM_RI|TIOCM_CTS);

  if (-1 == ioctl (fd_, TIOCMIWAIT, &command)) {
    stringstream ss;
    ss << "waitForDSR failed on a call to ioctl(TIOCMIWAIT): "
       << errno << " " << strerror(errno);
    throw(SerialException(ss.str().c_str()));
  }
  return true;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
leaq -0x1c(%rbp), %rdx
movl $0x1e0, (%rdx)          # imm = 0x1E0
movl 0x28(%rdi), %edi
movl $0x545c, %esi           # imm = 0x545C
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xd7fc
movb $0x1, %al
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x13e40(%rip), %rsi     # 0x21656
movl $0x32, %edx
movq %r14, %rdi
callq 0x83c0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85d0
movq %rax, %r14
leaq 0x13e15(%rip), %rsi     # 0x21654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83c0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82f0
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x1a40c(%rip), %rsi     # 0x27ca0
leaq 0xaeb(%rip), %rdx       # 0xe386
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd8c7
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xd8c7
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0xd8d9
movq %rbx, %rdi
callq 0x8250
jmp 0xd8d9
movq %rax, %r14
movq 0x1a6c0(%rip), %rsi     # 0x27fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8270
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x8600
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::getCTS()
bool
Serial::SerialImpl::getCTS ()
{
  if (is_open_ == false) {
    throw PortNotOpenedException ("Serial::getCTS");
  }

  int status;

  if (-1 == ioctl (fd_, TIOCMGET, &status))
  {
    stringstream ss;
    ss << "getCTS failed on a call to ioctl(TIOCMGET): " << errno << " " << strerror(errno);
    throw(SerialException(ss.str().c_str()));
  }
  else
  {
    return 0 != (status & TIOCM_CTS);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
cmpb $0x0, 0x2c(%rdi)
je 0xd945
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xd977
movl -0x1c(%rbp), %eax
andl $0x20, %eax
shrl $0x5, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq 0x13d30(%rip), %rsi     # 0x21689
movq %rax, %rdi
callq 0xe848
leaq 0x1a368(%rip), %rsi     # 0x27cd0
leaq 0x1041(%rip), %rdx      # 0xe9b0
movq %rbx, %rdi
callq 0x85c0
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x13d07(%rip), %rsi     # 0x21698
movl $0x2c, %edx
movq %r14, %rdi
callq 0x83c0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85d0
movq %rax, %r14
leaq 0x13c9a(%rip), %rsi     # 0x21654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83c0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82f0
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x1a291(%rip), %rsi     # 0x27ca0
leaq 0x970(%rip), %rdx       # 0xe386
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xda42
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xda42
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0xda61
movq %rbx, %rdi
callq 0x8250
jmp 0xda61
movq %rax, %r14
movq %rbx, %rdi
callq 0x8250
jmp 0xda80
movq %rax, %r14
movq 0x1a538(%rip), %rsi     # 0x27fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8270
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x8600
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::getDSR()
bool
Serial::SerialImpl::getDSR ()
{
  if (is_open_ == false) {
    throw PortNotOpenedException ("Serial::getDSR");
  }

  int status;

  if (-1 == ioctl (fd_, TIOCMGET, &status))
  {
      stringstream ss;
      ss << "getDSR failed on a call to ioctl(TIOCMGET): " << errno << " " << strerror(errno);
      throw(SerialException(ss.str().c_str()));
  }
  else
  {
      return 0 != (status & TIOCM_DSR);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
cmpb $0x0, 0x2c(%rdi)
je 0xdacd
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xdaff
movl -0x1c(%rbp), %eax
shrl $0x8, %eax
andl $0x1, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq 0x13be4(%rip), %rsi     # 0x216c5
movq %rax, %rdi
callq 0xe848
leaq 0x1a1e0(%rip), %rsi     # 0x27cd0
leaq 0xeb9(%rip), %rdx       # 0xe9b0
movq %rbx, %rdi
callq 0x85c0
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x13bbb(%rip), %rsi     # 0x216d4
movl $0x2c, %edx
movq %r14, %rdi
callq 0x83c0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85d0
movq %rax, %r14
leaq 0x13b12(%rip), %rsi     # 0x21654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83c0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82f0
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x1a109(%rip), %rsi     # 0x27ca0
leaq 0x7e8(%rip), %rdx       # 0xe386
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdbca
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xdbca
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0xdbe9
movq %rbx, %rdi
callq 0x8250
jmp 0xdbe9
movq %rax, %r14
movq %rbx, %rdi
callq 0x8250
jmp 0xdc08
movq %rax, %r14
movq 0x1a3b0(%rip), %rsi     # 0x27fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8270
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x8600
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::getRI()
bool
Serial::SerialImpl::getRI ()
{
  if (is_open_ == false) {
    throw PortNotOpenedException ("Serial::getRI");
  }

  int status;

  if (-1 == ioctl (fd_, TIOCMGET, &status))
  {
    stringstream ss;
    ss << "getRI failed on a call to ioctl(TIOCMGET): " << errno << " " << strerror(errno);
    throw(SerialException(ss.str().c_str()));
  }
  else
  {
    return 0 != (status & TIOCM_RI);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
cmpb $0x0, 0x2c(%rdi)
je 0xdc52
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xdc84
movb -0x1c(%rbp), %al
shrb $0x7, %al
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq 0x13a9b(%rip), %rsi     # 0x21701
movq %rax, %rdi
callq 0xe848
leaq 0x1a05b(%rip), %rsi     # 0x27cd0
leaq 0xd34(%rip), %rdx       # 0xe9b0
movq %rbx, %rdi
callq 0x85c0
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x13a71(%rip), %rsi     # 0x2170f
movl $0x2b, %edx
movq %r14, %rdi
callq 0x83c0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85d0
movq %rax, %r14
leaq 0x1398d(%rip), %rsi     # 0x21654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83c0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82f0
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x19f84(%rip), %rsi     # 0x27ca0
leaq 0x663(%rip), %rdx       # 0xe386
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdd4f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xdd4f
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0xdd6e
movq %rbx, %rdi
callq 0x8250
jmp 0xdd6e
movq %rax, %r14
movq %rbx, %rdi
callq 0x8250
jmp 0xdd8d
movq %rax, %r14
movq 0x1a22b(%rip), %rsi     # 0x27fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8270
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x8600
nop
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::getCD()
bool
Serial::SerialImpl::getCD ()
{
  if (is_open_ == false) {
    throw PortNotOpenedException ("Serial::getCD");
  }

  int status;

  if (-1 == ioctl (fd_, TIOCMGET, &status))
  {
    stringstream ss;
    ss << "getCD failed on a call to ioctl(TIOCMGET): " << errno << " " << strerror(errno);
    throw(SerialException(ss.str().c_str()));
  }
  else
  {
    return 0 != (status & TIOCM_CD);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
cmpb $0x0, 0x2c(%rdi)
je 0xdddb
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xde0d
movl -0x1c(%rbp), %eax
andl $0x40, %eax
shrl $0x6, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq 0x1394c(%rip), %rsi     # 0x2173b
movq %rax, %rdi
callq 0xe848
leaq 0x19ed2(%rip), %rsi     # 0x27cd0
leaq 0xbab(%rip), %rdx       # 0xe9b0
movq %rbx, %rdi
callq 0x85c0
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x13922(%rip), %rsi     # 0x21749
movl $0x2b, %edx
movq %r14, %rdi
callq 0x83c0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85d0
movq %rax, %r14
leaq 0x13804(%rip), %rsi     # 0x21654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83c0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82f0
movl $0x28, %edi
callq 0x81a0
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x19dfb(%rip), %rsi     # 0x27ca0
leaq 0x4da(%rip), %rdx       # 0xe386
movq %rbx, %rdi
callq 0x85c0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xded8
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xded8
movq %rax, %r14
movb $0x1, %r15b
testb %r15b, %r15b
je 0xdef7
movq %rbx, %rdi
callq 0x8250
jmp 0xdef7
movq %rax, %r14
movq %rbx, %rdi
callq 0x8250
jmp 0xdf16
movq %rax, %r14
movq 0x1a0a2(%rip), %rsi     # 0x27fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8270
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x8600
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/serial.h
// Function: serial::IOException::IOException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, char const*)
explicit IOException (std::string file, int line, const char * description)
    : file_(file), line_(line), errno_(0) {
      std::stringstream ss;
      ss << "IO Exception: " << description;
      ss << ", file " << file_ << ", line " << line_ << ".";
      e_what_ = ss.str();
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rcx, %r13
movl %edx, %r15d
movq %rdi, %rbx
leaq 0x1993c(%rip), %rax     # 0x27d20
movq %rax, (%rdi)
addq $0x8, %rdi
leaq 0x18(%rbx), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x8(%rbx)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rdi, -0x38(%rbp)
movq %rax, %rsi
callq 0xa26a
movl %r15d, 0x28(%rbx)
leaq 0x30(%rbx), %r15
leaq 0x40(%rbx), %r14
movq %r14, 0x30(%rbx)
movq $0x0, 0x38(%rbx)
movb $0x0, 0x40(%rbx)
movl $0x0, 0x50(%rbx)
leaq -0x1e0(%rbp), %rdi
callq 0x8230
leaq -0x1d0(%rbp), %r12
leaq 0x13345(%rip), %rsi     # 0x2178f
movl $0xe, %edx
movq %r12, %rdi
callq 0x83c0
testq %r13, %r13
je 0xe474
movq %r13, %rdi
callq 0x8170
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x83c0
jmp 0xe492
movq -0x1d0(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl -0x1b0(%rbp,%rax), %esi
orl $0x1, %esi
callq 0x85b0
leaq 0x13305(%rip), %rsi     # 0x2179e
movl $0x7, %edx
movq %r12, %rdi
callq 0x83c0
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r12, %rdi
callq 0x83c0
movq %rax, %r12
leaq 0x132e6(%rip), %rsi     # 0x217a6
movl $0x7, %edx
movq %rax, %rdi
callq 0x83c0
movl 0x28(%rbx), %esi
movq %r12, %rdi
callq 0x85d0
leaq 0x132ae(%rip), %rsi     # 0x2178d
movl $0x1, %edx
movq %rax, %rdi
callq 0x83c0
leaq -0x1c8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x8560
leaq -0x58(%rbp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8400
movq (%rbx), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0xe523
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8320
movq 0x19a76(%rip), %rsi     # 0x27fa0
leaq -0x1e0(%rbp), %rdi
callq 0x8270
leaq -0x160(%rbp), %rdi
callq 0x8100
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe560
movq %rax, %r12
jmp 0xe582
movq %rax, %r12
jmp 0xe5b1
movq %rax, %r12
movq 0x19a36(%rip), %rsi     # 0x27fa0
leaq -0x1e0(%rbp), %rdi
callq 0x8270
leaq -0x160(%rbp), %rdi
callq 0x8100
movq (%r15), %rdi
cmpq %r14, %rdi
je 0xe595
movq (%r14), %rsi
incq %rsi
callq 0x8320
movq -0x38(%rbp), %rax
movq (%rax), %rdi
cmpq -0x30(%rbp), %rdi
je 0xe5b1
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8320
movq %rbx, %rdi
callq 0x8650
movq %r12, %rdi
callq 0x8600
nop
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__load_flip(stbi__context*, int*, int*, int*, int)
static unsigned char *stbi__load_flip(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   unsigned char *result = stbi__load_main(s, x, y, comp, req_comp);

   if (stbi__vertically_flip_on_load && result != NULL) {
      int w = *x, h = *y;
      int depth = req_comp ? req_comp : *comp;
      int row,col,z;
      stbi_uc temp;

      // @OPTIMIZE: use a bigger temp buffer and memcpy multiple pixels at once
      for (row = 0; row < (h>>1); row++) {
         for (col = 0; col < w; col++) {
            for (z = 0; z < depth; z++) {
               temp = result[(row * w + col) * depth + z];
               result[(row * w + col) * depth + z] = result[((h - row - 1) * w + col) * depth + z];
               result[((h - row - 1) * w + col) * depth + z] = temp;
            }
         }
      }
   }

   return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
callq 0x125df
movq %rax, (%rsp)
testq %rax, %rax
je 0x1013b
cmpl $0x0, 0x1835b(%rip)     # 0x28410
je 0x1013b
movl (%r12), %ecx
testl %ebx, %ebx
jne 0x100c6
movl (%r15), %ebx
movl %ecx, %edi
sarl %edi
testl %edi, %edi
jle 0x1013b
movslq (%r14), %rdx
movslq %ebx, %rsi
movl %edi, %eax
movl %esi, %r8d
decl %ecx
imull %edx, %ecx
movq %rsi, %r9
imulq %rdx, %r9
xorl %r10d, %r10d
movq (%rsp), %r11
testl %edx, %edx
jle 0x1012e
movslq %ecx, %r14
imulq %rsi, %r14
addq (%rsp), %r14
movq %r11, %r15
xorl %r12d, %r12d
testl %ebx, %ebx
jle 0x10120
xorl %r13d, %r13d
movb (%r15,%r13), %bpl
movb (%r14,%r13), %dil
movb %dil, (%r15,%r13)
movb %bpl, (%r14,%r13)
incq %r13
cmpq %r13, %r8
jne 0x10108
incq %r12
addq %rsi, %r14
addq %rsi, %r15
cmpq %rdx, %r12
jne 0x10101
incq %r10
subl %edx, %ecx
addq %r9, %r11
cmpq %rax, %r10
jne 0x100ec
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__start_callbacks(stbi__context*, stbi_io_callbacks*, void*)
static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user)
{
   s->io = *c;
   s->io_user_data = user;
   s->buflen = sizeof(s->buffer_start);
   s->read_from_callbacks = 1;
   s->img_buffer_original = s->buffer_start;
   stbi__refill_buffer(s);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rdi)
movups (%rsi), %xmm0
movups %xmm0, 0x10(%rdi)
movq %rdx, 0x28(%rdi)
movabsq $0x8000000001, %rax     # imm = 0x8000000001
movq %rax, 0x30(%rdi)
leaq 0x38(%rdi), %r14
movq %r14, 0xc8(%rdi)
movq %rdx, %rdi
movq %r14, %rsi
movl $0x80, %edx
callq *0x10(%rbx)
testl %eax, %eax
je 0x1024c
movq %r14, 0xb8(%rbx)
cltq
addq %r14, %rax
movq %rax, 0xc0(%rbx)
jmp 0x10269
movl $0x0, 0x30(%rbx)
movq %r14, 0xb8(%rbx)
leaq 0x39(%rbx), %rax
movq %rax, 0xc0(%rbx)
movb $0x0, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/src/thermalPrinter.cpp
// Function: ThermalPrinter::setControlParameter(unsigned char, unsigned char, unsigned char)
void ThermalPrinter::setControlParameter(uint8_t maxHeatingDots, uint8_t heatingTime, uint8_t heatingInterval) {
    write(27,55);
    write(maxHeatingDots);
    write(heatingTime);
    write(heatingInterval);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5(%rsp), %r14
movb %sil, (%r14)
leaq 0x4(%rsp), %r15
movb %dl, (%r15)
leaq 0x3(%rsp), %r12
movb %cl, (%r12)
leaq 0x6(%rsp), %rsi
movw $0x371b, (%rsi)         # imm = 0x371B
movl $0x2, %edx
callq 0x12594
movl $0x478, %edi            # imm = 0x478
callq 0x8490
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11cc4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11cc4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11cc4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/src/thermalPrinter.cpp
// Function: ThermalPrinter::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ThermalPrinter::print(const std::string& _text){
    if (bConnected) 
    {
        // Characters perline
        uint nCharByLine = 32;

        uint index = 0;
        while (index+nCharByLine < _text.size()){
            std::string rta = _text.substr(index,nCharByLine);
            port->write(rta);
            usleep(BYTE_TIME*_text.size());
            index += nCharByLine;
        }

        uint rest = _text.size() % nCharByLine;
        std::string remainer = _text.substr(index,rest);
        // for(uint i = 0; i < nCharByLine-rest; i++){
        //     remainer += " ";
        // }
        port->write(remainer);
        usleep(BYTE_TIME*_text.size());
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
cmpb $0x1, 0x10(%rdi)
jne 0x12130
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rcx
xorl %r15d, %r15d
cmpq $0x21, %rcx
jb 0x120e9
leaq 0x10(%rsp), %r13
movq %rsp, %r12
movl %r15d, %edx
movl $0x20, %ecx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8340
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0xb0ea
imull $0x23c, 0x8(%rbx), %edi # imm = 0x23C
callq 0x8490
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x120d5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8320
leal 0x40(%r15), %eax
movq 0x8(%rbx), %rcx
addl $0x20, %r15d
cmpq %rax, %rcx
ja 0x12094
movl %r15d, %r15d
andl $0x1f, %ecx
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x8340
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0xb0ea
imull $0x23c, 0x8(%rbx), %edi # imm = 0x23C
callq 0x8490
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12130
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8320
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x1215d
jmp 0x1216a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1216a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8320
movq %rbx, %rdi
callq 0x8600
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/src/thermalPrinter.cpp
// Function: ThermalPrinter::printBar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BarcodeType)
void ThermalPrinter::printBar(const std::string &data, BarcodeType type) {
    if(bConnected){
        write(29, 107, type);
        port->write(data);
        usleep(BYTE_TIME*data.size());
        write(0);
    }
}

// Assembly:
cmpb $0x1, 0x10(%rdi)
jne 0x121d3
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5(%rsp), %rsi
movw $0x6b1d, (%rsi)         # imm = 0x6B1D
movb %dl, 0x2(%rsi)
movl $0x3, %edx
callq 0x12594
movl $0x6b4, %edi            # imm = 0x6B4
callq 0x8490
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0xb0ea
imull $0x23c, 0x8(%r14), %edi # imm = 0x23C
callq 0x8490
leaq 0x4(%rsp), %rsi
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0x11cc4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/src/thermalPrinter.cpp
// Function: ThermalPrinter::writeBytesRow(unsigned char const*, int)
void ThermalPrinter::writeBytesRow(const uint8_t *_array, int _width) {
    if(bConnected){
        if(_width>48)
            _width = 48;
        
        const uint8_t command[4] = {18, 42, 1, (uint8_t)_width};
        port->write(command, 4);
        usleep(BYTE_TIME*4);
        
        port->write(_array,_width);
        usleep(BYTE_TIME*_width);
    }
}

// Assembly:
cmpb $0x1, 0x10(%rdi)
jne 0x12593
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x30, %edx
movl $0x30, %ebp
cmovll %edx, %ebp
leaq 0xc(%rsp), %rsi
movw $0x2a12, (%rsi)         # imm = 0x2A12
movb $0x1, 0x2(%rsi)
movb %bpl, 0x3(%rsi)
movq 0x8(%rdi), %rdi
movl $0x4, %edx
callq 0xb1c0
movl $0x8f0, %edi            # imm = 0x8F0
callq 0x8490
movq 0x8(%r14), %rdi
movslq %ebp, %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0xb1c0
imull $0x23c, %r14d, %edi     # imm = 0x23C
callq 0x8490
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__pnm_load(stbi__context*, int*, int*, int*, int)
static stbi_uc *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   stbi_uc *out;
   if (!stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n))
      return 0;
   *x = s->img_x;
   *y = s->img_y;
   *comp = s->img_n;

   out = (stbi_uc *) stbi__malloc(s->img_n * s->img_x * s->img_y);
   if (!out) return stbi__errpuc("outofmem", "Out of memory");
   stbi__getn(s, out, s->img_n * s->img_x * s->img_y);

   if (req_comp && req_comp != s->img_n) {
      out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y);
      if (out == NULL) return out; // stbi__convert_format frees input on failure
   }
   return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
leaq 0x4(%rdi), %rdx
leaq 0x8(%rdi), %r15
movq %rdi, %rsi
movq %r15, %rcx
callq 0x1ec0c
testl %eax, %eax
je 0x1846b
movl (%r14), %eax
movl %eax, (%rbp)
movl 0x4(%r14), %eax
movl %eax, (%r13)
movl 0x8(%r14), %eax
movl %eax, (%r12)
movl (%r14), %r13d
imull 0x8(%r14), %r13d
imull 0x4(%r14), %r13d
movq %r13, %rdi
callq 0x8430
testq %rax, %rax
je 0x1845d
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movl %r13d, %edx
callq 0x1d2f6
testl %ebx, %ebx
je 0x1846e
movl (%r15), %esi
cmpl %ebx, %esi
je 0x1846e
movl (%r14), %ecx
movl 0x4(%r14), %r8d
movq %r12, %rdi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1ce9a
leaq 0x9b23(%rip), %rax      # 0x21f87
movq %rax, 0xff9d(%rip)      # 0x28408
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__decode_jpeg_header(stbi__jpeg*, int)
static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan)
{
   int m;
   z->marker = STBI__MARKER_none; // initialize cached marker to empty
   m = stbi__get_marker(z);
   if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG");
   if (scan == STBI__SCAN_type) return 1;
   m = stbi__get_marker(z);
   while (!stbi__SOF(m)) {
      if (!stbi__process_marker(z,m)) return 0;
      m = stbi__get_marker(z);
      while (m == STBI__MARKER_none) {
         // some files have extra padding after their blocks, so ok, we'll scan
         if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG");
         m = stbi__get_marker(z);
      }
   }
   z->progressive = stbi__SOF_progressive(m);
   if (!stbi__process_frame_header(z, scan)) return 0;
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movb $-0x1, 0x4728(%rdi)
callq 0x1a0a3
cmpb $-0x28, %al
jne 0x19a56
movl $0x1, %ebp
cmpl $0x1, %ebx
je 0x19a66
movq %r14, %rdi
callq 0x1a0a3
movzbl %al, %esi
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0xc0, %ecx
sete %cl
cmpb $-0x3e, %sil
sete %dl
orb %cl, %dl
jne 0x19a34
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x1a1d5
testl %eax, %eax
je 0x19a66
movq %r14, %rdi
callq 0x1a0a3
cmpb $-0x1, %al
jne 0x19a20
movq (%r14), %r15
cmpq $0x0, 0x10(%r15)
je 0x19a0e
movq 0x28(%r15), %rdi
callq *0x20(%r15)
testl %eax, %eax
je 0x199e5
cmpl $0x0, 0x30(%r15)
je 0x19a73
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0x199e5
jmp 0x19a73
cmpb $-0x3e, %al
je 0x19a34
movzbl %al, %esi
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0xc0, %ecx
jne 0x199d5
xorl %ecx, %ecx
cmpb $-0x3e, %al
sete %cl
movl %ecx, 0x4730(%r14)
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1a7c2
leaq 0x8453(%rip), %rax      # 0x21eb0
movq %rax, 0xe9a4(%rip)      # 0x28408
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x843d(%rip), %rax      # 0x21eb7
movq %rax, 0xe987(%rip)      # 0x28408
jmp 0x19a66
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__YCbCr_to_RGB_row(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int)
static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step)
{
   int i;
   for (i=0; i < count; ++i) {
      int y_fixed = (y[i] << 20) + (1<<19); // rounding
      int r,g,b;
      int cr = pcr[i] - 128;
      int cb = pcb[i] - 128;
      r = y_fixed +  cr* float2fixed(1.40200f);
      g = y_fixed + (cr*-float2fixed(0.71414f)) + ((cb*-float2fixed(0.34414f)) & 0xffff0000);
      b = y_fixed                               +   cb* float2fixed(1.77200f);
      r >>= 20;
      g >>= 20;
      b >>= 20;
      if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
      if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
      if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
      out[0] = (stbi_uc)r;
      out[1] = (stbi_uc)g;
      out[2] = (stbi_uc)b;
      out[3] = 255;
      out += step;
   }
}

// Assembly:
testl %r8d, %r8d
jle 0x19ff8
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %r9d, %rax
movl %r8d, %r8d
addq $0x3, %rdi
xorl %r9d, %r9d
xorl %r10d, %r10d
movl $0xff, %ebp
movzbl (%rsi,%r10), %ebx
shll $0x14, %ebx
movzbl (%rcx,%r10), %r14d
addl $-0x80, %r14d
imull $0x166f00, %r14d, %r11d # imm = 0x166F00
addl %ebx, %r11d
addl $0x80000, %r11d         # imm = 0x80000
sarl $0x14, %r11d
testl %r11d, %r11d
cmovlel %r9d, %r11d
cmpl %ebp, %r11d
jl 0x19f6e
movl $0xff, %r11d
movzbl (%rdx,%r10), %r15d
addl $-0x80, %r15d
imull $0xfff49300, %r14d, %r14d # imm = 0xFFF49300
leal (%r14,%rbx), %r12d
addl $0x80000, %r12d         # imm = 0x80000
imull $0xfffa7e00, %r15d, %r14d # imm = 0xFFFA7E00
andl $0xffff0000, %r14d      # imm = 0xFFFF0000
addl %r12d, %r14d
sarl $0x14, %r14d
testl %r14d, %r14d
jg 0x19fa6
xorl %r14d, %r14d
cmpl %ebp, %r14d
jl 0x19fb1
movl $0xff, %r14d
imull $0x1c5a00, %r15d, %r15d # imm = 0x1C5A00
addl %r15d, %ebx
addl $0x80000, %ebx          # imm = 0x80000
sarl $0x14, %ebx
testl %ebx, %ebx
cmovlel %r9d, %ebx
cmpl %ebp, %ebx
jl 0x19fd3
movl $0xff, %ebx
movb %r11b, -0x3(%rdi)
movb %r14b, -0x2(%rdi)
movb %bl, -0x1(%rdi)
movb $-0x1, (%rdi)
incq %r10
addq %rax, %rdi
cmpq %r10, %r8
jne 0x19f36
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__build_huffman(stbi__huffman*, int*)
static int stbi__build_huffman(stbi__huffman *h, int *count)
{
   int i,j,k=0,code;
   // build size list for each symbol (from JPEG spec)
   for (i=0; i < 16; ++i)
      for (j=0; j < count[i]; ++j)
         h->size[k++] = (stbi_uc) (i+1);
   h->size[k] = 0;

   // compute actual symbols (from jpeg spec)
   code = 0;
   k = 0;
   for(j=1; j <= 16; ++j) {
      // compute delta to add to code to compute symbol id
      h->delta[j] = k - code;
      if (h->size[k] == j) {
         while (h->size[k] == j)
            h->code[k++] = (stbi__uint16) (code++);
         if (code-1 >= (1 << j)) return stbi__err("bad code lengths","Corrupt JPEG");
      }
      // compute largest code + 1 for this size, preshifted as needed later
      h->maxcode[j] = code << (16-j);
      code <<= 1;
   }
   h->maxcode[j] = 0xffffffff;

   // build non-spec acceleration table; 255 is flag for not-accelerated
   memset(h->fast, 255, 1 << FAST_BITS);
   for (i=0; i < k; ++i) {
      int s = h->size[i];
      if (s <= FAST_BITS) {
         int c = h->code[i] << (FAST_BITS-s);
         int m = 1 << (FAST_BITS-s);
         for (j=0; j < m; ++j) {
            h->fast[c+j] = (stbi_uc) i;
         }
      }
   }
   return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x500(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x0, (%rsi,%rcx,4)
jle 0x1afd3
leal 0x1(%rcx), %edi
movslq %edx, %r8
addq %rax, %r8
xorl %r9d, %r9d
movb %dil, (%r8,%r9)
incq %r9
cmpl (%rsi,%rcx,4), %r9d
jl 0x1afc3
addl %r9d, %edx
incq %rcx
cmpq $0x10, %rcx
jne 0x1afb1
movslq %edx, %rax
movb $0x0, 0x500(%rbx,%rax)
xorl %edx, %edx
movl $0x1, %eax
xorl %ebp, %ebp
movl %ebp, %ecx
subl %edx, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %ebp, %rcx
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x1b045
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x1b034
movw %dx, 0x200(%rbx,%rcx,2)
incl %edx
movzbl 0x501(%rbx,%rcx), %esi
incq %rcx
cmpq %rsi, %rax
je 0x1b018
movl %ecx, %ebp
movl $0x1, %esi
movl %eax, %ecx
shll %cl, %esi
cmpl %esi, %edx
jg 0x1b0cc
movb $0x10, %cl
subb %al, %cl
movl %edx, %esi
shll %cl, %esi
movl %esi, 0x604(%rbx,%rax,4)
addl %edx, %edx
incq %rax
cmpq $0x11, %rax
jne 0x1aff0
movl $0xffffffff, 0x648(%rbx) # imm = 0xFFFFFFFF
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0x81d0
movl $0x1, %eax
testl %ebp, %ebp
jle 0x1b0dc
movl %ebp, %edx
xorl %esi, %esi
movzbl 0x500(%rbx,%rsi), %r8d
cmpq $0x9, %r8
ja 0x1b0c2
movzwl 0x200(%rbx,%rsi,2), %edi
movl $0x9, %ecx
subq %r8, %rcx
shlq %cl, %rdi
addq %rbx, %rdi
xorl %r8d, %r8d
movb %sil, (%rdi,%r8)
incq %r8
movl %r8d, %r9d
shrl %cl, %r9d
testl %r9d, %r9d
je 0x1b0b0
incq %rsi
cmpq %rdx, %rsi
jne 0x1b088
jmp 0x1b0dc
leaq 0x6e31(%rip), %rax      # 0x21f04
movq %rax, 0xd32e(%rip)      # 0x28408
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__cleanup_jpeg(stbi__jpeg*)
static void stbi__cleanup_jpeg(stbi__jpeg *j)
{
   int i;
   for (i=0; i < j->s->img_n; ++i) {
      if (j->img_comp[i].raw_data) {
         STBI_FREE(j->img_comp[i].raw_data);
         j->img_comp[i].raw_data = NULL;
         j->img_comp[i].data = NULL;
      }
      if (j->img_comp[i].raw_coeff) {
         STBI_FREE(j->img_comp[i].raw_coeff);
         j->img_comp[i].raw_coeff = 0;
         j->img_comp[i].coeff = 0;
      }
      if (j->img_comp[i].linebuf) {
         STBI_FREE(j->img_comp[i].linebuf);
         j->img_comp[i].linebuf = NULL;
      }
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
cmpl $0x0, 0x8(%rax)
jle 0x1b1a6
movq %rdi, %rbx
leaq 0x45f0(%rdi), %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x1b168
callq 0x83f0
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%r14)
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0x1b17d
callq 0x83f0
movq %r15, -0x10(%r14)
movq %r15, (%r14)
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x1b193
callq 0x83f0
movq $0x0, -0x8(%r14)
incq %r12
movq (%rbx), %rax
movslq 0x8(%rax), %rax
addq $0x60, %r14
cmpq %rax, %r12
jl 0x1b152
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__grow_buffer_unsafe(stbi__jpeg*)
static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
{
   do {
      int b = j->nomore ? 0 : stbi__get8(j->s);
      if (b == 0xff) {
         int c = stbi__get8(j->s);
         if (c != 0) {
            j->marker = (unsigned char) c;
            j->nomore = 1;
            return;
         }
      }
      j->code_buffer |= b << (24 - j->code_bits);
      j->code_bits += 8;
   } while (j->code_bits <= 24);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
cmpl $0x0, 0x472c(%rbx)
jne 0x1b876
movq (%rbx), %r15
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0x1b868
cmpl $0x0, 0x30(%r15)
je 0x1b876
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %r14
movl 0x34(%r15), %edx
movq %r14, %rsi
callq *0x10(%r15)
testl %eax, %eax
je 0x1b842
movq %r14, 0xb8(%r15)
cltq
addq %r14, %rax
movq %rax, 0xc0(%r15)
jmp 0x1b861
movl $0x0, 0x30(%r15)
movq %r14, 0xb8(%r15)
leaq 0x39(%r15), %rax
movq %rax, 0xc0(%r15)
movb $0x0, 0x38(%r15)
movq 0xb8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r15)
movzbl (%rax), %ebp
cmpl $0xff, %ebp
jne 0x1b903
movq (%rbx), %r15
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0x1b8f2
cmpl $0x0, 0x30(%r15)
je 0x1b8c8
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %r14
movl 0x34(%r15), %edx
movq %r14, %rsi
callq *0x10(%r15)
testl %eax, %eax
je 0x1b8cc
movq %r14, 0xb8(%r15)
cltq
addq %r14, %rax
movq %rax, 0xc0(%r15)
jmp 0x1b8eb
xorl %eax, %eax
jmp 0x1b8ff
movl $0x0, 0x30(%r15)
movq %r14, 0xb8(%r15)
leaq 0x39(%r15), %rax
movq %rax, 0xc0(%r15)
movb $0x0, 0x38(%r15)
movq 0xb8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r15)
movb (%rax), %al
testb %al, %al
jne 0x1b929
movl 0x4724(%rbx), %eax
movb $0x18, %cl
subb %al, %cl
shll %cl, %ebp
orl %ebp, 0x4720(%rbx)
leal 0x8(%rax), %ecx
movl %ecx, 0x4724(%rbx)
cmpl $0x11, %eax
jl 0x1b7f1
jmp 0x1b939
movb %al, 0x4728(%rbx)
movl $0x1, 0x472c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__bitcount(unsigned int)
static int stbi__bitcount(unsigned int a)
{
   a = (a & 0x55555555) + ((a >>  1) & 0x55555555); // max 2
   a = (a & 0x33333333) + ((a >>  2) & 0x33333333); // max 4
   a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
   a = (a + (a >> 8)); // max 16 per 8 bits
   a = (a + (a >> 16)); // max 32 per 8 bits
   return a & 0xff;
}

// Assembly:
movl $0x55555555, %eax       # imm = 0x55555555
movl %edi, %ecx
andl %eax, %ecx
shrl %edi
andl %eax, %edi
addl %ecx, %edi
movl $0x33333333, %eax       # imm = 0x33333333
movl %edi, %ecx
andl %eax, %ecx
shrl $0x2, %edi
andl %eax, %edi
addl %ecx, %edi
movl %edi, %eax
shrl $0x4, %eax
addl %edi, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
movl %eax, %ecx
shrl $0x8, %ecx
addl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
addl %ecx, %eax
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__out_gif_code(stbi__gif*, unsigned short)
static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
{
   stbi_uc *p, *c;

   // recurse to decode the prefixes, since the linked-list is backwards,
   // and working backwards through an interleaved image would be nasty
   if (g->codes[code].prefix >= 0)
      stbi__out_gif_code(g, g->codes[code].prefix);

   if (g->cur_y >= g->max_y) return;

   p = &g->out[g->cur_x + g->cur_y];
   c = &g->color_table[g->codes[code].suffix * 4];

   if (c[3] >= 128) {
      p[0] = c[2];
      p[1] = c[1];
      p[2] = c[0];
      p[3] = c[3];
   }
   g->cur_x += 4;

   if (g->cur_x >= g->max_x) {
      g->cur_x = g->start_x;
      g->cur_y += g->step;

      while (g->cur_y >= g->max_y && g->parse > 0) {
         g->step = (1 << g->parse) * g->line_size;
         g->cur_y = g->start_y + (g->step >> 1);
         --g->parse;
      }
   }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
movzwl 0x824(%rdi,%r14,4), %eax
testw %ax, %ax
js 0x1e97a
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x1e957
movslq 0x4850(%rbx), %rcx
cmpl 0x4848(%rbx), %ecx
jge 0x1ea41
movq 0x4828(%rbx), %rax
movzbl 0x827(%rbx,%r14,4), %edx
cmpb $0x0, 0x3(%rax,%rdx,4)
jns 0x1e9d0
movq 0x8(%rbx), %rsi
movslq 0x484c(%rbx), %rdi
addq %rcx, %rdi
movb 0x2(%rax,%rdx,4), %cl
movb %cl, (%rsi,%rdi)
movb 0x1(%rax,%rdx,4), %cl
movb %cl, 0x1(%rsi,%rdi)
movb (%rax,%rdx,4), %cl
movb %cl, 0x2(%rsi,%rdi)
movb 0x3(%rax,%rdx,4), %al
movb %al, 0x3(%rsi,%rdi)
movl 0x484c(%rbx), %eax
addl $0x4, %eax
movl %eax, 0x484c(%rbx)
cmpl 0x4844(%rbx), %eax
jl 0x1ea41
movl 0x483c(%rbx), %ecx
movl 0x4848(%rbx), %eax
movl %ecx, 0x484c(%rbx)
movl 0x4850(%rbx), %ecx
addl 0x4834(%rbx), %ecx
movl %ecx, 0x4850(%rbx)
cmpl %eax, %ecx
jl 0x1ea41
movl 0x4830(%rbx), %ecx
testl %ecx, %ecx
jle 0x1ea41
movl 0x4854(%rbx), %edx
shll %cl, %edx
movl %edx, 0x4834(%rbx)
sarl %edx
addl 0x4840(%rbx), %edx
movl %edx, 0x4850(%rbx)
decl %ecx
movl %ecx, 0x4830(%rbx)
cmpl %eax, %edx
jge 0x1ea15
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__fill_bits(stbi__zbuf*)
static void stbi__fill_bits(stbi__zbuf *z)
{
   do {
      STBI_ASSERT(z->code_buffer < (1U << z->num_bits));
      z->code_buffer |= stbi__zget8(z) << z->num_bits;
      z->num_bits += 8;
   } while (z->num_bits <= 24);
}

// Assembly:
pushq %rax
movl 0x10(%rdi), %ecx
movl 0x14(%rdi), %eax
movl %eax, %edx
shrl %cl, %edx
testl %edx, %edx
jne 0x1f89c
movq (%rdi), %rsi
xorl %edx, %edx
cmpq 0x8(%rdi), %rsi
jae 0x1f886
leaq 0x1(%rsi), %rdx
movq %rdx, (%rdi)
movzbl (%rsi), %edx
shll %cl, %edx
orl %edx, %eax
movl %eax, 0x14(%rdi)
leal 0x8(%rcx), %edx
movl %edx, 0x10(%rdi)
cmpl $0x11, %ecx
movl %edx, %ecx
jl 0x1f869
popq %rax
retq
leaq 0x2dc0(%rip), %rdi      # 0x22663
leaq 0x27ad(%rip), %rsi      # 0x22057
leaq 0x2dd7(%rip), %rcx      # 0x22688
movl $0xdd8, %edx            # imm = 0xDD8
callq 0x8210
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__zexpand(stbi__zbuf*, char*, int)
static int stbi__zexpand(stbi__zbuf *z, char *zout, int n)  // need to make room for n bytes
{
   char *q;
   int cur, limit;
   z->zout = zout;
   if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG");
   cur   = (int) (z->zout     - z->zout_start);
   limit = (int) (z->zout_end - z->zout_start);
   while (cur + n > limit)
      limit *= 2;
   q = (char *) STBI_REALLOC(z->zout_start, limit);
   if (q == NULL) return stbi__err("outofmem", "Out of memory");
   z->zout_start = q;
   z->zout       = q + cur;
   z->zout_end   = q + limit;
   return 1;
}

// Assembly:
movq %rsi, 0x18(%rdi)
cmpl $0x0, 0x30(%rdi)
je 0x1f914
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
subq %rdi, %r14
movl 0x28(%rbx), %eax
subl %edi, %eax
addl %r14d, %edx
movl %eax, %ecx
leal (%rcx,%rcx), %eax
cmpl %ecx, %edx
jg 0x1f8df
movslq %ecx, %r15
movq %r15, %rsi
callq 0x8590
testq %rax, %rax
je 0x1f925
movq %rax, 0x20(%rbx)
movslq %r14d, %rcx
addq %rax, %rcx
movq %rcx, 0x18(%rbx)
addq %rax, %r15
movq %r15, 0x28(%rbx)
movl $0x1, %eax
jmp 0x1f935
leaq 0x2df0(%rip), %rax      # 0x2270b
movq %rax, 0x8ae6(%rip)      # 0x28408
xorl %eax, %eax
retq
leaq 0x265b(%rip), %rax      # 0x21f87
movq %rax, 0x8ad5(%rip)      # 0x28408
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__psd_info(stbi__context*, int*, int*, int*)
static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
{
   int channelCount;
   if (stbi__get32be(s) != 0x38425053) {
       stbi__rewind( s );
       return 0;
   }
   if (stbi__get16be(s) != 1) {
       stbi__rewind( s );
       return 0;
   }
   stbi__skip(s, 6);
   channelCount = stbi__get16be(s);
   if (channelCount < 0 || channelCount > 16) {
       stbi__rewind( s );
       return 0;
   }
   *y = stbi__get32be(s);
   *x = stbi__get32be(s);
   if (stbi__get16be(s) != 8) {
       stbi__rewind( s );
       return 0;
   }
   if (stbi__get16be(s) != 3) {
       stbi__rewind( s );
       return 0;
   }
   *comp = 4;
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1aea1
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x1aea1
orl %ebp, %eax
cmpl $0x38425053, %eax       # imm = 0x38425053
jne 0x1fa25
movq %rbx, %rdi
callq 0x1aea1
cmpl $0x1, %eax
jne 0x1fa25
cmpq $0x0, 0x10(%rbx)
je 0x1f9b3
movq 0xc0(%rbx), %rcx
movl 0xb8(%rbx), %edx
movl %ecx, %eax
subl %edx, %eax
cmpl $0x5, %eax
jg 0x1f9b3
movq %rcx, 0xb8(%rbx)
movq 0x28(%rbx), %rdi
movl $0x6, %esi
subl %eax, %esi
callq *0x18(%rbx)
jmp 0x1f9bb
addq $0x6, 0xb8(%rbx)
movq %rbx, %rdi
callq 0x1aea1
cmpl $0x11, %eax
jae 0x1fa25
movq %rbx, %rdi
callq 0x1aea1
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x1aea1
orl %ebp, %eax
movl %eax, (%r12)
movq %rbx, %rdi
callq 0x1aea1
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x1aea1
orl %ebp, %eax
movl %eax, (%r15)
movq %rbx, %rdi
callq 0x1aea1
cmpl $0x8, %eax
jne 0x1fa25
movq %rbx, %rdi
callq 0x1aea1
cmpl $0x3, %eax
jne 0x1fa25
movl $0x4, (%r14)
movl $0x1, %eax
jmp 0x1fa35
movq 0xc8(%rbx), %rax
movq %rax, 0xb8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq