// File: /workspace/github_c_makefile_star2_O2/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 0xc4f9
movl $0x2, -0x1c(%rbp)
movl 0x28(%rdi), %edi
leaq -0x1c(%rbp), %rdx
testb %sil, %sil
je 0xc4da
movl $0x5416, %esi           # imm = 0x5416
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
jne 0xc4eb
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %rdi
leaq 0xc1a8(%rip), %rsi      # 0x185fc
callq 0x82e0
movq %rax, %r14
callq 0x8050
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85a0
leaq 0xc1df(%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 0x137ea(%rip), %rsi     # 0x1fcb0
leaq 0xaf9(%rip), %rdx       # 0xcfc6
movq %r14, %rdi
callq 0x8590
jmp 0xc5c4
movl $0x5417, %esi           # imm = 0x5417
xorl %eax, %eax
callq 0x8470
cmpl $-0x1, %eax
je 0xc529
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x81a0
movq %rax, %r14
leaq 0xc0e2(%rip), %rsi      # 0x185ed
movq %rax, %rdi
callq 0xd2ca
leaq 0x137c6(%rip), %rsi     # 0x1fce0
leaq 0xe87(%rip), %rdx       # 0xd3a8
movq %r14, %rdi
callq 0x8590
leaq -0x1c8(%rbp), %rdi
callq 0x8220
leaq -0x1b8(%rbp), %rdi
leaq 0xc0e6(%rip), %rsi      # 0x18629
callq 0x82e0
movq %rax, %r14
callq 0x8050
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85a0
leaq 0xc0f0(%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 0x136fb(%rip), %rsi     # 0x1fcb0
leaq 0xa0a(%rip), %rdx       # 0xcfc6
movq %r14, %rdi
callq 0x8590
jmp 0xc5c6
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x8170
testb %r15b, %r15b
jne 0xc5de
jmp 0xc5ed
jmp 0xc5db
movq %rax, %rbx
movq %r14, %rdi
callq 0x8240
jmp 0xc5ed
jmp 0xc5ea
movq %rax, %rbx
leaq -0x1c8(%rbp), %rdi
callq 0x8260
jmp 0xc606
movq %rax, %rbx
movq %r14, %rdi
callq 0x8240
movq %rbx, %rdi
callq 0x85c0