	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function piix_cable_detect
_piix_cable_detect:                     ## @piix_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
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_to_pci_dev
	movq	_ich_laptop@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, -12(%rbp)
	cmpq	$0, (%rbx)
	movl	$48, %edx
	movl	$192, %ebx
	cmovel	%edx, %ebx
	movq	(%rcx), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	(%rax), %rdx
	addq	$24, %rcx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rcx), %rsi
	addq	$24, %rcx
	testq	%rsi, %rsi
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, %rsi
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-16(%rcx), %rsi
	cmpq	8(%rax), %rsi
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-8(%rcx), %rsi
	cmpq	16(%rax), %rsi
	jne	LBB0_6
## %bb.5:
	movq	_ATA_CBL_PATA40_SHORT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	leaq	-12(%rbp), %rdx
	movq	%rax, %rdi
	movl	$84, %esi
	callq	_pci_read_config_byte
	testl	%ebx, -12(%rbp)
	jne	LBB0_8
## %bb.9:
	movq	_ATA_CBL_PATA40@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_ATA_CBL_PATA80@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ich_laptop,8,3                 ## @ich_laptop
	.comm	_ATA_CBL_PATA40_SHORT,4,2       ## @ATA_CBL_PATA40_SHORT
	.comm	_ATA_CBL_PATA80,4,2             ## @ATA_CBL_PATA80
	.comm	_ATA_CBL_PATA40,4,2             ## @ATA_CBL_PATA40
	.no_dead_strip	_piix_cable_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function piix_cable_detect
_piix_cable_detect:                     ; @piix_cable_detect
	.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	w0, [x0, #8]
	bl	_to_pci_dev
Lloh0:
	adrp	x8, _ich_laptop@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ich_laptop@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	str	wzr, [sp, #12]
	ldr	x8, [x19]
	cmp	x8, #0
	mov	w8, #192
	mov	w10, #48
	csel	w19, w10, w8, eq
	ldr	x10, [x9]
	cbz	x10, LBB0_7
; %bb.1:
	ldr	x8, [x0]
	add	x9, x9, #24
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x9], #24
	cbz	x10, LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x10, x8
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x10, [x9, #-16]
	ldr	x11, [x0, #8]
	cmp	x10, x11
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x10, [x9, #-8]
	ldr	x11, [x0, #16]
	cmp	x10, x11
	b.ne	LBB0_2
; %bb.6:
Lloh3:
	adrp	x8, _ATA_CBL_PATA40_SHORT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_CBL_PATA40_SHORT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	add	x2, sp, #12
	mov	w1, #84
	bl	_pci_read_config_byte
Lloh5:
	adrp	x8, _ATA_CBL_PATA80@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATA_CBL_PATA80@GOTPAGEOFF]
	ldr	w9, [sp, #12]
Lloh7:
	adrp	x10, _ATA_CBL_PATA40@GOTPAGE
Lloh8:
	ldr	x10, [x10, _ATA_CBL_PATA40@GOTPAGEOFF]
	tst	w9, w19
	csel	x8, x10, x8, eq
LBB0_8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ich_laptop,8,3                 ; @ich_laptop
	.comm	_ATA_CBL_PATA40_SHORT,4,2       ; @ATA_CBL_PATA40_SHORT
	.comm	_ATA_CBL_PATA80,4,2             ; @ATA_CBL_PATA80
	.comm	_ATA_CBL_PATA40,4,2             ; @ATA_CBL_PATA40
	.no_dead_strip	_piix_cable_detect
.subsections_via_symbols
