	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_config_drive_for_dma           ## -- Begin function config_drive_for_dma
	.p2align	4, 0x90
_config_drive_for_dma:                  ## @config_drive_for_dma
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rcx
	movq	8(%rdi), %rax
	movq	_ide_disk@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_2
## %bb.1:
	movq	16(%rdi), %rdx
	movq	_IDE_HFLAG_NO_ATAPI_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	testl	%esi, (%rdx)
	je	LBB0_2
LBB0_7:
	popq	%rbp
	retq
LBB0_2:
	movq	_ATA_ID_FIELD_VALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$4, (%rcx,%rax,4)
	je	LBB0_4
## %bb.3:
	movq	_ATA_ID_UDMA_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	$1, %eax
	testb	$127, 1(%rcx,%rdx,4)
	jne	LBB0_7
LBB0_4:
	movq	_ATA_ID_MWDMA_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rcx,%rax,4), %edx
	notl	%edx
	movl	$1, %eax
	testl	$1028, %edx                     ## imm = 0x404
	je	LBB0_7
## %bb.5:
	movq	_ATA_ID_SWDMA_MODES@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %ecx
	notl	%ecx
	testl	$1028, %ecx                     ## imm = 0x404
	je	LBB0_7
## %bb.6:
	callq	_ide_dma_good_drive
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	setne	%al
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ide_disk,8,3                   ## @ide_disk
	.comm	_IDE_HFLAG_NO_ATAPI_DMA,4,2     ## @IDE_HFLAG_NO_ATAPI_DMA
	.comm	_ATA_ID_FIELD_VALID,8,3         ## @ATA_ID_FIELD_VALID
	.comm	_ATA_ID_UDMA_MODES,8,3          ## @ATA_ID_UDMA_MODES
	.comm	_ATA_ID_MWDMA_MODES,8,3         ## @ATA_ID_MWDMA_MODES
	.comm	_ATA_ID_SWDMA_MODES,8,3         ## @ATA_ID_SWDMA_MODES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_config_drive_for_dma           ; -- Begin function config_drive_for_dma
	.p2align	2
_config_drive_for_dma:                  ; @config_drive_for_dma
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldp	x8, x9, [x0]
Lloh0:
	adrp	x10, _ide_disk@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ide_disk@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_3
; %bb.1:
	ldr	x9, [x0, #16]
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _IDE_HFLAG_NO_ATAPI_DMA@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IDE_HFLAG_NO_ATAPI_DMA@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.2:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh6:
	adrp	x9, _ATA_ID_FIELD_VALID@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATA_ID_FIELD_VALID@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
	tbz	w9, #2, LBB0_5
; %bb.4:
Lloh9:
	adrp	x9, _ATA_ID_UDMA_MODES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATA_ID_UDMA_MODES@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
	tst	w9, #0x7f00
	b.ne	LBB0_7
LBB0_5:
Lloh12:
	adrp	x9, _ATA_ID_MWDMA_MODES@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATA_ID_MWDMA_MODES@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w10, [x8, x9, lsl #2]
	mov	w9, #1028
	bics	wzr, w9, w10
	b.eq	LBB0_7
; %bb.6:
Lloh15:
	adrp	x10, _ATA_ID_SWDMA_MODES@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ATA_ID_SWDMA_MODES@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	ldr	w8, [x8, x10, lsl #2]
	bics	wzr, w9, w8
	b.ne	LBB0_8
LBB0_7:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	_ide_dma_good_drive
	cmp	x0, #0
	cset	w0, ne
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ide_disk,8,3                   ; @ide_disk
	.comm	_IDE_HFLAG_NO_ATAPI_DMA,4,2     ; @IDE_HFLAG_NO_ATAPI_DMA
	.comm	_ATA_ID_FIELD_VALID,8,3         ; @ATA_ID_FIELD_VALID
	.comm	_ATA_ID_UDMA_MODES,8,3          ; @ATA_ID_UDMA_MODES
	.comm	_ATA_ID_MWDMA_MODES,8,3         ; @ATA_ID_MWDMA_MODES
	.comm	_ATA_ID_SWDMA_MODES,8,3         ; @ATA_ID_SWDMA_MODES
.subsections_via_symbols
