	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_cbs_h264_add_sei_message    ## -- Begin function ff_cbs_h264_add_sei_message
	.p2align	4, 0x90
_ff_cbs_h264_add_sei_message:           ## @ff_cbs_h264_add_sei_message
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	(%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	8(%r12), %rcx
	movq	_H264_NAL_SEI@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_H264_MAX_SEI_PAYLOADS@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	shlq	$4, %rax
	xorl	%edi, %edi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$16, %rdi
	cmpq	%rdi, %rax
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rcx,%rdi)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rcx,%rdi), %r13
	cmpq	%rsi, (%r13)
	jae	LBB0_4
	jmp	LBB0_16
LBB0_5:
	movl	$32, %edi
	callq	_av_mallocz
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %r13
	movq	_H264_NAL_SEI@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r13)
	movq	$0, 16(%r13)
	movq	_cbs_h264_free_sei@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	$32, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_av_buffer_create
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_18
## %bb.9:
	movl	(%r12), %r8d
	testl	%r8d, %r8d
	jle	LBB0_15
## %bb.10:
	movq	8(%r12), %rdx
	movq	_H264_NAL_SLICE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	_H264_NAL_IDR_SLICE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rcx
	cmpq	%rsi, %rcx
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rdi, %rcx
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	addq	$16, %rdx
	cmpq	%rbx, %r8
	jne	LBB0_11
## %bb.14:
	movl	%r8d, %ebx
LBB0_15:
	movq	_H264_NAL_SEI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	movq	%r13, %r8
	movq	%rax, %r9
	callq	_ff_cbs_insert_unit_content
	movl	%eax, %ebx
	leaq	-48(%rbp), %rdi
	callq	_av_buffer_unref
	testl	%ebx, %ebx
	js	LBB0_7
LBB0_16:
	movq	(%r13), %rdi
	shlq	$2, %rdi
	addq	8(%r13), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	incq	(%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_18:
	leaq	-56(%rbp), %rdi
	callq	_av_freep
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_cbs_h264_free_sei_payload
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H264_NAL_SEI,8,3               ## @H264_NAL_SEI
	.comm	_H264_MAX_SEI_PAYLOADS,8,3      ## @H264_MAX_SEI_PAYLOADS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_cbs_h264_free_sei,4,2          ## @cbs_h264_free_sei
	.comm	_H264_NAL_SLICE,8,3             ## @H264_NAL_SLICE
	.comm	_H264_NAL_IDR_SLICE,8,3         ## @H264_NAL_IDR_SLICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_cbs_h264_add_sei_message    ; -- Begin function ff_cbs_h264_add_sei_message
	.p2align	2
_ff_cbs_h264_add_sei_message:           ; @ff_cbs_h264_add_sei_message
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x23, _H264_NAL_SEI@GOTPAGE
Lloh1:
	ldr	x23, [x23, _H264_NAL_SEI@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	ldr	x11, [x20, #8]
	ldr	x9, [x23]
Lloh2:
	adrp	x10, _H264_MAX_SEI_PAYLOADS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _H264_MAX_SEI_PAYLOADS@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	add	x11, x11, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, #16
	subs	x8, x8, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x12, [x11, #-8]
	cmp	x12, x9
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x22, [x11]
	ldr	x12, [x22]
	cmp	x12, x10
	b.hs	LBB0_2
	b	LBB0_17
LBB0_5:
	mov	w0, #32
	bl	_av_mallocz
	str	x0, [sp, #8]
	cbz	x0, LBB0_13
; %bb.6:
	mov	x22, x0
	ldr	x8, [x23]
	stp	xzr, x8, [x0, #16]
Lloh5:
	adrp	x2, _cbs_h264_free_sei@GOTPAGE
Lloh6:
	ldr	x2, [x2, _cbs_h264_free_sei@GOTPAGEOFF]
	mov	w1, #32
	mov	x3, #0
	mov	w4, #0
	bl	_av_buffer_create
	str	x0, [sp]
	cbz	x0, LBB0_12
; %bb.7:
	mov	x5, x0
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.8:
	mov	x2, #0
	ldr	x9, [x20, #8]
Lloh7:
	adrp	x10, _H264_NAL_SLICE@GOTPAGE
Lloh8:
	ldr	x10, [x10, _H264_NAL_SLICE@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
Lloh10:
	adrp	x11, _H264_NAL_IDR_SLICE@GOTPAGE
Lloh11:
	ldr	x11, [x11, _H264_NAL_IDR_SLICE@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	cmp	x12, x10
	ccmp	x12, x11, #4, ne
	b.eq	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x2, x2, #1
	add	x9, x9, #16
	cmp	x8, x2
	b.ne	LBB0_9
; %bb.11:
	mov	x2, x8
	b	LBB0_16
LBB0_12:
	add	x0, sp, #8
	bl	_av_freep
LBB0_13:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
LBB0_14:
	mov	x0, x19
	bl	_cbs_h264_free_sei_payload
	b	LBB0_18
LBB0_15:
	mov	w2, #0
LBB0_16:
	ldr	x3, [x23]
	mov	x0, x21
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x4, x22
	bl	_ff_cbs_insert_unit_content
	mov	x20, x0
	mov	x0, sp
	bl	_av_buffer_unref
	tbnz	w20, #31, LBB0_14
LBB0_17:
	ldp	x9, x8, [x22]
	add	x0, x8, x9, lsl #2
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	mov	w20, #0
	ldr	x8, [x22]
	add	x8, x8, #1
	str	x8, [x22]
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_H264_NAL_SEI,8,3               ; @H264_NAL_SEI
	.comm	_H264_MAX_SEI_PAYLOADS,8,3      ; @H264_MAX_SEI_PAYLOADS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_cbs_h264_free_sei,4,2          ; @cbs_h264_free_sei
	.comm	_H264_NAL_SLICE,8,3             ; @H264_NAL_SLICE
	.comm	_H264_NAL_IDR_SLICE,8,3         ; @H264_NAL_IDR_SLICE
.subsections_via_symbols
