	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ff_hevc_frame_nb_refs
LCPI0_0:
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ff_hevc_frame_nb_refs
	.p2align	4, 0x90
_ff_hevc_frame_nb_refs:                 ## @ff_hevc_frame_nb_refs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	16(%rdi), %r8
	testq	%r8, %r8
	je	LBB0_1
## %bb.2:
	movl	(%r8), %r10d
	testl	%r10d, %r10d
	jle	LBB0_3
## %bb.4:
	movq	8(%r8), %rsi
	cmpl	$8, %r10d
	jae	LBB0_7
## %bb.5:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_3:
	xorl	%r10d, %r10d
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_7:
	movl	%r10d, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rax
	movq	%rax, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%r9, %rcx
	andq	$-2, %rcx
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = [2,2,2,2]
	pxor	%xmm5, %xmm5
	pxor	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rsi,%rax,4), %xmm6
	movdqu	16(%rsi,%rax,4), %xmm7
	movdqu	32(%rsi,%rax,4), %xmm0
	movdqu	48(%rsi,%rax,4), %xmm1
	pcmpeqd	%xmm2, %xmm6
	paddd	%xmm5, %xmm6
	pcmpeqd	%xmm2, %xmm7
	paddd	%xmm4, %xmm7
	pcmpeqd	%xmm2, %xmm0
	pcmpeqd	%xmm2, %xmm1
	paddd	%xmm3, %xmm0
	paddd	%xmm6, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm7, %xmm1
	addq	$16, %rax
	movdqa	%xmm0, %xmm5
	movdqa	%xmm1, %xmm4
	addq	$-2, %rcx
	jne	LBB0_10
## %bb.11:
	testb	$1, %r9b
	je	LBB0_13
LBB0_12:
	movdqu	(%rsi,%rax,4), %xmm2
	movdqu	16(%rsi,%rax,4), %xmm3
	pxor	%xmm4, %xmm4
	pcmpeqd	%xmm4, %xmm2
	paddd	%xmm2, %xmm0
	pcmpeqd	%xmm4, %xmm3
	paddd	%xmm3, %xmm1
	pcmpeqd	%xmm2, %xmm2
	psubd	%xmm2, %xmm0
	psubd	%xmm2, %xmm1
LBB0_13:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpq	%r10, %rdx
	je	LBB0_14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$1, (%rsi,%rdx,4)
	sbbl	$-1, %eax
	incq	%rdx
	cmpq	%rdx, %r10
	jne	LBB0_6
LBB0_14:
	movl	4(%r8), %esi
	cmpl	%esi, %r10d
	jge	LBB0_25
## %bb.15:
	movq	8(%r8), %r8
	movl	%r10d, %edx
	movq	%rsi, %r11
	subq	%rdx, %r11
	cmpq	$8, %r11
	jb	LBB0_24
## %bb.16:
	movq	%r11, %r9
	andq	$-8, %r9
	movd	%eax, %xmm0
	leaq	-8(%r9), %rax
	movq	%rax, %r10
	shrq	$3, %r10
	incq	%r10
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%r10, %rcx
	andq	$-2, %rcx
	leaq	(%r8,%rdx,4), %rbx
	addq	$48, %rbx
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = [2,2,2,2]
	movdqa	%xmm0, %xmm5
	pxor	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-48(%rbx,%rax,4), %xmm6
	movdqu	-32(%rbx,%rax,4), %xmm7
	movdqu	-16(%rbx,%rax,4), %xmm0
	movdqu	(%rbx,%rax,4), %xmm1
	pcmpeqd	%xmm2, %xmm6
	paddd	%xmm5, %xmm6
	pcmpeqd	%xmm2, %xmm7
	paddd	%xmm4, %xmm7
	pcmpeqd	%xmm2, %xmm0
	pcmpeqd	%xmm2, %xmm1
	paddd	%xmm3, %xmm0
	paddd	%xmm6, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm7, %xmm1
	addq	$16, %rax
	movdqa	%xmm0, %xmm5
	movdqa	%xmm1, %xmm4
	addq	$-2, %rcx
	jne	LBB0_19
## %bb.20:
	testb	$1, %r10b
	je	LBB0_22
LBB0_21:
	addq	%rdx, %rax
	movdqu	(%r8,%rax,4), %xmm2
	movdqu	16(%r8,%rax,4), %xmm3
	pxor	%xmm4, %xmm4
	pcmpeqd	%xmm4, %xmm2
	paddd	%xmm2, %xmm0
	pcmpeqd	%xmm4, %xmm3
	paddd	%xmm3, %xmm1
	pcmpeqd	%xmm2, %xmm2
	psubd	%xmm2, %xmm0
	psubd	%xmm2, %xmm1
LBB0_22:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpq	%r9, %r11
	je	LBB0_25
## %bb.23:
	addq	%r9, %rdx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$1, (%r8,%rdx,4)
	sbbl	$-1, %eax
	incq	%rdx
	cmpq	%rdx, %rsi
	jne	LBB0_24
LBB0_25:
	testq	%rdi, %rdi
	je	LBB0_37
LBB0_26:
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_37
## %bb.27:
	movq	8(%rdi), %rdx
	cmpl	$8, %ecx
	jae	LBB0_29
## %bb.28:
	xorl	%esi, %esi
	jmp	LBB0_36
LBB0_29:
	movl	%ecx, %esi
	andl	$-8, %esi
	movd	%eax, %xmm0
	leaq	-8(%rsi), %rax
	movq	%rax, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rax, %rax
	je	LBB0_30
## %bb.31:
	movq	%r8, %rax
	andq	$-2, %rax
	pxor	%xmm2, %xmm2
	xorl	%edi, %edi
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = [2,2,2,2]
	movdqa	%xmm0, %xmm5
	pxor	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdx,%rdi,4), %xmm6
	movdqu	16(%rdx,%rdi,4), %xmm7
	movdqu	32(%rdx,%rdi,4), %xmm0
	movdqu	48(%rdx,%rdi,4), %xmm1
	pcmpeqd	%xmm2, %xmm6
	paddd	%xmm5, %xmm6
	pcmpeqd	%xmm2, %xmm7
	paddd	%xmm4, %xmm7
	pcmpeqd	%xmm2, %xmm0
	pcmpeqd	%xmm2, %xmm1
	paddd	%xmm3, %xmm0
	paddd	%xmm6, %xmm0
	paddd	%xmm3, %xmm1
	paddd	%xmm7, %xmm1
	addq	$16, %rdi
	movdqa	%xmm0, %xmm5
	movdqa	%xmm1, %xmm4
	addq	$-2, %rax
	jne	LBB0_32
## %bb.33:
	testb	$1, %r8b
	je	LBB0_35
LBB0_34:
	movdqu	(%rdx,%rdi,4), %xmm2
	movdqu	16(%rdx,%rdi,4), %xmm3
	pxor	%xmm4, %xmm4
	pcmpeqd	%xmm4, %xmm2
	paddd	%xmm2, %xmm0
	pcmpeqd	%xmm4, %xmm3
	paddd	%xmm3, %xmm1
	pcmpeqd	%xmm2, %xmm2
	psubd	%xmm2, %xmm0
	psubd	%xmm2, %xmm1
LBB0_35:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpq	%rcx, %rsi
	je	LBB0_37
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$1, (%rdx,%rsi,4)
	sbbl	$-1, %eax
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_36
LBB0_37:
	popq	%rbx
	popq	%rbp
	retq
LBB0_30:
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
	testb	$1, %r8b
	jne	LBB0_34
	jmp	LBB0_35
LBB0_8:
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	pxor	%xmm1, %xmm1
	testb	$1, %r9b
	jne	LBB0_12
	jmp	LBB0_13
LBB0_17:
	pxor	%xmm1, %xmm1
	xorl	%eax, %eax
	testb	$1, %r10b
	jne	LBB0_21
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_hevc_frame_nb_refs          ; -- Begin function ff_hevc_frame_nb_refs
	.p2align	2
_ff_hevc_frame_nb_refs:                 ; @ff_hevc_frame_nb_refs
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0, #16]
	cbz	x9, LBB0_4
; %bb.1:
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x11, [x9, #8]
	cmp	w10, #16
	b.hs	LBB0_6
; %bb.3:
	mov	x12, #0
	mov	w8, #0
	b	LBB0_9
LBB0_4:
	mov	w8, #0
	b	LBB0_20
LBB0_5:
	mov	w10, #0
	mov	w8, #0
	b	LBB0_11
LBB0_6:
	and	x12, x10, #0xfffffff0
	add	x8, x11, #32
	movi.2d	v0, #0000000000000000
	mov	x13, x12
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x8, #-32]
	ldp	q6, q7, [x8], #64
	cmtst.4s	v4, v4, v4
	cmtst.4s	v5, v5, v5
	cmtst.4s	v6, v6, v6
	cmtst.4s	v7, v7, v7
	sub.4s	v0, v0, v4
	sub.4s	v1, v1, v5
	sub.4s	v2, v2, v6
	sub.4s	v3, v3, v7
	subs	x13, x13, #16
	b.ne	LBB0_7
; %bb.8:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w8, s0
	cmp	x12, x10
	b.eq	LBB0_11
LBB0_9:
	add	x11, x11, x12, lsl #2
	sub	x12, x10, x12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x11], #4
	cmp	w13, #0
	cinc	w8, w8, ne
	subs	x12, x12, #1
	b.ne	LBB0_10
LBB0_11:
	ldr	w11, [x9, #4]
	cmp	w10, w11
	b.ge	LBB0_19
; %bb.12:
	ldr	x9, [x9, #8]
	mov	w14, w10
	sub	x12, x11, x14
	cmp	x12, #16
	b.hs	LBB0_14
; %bb.13:
	mov	x10, x14
	b	LBB0_17
LBB0_14:
	and	x13, x12, #0xfffffffffffffff0
	add	x10, x13, x14
	movi.2d	v0, #0000000000000000
	mov.s	v0[0], w8
	movi.2d	v1, #0000000000000000
	add	x8, x9, x14, lsl #2
	add	x8, x8, #32
	mov	x14, x13
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x8, #-32]
	ldp	q6, q7, [x8], #64
	cmtst.4s	v4, v4, v4
	cmtst.4s	v5, v5, v5
	cmtst.4s	v6, v6, v6
	cmtst.4s	v7, v7, v7
	sub.4s	v0, v0, v4
	sub.4s	v1, v1, v5
	sub.4s	v2, v2, v6
	sub.4s	v3, v3, v7
	subs	x14, x14, #16
	b.ne	LBB0_15
; %bb.16:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w8, s0
	cmp	x12, x13
	b.eq	LBB0_19
LBB0_17:
	add	x9, x9, x10, lsl #2
	sub	x10, x11, x10
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	cmp	w11, #0
	cinc	w8, w8, ne
	subs	x10, x10, #1
	b.ne	LBB0_18
LBB0_19:
	cbz	x0, LBB0_28
LBB0_20:
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_28
; %bb.21:
	ldr	x10, [x0, #8]
	cmp	w9, #16
	b.hs	LBB0_23
; %bb.22:
	mov	x11, #0
	b	LBB0_26
LBB0_23:
	and	x11, x9, #0xfffffff0
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w8
	add	x8, x10, #32
	mov	x12, x11
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x8, #-32]
	ldp	q6, q7, [x8], #64
	cmtst.4s	v4, v4, v4
	cmtst.4s	v5, v5, v5
	cmtst.4s	v6, v6, v6
	cmtst.4s	v7, v7, v7
	sub.4s	v1, v1, v4
	sub.4s	v0, v0, v5
	sub.4s	v2, v2, v6
	sub.4s	v3, v3, v7
	subs	x12, x12, #16
	b.ne	LBB0_24
; %bb.25:
	add.4s	v0, v0, v1
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w8, s0
	cmp	x11, x9
	b.eq	LBB0_28
LBB0_26:
	add	x10, x10, x11, lsl #2
	sub	x9, x9, x11
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10], #4
	cmp	w11, #0
	cinc	w8, w8, ne
	subs	x9, x9, #1
	b.ne	LBB0_27
LBB0_28:
	mov	x0, x8
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
