	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esdhc_of_adma_workaround
_esdhc_of_adma_workaround:              ## @esdhc_of_adma_workaround
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	_SDHCI_INT_DATA_END@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	_SDHCI_INT_BLK_GAP@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	(%rax), %rax
	movq	_VENDOR_V_23@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	(%r14), %rax
	movq	$0, 8(%rax)
	movl	4(%rax), %edi
	callq	_sg_dma_address
	movq	(%r14), %rcx
	movl	(%rcx), %edx
	addl	%eax, %edx
	movq	_SDHCI_DEFAULT_BOUNDARY_SIZE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	movl	%edi, %esi
	negl	%esi
	andl	%edx, %esi
	addl	%edi, %esi
	movl	%esi, %edx
	subl	%eax, %edx
	movl	%edx, (%rcx)
	movq	_SDHCI_DMA_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sdhci_writel                   ## TAILCALL
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_INT_DATA_END,4,2         ## @SDHCI_INT_DATA_END
	.comm	_SDHCI_INT_BLK_GAP,4,2          ## @SDHCI_INT_BLK_GAP
	.comm	_VENDOR_V_23,8,3                ## @VENDOR_V_23
	.comm	_SDHCI_DEFAULT_BOUNDARY_SIZE,4,2 ## @SDHCI_DEFAULT_BOUNDARY_SIZE
	.comm	_SDHCI_DMA_ADDRESS,4,2          ## @SDHCI_DMA_ADDRESS
	.no_dead_strip	_esdhc_of_adma_workaround
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esdhc_of_adma_workaround
_esdhc_of_adma_workaround:              ; @esdhc_of_adma_workaround
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
Lloh0:
	adrp	x8, _SDHCI_INT_DATA_END@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDHCI_INT_DATA_END@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _SDHCI_INT_BLK_GAP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDHCI_INT_BLK_GAP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x0]
Lloh6:
	adrp	x9, _VENDOR_V_23@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VENDOR_V_23@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19]
	str	xzr, [x8, #8]
	ldr	w0, [x8, #4]
	bl	_sg_dma_address
	ldr	x8, [x19]
	ldr	w9, [x8]
	add	w9, w9, w0
Lloh9:
	adrp	x10, _SDHCI_DEFAULT_BOUNDARY_SIZE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SDHCI_DEFAULT_BOUNDARY_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	neg	w11, w10
	and	w9, w9, w11
	add	w1, w9, w10
	sub	w9, w1, w0
	str	w9, [x8]
Lloh12:
	adrp	x8, _SDHCI_DMA_ADDRESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDHCI_DMA_ADDRESS@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sdhci_writel
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_INT_DATA_END,4,2         ; @SDHCI_INT_DATA_END
	.comm	_SDHCI_INT_BLK_GAP,4,2          ; @SDHCI_INT_BLK_GAP
	.comm	_VENDOR_V_23,8,3                ; @VENDOR_V_23
	.comm	_SDHCI_DEFAULT_BOUNDARY_SIZE,4,2 ; @SDHCI_DEFAULT_BOUNDARY_SIZE
	.comm	_SDHCI_DMA_ADDRESS,4,2          ; @SDHCI_DMA_ADDRESS
	.no_dead_strip	_esdhc_of_adma_workaround
.subsections_via_symbols
