	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idmac_desc_alloc
_idmac_desc_alloc:                      ## @idmac_desc_alloc
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	leal	(,%r15,8), %edi
	callq	_vmalloc
	movq	%rax, %rbx
	movl	8(%r14), %edi
	callq	_to_idmac
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_to_ipu
	movq	%rax, %rdi
	callq	_tasklet_disable
	movl	%r15d, (%r14)
	movq	%rbx, 16(%r14)
	leaq	12(%r14), %rdi
	callq	_INIT_LIST_HEAD
	leaq	4(%r14), %r13
	movq	%r13, %rdi
	callq	_INIT_LIST_HEAD
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.3:
	addq	$8, %r14
	addq	$4, %rbx
	movq	_idmac_tx_submit@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dma_async_tx_descriptor_init
	movl	(%r12), %eax
	movl	%eax, (%rbx)
	leaq	-4(%rbx), %rdi
	movq	%r13, %rsi
	callq	_list_add
	addq	$8, %rbx
	decl	%r15d
	jne	LBB0_4
LBB0_5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_to_ipu
	movq	%rax, %rdi
	callq	_tasklet_enable
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_idmac_tx_submit,4,2            ## @idmac_tx_submit
	.no_dead_strip	_idmac_desc_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idmac_desc_alloc
_idmac_desc_alloc:                      ; @idmac_desc_alloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x22, x0
	lsl	w0, w1, #3
	bl	_vmalloc
	mov	x23, x0
	mov	x20, x22
	ldr	w0, [x20, #8]!
	bl	_to_idmac
	cbz	x23, LBB0_5
; %bb.1:
	mov	x21, x0
	bl	_to_ipu
	bl	_tasklet_disable
	str	w19, [x22]
	str	x23, [x22, #16]
	add	x0, x22, #12
	bl	_INIT_LIST_HEAD
	add	x22, x22, #4
	mov	x0, x22
	bl	_INIT_LIST_HEAD
	cbz	w19, LBB0_4
; %bb.2:
	add	x23, x23, #4
Lloh0:
	adrp	x24, _idmac_tx_submit@GOTPAGE
Lloh1:
	ldr	x24, [x24, _idmac_tx_submit@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w19, w19, #1
	mov	x0, x23
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x23
	mov	x1, x20
	bl	_dma_async_tx_descriptor_init
	ldr	w8, [x24]
	sub	x0, x23, #4
	str	w8, [x23], #8
	mov	x1, x22
	bl	_list_add
	cbnz	w19, LBB0_3
LBB0_4:
	mov	x0, x21
	bl	_to_ipu
	bl	_tasklet_enable
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_idmac_tx_submit,4,2            ; @idmac_tx_submit
	.no_dead_strip	_idmac_desc_alloc
.subsections_via_symbols
