	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmac_ide_cable_detect
_pmac_ide_cable_detect:                 ## @pmac_ide_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	(%rax), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rdi
	callq	_of_find_node_by_path
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%rax, %r15
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_strncmp
	testl	%eax, %eax
	je	LBB0_6
LBB0_2:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:
	movq	_ATA_CBL_PATA40@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	$9, %edx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	_ATA_CBL_PATA40_SHORT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_ATA_CBL_PATA80@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cable-type"

L_.str.1:                               ## @.str.1
	.asciz	"/"

L_.str.2:                               ## @.str.2
	.asciz	"model"

L_.str.3:                               ## @.str.3
	.asciz	"80-"

L_.str.4:                               ## @.str.4
	.asciz	"PowerBook"

	.comm	_ATA_CBL_PATA40_SHORT,4,2       ## @ATA_CBL_PATA40_SHORT
	.comm	_ATA_CBL_PATA80,4,2             ## @ATA_CBL_PATA80
L_.str.5:                               ## @.str.5
	.asciz	"K2-UATA"

L_.str.6:                               ## @.str.6
	.asciz	"shasta-ata"

	.comm	_ATA_CBL_PATA40,4,2             ## @ATA_CBL_PATA40
	.no_dead_strip	_pmac_ide_cable_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmac_ide_cable_detect
_pmac_ide_cable_detect:                 ; @pmac_ide_cable_detect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	ldr	x19, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, #0
	bl	_of_get_property
	mov	x20, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_of_find_node_by_path
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, #0
	bl	_of_get_property
	cbz	x20, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w2, #3
	bl	_strncmp
	cbz	w0, LBB0_4
LBB0_2:
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_of_device_is_compatible
Lloh10:
	adrp	x20, _ATA_CBL_PATA80@GOTPAGE
Lloh11:
	ldr	x20, [x20, _ATA_CBL_PATA80@GOTPAGEOFF]
	cbnz	x0, LBB0_5
; %bb.3:
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_of_device_is_compatible
Lloh14:
	adrp	x8, _ATA_CBL_PATA40@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATA_CBL_PATA40@GOTPAGEOFF]
	cmp	x0, #0
	csel	x20, x8, x20, eq
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	w2, #9
	bl	_strncmp
Lloh18:
	adrp	x8, _ATA_CBL_PATA80@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ATA_CBL_PATA80@GOTPAGEOFF]
Lloh20:
	adrp	x9, _ATA_CBL_PATA40_SHORT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ATA_CBL_PATA40_SHORT@GOTPAGEOFF]
	cmp	w0, #0
	csel	x20, x9, x8, eq
LBB0_5:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cable-type"

l_.str.1:                               ; @.str.1
	.asciz	"/"

l_.str.2:                               ; @.str.2
	.asciz	"model"

l_.str.3:                               ; @.str.3
	.asciz	"80-"

l_.str.4:                               ; @.str.4
	.asciz	"PowerBook"

	.comm	_ATA_CBL_PATA40_SHORT,4,2       ; @ATA_CBL_PATA40_SHORT
	.comm	_ATA_CBL_PATA80,4,2             ; @ATA_CBL_PATA80
l_.str.5:                               ; @.str.5
	.asciz	"K2-UATA"

l_.str.6:                               ; @.str.6
	.asciz	"shasta-ata"

	.comm	_ATA_CBL_PATA40,4,2             ; @ATA_CBL_PATA40
	.no_dead_strip	_pmac_ide_cable_detect
.subsections_via_symbols
