	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs5536_cable_detect
_cs5536_cable_detect:                   ## @cs5536_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	_CFG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-4(%rbp), %rdx
	movq	%rax, %rdi
	callq	_cs5536_read
	movq	_IDE_CFG_CABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-4(%rbp), %eax
	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	_CFG,4,2                        ## @CFG
	.comm	_IDE_CFG_CABLE,4,2              ## @IDE_CFG_CABLE
	.comm	_ATA_CBL_PATA80,4,2             ## @ATA_CBL_PATA80
	.comm	_ATA_CBL_PATA40,4,2             ## @ATA_CBL_PATA40
	.no_dead_strip	_cs5536_cable_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs5536_cable_detect
_cs5536_cable_detect:                   ; @cs5536_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, _CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	sub	x2, x29, #4
	bl	_cs5536_read
	ldur	w8, [x29, #-4]
Lloh3:
	adrp	x9, _IDE_CFG_CABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IDE_CFG_CABLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _ATA_CBL_PATA40@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ATA_CBL_PATA40@GOTPAGEOFF]
Lloh8:
	adrp	x11, _ATA_CBL_PATA80@GOTPAGE
Lloh9:
	ldr	x11, [x11, _ATA_CBL_PATA80@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG,4,2                        ; @CFG
	.comm	_IDE_CFG_CABLE,4,2              ; @IDE_CFG_CABLE
	.comm	_ATA_CBL_PATA80,4,2             ; @ATA_CBL_PATA80
	.comm	_ATA_CBL_PATA40,4,2             ; @ATA_CBL_PATA40
	.no_dead_strip	_cs5536_cable_detect
.subsections_via_symbols
