	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ioat2_free_chan_resources      ## -- Begin function ioat2_free_chan_resources
	.p2align	4, 0x90
_ioat2_free_chan_resources:             ## @ioat2_free_chan_resources
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_ioat2_chan
	movq	%rax, %r12
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	cmpq	$0, 24(%r12)
	je	LBB0_10
## %bb.1:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	48(%r12), %r13
	movq	80(%r12), %rbx
	leaq	76(%r12), %rdi
	callq	_tasklet_disable
	leaq	72(%r12), %rdi
	callq	_del_timer_sync
	movq	%r12, %rdi
	callq	*16(%rbx)
	movq	%r13, %rdi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	callq	*8(%rbx)
	movq	_IOAT_RUN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	68(%r12), %rsi
	callq	_clear_bit
	movq	%r12, %rdi
	addq	$16, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_bh
	movq	%r12, %rdi
	callq	_ioat2_ring_space
	movl	%eax, %r14d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_to_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r14d, %edx
	callq	_dev_dbg
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.2:
	movl	%r14d, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r12), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_ioat2_get_ring_ent
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_ioat2_free_ring_ent
	incq	%r13
	cmpq	%r13, %rbx
	jne	LBB0_3
LBB0_4:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %eax
	subl	%r14d, %eax
	jle	LBB0_6
## %bb.5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_to_dev
	subl	%r14d, %ebx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %edx
	callq	_dev_err
	movl	%ebx, %eax
LBB0_6:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	callq	_ioat2_get_ring_ent
	movq	%rax, %r13
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_dump_desc_dbg
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ioat2_free_ring_ent
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_8
LBB0_9:
	movq	24(%r12), %rdi
	callq	_kfree
	movq	$0, 24(%r12)
	movl	$0, (%r12)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	64(%r12), %esi
	movq	48(%r12), %rdx
	callq	_pci_pool_free
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_bh
	movq	$0, 8(%r12)
	xorps	%xmm0, %xmm0
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movups	%xmm0, (%rax)
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOAT_RUN,4,2                   ## @IOAT_RUN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"freeing %d idle descriptors\n"

L_.str.1:                               ## @.str.1
	.asciz	"Freeing %d in use descriptors!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ioat2_free_chan_resources      ; -- Begin function ioat2_free_chan_resources
	.p2align	2
_ioat2_free_chan_resources:             ; @ioat2_free_chan_resources
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
	bl	_to_ioat2_chan
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_10
; %bb.1:
	mov	x19, x0
	add	x20, x0, #48
	ldr	x24, [x0, #80]
	ldr	w8, [x0], #76
	mov	w9, #1
	lsl	w25, w9, w8
	bl	_tasklet_disable
	add	x0, x19, #72
	bl	_del_timer_sync
	ldr	x8, [x24, #16]
	mov	x0, x19
	blr	x8
	ldr	x8, [x24, #8]
	mov	x0, x20
	blr	x8
Lloh0:
	adrp	x8, _IOAT_RUN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOAT_RUN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #68
	bl	_clear_bit
	add	x22, x19, #16
	mov	x0, x22
	bl	_spin_lock_bh
	mov	x0, x19
	bl	_ioat2_ring_space
	mov	x23, x0
	mov	x0, x20
	bl	_to_dev
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_dev_dbg
	cmp	w23, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x26, #0
	mov	w27, w23
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x1, x26, x8
	mov	x0, x19
	bl	_ioat2_get_ring_ent
	mov	x1, x21
	bl	_ioat2_free_ring_ent
	add	x26, x26, #1
	cmp	x27, x26
	b.ne	LBB0_3
LBB0_4:
	subs	w23, w25, w23
	b.le	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_to_dev
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x23
	bl	_dev_err
LBB0_6:
	cmp	w23, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x25, #0
	mov	w26, w23
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	add	x1, x25, x8
	mov	x0, x19
	bl	_ioat2_get_ring_ent
	mov	x23, x0
	mov	x0, x19
	mov	x1, x23
	bl	_dump_desc_dbg
	mov	x0, x23
	mov	x1, x21
	bl	_ioat2_free_ring_ent
	add	x25, x25, #1
	cmp	x26, x25
	b.ne	LBB0_8
LBB0_9:
	ldr	x0, [x19, #24]
	bl	_kfree
	str	xzr, [x19, #24]
	str	wzr, [x19]
	ldr	w0, [x24]
	ldr	w1, [x19, #64]
	ldr	x2, [x19, #48]
	bl	_pci_pool_free
	mov	x0, x22
	bl	_spin_unlock_bh
	str	xzr, [x19, #8]
	stp	xzr, xzr, [x20]
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_IOAT_RUN,4,2                   ; @IOAT_RUN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"freeing %d idle descriptors\n"

l_.str.1:                               ; @.str.1
	.asciz	"Freeing %d in use descriptors!\n"

.subsections_via_symbols
