// File: /workspace/github_c_makefile_star2_O3/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 0xd557
movl $0x2, -0x1c(%rbp)
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
testb %sil, %sil
je 0xd538
movl $0x5416, %esi           # imm = 0x5416
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
jne 0xd549
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %r14
leaq 0x13156(%rip), %rsi     # 0x205fc
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 0x13185(%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, %r14
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8550
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0xe0e2
xorl %r15d, %r15d
leaq 0x19764(%rip), %rsi     # 0x26c88
leaq 0xd1f(%rip), %rdx       # 0xe24a
movq %r14, %rdi
callq 0x85b0
jmp 0xd630
movl $0x5417, %esi           # imm = 0x5417
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
je 0xd589
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x8190
movq %rax, %r14
leaq 0x13082(%rip), %rsi     # 0x205ed
movq %rax, %rdi
callq 0xe70c
leaq 0x1973e(%rip), %rsi     # 0x26cb8
leaq 0x12f3(%rip), %rdx      # 0xe874
movq %r14, %rdi
callq 0x85b0
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %r14
leaq 0x13086(%rip), %rsi     # 0x20629
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 0x13088(%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, %r14
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8550
movb $0x1, %r15b
movq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0xe0e2
xorl %r15d, %r15d
leaq 0x19667(%rip), %rsi     # 0x26c88
leaq 0xc22(%rip), %rdx       # 0xe24a
movq %r14, %rdi
callq 0x85b0
jmp 0xd632
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd64e
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x8310
testb %r15b, %r15b
jne 0xd65a
jmp 0xd669
jmp 0xd657
movq %rax, %rbx
movq %r14, %rdi
callq 0x8240
jmp 0xd669
jmp 0xd666
movq %rax, %rbx
movq 0x19930(%rip), %rsi     # 0x26fa0
leaq -0x1c8(%rbp), %rdi
callq 0x8260
leaq -0x148(%rbp), %rdi
callq 0x8100
jmp 0xd695
movq %rax, %rbx
movq %r14, %rdi
callq 0x8240
movq %rbx, %rdi
callq 0x85f0
nop