	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc1200_udma_filter
_sc1200_udma_filter:                    ## @sc1200_udma_filter
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r14
	callq	_ide_get_pair_dev
	movq	(%r14), %r14
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	(%rax), %r15
	movq	%r15, %rdi
	callq	_ata_id_has_dma
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	callq	___ide_dma_bad_drive
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	_ATA_ID_FIELD_VALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$4, (%r15,%rax,4)
	je	LBB0_5
## %bb.4:
	movq	_ATA_ID_UDMA_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$7, (%r15,%rax,4)
	jne	LBB0_6
LBB0_5:
	movq	_ATA_ID_MWDMA_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ecx, %ecx
	testb	$7, (%r15,%rax,4)
	cmovneq	%rcx, %r14
LBB0_6:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.no_dead_strip	_sc1200_udma_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc1200_udma_filter
_sc1200_udma_filter:                    ; @sc1200_udma_filter
	.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
	ldr	x19, [x0, #8]
	bl	_ide_get_pair_dev
	ldr	x19, [x19]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	ldr	x20, [x0]
	mov	x0, x20
	bl	_ata_id_has_dma
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x21
	bl	___ide_dma_bad_drive
	cbnz	x0, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _ATA_ID_FIELD_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_ID_FIELD_VALID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
	tbz	w8, #2, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _ATA_ID_UDMA_MODES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_ID_UDMA_MODES@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
	tst	w8, #0x7
	b.ne	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _ATA_ID_MWDMA_MODES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATA_ID_MWDMA_MODES@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
	tst	w8, #0x7
	csel	x19, x19, xzr, eq
LBB0_6:
	mov	x0, x19
	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
	.cfi_endproc
                                        ; -- End function
	.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
	.no_dead_strip	_sc1200_udma_filter
.subsections_via_symbols
