	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_sff_prereset               ## -- Begin function ata_sff_prereset
	.p2align	4, 0x90
_ata_sff_prereset:                      ## @ata_sff_prereset
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_ata_std_prereset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_ATA_EH_HARDRESET@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, (%r14)
	jne	LBB0_6
## %bb.2:
	movq	%r14, %rdi
	callq	_ata_link_offline
	testl	%eax, %eax
	je	LBB0_3
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ata_sff_wait_ready
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	movq	_KERN_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_ata_link_printk
	movl	(%r12), %eax
	orl	%eax, (%r14)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_EH_HARDRESET,4,2           ## @ATA_EH_HARDRESET
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_KERN_WARNING,4,2               ## @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device not ready (errno=%d), forcing hardreset\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_sff_prereset               ; -- Begin function ata_sff_prereset
	.p2align	2
_ata_sff_prereset:                      ; @ata_sff_prereset
	.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	x21, x1
	mov	x19, x0
	bl	_ata_std_prereset
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x22, _ATA_EH_HARDRESET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ATA_EH_HARDRESET@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ata_link_offline
	cbz	w0, LBB0_4
LBB0_3:
	mov	x0, 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
LBB0_4:
	mov	x0, x19
	mov	x1, x21
	bl	_ata_sff_wait_ready
	cbz	w0, LBB0_3
; %bb.5:
	mov	x3, x0
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_3
; %bb.6:
Lloh5:
	adrp	x8, _KERN_WARNING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KERN_WARNING@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ata_link_printk
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_EH_HARDRESET,4,2           ; @ATA_EH_HARDRESET
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_KERN_WARNING,4,2               ; @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device not ready (errno=%d), forcing hardreset\n"

.subsections_via_symbols
