	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_sei_end
_find_sei_end:                          ## @find_sei_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, (%rcx)
	xorl	%eax, %eax
	testq	%rdx, %rdx
	je	LBB0_18
## %bb.1:
	movl	(%rsi), %r8d
	andl	$31, %r8d
	movq	_H264_NAL_SEI@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %r8d
	jne	LBB0_18
## %bb.2:
	leaq	4(%rsi), %rax
	leaq	-1(%rdx), %rbx
	cmpl	$128, -4(%rsi,%rdx,4)
	leaq	-2(%rdx), %r10
	cmovneq	%rbx, %r10
	testq	%r10, %r10
	je	LBB0_17
## %bb.3:
	xorl	%r9d, %r9d
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_9 Depth 2
	cmpl	$0, (%rax)
	jle	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	-1(%r10), %r8
	movl	$1, %r14d
	xorl	%ebx, %ebx
	movq	%rax, %rdx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rbx, %r8
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%r14, %r11
	addq	$4, %rdx
	movl	4(%rax,%rbx,4), %r15d
	incq	%rbx
	incq	%r14
	cmpl	$255, %r15d
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	subq	%rbx, %r10
	leaq	(%rdx,%r10,4), %r14
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r9, %rbx
	movq	%r11, %r10
	movslq	%r15d, %r9
	addq	%rbx, %r9
	movq	%r8, %rbx
	subq	%r11, %rbx
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=2
	addq	$4, %rdx
	leaq	1(%r10), %r11
	cmpl	$255, 4(%rax,%r10,4)
	movl	$255, %r15d
	je	LBB0_9
	jmp	LBB0_14
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdx
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r9, %rbx
	jb	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%rdx,%r9,4), %rax
	subq	%r9, %r8
	subq	%r10, %r8
	movq	%r8, %r10
	jne	LBB0_4
LBB0_17:
	movq	%rax, (%rcx)
	subq	%rsi, %rax
	shrq	$2, %rax
	incl	%eax
	jmp	LBB0_18
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_12:
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_H264_NAL_SEI,4,2               ## @H264_NAL_SEI
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unexpected end of SEI NAL Unit parsing type.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Unexpected end of SEI NAL Unit parsing size.\n"

	.no_dead_strip	_find_sei_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_sei_end
_find_sei_end:                          ; @find_sei_end
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	str	xzr, [x3]
	cbz	x2, LBB0_15
; %bb.1:
	ldr	w8, [x1]
	and	w8, w8, #0x1f
Lloh0:
	adrp	x9, _H264_NAL_SEI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _H264_NAL_SEI@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.2:
	add	x8, x1, #4
	sub	x9, x2, #1
	sub	x10, x2, #2
	ldr	w11, [x8, x10, lsl #2]
	cmp	w11, #128
	csel	x12, x10, x9, eq
	cbz	x12, LBB0_14
; %bb.3:
	mov	x9, #0
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w10, [x8]
	cmp	w10, #1
	b.lt	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x15, #0
	sub	x10, x12, #1
	mov	w16, #1
	mov	x11, x8
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x10, x15
	b.eq	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x13, x16
	add	x11, x11, #4
	add	x14, x8, x15, lsl #2
	ldr	w14, [x14, #4]
	add	x15, x15, #1
	add	x16, x16, #1
	cmp	w14, #255
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	x12, x12, x15
	add	x12, x11, x12, lsl #2
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x15, x13
	add	x9, x9, w14, sxtw
	subs	x16, x10, x13
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x11, x11, #4
	add	x13, x8, x15, lsl #2
	ldr	w17, [x13, #4]
	add	x13, x15, #1
	mov	w14, #255
	cmp	w17, #255
	b.eq	LBB0_9
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x11, x12
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x16, x9
	b.lo	LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x11, x9, lsl #2
	sub	x10, x10, x9
	subs	x12, x10, x15
	b.ne	LBB0_4
LBB0_14:
	str	x8, [x3]
	sub	x8, x8, x1
	lsr	x8, x8, #2
	add	w0, w8, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
LBB0_17:
	bl	_av_log
Lloh8:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_18:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_H264_NAL_SEI,4,2               ; @H264_NAL_SEI
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unexpected end of SEI NAL Unit parsing type.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Unexpected end of SEI NAL Unit parsing size.\n"

	.no_dead_strip	_find_sei_end
.subsections_via_symbols
