	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdio_uart_shutdown
_sdio_uart_shutdown:                    ## @sdio_uart_shutdown
	.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	%rdi, %rbx
	callq	_sdio_uart_claim_func
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_sdio_uart_stop_rx
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	movq	_HUPCL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rax
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sdio_uart_clear_mctrl
LBB0_3:
	movl	16(%rbx), %edi
	callq	_sdio_release_irq
	movq	$0, 24(%rbx)
	movq	_UART_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_sdio_out
	movq	_TIOCM_OUT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sdio_uart_clear_mctrl
	movq	_UART_LCR_SBC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	(%rbx), %edx
	movl	%edx, (%rbx)
	movq	_UART_LCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sdio_out
	movq	_UART_FCR@GOTPCREL(%rip), %r14
	movq	_UART_FCR_ENABLE_FIFO@GOTPCREL(%rip), %rax
	movq	_UART_FCR_CLEAR_RCVR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	(%r14), %esi
	movq	_UART_FCR_CLEAR_XMIT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_sdio_out
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_sdio_out
	movl	16(%rbx), %edi
	callq	_sdio_disable_func
	movq	%rbx, %rdi
	callq	_sdio_uart_release_func
LBB0_4:
	movq	8(%rbx), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_free_page                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HUPCL,4,2                      ## @HUPCL
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.comm	_TIOCM_RTS,4,2                  ## @TIOCM_RTS
	.comm	_UART_IER,4,2                   ## @UART_IER
	.comm	_TIOCM_OUT2,4,2                 ## @TIOCM_OUT2
	.comm	_UART_LCR_SBC,4,2               ## @UART_LCR_SBC
	.comm	_UART_LCR,4,2                   ## @UART_LCR
	.comm	_UART_FCR,4,2                   ## @UART_FCR
	.comm	_UART_FCR_ENABLE_FIFO,4,2       ## @UART_FCR_ENABLE_FIFO
	.comm	_UART_FCR_CLEAR_RCVR,4,2        ## @UART_FCR_CLEAR_RCVR
	.comm	_UART_FCR_CLEAR_XMIT,4,2        ## @UART_FCR_CLEAR_XMIT
	.no_dead_strip	_sdio_uart_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdio_uart_shutdown
_sdio_uart_shutdown:                    ; @sdio_uart_shutdown
	.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
	mov	x19, x0
	bl	_sdio_uart_claim_func
	cbnz	w0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_sdio_uart_stop_rx
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _HUPCL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HUPCL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _TIOCM_DTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIOCM_DTR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _TIOCM_RTS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TIOCM_RTS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_sdio_uart_clear_mctrl
LBB0_3:
	ldr	w0, [x19, #16]
	bl	_sdio_release_irq
	str	xzr, [x19, #24]
Lloh9:
	adrp	x8, _UART_IER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _UART_IER@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_sdio_out
Lloh12:
	adrp	x8, _TIOCM_OUT2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TIOCM_OUT2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sdio_uart_clear_mctrl
Lloh15:
	adrp	x8, _UART_LCR_SBC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UART_LCR_SBC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w2, w9, w8
	str	w2, [x19]
Lloh18:
	adrp	x8, _UART_LCR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _UART_LCR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sdio_out
Lloh21:
	adrp	x20, _UART_FCR@GOTPAGE
Lloh22:
	ldr	x20, [x20, _UART_FCR@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh23:
	adrp	x8, _UART_FCR_ENABLE_FIFO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _UART_FCR_ENABLE_FIFO@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _UART_FCR_CLEAR_RCVR@GOTPAGE
Lloh27:
	ldr	x9, [x9, _UART_FCR_CLEAR_RCVR@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh29:
	adrp	x9, _UART_FCR_CLEAR_XMIT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _UART_FCR_CLEAR_XMIT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_sdio_out
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_sdio_out
	ldr	w0, [x19, #16]
	bl	_sdio_disable_func
	mov	x0, x19
	bl	_sdio_uart_release_func
LBB0_4:
	ldr	x0, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_free_page
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HUPCL,4,2                      ; @HUPCL
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.comm	_TIOCM_RTS,4,2                  ; @TIOCM_RTS
	.comm	_UART_IER,4,2                   ; @UART_IER
	.comm	_TIOCM_OUT2,4,2                 ; @TIOCM_OUT2
	.comm	_UART_LCR_SBC,4,2               ; @UART_LCR_SBC
	.comm	_UART_LCR,4,2                   ; @UART_LCR
	.comm	_UART_FCR,4,2                   ; @UART_FCR
	.comm	_UART_FCR_ENABLE_FIFO,4,2       ; @UART_FCR_ENABLE_FIFO
	.comm	_UART_FCR_CLEAR_RCVR,4,2        ; @UART_FCR_CLEAR_RCVR
	.comm	_UART_FCR_CLEAR_XMIT,4,2        ; @UART_FCR_CLEAR_XMIT
	.no_dead_strip	_sdio_uart_shutdown
.subsections_via_symbols
