	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata66_svwks_cobalt
_ata66_svwks_cobalt:                    ## @ata66_svwks_cobalt
	.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
	movl	4(%rdi), %edi
	callq	_to_pci_dev
	movq	(%rax), %rcx
	movq	_PCI_VENDOR_ID_SUN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.1:
	movq	8(%rax), %rcx
	movq	_PCI_VENDOR_ID_SERVERWORKS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.2:
	movq	16(%rax), %rcx
	movq	_PCI_DEVICE_ID_SERVERWORKS_CSB5IDE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.3:
	movb	(%rbx), %cl
	addb	$14, %cl
	movl	24(%rax), %eax
	movzbl	%cl, %ecx
	btl	%ecx, %eax
	jb	LBB0_4
LBB0_5:
	movq	_ATA_CBL_PATA40@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movq	_ATA_CBL_PATA80@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID_SUN,8,3          ## @PCI_VENDOR_ID_SUN
	.comm	_PCI_VENDOR_ID_SERVERWORKS,8,3  ## @PCI_VENDOR_ID_SERVERWORKS
	.comm	_PCI_DEVICE_ID_SERVERWORKS_CSB5IDE,8,3 ## @PCI_DEVICE_ID_SERVERWORKS_CSB5IDE
	.comm	_ATA_CBL_PATA80,4,2             ## @ATA_CBL_PATA80
	.comm	_ATA_CBL_PATA40,4,2             ## @ATA_CBL_PATA40
	.no_dead_strip	_ata66_svwks_cobalt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata66_svwks_cobalt
_ata66_svwks_cobalt:                    ; @ata66_svwks_cobalt
	.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
	ldr	w0, [x0, #4]
	bl	_to_pci_dev
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PCI_VENDOR_ID_SUN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_VENDOR_ID_SUN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _PCI_VENDOR_ID_SERVERWORKS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_VENDOR_ID_SERVERWORKS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x0, #16]
Lloh6:
	adrp	x9, _PCI_DEVICE_ID_SERVERWORKS_CSB5IDE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCI_DEVICE_ID_SERVERWORKS_CSB5IDE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [x19]
	add	w8, w8, #14
	ldr	w9, [x0, #24]
Lloh9:
	adrp	x10, _ATA_CBL_PATA80@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ATA_CBL_PATA80@GOTPAGEOFF]
Lloh11:
	adrp	x11, _ATA_CBL_PATA40@GOTPAGE
Lloh12:
	ldr	x11, [x11, _ATA_CBL_PATA40@GOTPAGEOFF]
	lsr	w8, w9, w8
	tst	w8, #0x1
	csel	x8, x11, x10, eq
	b	LBB0_5
LBB0_4:
Lloh13:
	adrp	x8, _ATA_CBL_PATA40@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATA_CBL_PATA40@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID_SUN,8,3          ; @PCI_VENDOR_ID_SUN
	.comm	_PCI_VENDOR_ID_SERVERWORKS,8,3  ; @PCI_VENDOR_ID_SERVERWORKS
	.comm	_PCI_DEVICE_ID_SERVERWORKS_CSB5IDE,8,3 ; @PCI_DEVICE_ID_SERVERWORKS_CSB5IDE
	.comm	_ATA_CBL_PATA80,4,2             ; @ATA_CBL_PATA80
	.comm	_ATA_CBL_PATA40,4,2             ; @ATA_CBL_PATA40
	.no_dead_strip	_ata66_svwks_cobalt
.subsections_via_symbols
