	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function h265_metadata_init
_h265_metadata_init:                    ## @h265_metadata_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	16(%rdi), %r12
	leaq	8(%r12), %r14
	movq	_AV_CODEC_ID_HEVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_ff_cbs_init
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	16(%r12), %r15
	movq	8(%r13), %rdx
	xorl	%ebx, %ebx
	cmpq	$0, (%rdx)
	je	LBB0_19
## %bb.3:
	movl	(%r14), %edi
	movq	%r15, %rsi
	callq	_ff_cbs_read_extradata
	testl	%eax, %eax
	movq	%r15, %rbx
	js	LBB0_4
## %bb.5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	_LEVEL_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_h265_metadata_guess_level
LBB0_7:
	cmpl	$0, (%rbx)
	jle	LBB0_16
## %bb.8:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r15
	movslq	(%rbx), %rax
	addq	$16, %r14
	cmpq	%rax, %r15
	jge	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	movq	(%rax,%r14), %rcx
	movq	_HEVC_NAL_VPS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%rax,%r14), %esi
	movq	%r13, %rdi
	callq	_h265_metadata_update_vps
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	24(%r12), %rax
	movq	(%rax,%r14), %rcx
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_HEVC_NAL_SPS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%rax,%r14), %esi
	movq	%r13, %rdi
	callq	_h265_metadata_update_sps
	testl	%eax, %eax
	jns	LBB0_15
LBB0_11:
	movq	%rbx, %r15
	movl	%eax, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_16:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edi
	movl	(%r13), %esi
	movq	%rbx, %r15
	movq	%rbx, %rdx
	callq	_ff_cbs_write_extradata
	testl	%eax, %eax
	movl	$0, %ebx
	jns	LBB0_19
## %bb.17:
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_18
LBB0_4:
	movq	%rbx, %r15
	leaq	L_.str(%rip), %rdx
LBB0_18:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_av_log
LBB0_19:
	movl	(%r14), %edi
	movq	%r15, %rsi
	callq	_ff_cbs_fragment_reset
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_HEVC,4,2           ## @AV_CODEC_ID_HEVC
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read extradata.\n"

	.comm	_LEVEL_AUTO,8,3                 ## @LEVEL_AUTO
	.comm	_HEVC_NAL_VPS,8,3               ## @HEVC_NAL_VPS
	.comm	_HEVC_NAL_SPS,8,3               ## @HEVC_NAL_SPS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to write extradata.\n"

	.no_dead_strip	_h265_metadata_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function h265_metadata_init
_h265_metadata_init:                    ; @h265_metadata_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
	ldr	x23, [x0, #16]
	add	x19, x23, #8
Lloh0:
	adrp	x8, _AV_CODEC_ID_HEVC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_CODEC_ID_HEVC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_ff_cbs_init
	tbnz	w0, #31, LBB0_14
; %bb.1:
	add	x20, x23, #16
	ldr	x2, [x21, #8]
	ldr	x8, [x2]
	cbz	x8, LBB0_16
; %bb.2:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_ff_cbs_read_extradata
	tbnz	w0, #31, LBB0_17
; %bb.3:
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _LEVEL_AUTO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LEVEL_AUTO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x21
	mov	x1, x20
	bl	_h265_metadata_guess_level
LBB0_5:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.6:
	mov	x24, #0
	mov	x25, #0
Lloh6:
	adrp	x26, _HEVC_NAL_VPS@GOTPAGE
Lloh7:
	ldr	x26, [x26, _HEVC_NAL_VPS@GOTPAGEOFF]
Lloh8:
	adrp	x27, _HEVC_NAL_SPS@GOTPAGE
Lloh9:
	ldr	x27, [x27, _HEVC_NAL_SPS@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x20]
	add	x24, x24, #16
	cmp	x25, x8
	b.ge	LBB0_15
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #24]
	ldr	x9, [x8, x24]
	ldr	x10, [x26]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x8, x24
	ldr	w1, [x8, #8]
	mov	x0, x21
	bl	_h265_metadata_update_vps
	tbnz	w0, #31, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x23, #24]
	ldr	x9, [x8, x24]
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x10, [x27]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x8, x24
	ldr	w1, [x8, #8]
	mov	x0, x21
	bl	_h265_metadata_update_sps
	tbz	w0, #31, LBB0_7
LBB0_13:
	mov	x22, x0
	b	LBB0_20
LBB0_14:
	mov	x22, x0
	b	LBB0_21
LBB0_15:
	ldr	w0, [x19]
	ldr	w1, [x21]
	mov	x2, x20
	bl	_ff_cbs_write_extradata
	tbnz	w0, #31, LBB0_18
LBB0_16:
	mov	w22, #0
	b	LBB0_20
LBB0_17:
	mov	x22, x0
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_19
LBB0_18:
	mov	x22, x0
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_19:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_av_log
LBB0_20:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_ff_cbs_fragment_reset
LBB0_21:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_HEVC,4,2           ; @AV_CODEC_ID_HEVC
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read extradata.\n"

	.comm	_LEVEL_AUTO,8,3                 ; @LEVEL_AUTO
	.comm	_HEVC_NAL_VPS,8,3               ; @HEVC_NAL_VPS
	.comm	_HEVC_NAL_SPS,8,3               ; @HEVC_NAL_SPS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to write extradata.\n"

	.no_dead_strip	_h265_metadata_init
.subsections_via_symbols
