// File: /workspace/github_c_makefile_star2_O2/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 0xc2df
movl $0x4, -0x1c(%rbp)
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
testb %sil, %sil
je 0xc2c0
movl $0x5416, %esi           # imm = 0x5416
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
jne 0xc2d1
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %rdi
leaq 0xc359(%rip), %rsi      # 0x18593
callq 0x82e0
movq %rax, %r14
callq 0x8050
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85a0
leaq 0xc3f9(%rip), %rsi      # 0x18654
movq %rax, %rdi
callq 0x82e0
movq %rax, %r14
movl (%rbx), %edi
callq 0x80f0
movq %r14, %rdi
movq %rax, %rsi
callq 0x82e0
pushq $0x28
popq %rdi
callq 0x81a0
movq %rax, %r14
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8530
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0xcee8
xorl %r15d, %r15d
leaq 0x13a04(%rip), %rsi     # 0x1fcb0
leaq 0xd13(%rip), %rdx       # 0xcfc6
movq %r14, %rdi
callq 0x8590
jmp 0xc3aa
movl $0x5417, %esi           # imm = 0x5417
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
je 0xc30f
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x81a0
movq %rax, %r14
leaq 0xc293(%rip), %rsi      # 0x18584
movq %rax, %rdi
callq 0xd2ca
leaq 0x139e0(%rip), %rsi     # 0x1fce0
leaq 0x10a1(%rip), %rdx      # 0xd3a8
movq %r14, %rdi
callq 0x8590
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %rdi
leaq 0xc297(%rip), %rsi      # 0x185c0
callq 0x82e0
movq %rax, %r14
callq 0x8050
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85a0
leaq 0xc30a(%rip), %rsi      # 0x18654
movq %rax, %rdi
callq 0x82e0
movq %rax, %r14
movl (%rbx), %edi
callq 0x80f0
movq %r14, %rdi
movq %rax, %rsi
callq 0x82e0
pushq $0x28
popq %rdi
callq 0x81a0
movq %rax, %r14
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8530
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0xcee8
xorl %r15d, %r15d
leaq 0x13915(%rip), %rsi     # 0x1fcb0
leaq 0xc24(%rip), %rdx       # 0xcfc6
movq %r14, %rdi
callq 0x8590
jmp 0xc3ac
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x8170
testb %r15b, %r15b
jne 0xc3c4
jmp 0xc3d3
jmp 0xc3c1
movq %rax, %rbx
movq %r14, %rdi
callq 0x8240
jmp 0xc3d3
jmp 0xc3d0
movq %rax, %rbx
leaq -0x1c8(%rbp), %rdi
callq 0x8260
jmp 0xc3ec
movq %rax, %rbx
movq %r14, %rdi
callq 0x8240
movq %rbx, %rdi
callq 0x85c0