// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/serial/unix.cc
// Function: serial::Serial::SerialImpl::setRTS(bool)
void
Serial::SerialImpl::setRTS (bool level)
{
  if (is_open_ == false) {
    throw PortNotOpenedException ("Serial::setRTS");
  }

  int command = TIOCM_RTS;

  if (level) {
    if (-1 == ioctl (fd_, TIOCMBIS, &command))
    {
      stringstream ss;
      ss << "setRTS failed on a call to ioctl(TIOCMBIS): " << errno << " " << strerror(errno);
      throw(SerialException(ss.str().c_str()));
    }
  } else {
    if (-1 == ioctl (fd_, TIOCMBIC, &command))
    {
      stringstream ss;
      ss << "setRTS failed on a call to ioctl(TIOCMBIC): " << errno << " " << strerror(errno);
      throw(SerialException(ss.str().c_str()));
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
cmpb $0x0, 0x2c(%rdi)
je 0xd41b
movl $0x4, -0x1c(%rbp)
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
testb %sil, %sil
je 0xd3fc
movl $0x5416, %esi           # imm = 0x5416
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
jne 0xd40d
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x14229(%rip), %rsi     # 0x21593
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 0x142c1(%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, %r14
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x1a8b8(%rip), %rsi     # 0x27ca0
leaq 0xf97(%rip), %rdx       # 0xe386
movq %r14, %rdi
callq 0x85c0
jmp 0xd4f4
movl $0x5417, %esi           # imm = 0x5417
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xd44d
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x81a0
movq %rax, %r14
leaq 0x14155(%rip), %rsi     # 0x21584
movq %rax, %rdi
callq 0xe848
leaq 0x1a892(%rip), %rsi     # 0x27cd0
leaq 0x156b(%rip), %rdx      # 0xe9b0
movq %r14, %rdi
callq 0x85c0
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x14159(%rip), %rsi     # 0x215c0
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 0x141c4(%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, %r14
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x1a7bb(%rip), %rsi     # 0x27ca0
leaq 0xe9a(%rip), %rdx       # 0xe386
movq %r14, %rdi
callq 0x85c0
jmp 0xd4f6
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd51c
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xd51c
jmp 0xd516
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0xd530
movq %r14, %rdi
callq 0x8250
jmp 0xd530
jmp 0xd52d
movq %rax, %rbx
movq 0x1aa69(%rip), %rsi     # 0x27fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8270
leaq -0x148(%rbp), %rdi
callq 0x8100
jmp 0xd55c
movq %rax, %rbx
movq %r14, %rdi
callq 0x8250
movq %rbx, %rdi
callq 0x8600