	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hwframe_pool_prealloc
_hwframe_pool_prealloc:                 ## @hwframe_pool_prealloc
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movl	(%r12), %edi
	movl	$8, %esi
	callq	_av_mallocz_array
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	cmpl	$0, (%r12)
	jle	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movq	%rax, (%rbx)
	movq	-48(%rbp), %r15
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.4:
	movl	$1, %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_av_hwframe_get_buffer
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_8 Depth=1
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movq	%rax, (%r15,%r13,8)
	movq	-48(%rbp), %r15
	movq	(%r15,%r13,8), %rsi
	incq	%r13
	testq	%rsi, %rsi
	jne	LBB0_8
LBB0_9:
	movl	(%r12), %eax
LBB0_10:
	testl	%eax, %eax
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_av_frame_free
	incq	%rbx
	movslq	(%r12), %rax
	addq	$8, %r15
	cmpq	%rax, %rbx
	jl	LBB0_12
	jmp	LBB0_13
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	xorl	%r14d, %r14d
LBB0_13:
	leaq	-48(%rbp), %rdi
	callq	_av_freep
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hwframe_pool_prealloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hwframe_pool_prealloc
_hwframe_pool_prealloc:                 ; @hwframe_pool_prealloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x0
	ldr	x22, [x0]
	ldr	w0, [x22]
	mov	w1, #8
	bl	_av_mallocz_array
	str	x0, [sp, #8]
	cbz	x0, LBB0_7
; %bb.1:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x19, x0
	bl	_av_frame_alloc
	str	x0, [x19]
	ldr	x19, [sp, #8]
	ldr	x1, [x19]
	cbz	x1, LBB0_9
; %bb.3:
	mov	w23, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w2, #0
	bl	_av_hwframe_get_buffer
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_av_frame_alloc
	lsl	x8, x23, #3
	str	x0, [x19, x8]
	ldr	x19, [sp, #8]
	ldr	x1, [x19, x8]
	add	x23, x23, #1
	cbnz	x1, LBB0_4
	b	LBB0_10
LBB0_7:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
LBB0_8:
	mov	w20, #0
	b	LBB0_14
LBB0_9:
	mov	w20, #0
LBB0_10:
	ldr	w8, [x22]
LBB0_11:
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x21, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_av_frame_free
	add	x21, x21, #1
	ldrsw	x8, [x22]
	add	x19, x19, #8
	cmp	x21, x8
	b.lt	LBB0_13
LBB0_14:
	add	x0, sp, #8
	bl	_av_freep
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hwframe_pool_prealloc
.subsections_via_symbols
