	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function svwks_udma_filter
_svwks_udma_filter:                     ## @svwks_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %rdi
	movq	(%rax), %rcx
	movq	_PCI_DEVICE_ID_SERVERWORKS_HT1000IDE@GOTPCREL(%rip), %rdx
	movl	$31, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_10
## %bb.1:
	movq	8(%rdi), %rcx
	movq	_SVWKS_CSB5_REVISION_NEW@GOTPCREL(%rip), %rdx
	movl	$7, %eax
	cmpq	(%rdx), %rcx
	jl	LBB0_10
## %bb.2:
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rdx
	movl	$90, %esi
	callq	_pci_read_config_byte
	movl	-12(%rbp), %eax
	andl	$3, %eax
	cmpl	$1, %eax
	je	LBB0_3
## %bb.4:
	cmpl	$2, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$3, %eax
	jne	LBB0_9
## %bb.6:
	movq	_svwks_bad_ata100@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_check_in_drive_lists
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movl	$31, %eax
	jmp	LBB0_10
LBB0_3:
	movl	$7, %eax
	jmp	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_7:
	movl	$63, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DEVICE_ID_SERVERWORKS_HT1000IDE,8,3 ## @PCI_DEVICE_ID_SERVERWORKS_HT1000IDE
	.comm	_SVWKS_CSB5_REVISION_NEW,8,3    ## @SVWKS_CSB5_REVISION_NEW
	.comm	_svwks_bad_ata100,4,2           ## @svwks_bad_ata100
	.no_dead_strip	_svwks_udma_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function svwks_udma_filter
_svwks_udma_filter:                     ; @svwks_udma_filter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_pci_dev
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PCI_DEVICE_ID_SERVERWORKS_HT1000IDE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_DEVICE_ID_SERVERWORKS_HT1000IDE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #31
	b	LBB0_4
LBB0_2:
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _SVWKS_CSB5_REVISION_NEW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SVWKS_CSB5_REVISION_NEW@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_5
LBB0_3:
	mov	w0, #7
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	str	wzr, [sp, #12]
	add	x2, sp, #12
	mov	w1, #90
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	and	w8, w8, #0x3
	cmp	w8, #1
	b.eq	LBB0_3
; %bb.6:
	cmp	w8, #2
	b.eq	LBB0_1
; %bb.7:
	cmp	w8, #3
	b.ne	LBB0_10
; %bb.8:
Lloh6:
	adrp	x8, _svwks_bad_ata100@GOTPAGE
Lloh7:
	ldr	x8, [x8, _svwks_bad_ata100@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_check_in_drive_lists
	cbnz	x0, LBB0_1
; %bb.9:
	mov	w0, #63
	b	LBB0_4
LBB0_10:
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DEVICE_ID_SERVERWORKS_HT1000IDE,8,3 ; @PCI_DEVICE_ID_SERVERWORKS_HT1000IDE
	.comm	_SVWKS_CSB5_REVISION_NEW,8,3    ; @SVWKS_CSB5_REVISION_NEW
	.comm	_svwks_bad_ata100,4,2           ; @svwks_bad_ata100
	.no_dead_strip	_svwks_udma_filter
.subsections_via_symbols
