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

  if (level) {
    if (-1 == ioctl (fd_, TIOCSBRK))
    {
        stringstream ss;
        ss << "setBreak failed on a call to ioctl(TIOCSBRK): " << errno << " " << strerror(errno);
        throw(SerialException(ss.str().c_str()));
    }
  } else {
    if (-1 == ioctl (fd_, TIOCCBRK))
    {
        stringstream ss;
        ss << "setBreak failed on a call to ioctl(TIOCCBRK): " << errno << " " << strerror(errno);
        throw(SerialException(ss.str().c_str()));
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
cmpb $0x0, 0x2c(%rdi)
je 0xd1c0
movl 0x28(%rdi), %edi
testb %sil, %sil
je 0xd1a1
movl $0x5427, %esi           # imm = 0x5427
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
jne 0xd1b2
leaq -0x1c0(%rbp), %rdi
callq 0x8230
leaq -0x1b0(%rbp), %r14
leaq 0x14417(%rip), %rsi     # 0x21526
movl $0x2e, %edx
movq %r14, %rdi
callq 0x83c0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85d0
movq %rax, %r14
leaq 0x1451c(%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 -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x1ab13(%rip), %rsi     # 0x27ca0
leaq 0x11f2(%rip), %rdx      # 0xe386
movq %r14, %rdi
callq 0x85c0
jmp 0xd299
movl $0x5428, %esi           # imm = 0x5428
xorl %eax, %eax
callq 0x8480
cmpl $-0x1, %eax
je 0xd1f2
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x81a0
movq %rax, %r14
leaq 0x14341(%rip), %rsi     # 0x21515
movq %rax, %rdi
callq 0xe848
leaq 0x1aaed(%rip), %rsi     # 0x27cd0
leaq 0x17c6(%rip), %rdx      # 0xe9b0
movq %r14, %rdi
callq 0x85c0
leaq -0x1c0(%rbp), %rdi
callq 0x8230
leaq -0x1b0(%rbp), %r14
leaq 0x14349(%rip), %rsi     # 0x21555
movl $0x2e, %edx
movq %r14, %rdi
callq 0x83c0
callq 0x8060
movq %rax, %rbx
movl (%rax), %esi
movq %r14, %rdi
callq 0x85d0
movq %rax, %r14
leaq 0x1441f(%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 -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x8560
movb $0x1, %r15b
movq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0xe21e
xorl %r15d, %r15d
leaq 0x1aa16(%rip), %rsi     # 0x27ca0
leaq 0x10f5(%rip), %rdx      # 0xe386
movq %r14, %rdi
callq 0x85c0
jmp 0xd29b
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd2c1
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0xd2c1
jmp 0xd2bb
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0xd2d5
movq %r14, %rdi
callq 0x8250
jmp 0xd2d5
jmp 0xd2d2
movq %rax, %rbx
movq 0x1acc4(%rip), %rsi     # 0x27fa0
leaq -0x1c0(%rbp), %rdi
callq 0x8270
leaq -0x140(%rbp), %rdi
callq 0x8100
jmp 0xd301
movq %rax, %rbx
movq %r14, %rdi
callq 0x8250
movq %rbx, %rdi
callq 0x8600
nop