	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_enc_pages
_alloc_enc_pages:                       ## @alloc_enc_pages
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	24(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	28(%r15), %edx
	movq	_PAGE_CACHE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%edx, %esi
	sarl	%cl, %esi
	addl	%edx, %eax
	decl	%eax
	sarl	%cl, %eax
	subl	%esi, %eax
	leal	2(%rax), %ecx
	movl	%ecx, (%r15)
	leal	16(,%rax,8), %edi
	movq	_GFP_NOFS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_kmalloc
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_alloc_page
	movq	16(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	16(%r15), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_7:
	movq	_priv_release_snd_buf@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	movl	$0, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movl	%ebx, (%r15)
	movq	%r15, %rdi
	callq	_priv_release_snd_buf
LBB0_9:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_CACHE_SHIFT,4,2           ## @PAGE_CACHE_SHIFT
	.comm	_GFP_NOFS,4,2                   ## @GFP_NOFS
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_alloc_enc_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_enc_pages
_alloc_enc_pages:                       ; @alloc_enc_pages
	.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	x19, x0
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	w9, [x19, #28]
Lloh0:
	adrp	x10, _PAGE_CACHE_SHIFT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PAGE_CACHE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	asr	w11, w9, w10
	add	w8, w8, w9
	sub	w8, w8, #1
	asr	w8, w8, w10
	sub	w8, w8, w11
	add	w8, w8, #2
	str	w8, [x19]
	lsl	w0, w8, #3
Lloh3:
	adrp	x20, _GFP_NOFS@GOTPAGE
Lloh4:
	ldr	x20, [x20, _GFP_NOFS@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_kmalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_9
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_alloc_page
	ldr	x8, [x19, #16]
	lsl	x9, x21, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_4
LBB0_6:
	mov	w0, #0
Lloh5:
	adrp	x8, _priv_release_snd_buf@GOTPAGE
Lloh6:
	ldr	x8, [x8, _priv_release_snd_buf@GOTPAGEOFF]
	str	x8, [x19, #8]
	b	LBB0_10
LBB0_7:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_10
LBB0_8:
	str	w21, [x19]
	mov	x0, x19
	bl	_priv_release_snd_buf
LBB0_9:
Lloh7:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_CACHE_SHIFT,4,2           ; @PAGE_CACHE_SHIFT
	.comm	_GFP_NOFS,4,2                   ; @GFP_NOFS
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_alloc_enc_pages
.subsections_via_symbols
