	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_check_dma_crc              ## -- Begin function ide_check_dma_crc
	.p2align	4, 0x90
_ide_check_dma_crc:                     ## @ide_check_dma_crc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_ide_dma_off_quietly
	movq	$0, 8(%rbx)
	movq	(%rbx), %rax
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rcx
	movq	_XFER_UDMA_7@GOTPCREL(%rip), %rdx
	leaq	-1(%rax), %rsi
	cmpq	(%rdx), %rax
	movq	_XFER_PIO_4@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmovgq	%rdx, %rsi
	cmpq	(%rcx), %rax
	cmovleq	%rdx, %rsi
	movq	%rbx, %rdi
	callq	_ide_set_xfer_rate
	movq	(%rbx), %rax
	movq	_XFER_SW_DMA_0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ide_dma_on                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_UDMA_0,8,3                ## @XFER_UDMA_0
	.comm	_XFER_UDMA_7,8,3                ## @XFER_UDMA_7
	.comm	_XFER_PIO_4,8,3                 ## @XFER_PIO_4
	.comm	_XFER_SW_DMA_0,8,3              ## @XFER_SW_DMA_0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_check_dma_crc              ; -- Begin function ide_check_dma_crc
	.p2align	2
_ide_check_dma_crc:                     ; @ide_check_dma_crc
	.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	x19, x0
	bl	_ide_dma_off_quietly
	str	xzr, [x19, #8]
Lloh0:
	adrp	x8, _XFER_UDMA_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XFER_UDMA_0@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _XFER_UDMA_7@GOTPAGE
Lloh4:
	ldr	x10, [x10, _XFER_UDMA_7@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	sub	x11, x9, #1
	cmp	x9, x10
	ccmp	x9, x8, #4, le
Lloh6:
	adrp	x8, _XFER_PIO_4@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XFER_PIO_4@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	csel	x1, x8, x11, le
	mov	x0, x19
	bl	_ide_set_xfer_rate
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _XFER_SW_DMA_0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _XFER_SW_DMA_0@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ide_dma_on
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_UDMA_0,8,3                ; @XFER_UDMA_0
	.comm	_XFER_UDMA_7,8,3                ; @XFER_UDMA_7
	.comm	_XFER_PIO_4,8,3                 ; @XFER_PIO_4
	.comm	_XFER_SW_DMA_0,8,3              ; @XFER_SW_DMA_0
.subsections_via_symbols
