	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_xor_alloc_chan_resources
_mv_xor_alloc_chan_resources:           ## @mv_xor_alloc_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_to_mv_xor_chan
	movq	%rax, %r15
	movq	_MV_XOR_POOL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MV_XOR_SLOT_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	(%r15), %ebx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	%eax, %ebx
	jge	LBB0_5
## %bb.1:
	leaq	4(%r15), %r13
	movq	%r15, %rax
	addq	$8, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r12
	movq	_MV_XOR_SLOT_SIZE@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	movslq	%ebx, %rbx
	imulq	%rbx, %rax
	addq	24(%r15), %rax
	movq	%rax, 32(%r12)
	leaq	8(%r12), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_dma_async_tx_descriptor_init
	movq	_mv_xor_tx_submit@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movq	%r12, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r12, %rdi
	addq	$24, %rdi
	callq	_INIT_LIST_HEAD
	movslq	(%r14), %rax
	imulq	%rbx, %rax
	addq	16(%r15), %rax
	movq	%rax, 8(%r12)
	movl	%ebx, 4(%r12)
	incl	%ebx
	movq	%r13, %rdi
	callq	_spin_lock_bh
	movl	%ebx, (%r15)
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	movq	%r13, %rdi
	callq	_spin_unlock_bh
	cmpl	%ebx, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movq	%r15, %rdi
	callq	_mv_chan_to_devp
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %edx
	callq	_dev_info
LBB0_5:
	movq	%r15, %rdi
	callq	_mv_chan_to_devp
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	cmovnel	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV_XOR_POOL_SIZE,4,2           ## @MV_XOR_POOL_SIZE
	.comm	_MV_XOR_SLOT_SIZE,4,2           ## @MV_XOR_SLOT_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel only initialized %d descriptor slots"

	.comm	_mv_xor_tx_submit,4,2           ## @mv_xor_tx_submit
L_.str.1:                               ## @.str.1
	.asciz	"allocated %d descriptor slots\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mv_xor_alloc_chan_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_xor_alloc_chan_resources
_mv_xor_alloc_chan_resources:           ; @mv_xor_alloc_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	x20, x0
	bl	_to_mv_xor_chan
	mov	x19, x0
Lloh0:
	adrp	x8, _MV_XOR_POOL_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MV_XOR_POOL_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x25, _MV_XOR_SLOT_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MV_XOR_SLOT_SIZE@GOTPAGEOFF]
	ldr	w9, [x25]
	sdiv	w26, w8, w9
	ldr	w21, [x0]
	cmp	w21, w26
	b.ge	LBB0_5
; %bb.1:
	add	x22, x19, #4
	add	x23, x19, #8
Lloh5:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x27]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x0
	ldr	x8, [x19, #24]
	ldrsw	x9, [x25]
	sxtw	x28, w21
	madd	x8, x9, x28, x8
	str	x8, [x0, #32]
	add	x0, x0, #8
	mov	x1, x20
	bl	_dma_async_tx_descriptor_init
Lloh7:
	adrp	x8, _mv_xor_tx_submit@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mv_xor_tx_submit@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x24, #16]
	mov	x0, x24
	bl	_INIT_LIST_HEAD
	add	x0, x24, #24
	bl	_INIT_LIST_HEAD
	ldr	x8, [x19, #16]
	ldrsw	x9, [x25]
	madd	x8, x9, x28, x8
	str	x8, [x24, #8]
	add	w28, w21, #1
	str	w21, [x24, #4]
	mov	x0, x22
	bl	_spin_lock_bh
	str	w28, [x19]
	mov	x0, x24
	mov	x1, x23
	bl	_list_add_tail
	mov	x0, x22
	bl	_spin_unlock_bh
	mov	x21, x28
	cmp	w26, w28
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_mv_chan_to_devp
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_info
LBB0_5:
	mov	x0, x19
	bl	_mv_chan_to_devp
	ldr	w2, [x19]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, #0
	csneg	w0, w8, w9, ne
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MV_XOR_POOL_SIZE,4,2           ; @MV_XOR_POOL_SIZE
	.comm	_MV_XOR_SLOT_SIZE,4,2           ; @MV_XOR_SLOT_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel only initialized %d descriptor slots"

	.comm	_mv_xor_tx_submit,4,2           ; @mv_xor_tx_submit
l_.str.1:                               ; @.str.1
	.asciz	"allocated %d descriptor slots\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mv_xor_alloc_chan_resources
.subsections_via_symbols
