	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_mmc_attach
_aw_mmc_attach:                         ## @aw_mmc_attach
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_ofw_bus_get_node
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_device_get_softc
	movq	%rax, %r14
	movq	%r13, 56(%rax)
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ofw_bus_search_compatible
	movq	(%rax), %rax
	movq	%rax, 128(%r14)
	movq	$0, 120(%r14)
	movq	_aw_mmc_res_spec@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	32(%r14), %rdx
	movq	%r13, %rdi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%r14, %r12
	movq	32(%r14), %rax
	movq	_AW_MMC_IRQRES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rsi
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rsi), %edx
	movl	(%rax,%rcx,4), %esi
	movq	_aw_mmc_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	40(%r14), %rax
	subq	$8, %rsp
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movq	%r14, %r9
	pushq	%rax
	callq	_bus_setup_intr
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%rbx), %esi
	movq	32(%r12), %rdx
	movq	%r13, %rdi
	callq	_bus_release_resources
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r13, %rdi
	callq	_device_printf
LBB0_52:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_53:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	leaq	44(%r14), %rbx
	movq	56(%r12), %rdi
	callq	_device_get_nameunit
	movq	_MTX_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_mtx_init
	leaq	48(%r14), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_callout_init_mtx
	leaq	112(%r14), %r15
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r15, %rcx
	callq	_hwreset_get_by_ofw_name
	testq	%rax, %rax
	je	LBB0_6
LBB0_9:
	leaq	108(%r14), %r15
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r15, %rcx
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_8
LBB0_6:
	movl	(%r15), %edi
	callq	_hwreset_deassert
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_8
LBB0_11:
	movl	(%r15), %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.6(%rip), %rsi
LBB0_8:
	movq	%r13, %rdi
	callq	_device_printf
LBB0_50:
	movq	_aw_mmc_res_spec@GOTPCREL(%rip), %r15
LBB0_51:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_callout_drain
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mtx_destroy
	movq	32(%r12), %rax
	movq	_AW_MMC_IRQRES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	40(%r12), %edx
	movq	%r13, %rdi
	callq	_bus_teardown_intr
	movl	(%r15), %esi
	movq	32(%r12), %rdx
	movq	%r13, %rdi
	callq	_bus_release_resources
	jmp	LBB0_52
LBB0_13:
	leaq	104(%r14), %rbx
	leaq	L_.str.7(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	movq	_aw_mmc_res_spec@GOTPCREL(%rip), %r15
	je	LBB0_16
## %bb.14:
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_15
LBB0_16:
	movl	(%rbx), %edi
	movq	_CARD_ID_FREQUENCY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CLK_SET_ROUND_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_clk_set_freq
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_15
LBB0_18:
	movl	(%rbx), %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	leaq	L_.str.10(%rip), %rsi
LBB0_15:
	movq	%r13, %rdi
	callq	_device_printf
	jmp	LBB0_51
LBB0_20:
	movl	$10, (%r12)
	movq	%r13, %rdi
	callq	_device_get_sysctl_ctx
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_device_get_sysctl_tree
	movl	%eax, %edi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CTLFLAG_RW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leaq	L_.str.12(%rip), %r10
	leaq	L_.str.11(%rip), %rcx
	movq	%r15, %rdi
	movq	%rax, %rsi
	movq	%r12, %r9
	pushq	%r10
	pushq	$0
	callq	_SYSCTL_ADD_INT
	addq	$16, %rsp
	movq	%r12, %rdi
	callq	_aw_mmc_reset
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	leaq	L_.str.13(%rip), %rsi
	jmp	LBB0_8
LBB0_22:
	movq	%r12, %rdi
	callq	_aw_mmc_setup_dma
	testq	%rax, %rax
	movq	_aw_mmc_res_spec@GOTPCREL(%rip), %r15
	je	LBB0_24
## %bb.23:
	movq	56(%r12), %rdi
	leaq	L_.str.14(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_51
LBB0_24:
	leaq	L_.str.15(%rip), %rsi
	leaq	-52(%rbp), %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	$4, %ecx
	callq	_OF_getencprop
	testq	%rax, %rax
	jg	LBB0_26
## %bb.25:
	movl	$4, -52(%rbp)
LBB0_26:
	leaq	96(%r14), %rcx
	leaq	L_.str.16(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_regulator_get_by_ofw_property
	movq	_bootverbose@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	jne	LBB0_29
## %bb.27:
	cmpq	$0, (%r15)
	je	LBB0_29
## %bb.28:
	leaq	L_.str.17(%rip), %rsi
	movq	%r13, %rdi
	callq	_device_printf
LBB0_29:
	leaq	88(%r14), %rbx
	leaq	L_.str.18(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_regulator_get_by_ofw_property
	testq	%rax, %rax
	jne	LBB0_32
## %bb.30:
	cmpq	$0, (%r15)
	je	LBB0_32
## %bb.31:
	leaq	L_.str.19(%rip), %rsi
	movq	%r13, %rdi
	callq	_device_printf
LBB0_32:
	movl	$400000, 72(%r12)               ## imm = 0x61A80
	leaq	L_.str.20(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	$4, %ecx
	callq	_OF_getencprop
	testq	%rax, %rax
	jle	LBB0_34
## %bb.33:
	movl	-48(%rbp), %eax
	jmp	LBB0_35
LBB0_34:
	movl	$52000000, -48(%rbp)            ## imm = 0x3197500
	movl	$52000000, %eax                 ## imm = 0x3197500
LBB0_35:
	movl	%eax, 76(%r12)
	movq	_MMC_OCR_320_330@GOTPCREL(%rip), %rax
	movq	_MMC_OCR_330_340@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 80(%r12)
	movq	_MMC_CAP_HSPEED@GOTPCREL(%rip), %rcx
	movq	_MMC_CAP_UHS_SDR12@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_MMC_CAP_UHS_SDR25@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MMC_CAP_UHS_SDR50@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MMC_CAP_UHS_DDR50@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MMC_CAP_MMC_DDR52@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	addq	$84, %r14
	movl	%eax, 84(%r12)
	movq	88(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_36
## %bb.37:
	movl	$1800000, %esi                  ## imm = 0x1B7740
	callq	_regulator_check_voltage
	testq	%rax, %rax
	jne	LBB0_39
## %bb.38:
	movq	_MMC_CAP_SIGNALING_180@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_39:
	movq	(%rbx), %rdi
	movl	$3300000, %esi                  ## imm = 0x325AA0
	callq	_regulator_check_voltage
	testq	%rax, %rax
	jne	LBB0_42
## %bb.40:
	movq	_MMC_CAP_SIGNALING_330@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r14, %rcx
	jmp	LBB0_41
LBB0_36:
	movq	_MMC_CAP_SIGNALING_330@GOTPCREL(%rip), %rcx
LBB0_41:
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_42:
	movl	-52(%rbp), %ecx
	cmpl	$4, %ecx
	jl	LBB0_45
## %bb.43:
	movq	_MMC_CAP_4_BIT_DATA@GOTPCREL(%rip), %rdx
	movl	(%r14), %eax
	orl	(%rdx), %eax
	movl	%eax, (%r14)
	cmpl	$8, %ecx
	jb	LBB0_45
## %bb.44:
	movq	_MMC_CAP_8_BIT_DATA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_45:
	leaq	L_.str.7(%rip), %rsi
	movq	%r13, %rdi
	movl	$-1, %edx
	callq	_device_add_child
	testq	%rax, %rax
	je	LBB0_46
## %bb.47:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_device_probe_and_attach
	testq	%rax, %rax
	je	LBB0_48
## %bb.49:
	leaq	L_.str.22(%rip), %rsi
	movq	%r13, %rdi
	callq	_device_printf
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_device_delete_child
	jmp	LBB0_50
LBB0_46:
	leaq	L_.str.21(%rip), %rsi
	jmp	LBB0_8
LBB0_48:
	xorl	%eax, %eax
	jmp	LBB0_53
	.cfi_endproc
                                        ## -- End function
	.comm	_compat_data,4,2                ## @compat_data
	.comm	_aw_mmc_res_spec,4,2            ## @aw_mmc_res_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot allocate device resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_AW_MMC_IRQRES,8,3              ## @AW_MMC_IRQRES
	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_aw_mmc_intr,4,2                ## @aw_mmc_intr
L_.str.1:                               ## @.str.1
	.asciz	"cannot setup interrupt handler\n"

L_.str.2:                               ## @.str.2
	.asciz	"aw_mmc"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
L_.str.3:                               ## @.str.3
	.asciz	"ahb"

L_.str.4:                               ## @.str.4
	.asciz	"cannot de-assert reset\n"

L_.str.5:                               ## @.str.5
	.asciz	"cannot get ahb clock\n"

L_.str.6:                               ## @.str.6
	.asciz	"cannot enable ahb clock\n"

L_.str.7:                               ## @.str.7
	.asciz	"mmc"

L_.str.8:                               ## @.str.8
	.asciz	"cannot get mmc clock\n"

	.comm	_CARD_ID_FREQUENCY,4,2          ## @CARD_ID_FREQUENCY
	.comm	_CLK_SET_ROUND_DOWN,4,2         ## @CLK_SET_ROUND_DOWN
L_.str.9:                               ## @.str.9
	.asciz	"cannot init mmc clock\n"

L_.str.10:                              ## @.str.10
	.asciz	"cannot enable mmc clock\n"

	.comm	_OID_AUTO,4,2                   ## @OID_AUTO
L_.str.11:                              ## @.str.11
	.asciz	"req_timeout"

	.comm	_CTLFLAG_RW,4,2                 ## @CTLFLAG_RW
L_.str.12:                              ## @.str.12
	.asciz	"Request timeout in seconds"

L_.str.13:                              ## @.str.13
	.asciz	"cannot reset the controller\n"

L_.str.14:                              ## @.str.14
	.asciz	"Couldn't setup DMA!\n"

L_.str.15:                              ## @.str.15
	.asciz	"bus-width"

L_.str.16:                              ## @.str.16
	.asciz	"vmmc-supply"

	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.17:                              ## @.str.17
	.asciz	"vmmc-supply regulator found\n"

L_.str.18:                              ## @.str.18
	.asciz	"vqmmc-supply"

L_.str.19:                              ## @.str.19
	.asciz	"vqmmc-supply regulator found\n"

L_.str.20:                              ## @.str.20
	.asciz	"max-frequency"

	.comm	_MMC_OCR_320_330,4,2            ## @MMC_OCR_320_330
	.comm	_MMC_OCR_330_340,4,2            ## @MMC_OCR_330_340
	.comm	_MMC_CAP_HSPEED,4,2             ## @MMC_CAP_HSPEED
	.comm	_MMC_CAP_UHS_SDR12,4,2          ## @MMC_CAP_UHS_SDR12
	.comm	_MMC_CAP_UHS_SDR25,4,2          ## @MMC_CAP_UHS_SDR25
	.comm	_MMC_CAP_UHS_SDR50,4,2          ## @MMC_CAP_UHS_SDR50
	.comm	_MMC_CAP_UHS_DDR50,4,2          ## @MMC_CAP_UHS_DDR50
	.comm	_MMC_CAP_MMC_DDR52,4,2          ## @MMC_CAP_MMC_DDR52
	.comm	_MMC_CAP_SIGNALING_180,4,2      ## @MMC_CAP_SIGNALING_180
	.comm	_MMC_CAP_SIGNALING_330,4,2      ## @MMC_CAP_SIGNALING_330
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ## @MMC_CAP_4_BIT_DATA
	.comm	_MMC_CAP_8_BIT_DATA,4,2         ## @MMC_CAP_8_BIT_DATA
L_.str.21:                              ## @.str.21
	.asciz	"attaching MMC bus failed!\n"

L_.str.22:                              ## @.str.22
	.asciz	"attaching MMC child failed!\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_aw_mmc_cam_action,4,2          ## @aw_mmc_cam_action
	.comm	_aw_mmc_cam_poll,4,2            ## @aw_mmc_cam_poll
	.no_dead_strip	_aw_mmc_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_mmc_attach
_aw_mmc_attach:                         ; @aw_mmc_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_ofw_bus_get_node
	mov	x23, x0
	mov	x0, x19
	bl	_device_get_softc
	mov	x20, x0
	str	x19, [x0, #56]
Lloh0:
	adrp	x8, _compat_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	x8, [x0]
	stp	xzr, x8, [x20, #120]
Lloh3:
	adrp	x25, _aw_mmc_res_spec@GOTPAGE
Lloh4:
	ldr	x25, [x25, _aw_mmc_res_spec@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	x2, [x20, #32]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x8, [x20, #32]
Lloh7:
	adrp	x26, _AW_MMC_IRQRES@GOTPAGE
Lloh8:
	ldr	x26, [x26, _AW_MMC_IRQRES@GOTPAGEOFF]
	ldr	x9, [x26]
	ldr	w1, [x8, x9, lsl #2]
Lloh9:
	adrp	x8, _INTR_TYPE_MISC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh15:
	adrp	x8, _aw_mmc_intr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _aw_mmc_intr@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
	add	x6, x20, #40
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w1, [x25]
	ldr	x2, [x20, #32]
	mov	x0, x19
	bl	_bus_release_resources
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_device_printf
LBB0_5:
Lloh20:
	adrp	x8, _ENXIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	add	x21, x20, #44
	ldr	x0, [x20, #56]
	bl	_device_get_nameunit
	mov	x1, x0
Lloh23:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
Lloh26:
	adrp	x2, l_.str.2@PAGE
Lloh27:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_mtx_init
	add	x22, x20, #48
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	bl	_callout_init_mtx
	add	x24, x20, #112
Lloh28:
	adrp	x2, l_.str.3@PAGE
Lloh29:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x24
	bl	_hwreset_get_by_ofw_name
	cbz	x0, LBB0_10
LBB0_8:
	add	x24, x20, #108
Lloh30:
	adrp	x2, l_.str.3@PAGE
Lloh31:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x24
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_12
; %bb.9:
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_22
LBB0_10:
	ldr	w0, [x24]
	bl	_hwreset_deassert
	cbz	w0, LBB0_8
; %bb.11:
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_22
LBB0_12:
	ldr	w0, [x24]
	bl	_clk_enable
	cbz	w0, LBB0_14
; %bb.13:
Lloh36:
	adrp	x1, l_.str.6@PAGE
Lloh37:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_22
LBB0_14:
	add	x24, x20, #104
Lloh38:
	adrp	x2, l_.str.7@PAGE
Lloh39:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x24
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_16
; %bb.15:
Lloh40:
	adrp	x1, l_.str.8@PAGE
Lloh41:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_22
LBB0_16:
	ldr	w0, [x24]
Lloh42:
	adrp	x8, _CARD_ID_FREQUENCY@GOTPAGE
Lloh43:
	ldr	x8, [x8, _CARD_ID_FREQUENCY@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
Lloh45:
	adrp	x8, _CLK_SET_ROUND_DOWN@GOTPAGE
Lloh46:
	ldr	x8, [x8, _CLK_SET_ROUND_DOWN@GOTPAGEOFF]
Lloh47:
	ldr	w2, [x8]
	bl	_clk_set_freq
	cbz	w0, LBB0_18
; %bb.17:
Lloh48:
	adrp	x1, l_.str.9@PAGE
Lloh49:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_22
LBB0_18:
	ldr	w0, [x24]
	bl	_clk_enable
	cbz	w0, LBB0_20
; %bb.19:
Lloh50:
	adrp	x1, l_.str.10@PAGE
Lloh51:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_22
LBB0_20:
	mov	w8, #10
	str	w8, [x20]
	mov	x0, x19
	bl	_device_get_sysctl_ctx
	mov	x24, x0
	mov	x0, x19
	bl	_device_get_sysctl_tree
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
Lloh52:
	adrp	x8, _OID_AUTO@GOTPAGE
Lloh53:
	ldr	x8, [x8, _OID_AUTO@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x8]
Lloh55:
	adrp	x8, _CTLFLAG_RW@GOTPAGE
Lloh56:
	ldr	x8, [x8, _CTLFLAG_RW@GOTPAGEOFF]
Lloh57:
	ldr	w4, [x8]
Lloh58:
	adrp	x3, l_.str.11@PAGE
Lloh59:
	add	x3, x3, l_.str.11@PAGEOFF
Lloh60:
	adrp	x7, l_.str.12@PAGE
Lloh61:
	add	x7, x7, l_.str.12@PAGEOFF
	mov	x0, x24
	mov	x5, x20
	mov	w6, #0
	bl	_SYSCTL_ADD_INT
	mov	x0, x20
	bl	_aw_mmc_reset
	cbz	x0, LBB0_25
; %bb.21:
Lloh62:
	adrp	x1, l_.str.13@PAGE
Lloh63:
	add	x1, x1, l_.str.13@PAGEOFF
LBB0_22:
	mov	x0, x19
LBB0_23:
	bl	_device_printf
LBB0_24:
	mov	x0, x22
	bl	_callout_drain
	mov	x0, x21
	bl	_mtx_destroy
	ldr	x8, [x20, #32]
	ldr	x9, [x26]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w2, [x20, #40]
	mov	x0, x19
	bl	_bus_teardown_intr
	ldr	w1, [x25]
	ldr	x2, [x20, #32]
	mov	x0, x19
	bl	_bus_release_resources
	b	LBB0_5
LBB0_25:
	mov	x0, x20
	bl	_aw_mmc_setup_dma
	cbz	x0, LBB0_27
; %bb.26:
	ldr	x0, [x20, #56]
Lloh64:
	adrp	x1, l_.str.14@PAGE
Lloh65:
	add	x1, x1, l_.str.14@PAGEOFF
	b	LBB0_23
LBB0_27:
Lloh66:
	adrp	x1, l_.str.15@PAGE
Lloh67:
	add	x1, x1, l_.str.15@PAGEOFF
	mov	w24, #4
	add	x2, sp, #12
	mov	x0, x23
	mov	w3, #4
	bl	_OF_getencprop
	cmp	x0, #0
	b.gt	LBB0_29
; %bb.28:
	str	w24, [sp, #12]
LBB0_29:
	add	x3, x20, #96
Lloh68:
	adrp	x2, l_.str.16@PAGE
Lloh69:
	add	x2, x2, l_.str.16@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_regulator_get_by_ofw_property
Lloh70:
	adrp	x27, _bootverbose@GOTPAGE
Lloh71:
	ldr	x27, [x27, _bootverbose@GOTPAGEOFF]
	cbnz	x0, LBB0_32
; %bb.30:
	ldr	x8, [x27]
	cbz	x8, LBB0_32
; %bb.31:
Lloh72:
	adrp	x1, l_.str.17@PAGE
Lloh73:
	add	x1, x1, l_.str.17@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_32:
	add	x24, x20, #88
Lloh74:
	adrp	x2, l_.str.18@PAGE
Lloh75:
	add	x2, x2, l_.str.18@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x24
	bl	_regulator_get_by_ofw_property
	cbnz	x0, LBB0_35
; %bb.33:
	ldr	x8, [x27]
	cbz	x8, LBB0_35
; %bb.34:
Lloh76:
	adrp	x1, l_.str.19@PAGE
Lloh77:
	add	x1, x1, l_.str.19@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_35:
	mov	w8, #6784
	movk	w8, #6, lsl #16
	str	w8, [x20, #72]
Lloh78:
	adrp	x1, l_.str.20@PAGE
Lloh79:
	add	x1, x1, l_.str.20@PAGEOFF
	add	x2, sp, #8
	mov	x0, x23
	mov	w3, #4
	bl	_OF_getencprop
	cmp	x0, #1
	b.lt	LBB0_37
; %bb.36:
	ldr	w8, [sp, #8]
	b	LBB0_38
LBB0_37:
	mov	w8, #29952
	movk	w8, #793, lsl #16
	str	w8, [sp, #8]
LBB0_38:
Lloh80:
	adrp	x9, _MMC_CAP_HSPEED@GOTPAGE
Lloh81:
	ldr	x9, [x9, _MMC_CAP_HSPEED@GOTPAGEOFF]
Lloh82:
	ldr	w9, [x9]
Lloh83:
	adrp	x10, _MMC_CAP_UHS_SDR12@GOTPAGE
Lloh84:
	ldr	x10, [x10, _MMC_CAP_UHS_SDR12@GOTPAGEOFF]
Lloh85:
	ldr	w10, [x10]
Lloh86:
	adrp	x11, _MMC_CAP_UHS_SDR25@GOTPAGE
Lloh87:
	ldr	x11, [x11, _MMC_CAP_UHS_SDR25@GOTPAGEOFF]
	orr	w9, w10, w9
Lloh88:
	ldr	w10, [x11]
	orr	w9, w9, w10
Lloh89:
	adrp	x10, _MMC_CAP_UHS_SDR50@GOTPAGE
Lloh90:
	ldr	x10, [x10, _MMC_CAP_UHS_SDR50@GOTPAGEOFF]
Lloh91:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh92:
	adrp	x10, _MMC_CAP_UHS_DDR50@GOTPAGE
Lloh93:
	ldr	x10, [x10, _MMC_CAP_UHS_DDR50@GOTPAGEOFF]
Lloh94:
	ldr	w10, [x10]
Lloh95:
	adrp	x11, _MMC_CAP_MMC_DDR52@GOTPAGE
Lloh96:
	ldr	x11, [x11, _MMC_CAP_MMC_DDR52@GOTPAGEOFF]
	orr	w9, w9, w10
Lloh97:
	ldr	w10, [x11]
	orr	w9, w9, w10
	mov	x23, x20
	str	w9, [x23, #84]!
Lloh98:
	adrp	x10, _MMC_OCR_320_330@GOTPAGE
Lloh99:
	ldr	x10, [x10, _MMC_OCR_320_330@GOTPAGEOFF]
Lloh100:
	ldr	w10, [x10]
Lloh101:
	adrp	x11, _MMC_OCR_330_340@GOTPAGE
Lloh102:
	ldr	x11, [x11, _MMC_OCR_330_340@GOTPAGEOFF]
Lloh103:
	ldr	w11, [x11]
	orr	w10, w11, w10
	stp	w8, w10, [x23, #-8]
	ldur	x0, [x23, #4]
Lloh104:
	adrp	x27, _MMC_CAP_SIGNALING_330@GOTPAGE
Lloh105:
	ldr	x27, [x27, _MMC_CAP_SIGNALING_330@GOTPAGEOFF]
	cbz	x0, LBB0_43
; %bb.39:
	mov	w1, #30528
	movk	w1, #27, lsl #16
	bl	_regulator_check_voltage
	cbnz	x0, LBB0_41
; %bb.40:
Lloh106:
	adrp	x8, _MMC_CAP_SIGNALING_180@GOTPAGE
Lloh107:
	ldr	x8, [x8, _MMC_CAP_SIGNALING_180@GOTPAGEOFF]
Lloh108:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x23]
LBB0_41:
	ldr	x0, [x24]
	mov	w1, #23200
	movk	w1, #50, lsl #16
	bl	_regulator_check_voltage
	cbnz	x0, LBB0_44
; %bb.42:
	ldr	w9, [x27]
	mov	x27, x23
LBB0_43:
	ldr	w8, [x27]
	orr	w8, w8, w9
	str	w8, [x23]
LBB0_44:
	ldr	w8, [sp, #12]
	cmp	w8, #4
	b.lt	LBB0_47
; %bb.45:
Lloh109:
	adrp	x9, _MMC_CAP_4_BIT_DATA@GOTPAGE
Lloh110:
	ldr	x9, [x9, _MMC_CAP_4_BIT_DATA@GOTPAGEOFF]
Lloh111:
	ldr	w9, [x9]
	ldr	w10, [x23]
	orr	w9, w10, w9
	str	w9, [x23]
	cmp	w8, #8
	b.lo	LBB0_47
; %bb.46:
Lloh112:
	adrp	x8, _MMC_CAP_8_BIT_DATA@GOTPAGE
Lloh113:
	ldr	x8, [x8, _MMC_CAP_8_BIT_DATA@GOTPAGEOFF]
Lloh114:
	ldr	w8, [x8]
	orr	w8, w9, w8
	str	w8, [x23]
LBB0_47:
Lloh115:
	adrp	x1, l_.str.7@PAGE
Lloh116:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	bl	_device_add_child
	cbz	x0, LBB0_50
; %bb.48:
	mov	x23, x0
	bl	_device_probe_and_attach
	cbz	x0, LBB0_6
; %bb.49:
Lloh117:
	adrp	x1, l_.str.22@PAGE
Lloh118:
	add	x1, x1, l_.str.22@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	mov	x0, x19
	mov	x1, x23
	bl	_device_delete_child
	b	LBB0_24
LBB0_50:
Lloh119:
	adrp	x1, l_.str.21@PAGE
Lloh120:
	add	x1, x1, l_.str.21@PAGEOFF
	b	LBB0_22
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh104, Lloh105
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh106, Lloh107, Lloh108
	.loh AdrpLdrGotLdr	Lloh109, Lloh110, Lloh111
	.loh AdrpLdrGotLdr	Lloh112, Lloh113, Lloh114
	.loh AdrpAdd	Lloh115, Lloh116
	.loh AdrpAdd	Lloh117, Lloh118
	.loh AdrpAdd	Lloh119, Lloh120
	.cfi_endproc
                                        ; -- End function
	.comm	_compat_data,4,2                ; @compat_data
	.comm	_aw_mmc_res_spec,4,2            ; @aw_mmc_res_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate device resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_AW_MMC_IRQRES,8,3              ; @AW_MMC_IRQRES
	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_aw_mmc_intr,4,2                ; @aw_mmc_intr
l_.str.1:                               ; @.str.1
	.asciz	"cannot setup interrupt handler\n"

l_.str.2:                               ; @.str.2
	.asciz	"aw_mmc"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
l_.str.3:                               ; @.str.3
	.asciz	"ahb"

l_.str.4:                               ; @.str.4
	.asciz	"cannot de-assert reset\n"

l_.str.5:                               ; @.str.5
	.asciz	"cannot get ahb clock\n"

l_.str.6:                               ; @.str.6
	.asciz	"cannot enable ahb clock\n"

l_.str.7:                               ; @.str.7
	.asciz	"mmc"

l_.str.8:                               ; @.str.8
	.asciz	"cannot get mmc clock\n"

	.comm	_CARD_ID_FREQUENCY,4,2          ; @CARD_ID_FREQUENCY
	.comm	_CLK_SET_ROUND_DOWN,4,2         ; @CLK_SET_ROUND_DOWN
l_.str.9:                               ; @.str.9
	.asciz	"cannot init mmc clock\n"

l_.str.10:                              ; @.str.10
	.asciz	"cannot enable mmc clock\n"

	.comm	_OID_AUTO,4,2                   ; @OID_AUTO
l_.str.11:                              ; @.str.11
	.asciz	"req_timeout"

	.comm	_CTLFLAG_RW,4,2                 ; @CTLFLAG_RW
l_.str.12:                              ; @.str.12
	.asciz	"Request timeout in seconds"

l_.str.13:                              ; @.str.13
	.asciz	"cannot reset the controller\n"

l_.str.14:                              ; @.str.14
	.asciz	"Couldn't setup DMA!\n"

l_.str.15:                              ; @.str.15
	.asciz	"bus-width"

l_.str.16:                              ; @.str.16
	.asciz	"vmmc-supply"

	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.17:                              ; @.str.17
	.asciz	"vmmc-supply regulator found\n"

l_.str.18:                              ; @.str.18
	.asciz	"vqmmc-supply"

l_.str.19:                              ; @.str.19
	.asciz	"vqmmc-supply regulator found\n"

l_.str.20:                              ; @.str.20
	.asciz	"max-frequency"

	.comm	_MMC_OCR_320_330,4,2            ; @MMC_OCR_320_330
	.comm	_MMC_OCR_330_340,4,2            ; @MMC_OCR_330_340
	.comm	_MMC_CAP_HSPEED,4,2             ; @MMC_CAP_HSPEED
	.comm	_MMC_CAP_UHS_SDR12,4,2          ; @MMC_CAP_UHS_SDR12
	.comm	_MMC_CAP_UHS_SDR25,4,2          ; @MMC_CAP_UHS_SDR25
	.comm	_MMC_CAP_UHS_SDR50,4,2          ; @MMC_CAP_UHS_SDR50
	.comm	_MMC_CAP_UHS_DDR50,4,2          ; @MMC_CAP_UHS_DDR50
	.comm	_MMC_CAP_MMC_DDR52,4,2          ; @MMC_CAP_MMC_DDR52
	.comm	_MMC_CAP_SIGNALING_180,4,2      ; @MMC_CAP_SIGNALING_180
	.comm	_MMC_CAP_SIGNALING_330,4,2      ; @MMC_CAP_SIGNALING_330
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ; @MMC_CAP_4_BIT_DATA
	.comm	_MMC_CAP_8_BIT_DATA,4,2         ; @MMC_CAP_8_BIT_DATA
l_.str.21:                              ; @.str.21
	.asciz	"attaching MMC bus failed!\n"

l_.str.22:                              ; @.str.22
	.asciz	"attaching MMC child failed!\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_aw_mmc_cam_action,4,2          ; @aw_mmc_cam_action
	.comm	_aw_mmc_cam_poll,4,2            ; @aw_mmc_cam_poll
	.no_dead_strip	_aw_mmc_attach
.subsections_via_symbols
