// File: /workspace/github_c_makefile_star2_O0/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
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 0x16eeb
movl $0x28, %edi
callq 0xd1e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x390(%rbp)
leaq 0x166df(%rip), %rsi     # 0x2d58c
callq 0x18610
jmp 0x16eb4
movq -0x390(%rbp), %rdi
leaq 0x1ee0e(%rip), %rsi     # 0x35cd0
leaq 0x1887(%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 0x171ee
movl $0x2, -0x20(%rbp)
testb $0x1, -0x9(%rbp)
je 0x17075
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 0x17070
leaq -0x1a8(%rbp), %rdi
callq 0xd2a0
leaq -0x198(%rbp), %rdi
leaq 0x1665c(%rip), %rsi     # 0x2d59b
callq 0xd3a0
movq %rax, -0x398(%rbp)
jmp 0x16f4d
callq 0xd060
movq -0x398(%rbp), %rdi
movl (%rax), %esi
callq 0xd740
movq %rax, -0x3a0(%rbp)
jmp 0x16f69
movq -0x3a0(%rbp), %rdi
leaq 0x1667c(%rip), %rsi     # 0x2d5f3
callq 0xd3a0
movq %rax, -0x3a8(%rbp)
jmp 0x16f85
callq 0xd060
movl (%rax), %edi
callq 0xd100
movq -0x3a8(%rbp), %rdi
movq %rax, %rsi
callq 0xd3a0
jmp 0x16fa2
movb $0x1, -0x1c9(%rbp)
movl $0x28, %edi
callq 0xd1e0
movq %rax, -0x3b0(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xd390
jmp 0x16fcf
leaq -0x1c8(%rbp), %rdi
callq 0xd170
movq -0x3b0(%rbp), %rdi
movq %rax, %rsi
callq 0x17ff0
jmp 0x16fec
movq -0x3b0(%rbp), %rdi
movb $0x0, -0x1c9(%rbp)
leaq 0x1ec9f(%rip), %rsi     # 0x35ca0
leaq 0x1128(%rip), %rdx      # 0x18130
callq 0xd720
jmp 0x171f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1705f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x17046
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 0x17051
jmp 0x1705d
movq -0x3b0(%rbp), %rdi
callq 0xd2c0
jmp 0x1705f
leaq -0x1a8(%rbp), %rdi
callq 0xd2e0
jmp 0x171ee
jmp 0x171e5
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 0x171e3
leaq -0x358(%rbp), %rdi
callq 0xd2a0
leaq -0x348(%rbp), %rdi
leaq 0x16510(%rip), %rsi     # 0x2d5c8
callq 0xd3a0
movq %rax, -0x3b8(%rbp)
jmp 0x170c6
callq 0xd060
movq -0x3b8(%rbp), %rdi
movl (%rax), %esi
callq 0xd740
movq %rax, -0x3c0(%rbp)
jmp 0x170e2
movq -0x3c0(%rbp), %rdi
leaq 0x16503(%rip), %rsi     # 0x2d5f3
callq 0xd3a0
movq %rax, -0x3c8(%rbp)
jmp 0x170fe
callq 0xd060
movl (%rax), %edi
callq 0xd100
movq -0x3c8(%rbp), %rdi
movq %rax, %rsi
callq 0xd3a0
jmp 0x1711b
movb $0x1, -0x379(%rbp)
movl $0x28, %edi
callq 0xd1e0
movq %rax, -0x3d0(%rbp)
leaq -0x378(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0xd390
jmp 0x17148
leaq -0x378(%rbp), %rdi
callq 0xd170
movq -0x3d0(%rbp), %rdi
movq %rax, %rsi
callq 0x17ff0
jmp 0x17165
movq -0x3d0(%rbp), %rdi
movb $0x0, -0x379(%rbp)
leaq 0x1eb26(%rip), %rsi     # 0x35ca0
leaq 0xfaf(%rip), %rdx       # 0x18130
callq 0xd720
jmp 0x171f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x171d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x171bc
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 0x171c7
jmp 0x171d3
movq -0x3d0(%rbp), %rdi
callq 0xd2c0
jmp 0x171d5
leaq -0x358(%rbp), %rdi
callq 0xd2e0
jmp 0x171ee
jmp 0x171e5
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0xd750
nopw (%rax,%rax)