	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d40_pool_lli_alloc
_d40_pool_lli_alloc:                    ## @d40_pool_lli_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_chan_is_logical
	movl	%eax, %r12d
	cmpl	$1, %r15d
	jne	LBB0_2
## %bb.1:
	movq	24(%rbx), %rdi
	movl	$8, (%rbx)
	movq	$0, 16(%rbx)
	jmp	LBB0_3
LBB0_2:
	leal	(,%r15,8), %eax
	movl	%eax, (%rbx)
	leal	4(,%r15,8), %edi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, %rdi
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_7
LBB0_3:
	movl	$4, %esi
	callq	_PTR_ALIGN
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.4:
	movq	%rax, 48(%rbx)
	movslq	%r15d, %rcx
	addq	%rcx, %rax
	movq	%rax, 56(%rbx)
	movq	$0, 8(%rbx)
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_5:
	movq	%rax, 32(%rbx)
	movslq	%r15d, %rcx
	movq	%rax, %rdx
	addq	%rcx, %rdx
	movq	%rdx, 40(%rbx)
	movq	(%r14), %rcx
	movl	(%rcx), %edi
	movl	(%rbx), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, %rsi
	callq	_dma_map_single
	movq	%rax, 8(%rbx)
	movq	(%r14), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	16(%rbx), %rdi
	addq	$8, %rbx
	callq	_kfree
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_d40_pool_lli_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d40_pool_lli_alloc
_d40_pool_lli_alloc:                    ; @d40_pool_lli_alloc
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_chan_is_logical
	mov	x22, x0
	cmp	w21, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	x0, [x19, #24]
	mov	w8, #8
	str	w8, [x19]
	str	xzr, [x19, #16]
	b	LBB0_3
LBB0_2:
	lsl	w8, w21, #3
	str	w8, [x19]
	mov	w0, #4
	bfi	w0, w21, #3, #29
Lloh0:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
LBB0_3:
	mov	w1, #4
	bl	_PTR_ALIGN
	mov	x1, x0
	cbz	w22, LBB0_5
; %bb.4:
	mov	w0, #0
	add	x8, x1, w21, sxtw
	stp	x1, x8, [x19, #48]
	str	xzr, [x19, #8]
	b	LBB0_8
LBB0_5:
	add	x8, x1, w21, sxtw
	stp	x1, x8, [x19, #32]
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh3:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	bl	_dma_map_single
	mov	x1, x0
	mov	x21, x19
	str	x0, [x21, #8]!
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_dma_mapping_error
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x0, [x19, #16]
	bl	_kfree
	stp	xzr, xzr, [x21]
LBB0_7:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_d40_pool_lli_alloc
.subsections_via_symbols
