	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cts_change
_cts_change:                            ## @cts_change
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_get_signals
	movslq	32(%rbx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 32(%rbx)
	movq	_IO_PIN_SHUTDOWN_LIMIT@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jg	LBB0_2
## %bb.1:
	movq	_CHB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQ_CTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_irq_disable
LBB0_2:
	incl	28(%rbx)
	movq	_SerialSignal_CTS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	xorl	%ecx, %ecx
	andl	(%rbx), %eax
	setne	%cl
	incl	20(%rbx,%rcx,4)
	leaq	16(%rbx), %rdi
	callq	_wake_up_interruptible
	leaq	12(%rbx), %rdi
	callq	_wake_up_interruptible
	movq	_ASYNC_CTS_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_BH_STATUS@GOTPCREL(%rip), %r15
	testl	%eax, 8(%rbx)
	je	LBB0_12
## %bb.3:
	movl	(%r12), %eax
	andl	(%rbx), %eax
	cmpl	$0, (%r14)
	je	LBB0_8
## %bb.4:
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:
	movq	_debug_level@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_DEBUG_LEVEL_ISR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_printk
LBB0_7:
	movl	$0, (%r14)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_tx_start
	movq	_BH_TRANSMIT@GOTPCREL(%rip), %r15
	jmp	LBB0_12
LBB0_8:
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	_debug_level@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_DEBUG_LEVEL_ISR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	callq	_printk
LBB0_11:
	movl	$1, (%r14)
	movq	%rbx, %rdi
	callq	_tx_stop
LBB0_12:
	movl	(%r15), %eax
	orl	%eax, 4(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_PIN_SHUTDOWN_LIMIT,8,3      ## @IO_PIN_SHUTDOWN_LIMIT
	.comm	_CHB,4,2                        ## @CHB
	.comm	_IRQ_CTS,4,2                    ## @IRQ_CTS
	.comm	_SerialSignal_CTS,4,2           ## @SerialSignal_CTS
	.comm	_ASYNC_CTS_FLOW,4,2             ## @ASYNC_CTS_FLOW
	.comm	_debug_level,8,3                ## @debug_level
	.comm	_DEBUG_LEVEL_ISR,8,3            ## @DEBUG_LEVEL_ISR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CTS tx start..."

	.comm	_BH_TRANSMIT,4,2                ## @BH_TRANSMIT
L_.str.1:                               ## @.str.1
	.asciz	"CTS tx stop..."

	.comm	_BH_STATUS,4,2                  ## @BH_STATUS
	.no_dead_strip	_cts_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cts_change
_cts_change:                            ; @cts_change
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_get_signals
	ldrsw	x8, [x19, #32]
	add	w9, w8, #1
	str	w9, [x19, #32]
Lloh0:
	adrp	x9, _IO_PIN_SHUTDOWN_LIMIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IO_PIN_SHUTDOWN_LIMIT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x9, x8
	b.gt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CHB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHB@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _IRQ_CTS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_CTS@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_irq_disable
LBB0_2:
	ldr	w8, [x19, #28]
	add	w8, w8, #1
	str	w8, [x19, #28]
Lloh9:
	adrp	x21, _SerialSignal_CTS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SerialSignal_CTS@GOTPAGEOFF]
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	mov	w8, #24
	mov	w9, #20
	csel	x8, x9, x8, eq
	ldr	w9, [x19, x8]
	add	w9, w9, #1
	str	w9, [x19, x8]
	add	x0, x19, #16
	bl	_wake_up_interruptible
	add	x0, x19, #12
	bl	_wake_up_interruptible
	ldr	w8, [x19, #8]
Lloh11:
	adrp	x9, _ASYNC_CTS_FLOW@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ASYNC_CTS_FLOW@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.3:
	ldr	w9, [x20]
	ldr	w8, [x19]
	ldr	w10, [x21]
	and	w8, w10, w8
	cbz	w9, LBB0_8
; %bb.4:
	cbz	w8, LBB0_12
; %bb.5:
Lloh14:
	adrp	x8, _debug_level@GOTPAGE
Lloh15:
	ldr	x8, [x8, _debug_level@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _DEBUG_LEVEL_ISR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DEBUG_LEVEL_ISR@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_7
; %bb.6:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
LBB0_7:
	str	wzr, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_tx_start
Lloh22:
	adrp	x8, _BH_TRANSMIT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BH_TRANSMIT@GOTPAGEOFF]
	b	LBB0_13
LBB0_8:
	cbnz	w8, LBB0_12
; %bb.9:
Lloh24:
	adrp	x8, _debug_level@GOTPAGE
Lloh25:
	ldr	x8, [x8, _debug_level@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _DEBUG_LEVEL_ISR@GOTPAGE
Lloh28:
	ldr	x9, [x9, _DEBUG_LEVEL_ISR@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_11
; %bb.10:
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
LBB0_11:
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x19
	bl	_tx_stop
LBB0_12:
Lloh32:
	adrp	x8, _BH_STATUS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BH_STATUS@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_PIN_SHUTDOWN_LIMIT,8,3      ; @IO_PIN_SHUTDOWN_LIMIT
	.comm	_CHB,4,2                        ; @CHB
	.comm	_IRQ_CTS,4,2                    ; @IRQ_CTS
	.comm	_SerialSignal_CTS,4,2           ; @SerialSignal_CTS
	.comm	_ASYNC_CTS_FLOW,4,2             ; @ASYNC_CTS_FLOW
	.comm	_debug_level,8,3                ; @debug_level
	.comm	_DEBUG_LEVEL_ISR,8,3            ; @DEBUG_LEVEL_ISR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CTS tx start..."

	.comm	_BH_TRANSMIT,4,2                ; @BH_TRANSMIT
l_.str.1:                               ; @.str.1
	.asciz	"CTS tx stop..."

	.comm	_BH_STATUS,4,2                  ; @BH_STATUS
	.no_dead_strip	_cts_change
.subsections_via_symbols
