	.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
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movl	%edx, %r12d
	movq	8(%rbx), %rax
	movq	_HSO_PORT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movq	_HSO_PORT_MODEM@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_3
## %bb.4:
	movl	%esi, %r13d
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %r14d
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_6
## %bb.5:
	movl	$1, (%rbx)
LBB0_6:
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	testl	%r13d, %ecx
	je	LBB0_8
## %bb.7:
	movl	$1, 4(%rbx)
LBB0_8:
	testl	%r12d, (%rax)
	je	LBB0_10
## %bb.9:
	movl	$0, (%rbx)
	movl	(%rdx), %ecx
LBB0_10:
	testl	%r12d, %ecx
	je	LBB0_11
## %bb.12:
	movl	$0, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_hso_dbg
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	jmp	LBB0_14
LBB0_11:
	xorl	%eax, %eax
	cmpl	$0, 4(%rbx)
	setne	%al
LBB0_13:
	leal	2(%rax), %r12d
	cmpl	$0, (%rbx)
	cmovel	%eax, %r12d
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%rbx), %rax
	movl	4(%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_14:
	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\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HSO_PORT_MASK,4,2              ## @HSO_PORT_MASK
	.comm	_HSO_PORT_MODEM,4,2             ## @HSO_PORT_MODEM
	.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
	ldr	x23, [x0]
	cbz	x23, LBB0_10
; %bb.1:
	ldr	x8, [x23, #8]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _HSO_PORT_MASK@GOTPAGE
Lloh1:
	ldr	x10, [x10, _HSO_PORT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh3:
	adrp	x10, _HSO_PORT_MODEM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HSO_PORT_MODEM@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_11
; %bb.2:
	mov	x20, x2
	mov	x22, x1
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	w19, [x8]
	add	x21, x23, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh6:
	adrp	x9, _TIOCM_RTS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TIOCM_RTS@GOTPAGEOFF]
	ldr	w8, [x9]
	tst	w8, w22
	b.eq	LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x23]
LBB0_4:
Lloh8:
	adrp	x10, _TIOCM_DTR@GOTPAGE
Lloh9:
	ldr	x10, [x10, _TIOCM_DTR@GOTPAGEOFF]
	ldr	w8, [x10]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.5:
	mov	w11, #1
	str	w11, [x23, #4]
LBB0_6:
	ldr	w9, [x9]
	tst	w9, w20
	b.eq	LBB0_8
; %bb.7:
	str	wzr, [x23]
	ldr	w8, [x10]
LBB0_8:
	tst	w8, w20
	b.eq	LBB0_12
; %bb.9:
	mov	w8, #0
	str	wzr, [x23, #4]
	b	LBB0_13
LBB0_10:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_hso_dbg
LBB0_11:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_12:
	ldr	w8, [x23, #4]
	cmp	w8, #0
	cset	w8, ne
LBB0_13:
	ldr	w9, [x23]
	orr	w10, w8, #0x2
	cmp	w9, #0
	csel	w20, w8, w10, eq
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x8, [x23, #8]
	ldr	w21, [x8, #4]
	mov	x0, x21
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh15:
	adrp	x8, _USB_CTRL_SET_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _USB_CTRL_SET_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x21
	mov	w2, #34
	mov	w3, #33
	mov	x4, x20
	mov	x5, x19
	mov	x6, #0
	mov	w7, #0
	bl	_usb_control_msg
LBB0_14:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no tty structures\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HSO_PORT_MASK,4,2              ; @HSO_PORT_MASK
	.comm	_HSO_PORT_MODEM,4,2             ; @HSO_PORT_MODEM
	.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
