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

  int command = TIOCM_DTR;

  if (level) {
    if (-1 == ioctl (fd_, TIOCMBIS, &command))
    {
      stringstream ss;
      ss << "setDTR 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 << "setDTR 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 0xd675
movl $0x2, -0x1c(%rbp)
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
testb %sil, %sil
je 0xd656
movl $0x5416, %esi           # imm = 0x5416
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
jne 0xd667
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x14038(%rip), %rsi     # 0x215fc
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 0x14067(%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 0x1a65e(%rip), %rsi     # 0x27ca0
leaq 0xd3d(%rip), %rdx       # 0xe386
movq %r14, %rdi
callq 0x85c0
jmp 0xd74e
movl $0x5417, %esi           # imm = 0x5417
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xd6a7
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x81a0
movq %rax, %r14
leaq 0x13f64(%rip), %rsi     # 0x215ed
movq %rax, %rdi
callq 0xe848
leaq 0x1a638(%rip), %rsi     # 0x27cd0
leaq 0x1311(%rip), %rdx      # 0xe9b0
movq %r14, %rdi
callq 0x85c0
leaq -0x1c8(%rbp), %rdi
callq 0x8230
leaq -0x1b8(%rbp), %r14
leaq 0x13f68(%rip), %rsi     # 0x21629
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 0x13f6a(%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 0x1a561(%rip), %rsi     # 0x27ca0
leaq 0xc40(%rip), %rdx       # 0xe386
movq %r14, %rdi
callq 0x85c0
jmp 0xd750
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd776
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xd776
jmp 0xd770
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0xd78a
movq %r14, %rdi
callq 0x8250
jmp 0xd78a
jmp 0xd787
movq %rax, %rbx
movq 0x1a80f(%rip), %rsi     # 0x27fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8270
leaq -0x148(%rbp), %rdi
callq 0x8100
jmp 0xd7b6
movq %rax, %rbx
movq %r14, %rdi
callq 0x8250
movq %rbx, %rdi
callq 0x8600