	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_free_frame
_get_free_frame:                        ## @get_free_frame
	.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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_clear_unused_frames
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	24(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_1
## %bb.4:
	addq	$24, %rbx
LBB0_5:
	movl	$32, %edi
	callq	_av_mallocz
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movl	%eax, 16(%r15)
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_QSV_MAX_ENC_PAYLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$3, %edi
	callq	_av_mallocz
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%r15, (%rbx)
	movq	%r15, (%r14)
	movl	$1, (%r15)
	jmp	LBB0_10
LBB0_2:
	movq	%rbx, (%r14)
	movl	$1, (%rbx)
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_7:
	leaq	-32(%rbp), %rdi
	callq	_av_freep
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QSV_MAX_ENC_PAYLOAD,4,2        ## @QSV_MAX_ENC_PAYLOAD
	.no_dead_strip	_get_free_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_free_frame
_get_free_frame:                        ; @get_free_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_clear_unused_frames
	ldr	x9, [x20]
	cbz	x9, LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	ldr	w9, [x9]
	cbz	w9, LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x8, #24]
	cbnz	x9, LBB0_1
; %bb.3:
	add	x20, x8, #24
LBB0_4:
	mov	w0, #32
	bl	_av_mallocz
	str	x0, [sp, #8]
	cbz	x0, LBB0_9
; %bb.5:
	mov	x21, x0
	bl	_av_frame_alloc
	str	w0, [x21, #16]
	cbz	w0, LBB0_10
; %bb.6:
Lloh0:
	adrp	x8, _QSV_MAX_ENC_PAYLOAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QSV_MAX_ENC_PAYLOAD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w0, w8, #3
	bl	_av_mallocz
	str	x0, [x21, #8]
	cbz	x0, LBB0_10
; %bb.7:
	mov	w0, #0
	str	x21, [x20]
	str	x21, [x19]
	mov	w8, #1
	str	w8, [x21]
	b	LBB0_11
LBB0_8:
	mov	w0, #0
	str	x8, [x19]
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_11
LBB0_9:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	b	_AVERROR
LBB0_10:
	add	x0, sp, #8
	bl	_av_freep
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_11:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QSV_MAX_ENC_PAYLOAD,4,2        ; @QSV_MAX_ENC_PAYLOAD
	.no_dead_strip	_get_free_frame
.subsections_via_symbols
