	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hevc_find_frame_end
_hevc_find_frame_end:                   ## @hevc_find_frame_end
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	jle	LBB0_16
## %bb.1:
	movq	(%rdi), %rcx
	movl	%edx, %r13d
	movl	(%rcx), %edi
	xorl	%eax, %eax
	movq	_START_CODE@GOTPCREL(%rip), %r8
	movq	_HEVC_NAL_VPS@GOTPCREL(%rip), %r9
	movq	_HEVC_NAL_EOB_NUT@GOTPCREL(%rip), %r10
	movq	_HEVC_NAL_SEI_PREFIX@GOTPCREL(%rip), %r11
	movq	_HEVC_NAL_RASL_R@GOTPCREL(%rip), %r12
	movq	_HEVC_NAL_BLA_W_LP@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 4(%rcx)
	jne	LBB0_8
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	cmpq	%rax, %r13
	je	LBB0_16
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	shll	$8, %edi
	orl	(%rsi,%rax,4), %edi
	movl	%edi, (%rcx)
	movl	%edi, %ebx
	sarl	$24, %ebx
	andl	$16777215, %ebx                 ## imm = 0xFFFFFF
	cmpl	(%r8), %ebx
	jne	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edi, %ebx
	shrl	$17, %ebx
	andl	$63, %ebx
	cmpl	(%r9), %ebx
	setge	%dl
	cmpl	(%r10), %ebx
	setle	%r15b
	testb	%r15b, %dl
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	(%r11), %ebx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-41(%rbx), %edx
	cmpl	$4, %edx
	jb	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edi, %edx
	andl	$7340032, %edx                  ## imm = 0x700000
	cmpl	$6291456, %edx                  ## imm = 0x600000
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	(%r12), %ebx
	jle	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	(%r14), %ebx
	jl	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_HEVC_NAL_CRA_NUT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ebx
	jg	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$128, (%rsi,%rax,4)
	jb	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 4(%rcx)
	jne	LBB0_8
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, 4(%rcx)
	jmp	LBB0_15
LBB0_16:
	movq	_END_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_17:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$0, 4(%rcx)
	addl	$-5, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_START_CODE,4,2                 ## @START_CODE
	.comm	_HEVC_NAL_VPS,4,2               ## @HEVC_NAL_VPS
	.comm	_HEVC_NAL_EOB_NUT,4,2           ## @HEVC_NAL_EOB_NUT
	.comm	_HEVC_NAL_SEI_PREFIX,4,2        ## @HEVC_NAL_SEI_PREFIX
	.comm	_HEVC_NAL_RASL_R,4,2            ## @HEVC_NAL_RASL_R
	.comm	_HEVC_NAL_BLA_W_LP,4,2          ## @HEVC_NAL_BLA_W_LP
	.comm	_HEVC_NAL_CRA_NUT,4,2           ## @HEVC_NAL_CRA_NUT
	.comm	_END_NOT_FOUND,4,2              ## @END_NOT_FOUND
	.no_dead_strip	_hevc_find_frame_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hevc_find_frame_end
_hevc_find_frame_end:                   ; @hevc_find_frame_end
	.cfi_startproc
; %bb.0:
	cmp	w2, #1
	b.lt	LBB0_12
; %bb.1:
	ldr	x8, [x0]
	mov	w9, w2
	ldr	w10, [x8]
Lloh0:
	adrp	x11, _START_CODE@GOTPAGE
Lloh1:
	ldr	x11, [x11, _START_CODE@GOTPAGEOFF]
Lloh2:
	adrp	x12, _HEVC_NAL_VPS@GOTPAGE
Lloh3:
	ldr	x12, [x12, _HEVC_NAL_VPS@GOTPAGEOFF]
Lloh4:
	adrp	x13, _HEVC_NAL_EOB_NUT@GOTPAGE
Lloh5:
	ldr	x13, [x13, _HEVC_NAL_EOB_NUT@GOTPAGEOFF]
Lloh6:
	adrp	x14, _HEVC_NAL_SEI_PREFIX@GOTPAGE
Lloh7:
	ldr	x14, [x14, _HEVC_NAL_SEI_PREFIX@GOTPAGEOFF]
Lloh8:
	adrp	x15, _HEVC_NAL_RASL_R@GOTPAGE
Lloh9:
	ldr	x15, [x15, _HEVC_NAL_RASL_R@GOTPAGEOFF]
	mov	w0, #-5
Lloh10:
	adrp	x16, _HEVC_NAL_BLA_W_LP@GOTPAGE
Lloh11:
	ldr	x16, [x16, _HEVC_NAL_BLA_W_LP@GOTPAGEOFF]
Lloh12:
	adrp	x17, _HEVC_NAL_CRA_NUT@GOTPAGE
Lloh13:
	ldr	x17, [x17, _HEVC_NAL_CRA_NUT@GOTPAGEOFF]
	mov	w2, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w3, [x8, #4]
	cbnz	w3, LBB0_13
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w0, w0, #1
	add	x1, x1, #4
	subs	x9, x9, #1
	b.eq	LBB0_12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x1]
	orr	w10, w3, w10, lsl #8
	str	w10, [x8]
	asr	w3, w10, #24
	and	w3, w3, #0xffffff
	ldr	w4, [x11]
	cmp	w3, w4
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ubfx	w3, w10, #17, #6
	ldr	w4, [x12]
	ldr	w5, [x13]
	sub	w6, w3, #41
	cmp	w3, w5
	ccmp	w3, w4, #8, le
	ldr	w4, [x14]
	ccmp	w3, w4, #4, lt
	ccmp	w6, #4, #0, ne
	b.lo	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	and	w4, w10, #0x700000
	cmp	w4, #1536, lsl #12              ; =6291456
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w4, [x15]
	cmp	w3, w4
	b.le	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w4, [x16]
	ldr	w5, [x17]
	cmp	w3, w4
	ccmp	w3, w5, #0, ge
	b.gt	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w3, [x1]
	cmp	w3, #128
	b.lo	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w3, [x8, #4]
	cbnz	w3, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	str	w2, [x8, #4]
	b	LBB0_3
LBB0_12:
Lloh14:
	adrp	x8, _END_NOT_FOUND@GOTPAGE
Lloh15:
	ldr	x8, [x8, _END_NOT_FOUND@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ret
LBB0_13:
	str	wzr, [x8, #4]
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_START_CODE,4,2                 ; @START_CODE
	.comm	_HEVC_NAL_VPS,4,2               ; @HEVC_NAL_VPS
	.comm	_HEVC_NAL_EOB_NUT,4,2           ; @HEVC_NAL_EOB_NUT
	.comm	_HEVC_NAL_SEI_PREFIX,4,2        ; @HEVC_NAL_SEI_PREFIX
	.comm	_HEVC_NAL_RASL_R,4,2            ; @HEVC_NAL_RASL_R
	.comm	_HEVC_NAL_BLA_W_LP,4,2          ; @HEVC_NAL_BLA_W_LP
	.comm	_HEVC_NAL_CRA_NUT,4,2           ; @HEVC_NAL_CRA_NUT
	.comm	_END_NOT_FOUND,4,2              ; @END_NOT_FOUND
	.no_dead_strip	_hevc_find_frame_end
.subsections_via_symbols
