	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_desc
_alloc_desc:                            ## @alloc_desc
	.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
	movq	%rdi, %r12
	movl	40(%rdi), %edi
	movq	_DESC_LIST_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	24(%r12), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	(%rbx), %edx
	xorl	%r14d, %r14d
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	24(%r12), %r15
	movq	32(%r12), %rcx
	movq	%rcx, 16(%r12)
	movslq	(%r12), %rdx
	movq	%rdx, %rax
	shlq	$4, %rax
	addq	%rcx, %rax
	movq	%rax, 8(%r12)
	movl	$0, %eax
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.4:
	xorl	%r14d, %r14d
	movq	_DMABUFSIZE@GOTPCREL(%rip), %r13
	movl	%edx, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edx
	shll	$4, %edx
	addl	%r15d, %edx
	movq	%r14, %rbx
	shlq	$4, %rbx
	movl	%edx, (%rcx,%rbx)
	decl	%eax
	cmpq	%rax, %r14
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r15d, %edi
	callq	_cpu_to_le32
	movq	16(%r12), %rcx
	movq	%rax, 8(%rcx,%rbx)
	incq	%r14
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	movl	%r14d, %eax
	shll	$4, %eax
	leal	(%r15,%rax), %edi
	callq	_cpu_to_le32
	movq	16(%r12), %rcx
	movq	%rax, 8(%rcx,%rbx)
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r13), %edx
	movl	(%rcx,%rbx), %edi
	movq	%rax, %rsi
	callq	_set_desc_count
	movl	(%r12), %eax
	cmpq	%rax, %r14
	jae	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r12), %rcx
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_2
LBB0_13:
	xorl	%r14d, %r14d
LBB0_7:
	movl	4(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.8:
	movq	8(%r12), %rdx
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rbx,%rax), %esi
	shll	$4, %esi
	addl	%r15d, %esi
	movl	%esi, (%rdx,%r13)
	decl	%ecx
	cmpq	%rcx, %rbx
	leal	1(%rbx,%rax), %edi
	cmovel	%eax, %edi
	shll	$4, %edi
	addl	%r15d, %edi
	callq	_cpu_to_le32
	movq	8(%r12), %rdx
	movq	%rax, 8(%rdx,%r13)
	incq	%rbx
	movl	4(%r12), %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r12), %eax
	addq	$16, %r13
	jmp	LBB0_9
LBB0_2:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DESC_LIST_SIZE,4,2             ## @DESC_LIST_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMABUFSIZE,4,2                 ## @DMABUFSIZE
	.no_dead_strip	_alloc_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_desc
_alloc_desc:                            ; @alloc_desc
	.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, x0
	ldr	w0, [x0, #40]
Lloh0:
	adrp	x20, _DESC_LIST_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DESC_LIST_SIZE@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, x19, #24
	bl	_pci_alloc_consistent
	str	x0, [x19, #32]
	cbz	x0, LBB0_13
; %bb.1:
	ldr	w2, [x20]
	mov	w1, #0
	bl	_memset
	ldrsw	x8, [x19]
	ldp	x20, x9, [x19, #24]
	add	x10, x9, x8, lsl #4
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x10, x9, [x19, #8]
	cbz	w8, LBB0_8
; %bb.2:
	mov	x22, #0
Lloh2:
	adrp	x21, _DMABUFSIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _DMABUFSIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x10, x22, #4
	add	w11, w10, w20
	str	w11, [x9, x10]
	sub	w8, w8, #1
	cmp	x22, x8
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_cpu_to_le32
	ldr	x8, [x19, #16]
	add	x9, x8, x22, lsl #4
	str	x0, [x9, #8]
	add	x23, x22, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x22, #1
	add	w0, w20, w23, lsl #4
	bl	_cpu_to_le32
	ldr	x8, [x19, #16]
	add	x9, x8, x22, lsl #4
	str	x0, [x9, #8]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, x22, lsl #4
	ldr	w2, [x21]
	ldp	x0, x1, [x8]
	bl	_set_desc_count
	ldr	w8, [x19]
	cmp	x23, x8
	b.hs	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x19, #16]
	mov	x22, x23
	b	LBB0_3
LBB0_8:
	ldr	w9, [x19, #4]
	cbz	w9, LBB0_12
; %bb.9:
	mov	x21, #0
	mov	x22, #0
	ldr	x10, [x19, #8]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	w11, w22, w8
	add	w12, w20, w11, lsl #4
	str	w12, [x10, x21]
	sub	w9, w9, #1
	cmp	x22, x9
	csinc	w8, w8, w11, eq
	add	w0, w20, w8, lsl #4
	bl	_cpu_to_le32
	ldr	x10, [x19, #8]
	add	x8, x10, x21
	str	x0, [x8, #8]
	add	x22, x22, #1
	ldr	w9, [x19, #4]
	cmp	x22, x9
	b.hs	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19]
	add	x21, x21, #16
	b	LBB0_10
LBB0_12:
	mov	w0, #0
	b	LBB0_14
LBB0_13:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DESC_LIST_SIZE,4,2             ; @DESC_LIST_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMABUFSIZE,4,2                 ; @DMABUFSIZE
	.no_dead_strip	_alloc_desc
.subsections_via_symbols
