	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memstick_add_host              ## -- Begin function memstick_add_host
	.p2align	4, 0x90
_memstick_add_host:                     ## @memstick_add_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	%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, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_memstick_host_idr@GOTPCREL(%rip), %rdi
	callq	_idr_pre_get
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_memstick_host_lock@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	leaq	8(%r15), %r14
	movq	_memstick_host_idr@GOTPCREL(%rip), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_idr_get_new
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_unlock
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.3:
	leaq	12(%r15), %rbx
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_set_name
	movq	%rbx, %rdi
	callq	_device_add
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	_memstick_host_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movl	(%r14), %esi
	movq	_memstick_host_idr@GOTPCREL(%rip), %rdi
	callq	_idr_remove
	movq	%r15, %rdi
	callq	_spin_unlock
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	movq	_MEMSTICK_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MEMSTICK_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	*(%r15)
	movq	%r15, %rdi
	callq	_memstick_detect_change
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_memstick_host_idr,4,2          ## @memstick_host_idr
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_memstick_host_lock,4,2         ## @memstick_host_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"memstick%u"

	.comm	_MEMSTICK_POWER,4,2             ## @MEMSTICK_POWER
	.comm	_MEMSTICK_POWER_OFF,4,2         ## @MEMSTICK_POWER_OFF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memstick_add_host              ; -- Begin function memstick_add_host
	.p2align	2
_memstick_add_host:                     ; @memstick_add_host
	.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	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _memstick_host_idr@GOTPAGE
Lloh4:
	ldr	x0, [x0, _memstick_host_idr@GOTPAGEOFF]
	bl	_idr_pre_get
	cbz	w0, LBB0_4
; %bb.1:
Lloh5:
	adrp	x22, _memstick_host_lock@GOTPAGE
Lloh6:
	ldr	x22, [x22, _memstick_host_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_spin_lock
	add	x20, x19, #8
Lloh7:
	adrp	x0, _memstick_host_idr@GOTPAGE
Lloh8:
	ldr	x0, [x0, _memstick_host_idr@GOTPAGEOFF]
	mov	x1, x19
	mov	x2, x20
	bl	_idr_get_new
	mov	x21, x0
	mov	x0, x22
	bl	_spin_unlock
	cbnz	w21, LBB0_6
; %bb.2:
	add	x21, x19, #12
	ldr	w2, [x19, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_set_name
	mov	x0, x21
	bl	_device_add
	mov	x21, x0
	cbz	w0, LBB0_5
; %bb.3:
Lloh11:
	adrp	x19, _memstick_host_lock@GOTPAGE
Lloh12:
	ldr	x19, [x19, _memstick_host_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_spin_lock
	ldr	w1, [x20]
Lloh13:
	adrp	x0, _memstick_host_idr@GOTPAGE
Lloh14:
	ldr	x0, [x0, _memstick_host_idr@GOTPAGEOFF]
	bl	_idr_remove
	mov	x0, x19
	bl	_spin_unlock
	b	LBB0_6
LBB0_4:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _MEMSTICK_POWER@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MEMSTICK_POWER@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
Lloh21:
	adrp	x9, _MEMSTICK_POWER_OFF@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MEMSTICK_POWER_OFF@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x9]
	mov	x0, x19
	blr	x8
	mov	x0, x19
	bl	_memstick_detect_change
LBB0_6:
	mov	x0, x21
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_memstick_host_idr,4,2          ; @memstick_host_idr
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_memstick_host_lock,4,2         ; @memstick_host_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"memstick%u"

	.comm	_MEMSTICK_POWER,4,2             ; @MEMSTICK_POWER
	.comm	_MEMSTICK_POWER_OFF,4,2         ; @MEMSTICK_POWER_OFF
.subsections_via_symbols
