	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_pci_init_chip
_rtsx_pci_init_chip:                    ## @rtsx_pci_init_chip
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	addq	$52, %rdi
	callq	_spin_lock_init
	leaq	48(%rbx), %rdi
	callq	_mutex_init
	movq	%rbx, %rdi
	callq	_PCI_PID
                                        ## kill: def $eax killed $eax def $rax
	addl	$-21031, %eax                   ## imm = 0xADD9
	cmpl	$98, %eax
	ja	LBB0_2
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_5:
	movq	%rbx, %rdi
	callq	_rts5227_init_params
	jmp	LBB0_13
LBB0_2:
	movq	%rbx, %rdi
	callq	_rts5209_init_params
	jmp	LBB0_13
LBB0_3:
	movq	%rbx, %rdi
	callq	_rts5229_init_params
	jmp	LBB0_13
LBB0_6:
	movq	%rbx, %rdi
	callq	_rts522a_init_params
	jmp	LBB0_13
LBB0_7:
	movq	%rbx, %rdi
	callq	_rts5249_init_params
	jmp	LBB0_13
LBB0_8:
	movq	%rbx, %rdi
	callq	_rts524a_init_params
	jmp	LBB0_13
LBB0_9:
	movq	%rbx, %rdi
	callq	_rts525a_init_params
	jmp	LBB0_13
LBB0_12:
	movq	%rbx, %rdi
	callq	_rts5260_init_params
	jmp	LBB0_13
LBB0_11:
	movq	%rbx, %rdi
	callq	_rtl8402_init_params
	jmp	LBB0_13
LBB0_10:
	movq	%rbx, %rdi
	callq	_rtl8411b_init_params
	jmp	LBB0_13
LBB0_4:
	movq	%rbx, %rdi
	callq	_rtl8411_init_params
LBB0_13:
	movq	%rbx, %rdi
	callq	_PCI_PID
	movl	44(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pcr_dbg
	movl	40(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_17:
	movl	24(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_pcr_dbg
	movl	20(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_pcr_dbg
	movl	16(%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_pcr_dbg
	movl	12(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_pcr_dbg
	movl	8(%rbx), %edx
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_pcr_dbg
	movq	_PDEV_STAT_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_rtsx_pci_init_hw
	testl	%eax, %eax
	jns	LBB0_19
## %bb.18:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_kfree
	movl	%r15d, %r14d
	jmp	LBB0_19
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_9
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_12
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_11
	.long	L0_0_set_10
	.long	L0_0_set_2
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PID: 0x%04x, IC version: 0x%02x\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"pcr->aspm_en = 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"pcr->sd30_drive_sel_1v8 = 0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"pcr->sd30_drive_sel_3v3 = 0x%x\n"

L_.str.4:                               ## @.str.4
	.asciz	"pcr->card_drive_sel = 0x%x\n"

L_.str.5:                               ## @.str.5
	.asciz	"pcr->flags = 0x%x\n"

	.comm	_PDEV_STAT_IDLE,4,2             ## @PDEV_STAT_IDLE
	.no_dead_strip	_rtsx_pci_init_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_pci_init_chip
_rtsx_pci_init_chip:                    ; @rtsx_pci_init_chip
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	add	x0, x0, #52
	bl	_spin_lock_init
	add	x0, x19, #48
	bl	_mutex_init
	mov	x0, x19
	bl	_PCI_PID
	mov	w8, #-21031
	add	w8, w0, w8
	cmp	w8, #98
	b.hi	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x19
	bl	_rts5227_init_params
	b	LBB0_13
LBB0_3:
	mov	x0, x19
	bl	_rts5209_init_params
	b	LBB0_13
LBB0_4:
	mov	x0, x19
	bl	_rts5229_init_params
	b	LBB0_13
LBB0_5:
	mov	x0, x19
	bl	_rts522a_init_params
	b	LBB0_13
LBB0_6:
	mov	x0, x19
	bl	_rts5249_init_params
	b	LBB0_13
LBB0_7:
	mov	x0, x19
	bl	_rts524a_init_params
	b	LBB0_13
LBB0_8:
	mov	x0, x19
	bl	_rts525a_init_params
	b	LBB0_13
LBB0_9:
	mov	x0, x19
	bl	_rts5260_init_params
	b	LBB0_13
LBB0_10:
	mov	x0, x19
	bl	_rtl8402_init_params
	b	LBB0_13
LBB0_11:
	mov	x0, x19
	bl	_rtl8411b_init_params
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_rtl8411_init_params
LBB0_13:
	mov	x0, x19
	bl	_PCI_PID
	mov	x2, x0
	ldr	w8, [x19, #44]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pcr_dbg
	ldr	w0, [x19, #40]
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	str	w0, [x19]
	cbz	w0, LBB0_18
; %bb.14:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.15:
	mov	x0, x19
	blr	x8
LBB0_16:
	ldr	w2, [x19, #24]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pcr_dbg
	ldr	w2, [x19, #20]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_pcr_dbg
	ldr	w2, [x19, #16]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_pcr_dbg
	ldr	w2, [x19, #12]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_pcr_dbg
	ldr	w2, [x19, #8]
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_pcr_dbg
Lloh17:
	adrp	x8, _PDEV_STAT_IDLE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PDEV_STAT_IDLE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_rtsx_pci_init_hw
	tbnz	w0, #31, LBB0_19
; %bb.17:
	mov	w20, #0
	b	LBB0_20
LBB0_18:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_20
LBB0_19:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_kfree
LBB0_20:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3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	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PID: 0x%04x, IC version: 0x%02x\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"pcr->aspm_en = 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"pcr->sd30_drive_sel_1v8 = 0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"pcr->sd30_drive_sel_3v3 = 0x%x\n"

l_.str.4:                               ; @.str.4
	.asciz	"pcr->card_drive_sel = 0x%x\n"

l_.str.5:                               ; @.str.5
	.asciz	"pcr->flags = 0x%x\n"

	.comm	_PDEV_STAT_IDLE,4,2             ; @PDEV_STAT_IDLE
	.no_dead_strip	_rtsx_pci_init_chip
.subsections_via_symbols
