	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_usb_ms_drv_probe
_rtsx_usb_ms_drv_probe:                 ## @rtsx_usb_ms_drv_probe
	.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, %rbx
	movl	(%rdi), %edi
	callq	_to_usb_interface
	movl	%eax, %edi
	callq	_usb_get_intfdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	movl	$40, %edi
	movq	%rbx, %rsi
	callq	_memstick_alloc_host
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_memstick_priv
	movq	%rax, %r15
	movq	%r12, 32(%rax)
	movq	%r14, 24(%rax)
	movq	%rbx, 16(%rax)
	movq	_MEMSTICK_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	leaq	8(%r15), %rdi
	callq	_mutex_init
	leaq	4(%r15), %rdi
	movq	_rtsx_usb_ms_handle_req@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	_rtsx_usb_ms_poll_card@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_INIT_DELAYED_WORK
	movq	_rtsx_usb_ms_request@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_rtsx_usb_ms_set_param@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	_MEMSTICK_CAP_PAR4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	%r15, %rdi
	callq	_ms_dev
	movl	%eax, %edi
	callq	_pm_runtime_get_noresume
	movq	%r15, %rdi
	callq	_ms_dev
	movl	%eax, %edi
	callq	_pm_runtime_set_active
	movq	%r15, %rdi
	callq	_ms_dev
	movl	%eax, %edi
	callq	_pm_runtime_enable
	movq	%r14, %rdi
	callq	_memstick_add_host
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_memstick_free_host
	movq	%r15, %rdi
	callq	_ms_dev
	movl	%eax, %edi
	callq	_pm_runtime_disable
	movq	%r15, %rdi
	callq	_ms_dev
	movl	%eax, %edi
	callq	_pm_runtime_put_noidle
	jmp	LBB0_8
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_6:
	movq	%r15, %rdi
	callq	_ms_dev
	movl	%eax, %edi
	callq	_pm_runtime_put
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Realtek USB Memstick controller found\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MEMSTICK_POWER_OFF,4,2         ## @MEMSTICK_POWER_OFF
	.comm	_rtsx_usb_ms_handle_req,4,2     ## @rtsx_usb_ms_handle_req
	.comm	_rtsx_usb_ms_poll_card,4,2      ## @rtsx_usb_ms_poll_card
	.comm	_rtsx_usb_ms_request,4,2        ## @rtsx_usb_ms_request
	.comm	_rtsx_usb_ms_set_param,4,2      ## @rtsx_usb_ms_set_param
	.comm	_MEMSTICK_CAP_PAR4,4,2          ## @MEMSTICK_CAP_PAR4
	.no_dead_strip	_rtsx_usb_ms_drv_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_usb_ms_drv_probe
_rtsx_usb_ms_drv_probe:                 ; @rtsx_usb_ms_drv_probe
	.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	x21, x0
	ldr	w0, [x0]
	bl	_to_usb_interface
	bl	_usb_get_intfdata
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	w0, #40
	mov	x1, x21
	bl	_memstick_alloc_host
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	bl	_memstick_priv
	mov	x19, x0
	stp	x20, x22, [x0, #24]
	str	x21, [x0, #16]
Lloh2:
	adrp	x8, _MEMSTICK_POWER_OFF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MEMSTICK_POWER_OFF@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x0, #12]
	mov	x0, x21
	mov	x1, x19
	bl	_platform_set_drvdata
	add	x0, x19, #8
	bl	_mutex_init
	add	x0, x19, #4
Lloh5:
	adrp	x8, _rtsx_usb_ms_handle_req@GOTPAGE
Lloh6:
	ldr	x8, [x8, _rtsx_usb_ms_handle_req@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_INIT_WORK
Lloh8:
	adrp	x8, _rtsx_usb_ms_poll_card@GOTPAGE
Lloh9:
	ldr	x8, [x8, _rtsx_usb_ms_poll_card@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_INIT_DELAYED_WORK
Lloh11:
	adrp	x8, _rtsx_usb_ms_request@GOTPAGE
Lloh12:
	ldr	x8, [x8, _rtsx_usb_ms_request@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20, #8]
Lloh14:
	adrp	x8, _rtsx_usb_ms_set_param@GOTPAGE
Lloh15:
	ldr	x8, [x8, _rtsx_usb_ms_set_param@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _MEMSTICK_CAP_PAR4@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MEMSTICK_CAP_PAR4@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x20]
	mov	x0, x19
	bl	_ms_dev
	bl	_pm_runtime_get_noresume
	mov	x0, x19
	bl	_ms_dev
	bl	_pm_runtime_set_active
	mov	x0, x19
	bl	_ms_dev
	bl	_pm_runtime_enable
	mov	x0, x20
	bl	_memstick_add_host
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.3:
	mov	x0, x20
	bl	_memstick_free_host
	mov	x0, x19
	bl	_ms_dev
	bl	_pm_runtime_disable
	mov	x0, x19
	bl	_ms_dev
	bl	_pm_runtime_put_noidle
	b	LBB0_8
LBB0_4:
Lloh20:
	adrp	x8, _ENXIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_ms_dev
	bl	_pm_runtime_put
LBB0_8:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Realtek USB Memstick controller found\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MEMSTICK_POWER_OFF,4,2         ; @MEMSTICK_POWER_OFF
	.comm	_rtsx_usb_ms_handle_req,4,2     ; @rtsx_usb_ms_handle_req
	.comm	_rtsx_usb_ms_poll_card,4,2      ; @rtsx_usb_ms_poll_card
	.comm	_rtsx_usb_ms_request,4,2        ; @rtsx_usb_ms_request
	.comm	_rtsx_usb_ms_set_param,4,2      ; @rtsx_usb_ms_set_param
	.comm	_MEMSTICK_CAP_PAR4,4,2          ; @MEMSTICK_CAP_PAR4
	.no_dead_strip	_rtsx_usb_ms_drv_probe
.subsections_via_symbols
