	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function free_encoder_ctrl_payloads
_free_encoder_ctrl_payloads:            ## @free_encoder_ctrl_payloads
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	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
	cmpl	$0, (%rdi)
	jle	LBB0_6
## %bb.2:
	movq	_QSV_MAX_ENC_PAYLOAD@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.3:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	-4(%rax,%rbx,4), %edi
	callq	_av_free
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%rbx), %rax
	movslq	(%r14), %rcx
	cmpq	%rcx, %rbx
	movq	%rax, %rbx
	jl	LBB0_4
LBB0_6:
	movl	$0, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
LBB0_7:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QSV_MAX_ENC_PAYLOAD,4,2        ## @QSV_MAX_ENC_PAYLOAD
	.no_dead_strip	_free_encoder_ctrl_payloads
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function free_encoder_ctrl_payloads
_free_encoder_ctrl_payloads:            ; @free_encoder_ctrl_payloads
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_5
; %bb.1:
	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]
Lloh0:
	adrp	x20, _QSV_MAX_ENC_PAYLOAD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _QSV_MAX_ENC_PAYLOAD@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w8, #1
	ccmp	w9, #1, #8, ge
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x21, lsl #2]
	bl	_av_free
	add	x21, x21, #1
	ldrsw	x8, [x19]
	ldrsw	x9, [x20]
	cmp	x21, x8
	ccmp	x21, x9, #0, lt
	b.lt	LBB0_3
LBB0_4:
	str	wzr, [x19]
	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
LBB0_5:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_QSV_MAX_ENC_PAYLOAD,4,2        ; @QSV_MAX_ENC_PAYLOAD
	.no_dead_strip	_free_encoder_ctrl_payloads
.subsections_via_symbols
