	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_std_prereset               ## -- Begin function ata_std_prereset
	.p2align	4, 0x90
_ata_std_prereset:                      ## @ata_std_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	callq	_sata_ehc_deb_timing
	movq	_ATA_EH_HARDRESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	jne	LBB0_7
## %bb.1:
	movq	_ATA_FLAG_SATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r15)
	je	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_sata_link_resume
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_5
## %bb.4:
	movq	_KERN_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_ata_link_printk
LBB0_5:
	movq	%rbx, %rdi
	callq	_ata_phys_link_offline
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_ATA_EH_SOFTRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rbx)
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_EH_HARDRESET,4,2           ## @ATA_EH_HARDRESET
	.comm	_ATA_FLAG_SATA,4,2              ## @ATA_FLAG_SATA
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_KERN_WARNING,4,2               ## @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to resume link for reset (errno=%d)\n"

	.comm	_ATA_EH_SOFTRESET,4,2           ## @ATA_EH_SOFTRESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_std_prereset               ; -- Begin function ata_std_prereset
	.p2align	2
_ata_std_prereset:                      ; @ata_std_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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_sata_ehc_deb_timing
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _ATA_EH_HARDRESET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_EH_HARDRESET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.1:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _ATA_FLAG_SATA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATA_FLAG_SATA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_sata_link_resume
	cbz	w0, LBB0_5
; %bb.3:
	mov	x3, x0
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_5
; %bb.4:
Lloh9:
	adrp	x8, _KERN_WARNING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KERN_WARNING@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ata_link_printk
LBB0_5:
	mov	x0, x19
	bl	_ata_phys_link_offline
	cbz	x0, LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _ATA_EH_SOFTRESET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATA_EH_SOFTRESET@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_7:
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_EH_HARDRESET,4,2           ; @ATA_EH_HARDRESET
	.comm	_ATA_FLAG_SATA,4,2              ; @ATA_FLAG_SATA
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_KERN_WARNING,4,2               ; @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to resume link for reset (errno=%d)\n"

	.comm	_ATA_EH_SOFTRESET,4,2           ; @ATA_EH_SOFTRESET
.subsections_via_symbols
