LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::MillisecondTimer::MillisecondTimer(unsigned int)
MillisecondTimer::MillisecondTimer (const uint32_t millis)
  : expiry(timespec_now())
{
  int64_t tv_nsec = expiry.tv_nsec + (millis * 1e6);
  if (tv_nsec >= 1e9) {
    int64_t sec_diff = tv_nsec / static_cast<int> (1e9);
    expiry.tv_nsec = tv_nsec - static_cast<int> (1e9 * sec_diff);
    expiry.tv_sec += sec_diff;
  } else {
    expiry.tv_nsec = tv_nsec;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
xorl %edi, %edi
movq %r15, %rsi
callq 0x82c0
movq (%r15), %rcx
cvtsi2sdq 0x8(%r15), %xmm0
movl %r14d, %eax
cvtsi2sd %rax, %xmm1
mulsd 0x14a56(%rip), %xmm1    # 0x20160
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
cmpq $0x3b9aca00, %rsi       # imm = 0x3B9ACA00
jl 0xb74c
movq %rsi, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movabsq $0x3b9aca0000000000, %rax # imm = 0x3B9ACA0000000000
imulq %rdx, %rax
sarq $0x20, %rax
subq %rax, %rsi
addq %rdx, %rcx
movq %rcx, (%rbx)
movq %rsi, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::MillisecondTimer::remaining()
int64_t
MillisecondTimer::remaining ()
{
  timespec now(timespec_now());
  int64_t millis = (expiry.tv_sec - now.tv_sec) * 1e3;
  millis += (expiry.tv_nsec - now.tv_nsec) / 1e6;
  return millis;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x20(%rbp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x82c0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq (%r14), %rax
cvtsi2sd %rax, %xmm0
mulsd 0x149b1(%rip), %xmm0    # 0x20168
cvttsd2si %xmm0, %rax
subq 0x8(%r14), %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
divsd 0x14990(%rip), %xmm0    # 0x20160
cvtsi2sd %rax, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::SerialImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, serial::bytesize_t, serial::parity_t, serial::stopbits_t, serial::flowcontrol_t)
Serial::SerialImpl::SerialImpl (const string &port, unsigned long baudrate,
                                bytesize_t bytesize,
                                parity_t parity, stopbits_t stopbits,
                                flowcontrol_t flowcontrol)
  : port_ (port), fd_ (-1), is_open_ (false), xonxoff_ (false), rtscts_ (false),
    baudrate_ (baudrate), parity_ (parity),
    bytesize_ (bytesize), stopbits_ (stopbits), flowcontrol_ (flowcontrol)
{
  pthread_mutex_init(&this->read_mutex, NULL);
  pthread_mutex_init(&this->write_mutex, NULL);
  if (port_.empty () == false)
    open ();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movl %r8d, %r12d
movl %ecx, %r13d
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x1b41b(%rip), %rax     # 0x26c68
movq %rax, (%rdi)
addq $0x8, %rdi
leaq 0x18(%r14), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x8(%r14)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rdi, -0x38(%rbp)
movq %rax, %rsi
callq 0xa1e2
movl $0xffffffff, 0x28(%r14) # imm = 0xFFFFFFFF
movw $0x0, 0x2c(%r14)
movb $0x0, 0x2e(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movl $0x0, 0x40(%r14)
movq %rbx, 0x48(%r14)
movl %r12d, 0x54(%r14)
movl %r13d, 0x58(%r14)
movl %r15d, 0x5c(%r14)
movl 0x10(%rbp), %eax
movl %eax, 0x60(%r14)
leaq 0x68(%r14), %rdi
xorl %esi, %esi
callq 0x84d0
leaq 0x90(%r14), %rdi
xorl %esi, %esi
callq 0x84d0
cmpq $0x0, 0x10(%r14)
je 0xb8d9
movq %r14, %rdi
callq 0xb910
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
cmpq -0x30(%rbp), %rdi
je 0xb907
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8310
movq %r14, %rdi
callq 0x85f0
nop
// File: /workspace/github_c_makefile_star2_O3/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::open()
void
Serial::SerialImpl::open ()
{
  if (port_.empty ()) {
    throw invalid_argument ("Empty port is invalid.");
  }
  if (is_open_ == true) {
    throw SerialException ("Serial port already open.");
  }

  fd_ = ::open (port_.c_str(), O_RDWR | O_NOCTTY | O_NONBLOCK);

  if (fd_ == -1) {
    switch (errno) {
    case EINTR:
      // Recurse because this is a recoverable error.
      open ();
      return;
    case ENFILE:
    case EMFILE:
      THROW (IOException, "Too many file handles open.");
    default:
      THROW (IOException, errno);
    }
  }

  reconfigurePort();
  is_open_ = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x10(%rbx)
je 0xb9ec
cmpb $0x1, 0x2c(%rbx)
je 0xba18
movq 0x8(%rbx), %rdi
movl $0x902, %esi            # imm = 0x902
xorl %eax, %eax
callq 0x8250
movl %eax, 0x28(%rbx)
cmpl $-0x1, %eax
jne 0xb9d3
callq 0x8060
movq %rax, %r15
movl (%rax), %eax
cmpl $0x4, %eax
je 0xb922
addl $-0x17, %eax
movl $0x58, %edi
cmpl $0x1, %eax
ja 0xba4a
callq 0x8190
movq %rax, %r14
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x14888(%rip), %rsi     # 0x20212
leaq 0x14897(%rip), %rdx     # 0x20228
leaq -0x60(%rbp), %rdi
callq 0x9f1e
movb $0x1, %r12b
leaq 0x14885(%rip), %rcx     # 0x20229
leaq -0x60(%rbp), %rsi
movq %r14, %rdi
movl $0x96, %edx
callq 0xe284
xorl %r12d, %r12d
leaq 0x1b2e1(%rip), %rsi     # 0x26ca0
leaq 0x2ac0(%rip), %rdx      # 0xe486
movq %r14, %rdi
callq 0x85b0
jmp 0xbaa2
movq %rbx, %rdi
callq 0xbc4a
movb $0x1, 0x2c(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x8190
movq %rax, %r14
leaq 0x147e1(%rip), %rsi     # 0x201e1
movq %rax, %rdi
callq 0x8660
movq 0x1b5c9(%rip), %rsi     # 0x26fd8
movq 0x1b5b2(%rip), %rdx     # 0x26fc8
jmp 0xba42
movl $0x28, %edi
callq 0x8190
movq %rax, %r14
leaq 0x147cc(%rip), %rsi     # 0x201f8
movq %rax, %rdi
callq 0xe0e2
leaq 0x1b24d(%rip), %rsi     # 0x26c88
leaq 0x2808(%rip), %rdx      # 0xe24a
movq %r14, %rdi
callq 0x85b0
callq 0x8190
movq %rax, %r14
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x147b0(%rip), %rsi     # 0x20212
leaq 0x147bf(%rip), %rdx     # 0x20228
leaq -0x40(%rbp), %rdi
callq 0x9f1e
movl (%r15), %ecx
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
movl $0x98, %edx
callq 0xe4d8
xorl %r15d, %r15d
leaq 0x1b20d(%rip), %rsi     # 0x26ca0
leaq 0x29ec(%rip), %rdx      # 0xe486
movq %r14, %rdi
callq 0x85b0
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xbaba
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r15b, %r15b
jne 0xbae9
jmp 0xbaf1
jmp 0xbae6
jmp 0xbae6
jmp 0xbae6
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0xbadf
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r12b, %r12b
jne 0xbae9
jmp 0xbaf1
movq %rax, %rbx
movq %r14, %rdi
callq 0x8240
movq %rbx, %rdi
callq 0x85f0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xbb88
movq %rdi, %rbx
movl 0x28(%rdi), %edi
cmpl $-0x1, %edi
je 0xbb84
callq 0x8680
testl %eax, %eax
jne 0xbb95
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 0x8190
movq %rax, %rbx
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x14661(%rip), %rsi     # 0x20212
leaq 0x14670(%rip), %rdx     # 0x20228
leaq -0x40(%rbp), %rdi
callq 0x9f1e
callq 0x8060
movl (%rax), %ecx
movb $0x1, %r12b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
movl $0x1d1, %edx            # imm = 0x1D1
callq 0xe4d8
xorl %r12d, %r12d
leaq 0x1b0ba(%rip), %rsi     # 0x26ca0
leaq 0x2899(%rip), %rdx      # 0xe486
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xbc0d
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r12b, %r12b
jne 0xbc17
jmp 0xbc1f
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
movq %r14, %rdi
callq 0x85f0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xc48f
leaq -0x24(%rbp), %rdx
movl $0x0, (%rdx)
movl 0x28(%rdi), %edi
movl $0x541b, %esi           # imm = 0x541B
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
je 0xc49e
movslq -0x24(%rbp), %rax
jmp 0xc491
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x58, %edi
callq 0x8190
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x13d58(%rip), %rsi     # 0x20212
leaq 0x13d67(%rip), %rdx     # 0x20228
leaq -0x48(%rbp), %rdi
callq 0x9f1e
callq 0x8060
movl (%rax), %ecx
movb $0x1, %r12b
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
movl $0x1e6, %edx            # imm = 0x1E6
callq 0xe4d8
xorl %r12d, %r12d
leaq 0x1a7b1(%rip), %rsi     # 0x26ca0
leaq 0x1f90(%rip), %rdx      # 0xe486
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0xc516
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r12b, %r12b
jne 0xc520
jmp 0xc528
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
movq %r14, %rdi
callq 0x85f0
// File: /workspace/github_c_makefile_star2_O3/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 0x8470
cmpl $-0x1, %eax
je 0xd6dc
movb $0x1, %al
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %r14
leaq 0x12f60(%rip), %rsi     # 0x20656
movl $0x32, %edx
movq %r14, %rdi
callq 0x83b0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85c0
movq %rax, %r14
leaq 0x12f35(%rip), %rsi     # 0x20654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83b0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82e0
movl $0x28, %edi
callq 0x8190
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8550
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe0e2
xorl %r15d, %r15d
leaq 0x19514(%rip), %rsi     # 0x26c88
leaq 0xacf(%rip), %rdx       # 0xe24a
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd79f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r15b, %r15b
jne 0xd7a9
jmp 0xd7b6
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xd7b6
movq %rax, %r14
movq 0x197e3(%rip), %rsi     # 0x26fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8260
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x85f0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xd823
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
je 0xd855
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 0x8190
movq %rax, %rbx
leaq 0x12e52(%rip), %rsi     # 0x20689
movq %rax, %rdi
callq 0xe70c
leaq 0x19472(%rip), %rsi     # 0x26cb8
leaq 0x1027(%rip), %rdx      # 0xe874
movq %rbx, %rdi
callq 0x85b0
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %r14
leaq 0x12e29(%rip), %rsi     # 0x20698
movl $0x2c, %edx
movq %r14, %rdi
callq 0x83b0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85c0
movq %rax, %r14
leaq 0x12dbc(%rip), %rsi     # 0x20654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83b0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82e0
movl $0x28, %edi
callq 0x8190
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8550
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe0e2
xorl %r15d, %r15d
leaq 0x1939b(%rip), %rsi     # 0x26c88
leaq 0x956(%rip), %rdx       # 0xe24a
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd918
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r15b, %r15b
jne 0xd922
jmp 0xd93c
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xd93c
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xd95b
movq %rax, %r14
movq 0x1965d(%rip), %rsi     # 0x26fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8260
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x85f0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xd9a9
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
je 0xd9db
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 0x8190
movq %rax, %rbx
leaq 0x12d08(%rip), %rsi     # 0x206c5
movq %rax, %rdi
callq 0xe70c
leaq 0x192ec(%rip), %rsi     # 0x26cb8
leaq 0xea1(%rip), %rdx       # 0xe874
movq %rbx, %rdi
callq 0x85b0
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %r14
leaq 0x12cdf(%rip), %rsi     # 0x206d4
movl $0x2c, %edx
movq %r14, %rdi
callq 0x83b0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85c0
movq %rax, %r14
leaq 0x12c36(%rip), %rsi     # 0x20654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83b0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82e0
movl $0x28, %edi
callq 0x8190
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8550
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe0e2
xorl %r15d, %r15d
leaq 0x19215(%rip), %rsi     # 0x26c88
leaq 0x7d0(%rip), %rdx       # 0xe24a
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xda9e
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r15b, %r15b
jne 0xdaa8
jmp 0xdac2
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xdac2
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xdae1
movq %rax, %r14
movq 0x194d7(%rip), %rsi     # 0x26fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8260
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x85f0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xdb2c
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
je 0xdb5e
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 0x8190
movq %rax, %rbx
leaq 0x12bc1(%rip), %rsi     # 0x20701
movq %rax, %rdi
callq 0xe70c
leaq 0x19169(%rip), %rsi     # 0x26cb8
leaq 0xd1e(%rip), %rdx       # 0xe874
movq %rbx, %rdi
callq 0x85b0
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %r14
leaq 0x12b97(%rip), %rsi     # 0x2070f
movl $0x2b, %edx
movq %r14, %rdi
callq 0x83b0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85c0
movq %rax, %r14
leaq 0x12ab3(%rip), %rsi     # 0x20654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83b0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82e0
movl $0x28, %edi
callq 0x8190
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8550
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe0e2
xorl %r15d, %r15d
leaq 0x19092(%rip), %rsi     # 0x26c88
leaq 0x64d(%rip), %rdx       # 0xe24a
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdc21
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r15b, %r15b
jne 0xdc2b
jmp 0xdc45
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xdc45
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xdc64
movq %rax, %r14
movq 0x19354(%rip), %rsi     # 0x26fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8260
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x85f0
// File: /workspace/github_c_makefile_star2_O3/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 0xdcb1
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
movl $0x5415, %esi           # imm = 0x5415
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
je 0xdce3
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 0x8190
movq %rax, %rbx
leaq 0x12a76(%rip), %rsi     # 0x2073b
movq %rax, %rdi
callq 0xe70c
leaq 0x18fe4(%rip), %rsi     # 0x26cb8
leaq 0xb99(%rip), %rdx       # 0xe874
movq %rbx, %rdi
callq 0x85b0
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %r14
leaq 0x12a4c(%rip), %rsi     # 0x20749
movl $0x2b, %edx
movq %r14, %rdi
callq 0x83b0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85c0
movq %rax, %r14
leaq 0x1292e(%rip), %rsi     # 0x20654
movl $0x1, %edx
movq %rax, %rdi
callq 0x83b0
movl (%rbx), %edi
callq 0x8110
movq %r14, %rdi
movq %rax, %rsi
callq 0x82e0
movl $0x28, %edi
callq 0x8190
movq %rax, %rbx
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8550
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xe0e2
xorl %r15d, %r15d
leaq 0x18f0d(%rip), %rsi     # 0x26c88
leaq 0x4c8(%rip), %rdx       # 0xe24a
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdda6
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r15b, %r15b
jne 0xddb0
jmp 0xddca
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xddca
movq %rax, %r14
movq %rbx, %rdi
callq 0x8240
jmp 0xdde9
movq %rax, %r14
movq 0x191cf(%rip), %rsi     # 0x26fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8260
leaq -0x148(%rbp), %rdi
callq 0x8100
movq %r14, %rdi
callq 0x85f0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x18a60(%rip), %rax     # 0x26d08
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 0xa1e2
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 0x8220
leaq -0x1d0(%rbp), %r12
leaq 0x12481(%rip), %rsi     # 0x2078f
movl $0xe, %edx
movq %r12, %rdi
callq 0x83b0
testq %r13, %r13
je 0xe338
movq %r13, %rdi
callq 0x8170
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x83b0
jmp 0xe356
movq -0x1d0(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl -0x1b0(%rbp,%rax), %esi
orl $0x1, %esi
callq 0x85a0
leaq 0x12441(%rip), %rsi     # 0x2079e
movl $0x7, %edx
movq %r12, %rdi
callq 0x83b0
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r12, %rdi
callq 0x83b0
movq %rax, %r12
leaq 0x12422(%rip), %rsi     # 0x207a6
movl $0x7, %edx
movq %rax, %rdi
callq 0x83b0
movl 0x28(%rbx), %esi
movq %r12, %rdi
callq 0x85c0
leaq 0x123ea(%rip), %rsi     # 0x2078d
movl $0x1, %edx
movq %rax, %rdi
callq 0x83b0
leaq -0x1c8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x8550
leaq -0x58(%rbp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x83f0
movq (%rbx), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0xe3e7
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8310
movq 0x18bb2(%rip), %rsi     # 0x26fa0
leaq -0x1e0(%rbp), %rdi
callq 0x8260
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 0xe424
movq %rax, %r12
jmp 0xe446
movq %rax, %r12
jmp 0xe475
movq %rax, %r12
movq 0x18b72(%rip), %rsi     # 0x26fa0
leaq -0x1e0(%rbp), %rdi
callq 0x8260
leaq -0x160(%rbp), %rdi
callq 0x8100
movq (%r15), %rdi
cmpq %r14, %rdi
je 0xe459
movq (%r14), %rsi
incq %rsi
callq 0x8310
movq -0x38(%rbp), %rax
movq (%rax), %rdi
cmpq -0x30(%rbp), %rdi
je 0xe475
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8310
movq %rbx, %rdi
callq 0x8640
movq %r12, %rdi
callq 0x85f0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x122a9
movq %rax, (%rsp)
testq %rax, %rax
je 0xfcd0
cmpl $0x0, 0x177a6(%rip)     # 0x273f0
je 0xfcd0
movl (%r12), %ecx
testl %ebx, %ebx
jne 0xfc5b
movl (%r15), %ebx
movl %ecx, %edi
sarl %edi
testl %edi, %edi
jle 0xfcd0
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 0xfcc3
movslq %ecx, %r14
imulq %rsi, %r14
addq (%rsp), %r14
movq %r11, %r15
xorl %r12d, %r12d
testl %ebx, %ebx
jle 0xfcb5
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 0xfc9d
incq %r12
addq %rsi, %r14
addq %rsi, %r15
cmpq %rdx, %r12
jne 0xfc96
incq %r10
subl %edx, %ecx
addq %r9, %r11
cmpq %rax, %r10
jne 0xfc81
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_O3/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi_is_hdr_from_file
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 %rbx
subq $0xd0, %rsp
movq 0x169e8(%rip), %rax     # 0x26d88
leaq 0x38(%rsp), %rbx
movq %rax, -0x18(%rbx)
movups 0x169c8(%rip), %xmm0    # 0x26d78
movups %xmm0, -0x28(%rbx)
movq %rdi, -0x10(%rbx)
movabsq $0x8000000001, %rax     # imm = 0x8000000001
movq %rax, -0x8(%rbx)
movq %rbx, 0x90(%rbx)
movq %rbx, %rsi
movl $0x80, %edx
callq *-0x28(%rbx)
testl %eax, %eax
je 0x103e3
cltq
addq %rbx, %rax
jmp 0x103f3
leaq 0x39(%rsp), %rax
movl $0x0, -0x9(%rax)
movb $0x0, -0x1(%rax)
movq %rsp, %rdi
movq %rbx, 0xb8(%rdi)
movq %rax, 0xc0(%rdi)
callq 0x1028c
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1225e
movl $0x478, %edi            # imm = 0x478
callq 0x8480
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1198e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1198e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1198e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x11dfa
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rcx
xorl %r15d, %r15d
cmpq $0x21, %rcx
jb 0x11db3
leaq 0x10(%rsp), %r13
movq %rsp, %r12
movl %r15d, %edx
movl $0x20, %ecx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8330
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0xb08c
imull $0x23c, 0x8(%rbx), %edi # imm = 0x23C
callq 0x8480
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x11d9f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8310
leal 0x40(%r15), %eax
movq 0x8(%rbx), %rcx
addl $0x20, %r15d
cmpq %rax, %rcx
ja 0x11d5e
movl %r15d, %r15d
andl $0x1f, %ecx
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x8330
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0xb08c
imull $0x23c, 0x8(%rbx), %edi # imm = 0x23C
callq 0x8480
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11dfa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8310
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 0x11e27
jmp 0x11e34
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x11e34
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8310
movq %rbx, %rdi
callq 0x85f0
// File: /workspace/github_c_makefile_star2_O3/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 0x11e9d
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 0x1225e
movl $0x6b4, %edi            # imm = 0x6B4
callq 0x8480
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0xb08c
imull $0x23c, 0x8(%r14), %edi # imm = 0x23C
callq 0x8480
leaq 0x4(%rsp), %rsi
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0x1198e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1225d
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 0xb162
movl $0x8f0, %edi            # imm = 0x8F0
callq 0x8480
movq 0x8(%r14), %rdi
movslq %ebp, %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0xb162
imull $0x23c, %r14d, %edi     # imm = 0x23C
callq 0x8480
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1dfe4
testl %eax, %eax
je 0x17a96
movl (%r14), %eax
movl %eax, (%rbp)
movl 0x4(%r14), %eax
movl %eax, (%r13)
movl 0x8(%r14), %r13d
movl %r13d, (%r12)
imull (%r14), %r13d
imull 0x4(%r14), %r13d
movq %r13, %rdi
callq 0x8420
testq %rax, %rax
je 0x17a88
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movl %r13d, %edx
callq 0x1c7de
testl %ebx, %ebx
je 0x17a99
movl (%r15), %esi
cmpl %ebx, %esi
je 0x17a99
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 0x1c3aa
leaq 0x9508(%rip), %rax      # 0x20f97
movq %rax, 0xf952(%rip)      # 0x273e8
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_O3/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 0x19560
cmpb $-0x28, %al
jne 0x18f77
movl $0x1, %ebp
cmpl $0x1, %ebx
je 0x18f87
movq %r14, %rdi
callq 0x19560
movzbl %al, %esi
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0xc0, %ecx
sete %cl
cmpb $-0x3e, %sil
sete %dl
orb %cl, %dl
jne 0x18f55
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x19679
testl %eax, %eax
je 0x18f87
movq %r14, %rdi
callq 0x19560
cmpb $-0x1, %al
jne 0x18f41
movq (%r14), %r15
cmpq $0x0, 0x10(%r15)
je 0x18f2f
movq 0x28(%r15), %rdi
callq *0x20(%r15)
testl %eax, %eax
je 0x18f06
cmpl $0x0, 0x30(%r15)
je 0x18f94
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0x18f06
jmp 0x18f94
cmpb $-0x3e, %al
je 0x18f55
movzbl %al, %esi
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0xc0, %ecx
jne 0x18ef6
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 0x19c11
leaq 0x7f42(%rip), %rax      # 0x20ec0
movq %rax, 0xe463(%rip)      # 0x273e8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f2c(%rip), %rax      # 0x20ec7
movq %rax, 0xe446(%rip)      # 0x273e8
jmp 0x18f87
// File: /workspace/github_c_makefile_star2_O3/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 0x194b9
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 0x1942f
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 0x19467
xorl %r14d, %r14d
cmpl %ebp, %r14d
jl 0x19472
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 0x19494
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 0x193f7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__resample_row_hv_2(unsigned char*, unsigned char*, unsigned char*, int, int)
static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
{
   // need to generate 2x2 samples for every one in input
   int i,t0,t1;
   if (w == 1) {
      out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2);
      return out;
   }

   t1 = 3*in_near[0] + in_far[0];
   out[0] = stbi__div4(t1+2);
   for (i=1; i < w; ++i) {
      t0 = t1;
      t1 = 3*in_near[i]+in_far[i];
      out[i*2-1] = stbi__div16(3*t0 + t1 + 8);
      out[i*2  ] = stbi__div16(3*t1 + t0 + 8);
   }
   out[w*2-1] = stbi__div4(t1+2);

   STBI_NOTUSED(hs);

   return out;
}

// Assembly:
movq %rdi, %rax
movzbl (%rsi), %edi
movzbl (%rdx), %r8d
cmpl $0x1, %ecx
jne 0x194e1
movzwl %di, %ecx
leal (%rcx,%rcx,2), %ecx
movzwl %r8w, %edx
addl %edx, %ecx
addl $0x2, %ecx
shrl $0x2, %ecx
movb %cl, 0x1(%rax)
movb %cl, (%rax)
retq
movzwl %di, %edi
leal (%rdi,%rdi,2), %edi
movzwl %r8w, %r8d
leal (%r8,%rdi), %r9d
addl $0x2, %r9d
shrl $0x2, %r9d
movb %r9b, (%rax)
cmpl $0x2, %ecx
jl 0x19557
addl %r8d, %edi
movl %ecx, %r8d
movl $0x1, %r9d
movl %edi, %r10d
movzbl (%rsi,%r9), %edi
leal (%rdi,%rdi,2), %r11d
movzbl (%rdx,%r9), %edi
addl %r11d, %edi
leal (%r10,%r10,2), %r11d
addl %edi, %r11d
addl $0x8, %r11d
shrl $0x4, %r11d
movb %r11b, -0x1(%rax,%r9,2)
leal (%rdi,%rdi,2), %r11d
addl %r11d, %r10d
addl $0x8, %r10d
shrl $0x4, %r10d
movb %r10b, (%rax,%r9,2)
incq %r9
cmpq %r9, %r8
jne 0x1950b
addl $0x2, %edi
shrl $0x2, %edi
movl %edi, %r9d
movslq %ecx, %rcx
movb %r9b, -0x1(%rax,%rcx,2)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1a3cd
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 0x1a3bd
addl %r9d, %edx
incq %rcx
cmpq $0x10, %rcx
jne 0x1a3ab
movslq %edx, %rax
movb $0x0, 0x500(%rbx,%rax)
leaq 0x200(%rbx), %rdx
leaq 0x501(%rbx), %rsi
xorl %edi, %edi
movl $0x1, %eax
xorl %ebp, %ebp
movl %ebp, %ecx
subl %edi, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %ebp, %rcx
movzbl 0x500(%rbx,%rcx), %r8d
cmpq %r8, %rax
jne 0x1a44a
leaq (%rdx,%rcx,2), %r8
addq %rsi, %rcx
movw %di, (%r8)
incl %edi
movzbl (%rcx), %r9d
addq $0x2, %r8
incl %ebp
incq %rcx
cmpq %r9, %rax
je 0x1a41b
movl $0x1, %r8d
movl %eax, %ecx
shll %cl, %r8d
leal -0x1(%rdi), %ecx
cmpl %r8d, %ecx
jge 0x1a4d4
movb $0x10, %cl
subb %al, %cl
movl %edi, %r8d
shll %cl, %r8d
movl %r8d, 0x604(%rbx,%rax,4)
addl %edi, %edi
incq %rax
cmpq $0x11, %rax
jne 0x1a3f8
movl $0xffffffff, 0x648(%rbx) # imm = 0xFFFFFFFF
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0x81c0
movl $0x1, %eax
testl %ebp, %ebp
jle 0x1a4e4
movl %ebp, %edx
xorl %esi, %esi
movzbl 0x500(%rbx,%rsi), %r8d
cmpq $0x9, %r8
ja 0x1a4ca
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 0x1a4b8
incq %rsi
cmpq %rdx, %rsi
jne 0x1a490
jmp 0x1a4e4
leaq 0x6a39(%rip), %rax      # 0x20f14
movq %rax, 0xcf06(%rip)      # 0x273e8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1a5b6
movq %rdi, %rbx
leaq 0x45f0(%rdi), %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x1a578
callq 0x83e0
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%r14)
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0x1a58d
callq 0x83e0
movq %r15, -0x10(%r14)
movq %r15, (%r14)
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x1a5a3
callq 0x83e0
movq $0x0, -0x8(%r14)
incq %r12
movq (%rbx), %rax
movslq 0x8(%rax), %rax
addq $0x60, %r14
cmpq %rax, %r12
jl 0x1a562
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
cmpl $0x0, 0x472c(%rbx)
jne 0x1b186
movq (%rbx), %r15
movq 0xb8(%r15), %rcx
cmpq 0xc0(%r15), %rcx
jae 0x1b0ac
leaq 0x1(%rcx), %rax
movq %rax, 0xb8(%r15)
movb (%rcx), %al
jmp 0x1b0fe
cmpl $0x0, 0x30(%r15)
je 0x1b186
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %r14
movl 0x34(%r15), %edx
movq %r14, %rsi
callq *0x10(%r15)
testl %eax, %eax
je 0x1b0d9
movslq %eax, %rcx
addq %r14, %rcx
movb (%r14), %al
jmp 0x1b0ec
movl $0x0, 0x30(%r15)
leaq 0x39(%r15), %rcx
movb $0x0, 0x38(%r15)
xorl %eax, %eax
movq %rcx, 0xc0(%r15)
leaq 0x39(%r15), %rcx
movq %rcx, 0xb8(%r15)
cmpb $-0x1, %al
je 0x1b107
movzbl %al, %eax
jmp 0x1b186
movq (%rbx), %r15
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jae 0x1b129
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r15)
movb (%rax), %cl
jmp 0x1b17d
cmpl $0x0, 0x30(%r15)
je 0x1b151
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %r14
movl 0x34(%r15), %edx
movq %r14, %rsi
callq *0x10(%r15)
testl %eax, %eax
je 0x1b158
cltq
addq %r14, %rax
movb (%r14), %cl
jmp 0x1b16b
movl $0xff, %eax
jmp 0x1b186
movl $0x0, 0x30(%r15)
leaq 0x39(%r15), %rax
movb $0x0, 0x38(%r15)
xorl %ecx, %ecx
movq %rax, 0xc0(%r15)
leaq 0x39(%r15), %rax
movq %rax, 0xb8(%r15)
movl $0xff, %eax
testb %cl, %cl
jne 0x1b1b0
movl 0x4724(%rbx), %edx
movb $0x18, %cl
subb %dl, %cl
shll %cl, %eax
orl %eax, 0x4720(%rbx)
leal 0x8(%rdx), %eax
movl %eax, 0x4724(%rbx)
cmpl $0x11, %edx
jl 0x1b07b
popq %rbx
popq %r14
popq %r15
retq
movb %cl, 0x4728(%rbx)
movl $0x1, 0x472c(%rbx)
jmp 0x1b1aa