// File: /workspace/github_c_makefile_star2_O0/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
subq $0x3d0, %rsp            # imm = 0x3D0
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x388(%rbp)
movb 0x2c(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x16b4b
movl $0x28, %edi
callq 0xd1e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x390(%rbp)
leaq 0x16a16(%rip), %rsi     # 0x2d523
callq 0x18610
jmp 0x16b14
movq -0x390(%rbp), %rdi
leaq 0x1f1ae(%rip), %rsi     # 0x35cd0
leaq 0x1c27(%rip), %rdx      # 0x18750
callq 0xd720
movq -0x390(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xd2c0
jmp 0x16e4e
movl $0x4, -0x20(%rbp)
testb $0x1, -0x9(%rbp)
je 0x16cd5
movq -0x388(%rbp), %rax
movl 0x28(%rax), %edi
movl $0x5416, %esi           # imm = 0x5416
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0xd5e0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x16cd0
leaq -0x1a8(%rbp), %rdi
callq 0xd2a0
leaq -0x198(%rbp), %rdi
leaq 0x16993(%rip), %rsi     # 0x2d532
callq 0xd3a0
movq %rax, -0x398(%rbp)
jmp 0x16bad
callq 0xd060
movq -0x398(%rbp), %rdi
movl (%rax), %esi
callq 0xd740
movq %rax, -0x3a0(%rbp)
jmp 0x16bc9
movq -0x3a0(%rbp), %rdi
leaq 0x16a1c(%rip), %rsi     # 0x2d5f3
callq 0xd3a0
movq %rax, -0x3a8(%rbp)
jmp 0x16be5
callq 0xd060
movl (%rax), %edi
callq 0xd100
movq -0x3a8(%rbp), %rdi
movq %rax, %rsi
callq 0xd3a0
jmp 0x16c02
movb $0x1, -0x1c9(%rbp)
movl $0x28, %edi
callq 0xd1e0
movq %rax, -0x3b0(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xd390
jmp 0x16c2f
leaq -0x1c8(%rbp), %rdi
callq 0xd170
movq -0x3b0(%rbp), %rdi
movq %rax, %rsi
callq 0x17ff0
jmp 0x16c4c
movq -0x3b0(%rbp), %rdi
movb $0x0, -0x1c9(%rbp)
leaq 0x1f03f(%rip), %rsi     # 0x35ca0
leaq 0x14c8(%rip), %rdx      # 0x18130
callq 0xd720
jmp 0x16e57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x16cbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x16ca6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0xd240
testb $0x1, -0x1c9(%rbp)
jne 0x16cb1
jmp 0x16cbd
movq -0x3b0(%rbp), %rdi
callq 0xd2c0
jmp 0x16cbf
leaq -0x1a8(%rbp), %rdi
callq 0xd2e0
jmp 0x16e4e
jmp 0x16e45
movq -0x388(%rbp), %rax
movl 0x28(%rax), %edi
movl $0x5417, %esi           # imm = 0x5417
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0xd5e0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x16e43
leaq -0x358(%rbp), %rdi
callq 0xd2a0
leaq -0x348(%rbp), %rdi
leaq 0x16847(%rip), %rsi     # 0x2d55f
callq 0xd3a0
movq %rax, -0x3b8(%rbp)
jmp 0x16d26
callq 0xd060
movq -0x3b8(%rbp), %rdi
movl (%rax), %esi
callq 0xd740
movq %rax, -0x3c0(%rbp)
jmp 0x16d42
movq -0x3c0(%rbp), %rdi
leaq 0x168a3(%rip), %rsi     # 0x2d5f3
callq 0xd3a0
movq %rax, -0x3c8(%rbp)
jmp 0x16d5e
callq 0xd060
movl (%rax), %edi
callq 0xd100
movq -0x3c8(%rbp), %rdi
movq %rax, %rsi
callq 0xd3a0
jmp 0x16d7b
movb $0x1, -0x379(%rbp)
movl $0x28, %edi
callq 0xd1e0
movq %rax, -0x3d0(%rbp)
leaq -0x378(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0xd390
jmp 0x16da8
leaq -0x378(%rbp), %rdi
callq 0xd170
movq -0x3d0(%rbp), %rdi
movq %rax, %rsi
callq 0x17ff0
jmp 0x16dc5
movq -0x3d0(%rbp), %rdi
movb $0x0, -0x379(%rbp)
leaq 0x1eec6(%rip), %rsi     # 0x35ca0
leaq 0x134f(%rip), %rdx      # 0x18130
callq 0xd720
jmp 0x16e57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x16e35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x16e1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x378(%rbp), %rdi
callq 0xd240
testb $0x1, -0x379(%rbp)
jne 0x16e27
jmp 0x16e33
movq -0x3d0(%rbp), %rdi
callq 0xd2c0
jmp 0x16e35
leaq -0x358(%rbp), %rdi
callq 0xd2e0
jmp 0x16e4e
jmp 0x16e45
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0xd750
nopw (%rax,%rax)