	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_idmac_init
_dw_mci_idmac_init:                     ## @dw_mci_idmac_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_DESC_RING_BUF_SZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movabsq	$-3689348814741910323, %rcx     ## imm = 0xCCCCCCCCCCCCCCCD
	mulq	%rcx
	shrq	$5, %rdx
	cmpl	$1, (%rdi)
	movl	%edx, 4(%rdi)
	jne	LBB0_11
## %bb.1:
	movq	16(%r14), %rcx
	movl	8(%r14), %r8d
	cmpl	$2, %edx
	jl	LBB0_10
## %bb.2:
	leal	-2(%rdx), %edi
	decl	%edx
	movl	%edx, %esi
	andl	$3, %esi
	cmpl	$3, %edi
	jae	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	testl	%esi, %esi
	jne	LBB0_8
	jmp	LBB0_10
LBB0_11:
	movq	16(%r14), %r15
	cmpl	$2, %edx
	jl	LBB0_14
## %bb.12:
	xorl	%r12d, %r12d
	movl	$40, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	incl	%r12d
	movl	8(%r14), %edi
	addl	%ebx, %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r15)
	movl	$0, 8(%r15)
	movq	$0, 24(%r15)
	addq	$40, %r15
	movl	4(%r14), %eax
	decl	%eax
	addl	$40, %ebx
	cmpl	%eax, %r12d
	jl	LBB0_13
LBB0_14:
	movl	8(%r14), %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r15)
	movq	_IDMAC_DES0_ER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, 8(%r15)
	jmp	LBB0_15
LBB0_4:
	andl	$-4, %edx
	xorl	%ebx, %ebx
	xorps	%xmm0, %xmm0
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r8,%rbx), %eax
	addl	$40, %eax
	movl	%eax, (%rcx,%rbx)
	movl	$0, 8(%rcx,%rbx)
	movups	%xmm0, 16(%rcx,%rbx)
	movq	$0, 32(%rcx,%rbx)
	leal	80(%r8,%rbx), %eax
	movl	%eax, 40(%rcx,%rbx)
	movl	$0, 48(%rcx,%rbx)
	movups	%xmm0, 56(%rcx,%rbx)
	movq	$0, 72(%rcx,%rbx)
	leal	120(%r8,%rbx), %eax
	movl	%eax, 80(%rcx,%rbx)
	movl	$0, 88(%rcx,%rbx)
	movups	%xmm0, 96(%rcx,%rbx)
	movq	$0, 112(%rcx,%rbx)
	addl	$4, %edi
	leal	(%r8,%rbx), %eax
	addl	$160, %eax
	movl	%eax, 120(%rcx,%rbx)
	movl	$0, 128(%rcx,%rbx)
	movups	%xmm0, 136(%rcx,%rbx)
	movq	$0, 152(%rcx,%rbx)
	addq	$160, %rbx
	cmpl	%edi, %edx
	jne	LBB0_5
## %bb.6:
	addq	%rbx, %rcx
	testl	%esi, %esi
	je	LBB0_10
LBB0_8:
	leal	(%rdi,%rdi,4), %eax
	leal	(%r8,%rax,8), %edx
	addl	$40, %edx
	xorps	%xmm0, %xmm0
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edx, (%rcx)
	movl	$0, 8(%rcx)
	movups	%xmm0, 16(%rcx)
	movq	$0, 32(%rcx)
	addq	$40, %rcx
	addl	$40, %edx
	decl	%esi
	jne	LBB0_9
LBB0_10:
	movl	%r8d, (%rcx)
	movq	_IDMAC_DES0_ER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rcx)
LBB0_15:
	movq	%r14, %rdi
	callq	_dw_mci_idmac_reset
	cmpl	$1, (%r14)
	jne	LBB0_17
## %bb.16:
	movq	_IDSTS64@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IDMAC_INT_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mci_writel
	movq	_IDINTEN64@GOTPCREL(%rip), %rax
	movq	_SDMMC_IDMAC_INT_NI@GOTPCREL(%rip), %rcx
	movq	_SDMMC_IDMAC_INT_RI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_SDMMC_IDMAC_INT_TI@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mci_writel
	movq	_DBADDRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r14, %rdi
	callq	_mci_writel
	movq	_DBADDRU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## implicit-def: $edx
	jmp	LBB0_18
LBB0_17:
	movq	_IDSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IDMAC_INT_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mci_writel
	movq	_IDINTEN@GOTPCREL(%rip), %rax
	movq	_SDMMC_IDMAC_INT_NI@GOTPCREL(%rip), %rcx
	movq	_SDMMC_IDMAC_INT_RI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_SDMMC_IDMAC_INT_TI@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mci_writel
	movq	_DBADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
LBB0_18:
	movq	%r14, %rdi
	callq	_mci_writel
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DESC_RING_BUF_SZ,4,2           ## @DESC_RING_BUF_SZ
	.comm	_IDMAC_DES0_ER,4,2              ## @IDMAC_DES0_ER
	.comm	_IDSTS64,4,2                    ## @IDSTS64
	.comm	_IDMAC_INT_CLR,4,2              ## @IDMAC_INT_CLR
	.comm	_IDINTEN64,4,2                  ## @IDINTEN64
	.comm	_SDMMC_IDMAC_INT_NI,4,2         ## @SDMMC_IDMAC_INT_NI
	.comm	_SDMMC_IDMAC_INT_RI,4,2         ## @SDMMC_IDMAC_INT_RI
	.comm	_SDMMC_IDMAC_INT_TI,4,2         ## @SDMMC_IDMAC_INT_TI
	.comm	_DBADDRL,4,2                    ## @DBADDRL
	.comm	_DBADDRU,4,2                    ## @DBADDRU
	.comm	_IDSTS,4,2                      ## @IDSTS
	.comm	_IDINTEN,4,2                    ## @IDINTEN
	.comm	_DBADDR,4,2                     ## @DBADDR
	.no_dead_strip	_dw_mci_idmac_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_idmac_init
_dw_mci_idmac_init:                     ; @dw_mci_idmac_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DESC_RING_BUF_SZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DESC_RING_BUF_SZ@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	mov	x10, #-3689348814741910324
	movk	x10, #52429
	umulh	x9, x9, x10
	lsr	x10, x9, #5
	str	w10, [x0, #4]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.1:
	ldr	x9, [x19, #16]
	ldr	w8, [x19, #8]
	cmp	w10, #2
	b.lt	LBB0_5
; %bb.2:
	sub	w10, w10, #1
	add	w11, w8, #40
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	w11, [x9]
	str	wzr, [x9, #8]
	add	x12, x9, #40
	stp	xzr, xzr, [x9, #24]
	add	w11, w11, #40
	str	xzr, [x9, #16]
	mov	x9, x12
	subs	w10, w10, #1
	b.ne	LBB0_3
; %bb.4:
	mov	x9, x12
LBB0_5:
	str	w8, [x9]
Lloh3:
	adrp	x8, _IDMAC_DES0_ER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IDMAC_DES0_ER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x9, #8]
	b	LBB0_11
LBB0_6:
	ldr	x20, [x19, #16]
	cmp	w10, #2
	b.lt	LBB0_10
; %bb.7:
	mov	x21, #0
	mov	w22, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	w22, w22, #1
	ldr	w8, [x19, #8]
	add	w8, w21, w8
	add	w0, w8, #40
	bl	_cpu_to_le32
	add	x8, x20, x21
	str	wzr, [x8, #8]
	stp	x0, xzr, [x8, #16]
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	add	x21, x21, #40
	cmp	w22, w8
	b.lt	LBB0_8
; %bb.9:
	add	x20, x20, x21
LBB0_10:
	ldr	w0, [x19, #8]
	bl	_cpu_to_le32
	str	x0, [x20, #16]
Lloh6:
	adrp	x8, _IDMAC_DES0_ER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IDMAC_DES0_ER@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	w0, [x20, #8]
LBB0_11:
	mov	x0, x19
	bl	_dw_mci_idmac_reset
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.12:
Lloh9:
	adrp	x8, _IDSTS64@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IDSTS64@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _IDMAC_INT_CLR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IDMAC_INT_CLR@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mci_writel
Lloh15:
	adrp	x8, _IDINTEN64@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IDINTEN64@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _SDMMC_IDMAC_INT_NI@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SDMMC_IDMAC_INT_NI@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _SDMMC_IDMAC_INT_RI@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SDMMC_IDMAC_INT_RI@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _SDMMC_IDMAC_INT_TI@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SDMMC_IDMAC_INT_TI@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_mci_writel
Lloh27:
	adrp	x8, _DBADDRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DBADDRL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	mov	x0, x19
	bl	_mci_writel
Lloh30:
	adrp	x8, _DBADDRU@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DBADDRU@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
                                        ; implicit-def: $w2
	b	LBB0_14
LBB0_13:
Lloh33:
	adrp	x8, _IDSTS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IDSTS@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x8, _IDMAC_INT_CLR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _IDMAC_INT_CLR@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mci_writel
Lloh39:
	adrp	x8, _IDINTEN@GOTPAGE
Lloh40:
	ldr	x8, [x8, _IDINTEN@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x8, _SDMMC_IDMAC_INT_NI@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SDMMC_IDMAC_INT_NI@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
Lloh45:
	adrp	x9, _SDMMC_IDMAC_INT_RI@GOTPAGE
Lloh46:
	ldr	x9, [x9, _SDMMC_IDMAC_INT_RI@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh48:
	adrp	x9, _SDMMC_IDMAC_INT_TI@GOTPAGE
Lloh49:
	ldr	x9, [x9, _SDMMC_IDMAC_INT_TI@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_mci_writel
Lloh51:
	adrp	x8, _DBADDR@GOTPAGE
Lloh52:
	ldr	x8, [x8, _DBADDR@GOTPAGEOFF]
Lloh53:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
LBB0_14:
	mov	x0, x19
	bl	_mci_writel
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_DESC_RING_BUF_SZ,4,2           ; @DESC_RING_BUF_SZ
	.comm	_IDMAC_DES0_ER,4,2              ; @IDMAC_DES0_ER
	.comm	_IDSTS64,4,2                    ; @IDSTS64
	.comm	_IDMAC_INT_CLR,4,2              ; @IDMAC_INT_CLR
	.comm	_IDINTEN64,4,2                  ; @IDINTEN64
	.comm	_SDMMC_IDMAC_INT_NI,4,2         ; @SDMMC_IDMAC_INT_NI
	.comm	_SDMMC_IDMAC_INT_RI,4,2         ; @SDMMC_IDMAC_INT_RI
	.comm	_SDMMC_IDMAC_INT_TI,4,2         ; @SDMMC_IDMAC_INT_TI
	.comm	_DBADDRL,4,2                    ; @DBADDRL
	.comm	_DBADDRU,4,2                    ; @DBADDRU
	.comm	_IDSTS,4,2                      ; @IDSTS
	.comm	_IDINTEN,4,2                    ; @IDINTEN
	.comm	_DBADDR,4,2                     ; @DBADDR
	.no_dead_strip	_dw_mci_idmac_init
.subsections_via_symbols
