	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_pci_probe
_sdhci_pci_probe:                       ## @sdhci_pci_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	xorl	%edi, %edi
	testq	%r12, %r12
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_BUG_ON
	movl	24(%r12), %edx
	movl	8(%r12), %r8d
	movl	16(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
	movq	_PCI_SLOT_INFO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.1:
	movl	-36(%rbp), %edi
	callq	_PCI_SLOT_INFO_SLOTS
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edx
	movl	%edx, -36(%rbp)
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_dbg
	movl	-36(%rbp), %eax
	movq	_MAX_SLOTS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setg	%dil
	callq	_BUG_ON
	movl	(%r15), %esi
	leaq	-40(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.2:
	movq	_PCI_SLOT_INFO_FIRST_BAR_MASK@GOTPCREL(%rip), %rax
	movl	-40(%rbp), %ecx
	andl	(%rax), %ecx
	movl	%ecx, -40(%rbp)
	cmpl	$6, %ecx
	jl	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_4:
	movq	%r12, %rdi
	callq	_pcim_enable_device
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_23:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$56, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %r15
	movq	%r12, 48(%rax)
	movq	(%r14), %rax
	movq	%rax, 32(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	20(%rax), %ecx
	movl	%ecx, 44(%r15)
	movl	16(%rax), %ecx
	movl	%ecx, 40(%r15)
	movq	8(%rax), %rax
	movq	%rax, 16(%r15)
LBB0_10:
	movl	-36(%rbp), %eax
	movl	%eax, (%r15)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 4(%r15)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_pci_set_drvdata
	movq	32(%r15), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	*%rax
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
LBB0_13:
	movl	(%r15), %eax
	movl	%eax, -36(%rbp)
	testl	%eax, %eax
	jle	LBB0_21
## %bb.14:
	xorl	%r14d, %r14d
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	-40(%rbp), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %ecx
	callq	_sdhci_pci_probe_slot
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_16
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	24(%r15), %rax
	movq	%rbx, (%rax,%r14,8)
	incq	%r14
	movslq	-36(%rbp), %rax
	cmpq	%rax, %r14
	jl	LBB0_15
LBB0_21:
	xorl	%ebx, %ebx
	cmpq	$0, 16(%r15)
	je	LBB0_23
## %bb.22:
	movq	%r12, %rdi
	callq	_sdhci_pci_runtime_pm_allow
	jmp	LBB0_23
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_16:
	testl	%r14d, %r14d
	je	LBB0_19
## %bb.17:
	incq	%r14
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movq	-16(%rax,%r14,8), %rdi
	callq	_sdhci_pci_remove_slot
	decq	%r14
	cmpq	$1, %r14
	jg	LBB0_18
LBB0_19:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDHCI controller found [%04x:%04x] (rev %x)\n"

	.comm	_PCI_SLOT_INFO,4,2              ## @PCI_SLOT_INFO
L_.str.1:                               ## @.str.1
	.asciz	"found %d slot(s)\n"

	.comm	_MAX_SLOTS,4,2                  ## @MAX_SLOTS
	.comm	_PCI_SLOT_INFO_FIRST_BAR_MASK,4,2 ## @PCI_SLOT_INFO_FIRST_BAR_MASK
L_.str.2:                               ## @.str.2
	.asciz	"Invalid first BAR. Aborting.\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sdhci_pci_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_pci_probe
_sdhci_pci_probe:                       ; @sdhci_pci_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	cmp	x20, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w2, [x19, #24]
	ldr	w3, [x19, #16]
	ldr	w4, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_info
Lloh2:
	adrp	x21, _PCI_SLOT_INFO@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PCI_SLOT_INFO@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_byte
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w0, [sp, #12]
	bl	_PCI_SLOT_INFO_SLOTS
	add	w2, w0, #1
	str	w2, [sp, #12]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _MAX_SLOTS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_SLOTS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, gt
	bl	_BUG_ON
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_byte
	cbnz	w0, LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _PCI_SLOT_INFO_FIRST_BAR_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_SLOT_INFO_FIRST_BAR_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	and	w8, w9, w8
	str	w8, [sp, #8]
	cmp	w8, #6
	b.lt	LBB0_5
; %bb.3:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_pcim_enable_device
	cbz	w0, LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
Lloh16:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #56
	bl	_devm_kzalloc
	cbz	x0, LBB0_20
; %bb.8:
	mov	x21, x0
	str	x19, [x0, #48]
	ldr	x8, [x20]
	str	x8, [x0, #32]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	d0, [x8, #16]
	str	d0, [x21, #40]
	ldr	x8, [x8, #8]
	str	x8, [x21, #16]
LBB0_10:
	ldr	w8, [sp, #12]
	str	w8, [x21]
	movi.2s	v0, #1
	stur	d0, [x21, #4]
	mov	x0, x19
	mov	x1, x21
	bl	_pci_set_drvdata
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x21
	blr	x8
	cbnz	w0, LBB0_6
LBB0_13:
	ldr	w8, [x21]
	str	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.14:
	mov	x22, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [sp, #8]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_sdhci_pci_probe_slot
	mov	x20, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x21, #24]
	str	x20, [x8, x22, lsl #3]
	add	x22, x22, #1
	ldrsw	x8, [sp, #12]
	cmp	x22, x8
	b.lt	LBB0_15
LBB0_17:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_sdhci_pci_runtime_pm_allow
LBB0_19:
	mov	w0, #0
	b	LBB0_6
LBB0_20:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_21:
	cbz	w22, LBB0_24
; %bb.22:
	sub	x19, x22, #1
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #24]
	ldr	x0, [x8, x19, lsl #3]
	bl	_sdhci_pci_remove_slot
	add	x8, x19, #1
	sub	x19, x19, #1
	cmp	x8, #1
	b.gt	LBB0_23
LBB0_24:
	mov	x0, x20
	bl	_PTR_ERR
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDHCI controller found [%04x:%04x] (rev %x)\n"

	.comm	_PCI_SLOT_INFO,4,2              ; @PCI_SLOT_INFO
l_.str.1:                               ; @.str.1
	.asciz	"found %d slot(s)\n"

	.comm	_MAX_SLOTS,4,2                  ; @MAX_SLOTS
	.comm	_PCI_SLOT_INFO_FIRST_BAR_MASK,4,2 ; @PCI_SLOT_INFO_FIRST_BAR_MASK
l_.str.2:                               ; @.str.2
	.asciz	"Invalid first BAR. Aborting.\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sdhci_pci_probe
.subsections_via_symbols
