	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i7300_idle_ioat_stop
_i7300_idle_ioat_stop:                  ## @i7300_idle_ioat_stop
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MAX_STOP_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	testl	%esi, %esi
	jle	LBB0_5
## %bb.1:
	movq	_ioat_chanbase@GOTPCREL(%rip), %r12
	movq	_IOAT1_CHANSTS_OFFSET@GOTPCREL(%rip), %r15
	movq	_IOAT_CHANSTS_STATUS@GOTPCREL(%rip), %r14
	movq	_IOAT_CHANSTS_ACTIVE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_IOAT_CHANCMD_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IOAT1_CHANCMD_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	callq	_writeb
	movl	$10, %edi
	callq	_udelay
	movq	(%r15), %rdi
	addq	(%r12), %rdi
	callq	_readq
	andl	(%r14), %eax
	cmpl	(%r13), %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movq	_MAX_STOP_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %ebx
	jl	LBB0_2
LBB0_5:
	cmpl	%esi, %ebx
	jne	LBB0_6
LBB0_7:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dprintk                        ## TAILCALL
LBB0_3:
	movq	_MAX_STOP_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %ebx
	je	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_STOP_RETRIES,4,2           ## @MAX_STOP_RETRIES
	.comm	_IOAT_CHANCMD_RESET,4,2         ## @IOAT_CHANCMD_RESET
	.comm	_ioat_chanbase,8,3              ## @ioat_chanbase
	.comm	_IOAT1_CHANCMD_OFFSET,8,3       ## @IOAT1_CHANCMD_OFFSET
	.comm	_IOAT1_CHANSTS_OFFSET,8,3       ## @IOAT1_CHANSTS_OFFSET
	.comm	_IOAT_CHANSTS_STATUS,4,2        ## @IOAT_CHANSTS_STATUS
	.comm	_IOAT_CHANSTS_ACTIVE,4,2        ## @IOAT_CHANSTS_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to stop I/O AT after %d retries\n"

	.no_dead_strip	_i7300_idle_ioat_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i7300_idle_ioat_stop
_i7300_idle_ioat_stop:                  ; @i7300_idle_ioat_stop
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x20, _MAX_STOP_RETRIES@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MAX_STOP_RETRIES@GOTPAGEOFF]
	ldr	w1, [x20]
	cmp	w1, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w19, #0
Lloh2:
	adrp	x21, _IOAT_CHANCMD_RESET@GOTPAGE
Lloh3:
	ldr	x21, [x21, _IOAT_CHANCMD_RESET@GOTPAGEOFF]
Lloh4:
	adrp	x22, _ioat_chanbase@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ioat_chanbase@GOTPAGEOFF]
Lloh6:
	adrp	x23, _IOAT1_CHANCMD_OFFSET@GOTPAGE
Lloh7:
	ldr	x23, [x23, _IOAT1_CHANCMD_OFFSET@GOTPAGEOFF]
Lloh8:
	adrp	x24, _IOAT1_CHANSTS_OFFSET@GOTPAGE
Lloh9:
	ldr	x24, [x24, _IOAT1_CHANSTS_OFFSET@GOTPAGEOFF]
Lloh10:
	adrp	x25, _IOAT_CHANSTS_STATUS@GOTPAGE
Lloh11:
	ldr	x25, [x25, _IOAT_CHANSTS_STATUS@GOTPAGEOFF]
Lloh12:
	adrp	x26, _IOAT_CHANSTS_ACTIVE@GOTPAGE
Lloh13:
	ldr	x26, [x26, _IOAT_CHANSTS_ACTIVE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	x8, [x22]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writeb
	mov	w0, #10
	bl	_udelay
	ldr	x8, [x22]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readq
	ldr	w8, [x25]
	and	w8, w8, w0
	ldr	w9, [x26]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w19, w19, #1
	ldr	w1, [x20]
	cmp	w19, w1
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w19, #0
LBB0_5:
	cmp	w19, w1
	b.ne	LBB0_8
LBB0_6:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_dprintk
LBB0_7:
	ldr	w1, [x20]
	cmp	w19, w1
	b.eq	LBB0_6
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_STOP_RETRIES,4,2           ; @MAX_STOP_RETRIES
	.comm	_IOAT_CHANCMD_RESET,4,2         ; @IOAT_CHANCMD_RESET
	.comm	_ioat_chanbase,8,3              ; @ioat_chanbase
	.comm	_IOAT1_CHANCMD_OFFSET,8,3       ; @IOAT1_CHANCMD_OFFSET
	.comm	_IOAT1_CHANSTS_OFFSET,8,3       ; @IOAT1_CHANSTS_OFFSET
	.comm	_IOAT_CHANSTS_STATUS,4,2        ; @IOAT_CHANSTS_STATUS
	.comm	_IOAT_CHANSTS_ACTIVE,4,2        ; @IOAT_CHANSTS_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to stop I/O AT after %d retries\n"

	.no_dead_strip	_i7300_idle_ioat_stop
.subsections_via_symbols
