	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdio_uart_port_remove
_sdio_uart_port_remove:                 ## @sdio_uart_port_remove
	.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	%rdi, %r14
	movq	_sdio_uart_table_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	_sdio_uart_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	%rbx, %rdi
	callq	_spin_unlock
	leaq	8(%r14), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	leaq	12(%r14), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_sdio_claim_host
	movq	$0, 16(%r14)
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_tty_port_tty_hangup
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_sdio_release_irq
	movq	%rbx, %rdi
	callq	_sdio_disable_func
	movq	%rbx, %rdi
	callq	_sdio_release_host
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdio_uart_port_put             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_sdio_uart_table_lock,4,2       ## @sdio_uart_table_lock
	.comm	_sdio_uart_table,8,3            ## @sdio_uart_table
	.no_dead_strip	_sdio_uart_port_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdio_uart_port_remove
_sdio_uart_port_remove:                 ; @sdio_uart_port_remove
	.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	x19, x0
Lloh0:
	adrp	x20, _sdio_uart_table_lock@GOTPAGE
Lloh1:
	ldr	x20, [x20, _sdio_uart_table_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock
Lloh2:
	adrp	x8, _sdio_uart_table@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sdio_uart_table@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [x19]
	str	xzr, [x8, x9, lsl #3]
	mov	x0, x20
	bl	_spin_unlock
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	add	x21, x19, #12
	mov	x0, x21
	bl	_mutex_lock
	ldr	x22, [x19, #16]
	mov	x0, x22
	bl	_sdio_claim_host
	str	xzr, [x19, #16]
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x20
	mov	w1, #0
	bl	_tty_port_tty_hangup
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x22
	bl	_sdio_release_irq
	mov	x0, x22
	bl	_sdio_disable_func
	mov	x0, x22
	bl	_sdio_release_host
	mov	x0, x19
	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
	b	_sdio_uart_port_put
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_sdio_uart_table_lock,4,2       ; @sdio_uart_table_lock
	.comm	_sdio_uart_table,8,3            ; @sdio_uart_table
	.no_dead_strip	_sdio_uart_port_remove
.subsections_via_symbols
