	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_stop
_rs_stop:                               ## @rs_stop
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rbx
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_serial_paranoia_check
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %eax
	movq	_UART_IER_THRI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_3
## %bb.2:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movq	_UART_ESI_CMD1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ESI_SET_SRV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_serial_out
	movq	_UART_ESI_CMD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_serial_out
LBB0_3:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rs_stop"

	.comm	_UART_IER_THRI,4,2              ## @UART_IER_THRI
	.comm	_UART_ESI_CMD1,4,2              ## @UART_ESI_CMD1
	.comm	_ESI_SET_SRV_MASK,4,2           ## @ESI_SET_SRV_MASK
	.comm	_UART_ESI_CMD2,4,2              ## @UART_ESI_CMD2
	.no_dead_strip	_rs_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_stop
_rs_stop:                               ; @rs_stop
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0, #8]
	ldr	w1, [x0]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_serial_paranoia_check
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _UART_IER_THRI@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UART_IER_THRI@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bic	w8, w8, w9
	str	w8, [x19]
Lloh5:
	adrp	x8, _UART_ESI_CMD1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UART_ESI_CMD1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _ESI_SET_SRV_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ESI_SET_SRV_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_serial_out
Lloh11:
	adrp	x8, _UART_ESI_CMD2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UART_ESI_CMD2@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_serial_out
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rs_stop"

	.comm	_UART_IER_THRI,4,2              ; @UART_IER_THRI
	.comm	_UART_ESI_CMD1,4,2              ; @UART_ESI_CMD1
	.comm	_ESI_SET_SRV_MASK,4,2           ; @ESI_SET_SRV_MASK
	.comm	_UART_ESI_CMD2,4,2              ; @UART_ESI_CMD2
	.no_dead_strip	_rs_stop
.subsections_via_symbols
