	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb710_mmc_init
_cb710_mmc_init:                        ## @cb710_mmc_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_cb710_pdev_to_slot
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_cb710_slot_to_chip
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_cb710_slot_dev
	movl	$8, %edi
	movl	%eax, %esi
	callq	_mmc_alloc_host
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movl	(%r15), %edi
	leaq	-44(%rbp), %rdx
	movl	$72, %esi
	callq	_pci_read_config_dword
	movq	_cb710_src_freq_mhz@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	-44(%rbp), %ecx
	shrq	$14, %rcx
	andl	$60, %ecx
	movl	(%rax,%rcx), %eax
	movl	%eax, -44(%rbp)
	movq	%r14, %rdi
	callq	_cb710_slot_dev
	movl	-44(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	imull	$1000000, -44(%rbp), %eax       ## imm = 0xF4240
	movl	%eax, -44(%rbp)
	movq	_cb710_mmc_host@GOTPCREL(%rip), %rcx
	movq	%rcx, 16(%r13)
	movl	%eax, (%r13)
	movl	-44(%rbp), %eax
	movq	_cb710_clock_divider_log2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_CB710_MAX_DIVIDER_IDX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movb	(%rcx,%rdx,4), %cl
	sarl	%cl, %eax
	movl	%eax, 4(%r13)
	movq	_MMC_VDD_32_33@GOTPCREL(%rip), %rax
	movq	_MMC_VDD_33_34@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 8(%r13)
	movq	_MMC_CAP_4_BIT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13)
	movq	%r13, %rdi
	callq	_mmc_priv
	movq	%rax, %rbx
	leaq	4(%rax), %rdi
	movq	_cb710_mmc_finish_request_tasklet@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	callq	_tasklet_init
	movq	%rbx, %rdi
	callq	_spin_lock_init
	movq	_CB710_DUMP_REGS_MMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_cb710_dump_regs
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$-1, %edx
	callq	_cb710_mmc_enable_irq
	movq	_cb710_mmc_irq_handler@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_cb710_set_irq_handler
	movq	%r13, %rdi
	callq	_mmc_add_host
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_unlikely
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_cb710_slot_dev
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	movl	%r12d, %edx
	callq	_dev_dbg
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_cb710_set_irq_handler
	movq	%r13, %rdi
	callq	_mmc_free_host
	movl	%r12d, %r15d
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_5
LBB0_3:
	movq	%r13, %rdi
	movl	%eax, %ebx
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_CB710_MMC_IE_CARD_INSERTION_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_cb710_mmc_enable_irq
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_cb710_src_freq_mhz,8,3         ## @cb710_src_freq_mhz
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"source frequency: %dMHz\n"

	.comm	_cb710_mmc_host,4,2             ## @cb710_mmc_host
	.comm	_cb710_clock_divider_log2,8,3   ## @cb710_clock_divider_log2
	.comm	_CB710_MAX_DIVIDER_IDX,8,3      ## @CB710_MAX_DIVIDER_IDX
	.comm	_MMC_VDD_32_33,4,2              ## @MMC_VDD_32_33
	.comm	_MMC_VDD_33_34,4,2              ## @MMC_VDD_33_34
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ## @MMC_CAP_4_BIT_DATA
	.comm	_cb710_mmc_finish_request_tasklet,4,2 ## @cb710_mmc_finish_request_tasklet
	.comm	_CB710_DUMP_REGS_MMC,4,2        ## @CB710_DUMP_REGS_MMC
	.comm	_cb710_mmc_irq_handler,8,3      ## @cb710_mmc_irq_handler
L_.str.1:                               ## @.str.1
	.asciz	"mmc_hostname is %s\n"

	.comm	_CB710_MMC_IE_CARD_INSERTION_STATUS,4,2 ## @CB710_MMC_IE_CARD_INSERTION_STATUS
L_.str.2:                               ## @.str.2
	.asciz	"mmc_add_host() failed: %d\n"

	.no_dead_strip	_cb710_mmc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cb710_mmc_init
_cb710_mmc_init:                        ; @cb710_mmc_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x0
	bl	_cb710_pdev_to_slot
	mov	x19, x0
	bl	_cb710_slot_to_chip
	mov	x21, x0
	mov	x0, x19
	bl	_cb710_slot_dev
	mov	x1, x0
	mov	w0, #8
	bl	_mmc_alloc_host
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	x0, x22
	mov	x1, x20
	bl	_platform_set_drvdata
	ldr	w0, [x21]
	add	x2, sp, #12
	mov	w1, #72
	bl	_pci_read_config_dword
Lloh0:
	adrp	x8, _cb710_src_freq_mhz@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cb710_src_freq_mhz@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldrh	w9, [sp, #14]
	and	x9, x9, #0xf
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [sp, #12]
	mov	x0, x19
	bl	_cb710_slot_dev
	ldr	w2, [sp, #12]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [sp, #12]
	mov	w9, #16960
	movk	w9, #15, lsl #16
	mul	w8, w8, w9
	str	w8, [sp, #12]
Lloh5:
	adrp	x9, _cb710_mmc_host@GOTPAGE
Lloh6:
	ldr	x9, [x9, _cb710_mmc_host@GOTPAGEOFF]
	str	x9, [x20, #16]
	str	w8, [x20]
	ldr	w8, [sp, #12]
Lloh7:
	adrp	x9, _cb710_clock_divider_log2@GOTPAGE
Lloh8:
	ldr	x9, [x9, _cb710_clock_divider_log2@GOTPAGEOFF]
Lloh9:
	adrp	x10, _CB710_MAX_DIVIDER_IDX@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CB710_MAX_DIVIDER_IDX@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
Lloh13:
	adrp	x10, _MMC_VDD_32_33@GOTPAGE
Lloh14:
	ldr	x10, [x10, _MMC_VDD_32_33@GOTPAGEOFF]
	asr	w8, w8, w9
Lloh15:
	ldr	w9, [x10]
Lloh16:
	adrp	x10, _MMC_VDD_33_34@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MMC_VDD_33_34@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
	stp	w8, w9, [x20, #4]
Lloh19:
	adrp	x8, _MMC_CAP_4_BIT_DATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MMC_CAP_4_BIT_DATA@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	x0, x20
	bl	_mmc_priv
	mov	x22, x0
	add	x0, x0, #4
Lloh22:
	adrp	x8, _cb710_mmc_finish_request_tasklet@GOTPAGE
Lloh23:
	ldr	x8, [x8, _cb710_mmc_finish_request_tasklet@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_tasklet_init
	mov	x0, x22
	bl	_spin_lock_init
Lloh25:
	adrp	x8, _CB710_DUMP_REGS_MMC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CB710_DUMP_REGS_MMC@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_cb710_dump_regs
	mov	x0, x19
	mov	w1, #0
	mov	w2, #-1
	bl	_cb710_mmc_enable_irq
Lloh28:
	adrp	x8, _cb710_mmc_irq_handler@GOTPAGE
Lloh29:
	ldr	x8, [x8, _cb710_mmc_irq_handler@GOTPAGEOFF]
Lloh30:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_cb710_set_irq_handler
	mov	x0, x20
	bl	_mmc_add_host
	mov	x21, x0
	bl	_unlikely
	mov	x23, x0
	mov	x0, x19
	bl	_cb710_slot_dev
	mov	x22, x0
	cbz	x23, LBB0_4
; %bb.2:
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	bl	_dev_dbg
	mov	x0, x19
	mov	x1, #0
	bl	_cb710_set_irq_handler
	mov	x0, x20
	bl	_mmc_free_host
	b	LBB0_5
LBB0_3:
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_mmc_hostname
	mov	x2, x0
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
Lloh38:
	adrp	x8, _CB710_MMC_IE_CARD_INSERTION_STATUS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _CB710_MMC_IE_CARD_INSERTION_STATUS@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_cb710_mmc_enable_irq
	mov	w21, #0
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_cb710_src_freq_mhz,8,3         ; @cb710_src_freq_mhz
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"source frequency: %dMHz\n"

	.comm	_cb710_mmc_host,4,2             ; @cb710_mmc_host
	.comm	_cb710_clock_divider_log2,8,3   ; @cb710_clock_divider_log2
	.comm	_CB710_MAX_DIVIDER_IDX,8,3      ; @CB710_MAX_DIVIDER_IDX
	.comm	_MMC_VDD_32_33,4,2              ; @MMC_VDD_32_33
	.comm	_MMC_VDD_33_34,4,2              ; @MMC_VDD_33_34
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ; @MMC_CAP_4_BIT_DATA
	.comm	_cb710_mmc_finish_request_tasklet,4,2 ; @cb710_mmc_finish_request_tasklet
	.comm	_CB710_DUMP_REGS_MMC,4,2        ; @CB710_DUMP_REGS_MMC
	.comm	_cb710_mmc_irq_handler,8,3      ; @cb710_mmc_irq_handler
l_.str.1:                               ; @.str.1
	.asciz	"mmc_hostname is %s\n"

	.comm	_CB710_MMC_IE_CARD_INSERTION_STATUS,4,2 ; @CB710_MMC_IE_CARD_INSERTION_STATUS
l_.str.2:                               ; @.str.2
	.asciz	"mmc_add_host() failed: %d\n"

	.no_dead_strip	_cb710_mmc_init
.subsections_via_symbols
