	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smssdio_probe
_smssdio_probe:                         ## @smssdio_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rsi), %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, 8(%rax)
	leaq	-88(%rbp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	%r14, -48(%rbp)
	movabsq	$94489300992, %rax              ## imm = 0x1600005000
	movq	%rax, -88(%rbp)
	movq	%r15, -56(%rbp)
	movl	-64(%rbp), %ebx
	movq	%r14, %rdi
	callq	_sdio_func_id
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %edi
	movl	$4, %esi
	movq	%rax, %rcx
	callq	_snprintf
	movq	_smssdio_sendrequest@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movl	%r12d, %edi
	callq	_sms_get_board
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movq	_SMS_STELLAR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_14
LBB0_3:
	movq	_SMS_DEVICE_FAMILY2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -72(%rbp)
	movq	_GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-88(%rbp), %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_smscore_register_device
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:
	movl	(%r15), %edi
	movl	%r12d, %esi
	callq	_smscore_set_board_id
	movq	%r14, %rdi
	callq	_sdio_claim_host
	movq	%r14, %rdi
	callq	_sdio_enable_func
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movq	_SMSSDIO_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sdio_set_block_size
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	_smssdio_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sdio_claim_irq
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	movq	%r14, %rdi
	callq	_sdio_disable_func
LBB0_12:
	movq	%r14, %rdi
	callq	_sdio_release_host
	movl	(%r15), %edi
	callq	_smscore_unregister_device
	jmp	LBB0_13
LBB0_4:
	movl	%eax, %r13d
LBB0_13:
	movq	%r15, %rdi
	callq	_kfree
LBB0_14:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sdio_set_drvdata
	movq	%r14, %rdi
	callq	_sdio_release_host
	movl	(%r15), %edi
	callq	_smscore_start_device
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jns	LBB0_14
## %bb.10:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_sdio_claim_host
	movq	%r14, %rdi
	callq	_sdio_release_irq
	movl	%r12d, %r13d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sdio\\%s"

	.comm	_smssdio_sendrequest,4,2        ## @smssdio_sendrequest
	.comm	_SMS_STELLAR,8,3                ## @SMS_STELLAR
	.comm	_SMS_DEVICE_FAMILY2,4,2         ## @SMS_DEVICE_FAMILY2
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_SMSSDIO_BLOCK_SIZE,4,2         ## @SMSSDIO_BLOCK_SIZE
	.comm	_smssdio_interrupt,4,2          ## @smssdio_interrupt
	.no_dead_strip	_smssdio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function smssdio_probe
lCPI0_0:
	.long	20480                           ; 0x5000
	.long	22                              ; 0x16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_smssdio_probe:                         ; @smssdio_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	ldr	w21, [x1]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	x20, [x0, #8]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp]
	stp	x19, x20, [sp, #32]
	ldr	w22, [sp, #24]
	mov	x0, x20
	bl	_sdio_func_id
	mov	x3, x0
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	w1, #4
	bl	_snprintf
Lloh7:
	adrp	x8, _smssdio_sendrequest@GOTPAGE
Lloh8:
	ldr	x8, [x8, _smssdio_sendrequest@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [sp, #20]
	mov	x0, x21
	bl	_sms_get_board
	ldr	x8, [x0]
	str	x8, [sp, #8]
Lloh10:
	adrp	x9, _SMS_STELLAR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SMS_STELLAR@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_3:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_4:
Lloh19:
	adrp	x8, _SMS_DEVICE_FAMILY2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SMS_DEVICE_FAMILY2@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [sp, #16]
	orr	w8, w9, w8
	str	w8, [sp, #16]
Lloh22:
	adrp	x8, _GFP_DMA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GFP_DMA@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, sp
	mov	x1, x19
	mov	x3, #0
	bl	_smscore_register_device
	tbnz	w0, #31, LBB0_10
; %bb.5:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_smscore_set_board_id
	mov	x0, x20
	bl	_sdio_claim_host
	mov	x0, x20
	bl	_sdio_enable_func
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.6:
Lloh25:
	adrp	x8, _SMSSDIO_BLOCK_SIZE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SMSSDIO_BLOCK_SIZE@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sdio_set_block_size
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.7:
Lloh28:
	adrp	x8, _smssdio_interrupt@GOTPAGE
Lloh29:
	ldr	x8, [x8, _smssdio_interrupt@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sdio_claim_irq
	mov	x22, x0
	cbz	w0, LBB0_13
LBB0_8:
	mov	x0, x20
	bl	_sdio_disable_func
LBB0_9:
	mov	x0, x20
	bl	_sdio_release_host
	ldr	w0, [x19]
	bl	_smscore_unregister_device
	b	LBB0_11
LBB0_10:
	mov	x22, x0
LBB0_11:
	mov	x0, x19
	bl	_kfree
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	bl	_sdio_set_drvdata
	mov	x0, x20
	bl	_sdio_release_host
	ldr	w0, [x19]
	bl	_smscore_start_device
	tbnz	w0, #31, LBB0_15
; %bb.14:
	mov	w22, #0
	b	LBB0_12
LBB0_15:
	mov	x22, x0
	mov	x0, x20
	bl	_sdio_claim_host
	mov	x0, x20
	bl	_sdio_release_irq
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sdio\\%s"

	.comm	_smssdio_sendrequest,4,2        ; @smssdio_sendrequest
	.comm	_SMS_STELLAR,8,3                ; @SMS_STELLAR
	.comm	_SMS_DEVICE_FAMILY2,4,2         ; @SMS_DEVICE_FAMILY2
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_SMSSDIO_BLOCK_SIZE,4,2         ; @SMSSDIO_BLOCK_SIZE
	.comm	_smssdio_interrupt,4,2          ; @smssdio_interrupt
	.no_dead_strip	_smssdio_probe
.subsections_via_symbols
