	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc86c001_cable_detect
_tc86c001_cable_detect:                 ## @tc86c001_cable_detect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %edi
	callq	_to_pci_dev
	movq	%rax, %rdi
	movl	$5, %esi
	callq	_pci_resource_start
	movq	%rax, %rdi
	callq	_inw
	testl	$8192, %eax                     ## imm = 0x2000
	jne	LBB0_1
## %bb.2:
	movq	_ATA_CBL_PATA80@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ATA_CBL_PATA40@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_CBL_PATA40,4,2             ## @ATA_CBL_PATA40
	.comm	_ATA_CBL_PATA80,4,2             ## @ATA_CBL_PATA80
	.no_dead_strip	_tc86c001_cable_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc86c001_cable_detect
_tc86c001_cable_detect:                 ; @tc86c001_cable_detect
	.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
	ldr	w0, [x0]
	bl	_to_pci_dev
	mov	w1, #5
	bl	_pci_resource_start
	bl	_inw
Lloh0:
	adrp	x8, _ATA_CBL_PATA40@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_CBL_PATA40@GOTPAGEOFF]
Lloh2:
	adrp	x9, _ATA_CBL_PATA80@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATA_CBL_PATA80@GOTPAGEOFF]
	tst	w0, #0x2000
	csel	x8, x9, x8, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_CBL_PATA40,4,2             ; @ATA_CBL_PATA40
	.comm	_ATA_CBL_PATA80,4,2             ; @ATA_CBL_PATA80
	.no_dead_strip	_tc86c001_cable_detect
.subsections_via_symbols
