	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_do_link_spd_horkage
_ata_do_link_spd_horkage:               ## @ata_do_link_spd_horkage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_ata_dev_phys_link
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_sata_scr_valid
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.1:
	movq	_ATA_HORKAGE_1_5_GBPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_5
## %bb.2:
	cmpl	$2, (%rbx)
	jl	LBB0_5
## %bb.3:
	movl	$1, (%rbx)
	cmpl	$2, 4(%rbx)
	jl	LBB0_5
## %bb.4:
	movq	_KERN_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$1, %edi
	callq	_sata_spd_string
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_ata_dev_printk
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_HORKAGE_1_5_GBPS,4,2       ## @ATA_HORKAGE_1_5_GBPS
	.comm	_KERN_INFO,4,2                  ## @KERN_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"applying link speed limit horkage to %s\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_ata_do_link_spd_horkage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_do_link_spd_horkage
_ata_do_link_spd_horkage:               ; @ata_do_link_spd_horkage
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_ata_dev_phys_link
	mov	x20, x0
	bl	_sata_scr_valid
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _ATA_HORKAGE_1_5_GBPS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_HORKAGE_1_5_GBPS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.3:
	mov	w8, #1
	str	w8, [x20]
	ldr	w8, [x20, #4]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _KERN_INFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KERN_INFO@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	w0, #1
	bl	_sata_spd_string
	mov	x3, x0
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_ata_dev_printk
Lloh8:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_HORKAGE_1_5_GBPS,4,2       ; @ATA_HORKAGE_1_5_GBPS
	.comm	_KERN_INFO,4,2                  ; @KERN_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"applying link speed limit horkage to %s\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_ata_do_link_spd_horkage
.subsections_via_symbols
