	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioat2_alloc_ring_ent
_ioat2_alloc_ring_ent:                  ## @ioat2_alloc_ring_ent
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_ioatdma_device
	movq	%rax, %r12
	movl	(%rax), %edi
	leaq	-36(%rbp), %rdx
	movl	%ebx, %esi
	callq	_pci_pool_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_ioat2_cache@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_kmem_cache_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dma_async_tx_descriptor_init
	movq	_ioat2_tx_submit_unlock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%r15, 8(%rbx)
	movl	-36(%rbp), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_6
LBB0_4:
	movl	(%r12), %edi
	movl	-36(%rbp), %edx
	movq	%r15, %rsi
	callq	_pci_pool_free
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ioat2_cache,4,2                ## @ioat2_cache
	.comm	_ioat2_tx_submit_unlock,4,2     ## @ioat2_tx_submit_unlock
	.no_dead_strip	_ioat2_alloc_ring_ent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioat2_alloc_ring_ent
_ioat2_alloc_ring_ent:                  ; @ioat2_alloc_ring_ent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_ioatdma_device
	mov	x21, x0
	ldr	w0, [x0]
	add	x2, sp, #12
	mov	x1, x22
	bl	_pci_pool_alloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _ioat2_cache@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ioat2_cache@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_kmem_cache_alloc
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, x22
	mov	x1, x19
	bl	_dma_async_tx_descriptor_init
Lloh3:
	adrp	x8, _ioat2_tx_submit_unlock@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ioat2_tx_submit_unlock@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	x20, [x22, #8]
	ldr	w9, [sp, #12]
	stp	w9, w8, [x22]
	b	LBB0_5
LBB0_3:
	mov	x22, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x21]
	ldr	w2, [sp, #12]
	mov	x1, x20
	bl	_pci_pool_free
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ioat2_cache,4,2                ; @ioat2_cache
	.comm	_ioat2_tx_submit_unlock,4,2     ; @ioat2_tx_submit_unlock
	.no_dead_strip	_ioat2_alloc_ring_ent
.subsections_via_symbols
