	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_hevc_frame_rps              ## -- Begin function ff_hevc_frame_rps
	.p2align	4, 0x90
_ff_hevc_frame_rps:                     ## @ff_hevc_frame_rps
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	24(%rdi), %r14
	movq	56(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_26
## %bb.1:
	movq	%rdi, %r13
	movq	8(%rdi), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	callq	_FF_ARRAY_ELEMS
	cltq
	addq	$4, %r15
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rdi
	leaq	(%rdi,%r15), %rax
	cmpq	16(%r13), %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_mark_ref
	movq	8(%r13), %rdi
	jmp	LBB0_5
LBB0_6:
	movq	_NB_RPS_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	jle	LBB0_8
## %bb.7:
	shlq	$3, %rsi
	movq	%r14, %rdi
	callq	___bzero
LBB0_8:
	cmpl	$0, (%r12)
	jle	LBB0_9
## %bb.13:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	24(%r12), %rcx
	movl	(%rax,%rbx,4), %edx
	movq	_ST_FOLL@GOTPCREL(%rip), %rax
	addl	(%r13), %edx
	cmpl	$0, (%rcx,%rbx,4)
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movslq	16(%r12), %rcx
	movq	_ST_CURR_AFT@GOTPCREL(%rip), %rax
	cmpq	%rcx, %rbx
	jge	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_ST_CURR_BEF@GOTPCREL(%rip), %rax
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movslq	(%rax), %rax
	leaq	(%r14,%rax,8), %rsi
	movq	_HEVC_FRAME_FLAG_SHORT_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_add_candidate_ref
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_22
## %bb.10:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_14
## %bb.11:
	cmpl	$0, 32(%r13)
	jg	LBB0_12
	jmp	LBB0_22
LBB0_26:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_25
LBB0_9:
	xorl	%r15d, %r15d
	cmpl	$0, 32(%r13)
	jle	LBB0_22
LBB0_12:
	xorl	%ebx, %ebx
	movq	_HEVC_FRAME_FLAG_LONG_REF@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r13), %rax
	cmpq	$0, (%rax,%rbx,8)
	movq	_LT_CURR@GOTPCREL(%rip), %rax
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	_LT_FOLL@GOTPCREL(%rip), %rax
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	40(%r13), %rcx
	movl	(%rcx,%rbx,4), %edx
	movslq	(%rax), %rax
	leaq	(%r14,%rax,8), %rsi
	movl	(%r12), %ecx
	movq	%r13, %rdi
	callq	_add_candidate_ref
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_19 Depth=1
	incq	%rbx
	movslq	32(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_19
LBB0_22:
	movq	8(%r13), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_25
## %bb.23:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rsi
	addq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_ff_hevc_unref_frame
	incq	%rbx
	movq	8(%r13), %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_24
LBB0_25:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NB_RPS_TYPE,4,2                ## @NB_RPS_TYPE
	.comm	_ST_FOLL,4,2                    ## @ST_FOLL
	.comm	_ST_CURR_BEF,4,2                ## @ST_CURR_BEF
	.comm	_ST_CURR_AFT,4,2                ## @ST_CURR_AFT
	.comm	_HEVC_FRAME_FLAG_SHORT_REF,4,2  ## @HEVC_FRAME_FLAG_SHORT_REF
	.comm	_LT_CURR,4,2                    ## @LT_CURR
	.comm	_LT_FOLL,4,2                    ## @LT_FOLL
	.comm	_HEVC_FRAME_FLAG_LONG_REF,4,2   ## @HEVC_FRAME_FLAG_LONG_REF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_hevc_frame_rps              ; -- Begin function ff_hevc_frame_rps
	.p2align	2
_ff_hevc_frame_rps:                     ; @ff_hevc_frame_rps
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x22, [x0, #56]
	ldr	x20, [x0, #24]
	cbz	x22, LBB0_15
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x21, #0
	mov	x23, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	bl	_FF_ARRAY_ELEMS
	add	x21, x21, #4
	cmp	x23, w0, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x0, x9, [x19, #8]
	add	x8, x0, x21
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x8
	mov	w1, #0
	bl	_mark_ref
	ldr	x0, [x19, #8]
	b	LBB0_3
LBB0_6:
Lloh0:
	adrp	x8, _NB_RPS_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NB_RPS_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.7:
	lsl	x1, x8, #3
	mov	x0, x20
	bl	_bzero
LBB0_8:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.9:
	mov	x23, #0
Lloh3:
	adrp	x24, _ST_FOLL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ST_FOLL@GOTPAGEOFF]
Lloh5:
	adrp	x25, _HEVC_FRAME_FLAG_SHORT_REF@GOTPAGE
Lloh6:
	ldr	x25, [x25, _HEVC_FRAME_FLAG_SHORT_REF@GOTPAGEOFF]
Lloh7:
	adrp	x26, _ST_CURR_AFT@GOTPAGE
Lloh8:
	ldr	x26, [x26, _ST_CURR_AFT@GOTPAGEOFF]
Lloh9:
	adrp	x27, _ST_CURR_BEF@GOTPAGE
Lloh10:
	ldr	x27, [x27, _ST_CURR_BEF@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	lsl	x8, x23, #2
	ldr	x9, [x22, #24]
	ldr	w9, [x9, x8]
	cbz	w9, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldrsw	x9, [x22, #16]
	cmp	x23, x9
	csel	x9, x27, x26, lt
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x9, x24
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w10, [x19]
	ldr	x11, [x22, #8]
	ldr	w8, [x11, x8]
	add	w2, w8, w10
	ldrsw	x8, [x9]
	add	x1, x20, x8, lsl #3
	ldr	w3, [x25]
	mov	x0, x19
	bl	_add_candidate_ref
	mov	x21, x0
	tbnz	w0, #31, LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_10
	b	LBB0_17
LBB0_15:
	mov	w21, #0
	stp	xzr, xzr, [x20]
	b	LBB0_24
LBB0_16:
	mov	w21, #0
LBB0_17:
	ldr	w8, [x19, #32]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.18:
	mov	x22, #0
Lloh11:
	adrp	x23, _LT_CURR@GOTPAGE
Lloh12:
	ldr	x23, [x23, _LT_CURR@GOTPAGEOFF]
Lloh13:
	adrp	x24, _LT_FOLL@GOTPAGE
Lloh14:
	ldr	x24, [x24, _LT_FOLL@GOTPAGEOFF]
Lloh15:
	adrp	x25, _HEVC_FRAME_FLAG_LONG_REF@GOTPAGE
Lloh16:
	ldr	x25, [x25, _HEVC_FRAME_FLAG_LONG_REF@GOTPAGEOFF]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19, #40]
	ldr	w2, [x8, x22, lsl #2]
	ldr	x8, [x9, x22, lsl #3]
	cmp	x8, #0
	csel	x8, x24, x23, eq
	ldrsw	x8, [x8]
	add	x1, x20, x8, lsl #3
	ldr	w3, [x25]
	mov	x0, x19
	bl	_add_candidate_ref
	mov	x21, x0
	tbnz	w0, #31, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19, #32]
	cmp	x22, x8
	b.lt	LBB0_19
LBB0_21:
	ldr	x0, [x19, #8]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_24
; %bb.22:
	mov	x20, #0
	mov	x22, #0
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x1, x8, x20
	mov	x0, x19
	mov	w2, #0
	bl	_ff_hevc_unref_frame
	add	x22, x22, #1
	ldr	x0, [x19, #8]
	bl	_FF_ARRAY_ELEMS
	add	x20, x20, #4
	cmp	x22, w0, sxtw
	b.lt	LBB0_23
LBB0_24:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NB_RPS_TYPE,4,2                ; @NB_RPS_TYPE
	.comm	_ST_FOLL,4,2                    ; @ST_FOLL
	.comm	_ST_CURR_BEF,4,2                ; @ST_CURR_BEF
	.comm	_ST_CURR_AFT,4,2                ; @ST_CURR_AFT
	.comm	_HEVC_FRAME_FLAG_SHORT_REF,4,2  ; @HEVC_FRAME_FLAG_SHORT_REF
	.comm	_LT_CURR,4,2                    ; @LT_CURR
	.comm	_LT_FOLL,4,2                    ; @LT_FOLL
	.comm	_HEVC_FRAME_FLAG_LONG_REF,4,2   ; @HEVC_FRAME_FLAG_LONG_REF
.subsections_via_symbols
