	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hso_serial_tiocmset
_hso_serial_tiocmset:                   ## @hso_serial_tiocmset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r13d
	callq	_get_serial_by_tty
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %r14d
	movq	%rbx, %r15
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_5
## %bb.4:
	movl	$1, (%rbx)
LBB0_5:
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	testl	%r13d, %ecx
	je	LBB0_7
## %bb.6:
	movl	$1, 4(%rbx)
LBB0_7:
	testl	%r12d, (%rax)
	je	LBB0_9
## %bb.8:
	movl	$0, (%rbx)
	movl	(%rdx), %ecx
LBB0_9:
	testl	%r12d, %ecx
	je	LBB0_10
## %bb.11:
	movl	$0, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_D1
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	jmp	LBB0_2
LBB0_10:
	xorl	%eax, %eax
	cmpl	$0, 4(%rbx)
	setne	%al
LBB0_12:
	leal	2(%rax), %r12d
	cmpl	$0, (%rbx)
	cmovel	%eax, %r12d
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%rbx), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_USB_CTRL_SET_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$34, %edx
	movl	$33, %ecx
	movl	%r12d, %r8d
	movl	%r14d, %r9d
	pushq	%r10
	pushq	$0
	pushq	$0
	callq	_usb_control_msg
	addq	$40, %rsp
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no tty structures"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TIOCM_RTS,4,2                  ## @TIOCM_RTS
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.comm	_USB_CTRL_SET_TIMEOUT,4,2       ## @USB_CTRL_SET_TIMEOUT
	.no_dead_strip	_hso_serial_tiocmset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hso_serial_tiocmset
_hso_serial_tiocmset:                   ; @hso_serial_tiocmset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x23, x2
	bl	_get_serial_by_tty
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	w19, [x8]
	add	x21, x0, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x9, _TIOCM_RTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TIOCM_RTS@GOTPAGEOFF]
	ldr	w8, [x9]
	tst	w8, w23
	b.eq	LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [x20]
LBB0_3:
Lloh2:
	adrp	x10, _TIOCM_DTR@GOTPAGE
Lloh3:
	ldr	x10, [x10, _TIOCM_DTR@GOTPAGEOFF]
	ldr	w8, [x10]
	tst	w8, w23
	b.eq	LBB0_5
; %bb.4:
	mov	w11, #1
	str	w11, [x20, #4]
LBB0_5:
	ldr	w9, [x9]
	tst	w9, w22
	b.eq	LBB0_7
; %bb.6:
	str	wzr, [x20]
	ldr	w8, [x10]
LBB0_7:
	tst	w8, w22
	b.eq	LBB0_10
; %bb.8:
	mov	w8, #0
	str	wzr, [x20, #4]
	b	LBB0_11
LBB0_9:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D1
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
	ldr	w8, [x20, #4]
	cmp	w8, #0
	cset	w8, ne
LBB0_11:
	ldr	w9, [x20]
	orr	w10, w8, #0x2
	cmp	w9, #0
	csel	w22, w8, w10, eq
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20, #8]
	ldr	w20, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh9:
	adrp	x8, _USB_CTRL_SET_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _USB_CTRL_SET_TIMEOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x20
	mov	w2, #34
	mov	w3, #33
	mov	x4, x22
	mov	x5, x19
	mov	x6, #0
	mov	w7, #0
	bl	_usb_control_msg
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no tty structures"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TIOCM_RTS,4,2                  ; @TIOCM_RTS
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.comm	_USB_CTRL_SET_TIMEOUT,4,2       ; @USB_CTRL_SET_TIMEOUT
	.no_dead_strip	_hso_serial_tiocmset
.subsections_via_symbols
