	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_frame_rps_type
_find_frame_rps_type:                   ## @find_frame_rps_type
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rsi), %edi
	callq	_ff_vaapi_get_surface_id
	movq	%rax, %r12
	movq	(%r14), %rax
	movq	_ST_CURR_BEF@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	cmpl	$0, (%rax,%rdx)
	jle	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edi
	callq	_ff_vaapi_get_surface_id
	cmpq	%rax, %r12
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	(%r14), %rax
	movq	(%r15), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movslq	(%rax,%rdx), %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_2
LBB0_4:
	movq	_ST_CURR_AFT@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	cmpl	$0, (%rax,%rdx)
	jle	LBB0_8
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edi
	callq	_ff_vaapi_get_surface_id
	cmpq	%rax, %r12
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movq	(%r14), %rax
	movq	(%r15), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movslq	(%rax,%rdx), %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_6
LBB0_8:
	movq	_LT_CURR@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	cmpl	$0, (%rax,%rdx)
	jle	LBB0_15
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edi
	callq	_ff_vaapi_get_surface_id
	cmpq	%rax, %r12
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movq	(%r14), %rax
	movq	(%r15), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movslq	(%rax,%rdx), %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_10
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_13:
	movq	_VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	movq	_VA_PICTURE_HEVC_RPS_ST_CURR_AFTER@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movq	_VA_PICTURE_HEVC_RPS_LT_CURR@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_CURR_BEF,8,3                ## @ST_CURR_BEF
	.comm	_VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE,4,2 ## @VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE
	.comm	_ST_CURR_AFT,8,3                ## @ST_CURR_AFT
	.comm	_VA_PICTURE_HEVC_RPS_ST_CURR_AFTER,4,2 ## @VA_PICTURE_HEVC_RPS_ST_CURR_AFTER
	.comm	_LT_CURR,8,3                    ## @LT_CURR
	.comm	_VA_PICTURE_HEVC_RPS_LT_CURR,4,2 ## @VA_PICTURE_HEVC_RPS_LT_CURR
	.no_dead_strip	_find_frame_rps_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_frame_rps_type
_find_frame_rps_type:                   ; @find_frame_rps_type
	.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	w0, [x1]
	bl	_ff_vaapi_get_surface_id
	mov	x20, x0
Lloh0:
	adrp	x21, _ST_CURR_BEF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ST_CURR_BEF@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x9, [x21]
	lsl	x10, x9, #4
	ldr	w10, [x8, x10]
	cmp	w10, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w0, [x8]
	bl	_ff_vaapi_get_surface_id
	cmp	x20, x0
	b.eq	LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	ldr	x8, [x19]
	ldr	x9, [x21]
	lsl	x10, x9, #4
	ldrsw	x10, [x8, x10]
	cmp	x22, x10
	b.lt	LBB0_2
LBB0_4:
Lloh2:
	adrp	x21, _ST_CURR_AFT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ST_CURR_AFT@GOTPAGEOFF]
	ldr	x9, [x21]
	lsl	x10, x9, #4
	ldr	w10, [x8, x10]
	cmp	w10, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w0, [x8]
	bl	_ff_vaapi_get_surface_id
	cmp	x20, x0
	b.eq	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldr	x8, [x19]
	ldr	x9, [x21]
	lsl	x10, x9, #4
	ldrsw	x10, [x8, x10]
	cmp	x22, x10
	b.lt	LBB0_6
LBB0_8:
Lloh4:
	adrp	x21, _LT_CURR@GOTPAGE
Lloh5:
	ldr	x21, [x21, _LT_CURR@GOTPAGEOFF]
	ldr	x9, [x21]
	lsl	x10, x9, #4
	ldr	w10, [x8, x10]
	cmp	w10, #1
	b.lt	LBB0_12
; %bb.9:
	mov	x22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w0, [x8]
	bl	_ff_vaapi_get_surface_id
	cmp	x20, x0
	b.eq	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	ldr	x8, [x19]
	ldr	x9, [x21]
	lsl	x10, x9, #4
	ldrsw	x10, [x8, x10]
	cmp	x22, x10
	b.lt	LBB0_10
LBB0_12:
	mov	w0, #0
	b	LBB0_17
LBB0_13:
Lloh6:
	adrp	x8, _VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh8:
	adrp	x8, _VA_PICTURE_HEVC_RPS_ST_CURR_AFTER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VA_PICTURE_HEVC_RPS_ST_CURR_AFTER@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh10:
	adrp	x8, _VA_PICTURE_HEVC_RPS_LT_CURR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VA_PICTURE_HEVC_RPS_LT_CURR@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
LBB0_17:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_CURR_BEF,8,3                ; @ST_CURR_BEF
	.comm	_VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE,4,2 ; @VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE
	.comm	_ST_CURR_AFT,8,3                ; @ST_CURR_AFT
	.comm	_VA_PICTURE_HEVC_RPS_ST_CURR_AFTER,4,2 ; @VA_PICTURE_HEVC_RPS_ST_CURR_AFTER
	.comm	_LT_CURR,8,3                    ; @LT_CURR
	.comm	_VA_PICTURE_HEVC_RPS_LT_CURR,4,2 ; @VA_PICTURE_HEVC_RPS_LT_CURR
	.no_dead_strip	_find_frame_rps_type
.subsections_via_symbols
