	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ioat_prep_interrupt_lock       ## -- Begin function ioat_prep_interrupt_lock
	.p2align	4, 0x90
_ioat_prep_interrupt_lock:              ## @ioat_prep_interrupt_lock
	.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
	callq	_to_ioat_chan
	movq	%rax, %r15
	movq	_IOAT_CHAN_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_ioat_check_space_lock
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_ioat_get_ring_ent
	movq	16(%rax), %rcx
	movq	$0, 40(%rcx)
	movabsq	$4294967297, %rdx               ## imm = 0x100000001
	movq	%rdx, 20(%rcx)
	movq	_DMA_PREP_FENCE@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	movq	(%rdx), %rdx
	andq	%r14, %rdx
	setne	%sil
	movl	%esi, 28(%rcx)
	movl	$1, 32(%rcx)
	movq	_NULL_DESC_BUFFER_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 16(%rcx)
	leaq	8(%rax), %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rcx)
	movq	%r14, 8(%rax)
	movl	$1, (%rax)
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_dump_desc_dbg
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_IOAT_CHAN_DOWN,4,2             ## @IOAT_CHAN_DOWN
	.comm	_DMA_PREP_FENCE,8,3             ## @DMA_PREP_FENCE
	.comm	_NULL_DESC_BUFFER_SIZE,4,2      ## @NULL_DESC_BUFFER_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ioat_prep_interrupt_lock       ; -- Begin function ioat_prep_interrupt_lock
	.p2align	2
_ioat_prep_interrupt_lock:              ; @ioat_prep_interrupt_lock
	.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, x1
	bl	_to_ioat_chan
	mov	x20, x0
Lloh0:
	adrp	x8, _IOAT_CHAN_DOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOAT_CHAN_DOWN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x20, #4
	bl	_test_bit
	cbnz	x0, LBB0_2
; %bb.1:
	mov	w22, #1
	mov	x0, x20
	mov	w1, #1
	bl	_ioat_check_space_lock
	cbz	x0, LBB0_4
LBB0_2:
	mov	x21, #0
LBB0_3:
	mov	x0, x21
	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:
	ldr	w1, [x20]
	mov	x0, x20
	bl	_ioat_get_ring_ent
	mov	x1, x0
	ldr	x8, [x0, #16]
	str	xzr, [x8, #40]
	movi.2s	v0, #1
	stur	d0, [x8, #20]
Lloh3:
	adrp	x9, _DMA_PREP_FENCE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_PREP_FENCE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	tst	x9, x19
	cset	w9, ne
	stp	w9, w22, [x8, #28]
Lloh6:
	adrp	x9, _NULL_DESC_BUFFER_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NULL_DESC_BUFFER_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x8, #16]
	stp	xzr, xzr, [x8]
	mov	x21, x0
	str	x19, [x21, #8]!
	str	w22, [x0]
	mov	x0, x20
	bl	_dump_desc_dbg
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IOAT_CHAN_DOWN,4,2             ; @IOAT_CHAN_DOWN
	.comm	_DMA_PREP_FENCE,8,3             ; @DMA_PREP_FENCE
	.comm	_NULL_DESC_BUFFER_SIZE,4,2      ; @NULL_DESC_BUFFER_SIZE
.subsections_via_symbols
