	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs5535_cable_detect
_cs5535_cable_detect:                   ## @cs5535_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
	subq	$16, %rsp
	movl	(%rdi), %edi
	callq	_to_pci_dev
	movq	_CS5535_CABLE_DETECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-4(%rbp), %rdx
	movq	%rax, %rdi
	callq	_pci_read_config_byte
	testb	$1, -4(%rbp)
	jne	LBB0_1
## %bb.2:
	movq	_ATA_CBL_PATA40@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ATA_CBL_PATA80@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CS5535_CABLE_DETECT,4,2        ## @CS5535_CABLE_DETECT
	.comm	_ATA_CBL_PATA80,4,2             ## @ATA_CBL_PATA80
	.comm	_ATA_CBL_PATA40,4,2             ## @ATA_CBL_PATA40
	.no_dead_strip	_cs5535_cable_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs5535_cable_detect
_cs5535_cable_detect:                   ; @cs5535_cable_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
	ldr	w0, [x0]
	bl	_to_pci_dev
Lloh0:
	adrp	x8, _CS5535_CABLE_DETECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CS5535_CABLE_DETECT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	sub	x2, x29, #4
	bl	_pci_read_config_byte
	ldur	w8, [x29, #-4]
Lloh3:
	adrp	x9, _ATA_CBL_PATA80@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATA_CBL_PATA80@GOTPAGEOFF]
Lloh5:
	adrp	x10, _ATA_CBL_PATA40@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ATA_CBL_PATA40@GOTPAGEOFF]
	tst	w8, #0x1
	csel	x8, x10, x9, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CS5535_CABLE_DETECT,4,2        ; @CS5535_CABLE_DETECT
	.comm	_ATA_CBL_PATA80,4,2             ; @ATA_CBL_PATA80
	.comm	_ATA_CBL_PATA40,4,2             ; @ATA_CBL_PATA40
	.no_dead_strip	_cs5535_cable_detect
.subsections_via_symbols
