	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memstick_remove_host           ## -- Begin function memstick_remove_host
	.p2align	4, 0x90
_memstick_remove_host:                  ## @memstick_remove_host
	.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
	movq	_workqueue@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_flush_workqueue
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_device_unregister
LBB0_2:
	movq	$0, 24(%rbx)
	movq	_MEMSTICK_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MEMSTICK_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_memstick_host_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	4(%rbx), %esi
	movq	_memstick_host_idr@GOTPCREL(%rip), %rdi
	callq	_idr_remove
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_device_del                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_workqueue,4,2                  ## @workqueue
	.comm	_MEMSTICK_POWER,4,2             ## @MEMSTICK_POWER
	.comm	_MEMSTICK_POWER_OFF,4,2         ## @MEMSTICK_POWER_OFF
	.comm	_memstick_host_lock,4,2         ## @memstick_host_lock
	.comm	_memstick_host_idr,4,2          ## @memstick_host_idr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memstick_remove_host           ; -- Begin function memstick_remove_host
	.p2align	2
_memstick_remove_host:                  ; @memstick_remove_host
	.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
Lloh0:
	adrp	x8, _workqueue@GOTPAGE
Lloh1:
	ldr	x8, [x8, _workqueue@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_flush_workqueue
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_device_unregister
LBB0_2:
	str	xzr, [x19, #24]
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _MEMSTICK_POWER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MEMSTICK_POWER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
Lloh6:
	adrp	x9, _MEMSTICK_POWER_OFF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MEMSTICK_POWER_OFF@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x9]
	mov	x0, x19
	blr	x8
	mov	x0, x20
	bl	_mutex_unlock
Lloh9:
	adrp	x20, _memstick_host_lock@GOTPAGE
Lloh10:
	ldr	x20, [x20, _memstick_host_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock
	ldr	w1, [x19, #4]
Lloh11:
	adrp	x0, _memstick_host_idr@GOTPAGE
Lloh12:
	ldr	x0, [x0, _memstick_host_idr@GOTPAGEOFF]
	bl	_idr_remove
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_device_del
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_workqueue,4,2                  ; @workqueue
	.comm	_MEMSTICK_POWER,4,2             ; @MEMSTICK_POWER
	.comm	_MEMSTICK_POWER_OFF,4,2         ; @MEMSTICK_POWER_OFF
	.comm	_memstick_host_lock,4,2         ; @memstick_host_lock
	.comm	_memstick_host_idr,4,2          ; @memstick_host_idr
.subsections_via_symbols
