	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmac_ide_do_resume
_pmac_ide_do_resume:                    ## @pmac_ide_do_resume
	.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	%rdi, %rbx
	cmpl	$0, 24(%rdi)
	jne	LBB0_4
## %bb.1:
	movq	_ppc_md@GOTPCREL(%rip), %r14
	movq	_PMAC_FTR_IDE_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	16(%rbx), %edx
	movl	20(%rbx), %esi
	movl	$1, %ecx
	callq	*(%r14)
	movq	_PMAC_FTR_IDE_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %edx
	movl	20(%rbx), %esi
	movl	$1, %ecx
	callq	*(%r14)
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	movl	16(%rbx), %edx
	movl	20(%rbx), %esi
	xorl	%ecx, %ecx
	callq	*(%r14)
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_readl
	movq	_KAUAI_FCR_UATA_RESET_N@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_KAUAI_FCR_UATA_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	8(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
LBB0_3:
	movq	_IDE_WAKEUP_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_jiffies_to_msecs
	movl	%eax, %edi
	callq	_msleep
LBB0_4:
	movq	%rbx, %rdi
	callq	_sanitize_timings
	movl	(%rbx), %edi
	callq	_enable_irq
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ppc_md,8,3                     ## @ppc_md
	.comm	_PMAC_FTR_IDE_RESET,4,2         ## @PMAC_FTR_IDE_RESET
	.comm	_PMAC_FTR_IDE_ENABLE,4,2        ## @PMAC_FTR_IDE_ENABLE
	.comm	_KAUAI_FCR_UATA_RESET_N,4,2     ## @KAUAI_FCR_UATA_RESET_N
	.comm	_KAUAI_FCR_UATA_ENABLE,4,2      ## @KAUAI_FCR_UATA_ENABLE
	.comm	_IDE_WAKEUP_DELAY,4,2           ## @IDE_WAKEUP_DELAY
	.no_dead_strip	_pmac_ide_do_resume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmac_ide_do_resume
_pmac_ide_do_resume:                    ; @pmac_ide_do_resume
	.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, x0
	ldr	w8, [x0, #24]
	cbnz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x20, _ppc_md@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ppc_md@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x21, _PMAC_FTR_IDE_RESET@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PMAC_FTR_IDE_RESET@GOTPAGEOFF]
	ldr	w0, [x21]
	ldp	w2, w1, [x19, #16]
	mov	w3, #1
	blr	x8
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _PMAC_FTR_IDE_ENABLE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PMAC_FTR_IDE_ENABLE@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x9]
	ldp	w2, w1, [x19, #16]
	mov	w3, #1
	blr	x8
	mov	w0, #10
	bl	_msleep
	ldr	x8, [x20]
	ldr	w0, [x21]
	ldp	w2, w1, [x19, #16]
	mov	w3, #0
	blr	x8
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_readl
Lloh7:
	adrp	x8, _KAUAI_FCR_UATA_RESET_N@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KAUAI_FCR_UATA_RESET_N@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _KAUAI_FCR_UATA_ENABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _KAUAI_FCR_UATA_ENABLE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w0, w8, w9
	ldr	x1, [x19, #8]
	bl	_writel
LBB0_3:
Lloh13:
	adrp	x8, _IDE_WAKEUP_DELAY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IDE_WAKEUP_DELAY@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_jiffies_to_msecs
	bl	_msleep
LBB0_4:
	mov	x0, x19
	bl	_sanitize_timings
	ldr	w0, [x19]
	bl	_enable_irq
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ppc_md,8,3                     ; @ppc_md
	.comm	_PMAC_FTR_IDE_RESET,4,2         ; @PMAC_FTR_IDE_RESET
	.comm	_PMAC_FTR_IDE_ENABLE,4,2        ; @PMAC_FTR_IDE_ENABLE
	.comm	_KAUAI_FCR_UATA_RESET_N,4,2     ; @KAUAI_FCR_UATA_RESET_N
	.comm	_KAUAI_FCR_UATA_ENABLE,4,2      ; @KAUAI_FCR_UATA_ENABLE
	.comm	_IDE_WAKEUP_DELAY,4,2           ; @IDE_WAKEUP_DELAY
	.no_dead_strip	_pmac_ide_do_resume
.subsections_via_symbols
