	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hpt366_filter
_hpt366_filter:                         ## @hpt366_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	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_ATA_DEV_ATA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	_bad_ata33@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_hpt_dma_blacklisted
	movq	_ATA_MASK_UDMA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	notq	%rcx
	xorl	%ebx, %ebx
	cmpq	$1, %rax
	sbbq	%rbx, %rbx
	orq	%rcx, %rbx
	andq	%r15, %rbx
	movq	_bad_ata66_3@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_hpt_dma_blacklisted
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ATA_SHIFT_UDMA@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$248, %eax
	shll	%cl, %eax
	notl	%eax
	cltq
	andq	%rax, %rbx
LBB0_3:
	movq	_bad_ata66_4@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_hpt_dma_blacklisted
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	_ATA_SHIFT_UDMA@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$240, %eax
	shll	%cl, %eax
	notl	%eax
	cltq
	andq	%rax, %rbx
LBB0_7:
	movq	%rbx, %r15
	jmp	LBB0_8
LBB0_5:
	movq	_ATA_DEV_ATAPI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movq	_ATA_MASK_MWDMA@GOTPCREL(%rip), %rax
	movq	_ATA_MASK_UDMA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	(%rax), %rcx
	notq	%rcx
	andq	%rcx, %r15
LBB0_8:
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_bmdma_mode_filter          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_DEV_ATA,8,3                ## @ATA_DEV_ATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UDMA"

	.comm	_bad_ata33,4,2                  ## @bad_ata33
	.comm	_ATA_MASK_UDMA,8,3              ## @ATA_MASK_UDMA
L_.str.1:                               ## @.str.1
	.asciz	"UDMA3"

	.comm	_bad_ata66_3,4,2                ## @bad_ata66_3
	.comm	_ATA_SHIFT_UDMA,4,2             ## @ATA_SHIFT_UDMA
L_.str.2:                               ## @.str.2
	.asciz	"UDMA4"

	.comm	_bad_ata66_4,4,2                ## @bad_ata66_4
	.comm	_ATA_DEV_ATAPI,8,3              ## @ATA_DEV_ATAPI
	.comm	_ATA_MASK_MWDMA,8,3             ## @ATA_MASK_MWDMA
	.no_dead_strip	_hpt366_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hpt366_filter
_hpt366_filter:                         ; @hpt366_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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ATA_DEV_ATA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_DEV_ATA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _bad_ata33@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bad_ata33@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_hpt_dma_blacklisted
Lloh8:
	adrp	x8, _ATA_MASK_UDMA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATA_MASK_UDMA@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, #0
	mov	x9, #-1
	csinv	x8, x9, x8, eq
	and	x19, x8, x19
Lloh11:
	adrp	x8, _bad_ata66_3@GOTPAGE
Lloh12:
	ldr	x8, [x8, _bad_ata66_3@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_hpt_dma_blacklisted
Lloh16:
	adrp	x21, _ATA_SHIFT_UDMA@GOTPAGE
Lloh17:
	ldr	x21, [x21, _ATA_SHIFT_UDMA@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w8, [x21]
	mov	w9, #248
	lsl	w8, w9, w8
	mvn	w8, w8
	sxtw	x8, w8
	and	x19, x19, x8
LBB0_3:
Lloh18:
	adrp	x8, _bad_ata66_4@GOTPAGE
Lloh19:
	ldr	x8, [x8, _bad_ata66_4@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_hpt_dma_blacklisted
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w8, [x21]
	mov	w9, #240
	lsl	w8, w9, w8
	mvn	w8, w8
	sxtw	x8, w8
	and	x19, x19, x8
	b	LBB0_7
LBB0_5:
Lloh23:
	adrp	x9, _ATA_DEV_ATAPI@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ATA_DEV_ATAPI@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh26:
	adrp	x8, _ATA_MASK_MWDMA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ATA_MASK_MWDMA@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
Lloh29:
	adrp	x9, _ATA_MASK_UDMA@GOTPAGE
Lloh30:
	ldr	x9, [x9, _ATA_MASK_UDMA@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	orr	x8, x9, x8
	bic	x19, x19, x8
LBB0_7:
	mov	x0, x20
	mov	x1, 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
	b	_ata_bmdma_mode_filter
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_DEV_ATA,8,3                ; @ATA_DEV_ATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UDMA"

	.comm	_bad_ata33,4,2                  ; @bad_ata33
	.comm	_ATA_MASK_UDMA,8,3              ; @ATA_MASK_UDMA
l_.str.1:                               ; @.str.1
	.asciz	"UDMA3"

	.comm	_bad_ata66_3,4,2                ; @bad_ata66_3
	.comm	_ATA_SHIFT_UDMA,4,2             ; @ATA_SHIFT_UDMA
l_.str.2:                               ; @.str.2
	.asciz	"UDMA4"

	.comm	_bad_ata66_4,4,2                ; @bad_ata66_4
	.comm	_ATA_DEV_ATAPI,8,3              ; @ATA_DEV_ATAPI
	.comm	_ATA_MASK_MWDMA,8,3             ; @ATA_MASK_MWDMA
	.no_dead_strip	_hpt366_filter
.subsections_via_symbols
