	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __sata_set_spd_needed
___sata_set_spd_needed:                 ## @__sata_set_spd_needed
	.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
	movq	%rsi, %r14
	movq	8(%rdi), %r15
	movl	(%rdi), %ebx
	callq	_ata_is_host_link
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movl	4(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.2:
	movl	$-1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_3:
	movq	_UINT_MAX@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %ebx
	je	LBB0_5
## %bb.4:
	movl	%ebx, %edi
	callq	_fls
LBB0_5:
	movl	(%r14), %ecx
	movl	%ecx, %edx
	shrl	$4, %edx
	andl	$15, %edx
	andl	$-241, %ecx
	movl	%eax, %esi
	shll	$4, %esi
	movzbl	%sil, %esi
	orl	%ecx, %esi
	movl	%esi, (%r14)
	xorl	%ecx, %ecx
	cmpl	%eax, %edx
	setne	%cl
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT_MAX,4,2                   ## @UINT_MAX
	.no_dead_strip	___sata_set_spd_needed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __sata_set_spd_needed
___sata_set_spd_needed:                 ; @__sata_set_spd_needed
	.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
	mov	x19, x1
	ldr	x21, [x0, #8]
	ldr	w20, [x0]
	bl	_ata_is_host_link
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w8, [x21, #4]
	mov	w9, #-1
	lsl	w9, w9, w8
	bic	w9, w20, w9
	cmp	w8, #0
	csel	w20, w20, w9, eq
LBB0_2:
Lloh0:
	adrp	x8, _UINT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UINT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_fls
LBB0_5:
	ldr	w8, [x19]
	ubfx	w9, w8, #4, #4
	bfi	w8, w0, #4, #4
	str	w8, [x19]
	cmp	w9, w0
	cset	w0, ne
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT_MAX,4,2                   ; @UINT_MAX
	.no_dead_strip	___sata_set_spd_needed
.subsections_via_symbols
