	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hevc_decode_frame
_hevc_decode_frame:                     ## @hevc_decode_frame
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	16(%rdi), %rbx
	cmpl	$0, (%rcx)
	je	LBB0_10
## %bb.1:
	movq	%rcx, %r15
	movq	%rdi, %r13
	movq	_AV_PKT_DATA_NEW_EXTRADATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rcx, %rdi
	callq	_av_packet_get_side_data
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	jle	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	callq	_hevc_decode_extradata
	testl	%eax, %eax
	js	LBB0_23
LBB0_4:
	movq	$0, 32(%rbx)
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_decode_nal_units
	testl	%eax, %eax
	js	LBB0_23
## %bb.5:
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	cmpq	$0, 32(%rbx)
	je	LBB0_18
## %bb.7:
	movq	%r13, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	jns	LBB0_18
## %bb.8:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_9:
	movq	32(%rbx), %rsi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_ff_hevc_unref_frame
	jmp	LBB0_24
LBB0_10:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_ff_hevc_output_frame
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_24
## %bb.11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
	xorl	%r14d, %r14d
	jmp	LBB0_24
LBB0_23:
	movl	%eax, %r14d
	jmp	LBB0_24
LBB0_13:
	movq	_AV_EF_CRCCHECK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_18
## %bb.14:
	cmpq	$0, 8(%rbx)
	je	LBB0_18
## %bb.15:
	cmpq	$0, 24(%rbx)
	je	LBB0_18
## %bb.16:
	movq	32(%rbx), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_verify_md5
	testl	%eax, %eax
	jns	LBB0_18
## %bb.17:
	movl	%eax, %r14d
	movq	_AV_EF_EXPLODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_9
LBB0_18:
	movq	$0, 24(%rbx)
	cmpq	$0, 8(%rbx)
	je	LBB0_20
## %bb.19:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	$0, 8(%rbx)
LBB0_20:
	movq	(%rbx), %rsi
	movq	(%rsi), %rax
	cmpq	$0, (%rax)
	je	LBB0_22
## %bb.21:
	movq	%r12, %rdi
	callq	_av_frame_move_ref
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
LBB0_22:
	movl	(%r15), %r14d
LBB0_24:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ## @AV_PKT_DATA_NEW_EXTRADATA
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hardware accelerator failed to decode picture\n"

	.comm	_AV_EF_CRCCHECK,4,2             ## @AV_EF_CRCCHECK
	.comm	_AV_EF_EXPLODE,4,2              ## @AV_EF_EXPLODE
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Decoded frame with POC %d.\n"

	.no_dead_strip	_hevc_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hevc_decode_frame
_hevc_decode_frame:                     ; @hevc_decode_frame
	.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	x22, x1
	ldr	x20, [x0, #16]
	ldr	w8, [x3]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x21, x3
	mov	x23, x0
Lloh0:
	adrp	x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x3
	bl	_av_packet_get_side_data
	ldr	w2, [sp, #12]
	cmp	x0, #0
	ccmp	w2, #1, #8, ne
	b.lt	LBB0_3
; %bb.2:
	mov	x1, x0
	mov	x0, x20
	mov	w3, #0
	bl	_hevc_decode_extradata
	tbnz	w0, #31, LBB0_11
LBB0_3:
	str	xzr, [x20, #32]
	ldp	w2, w1, [x21]
	mov	x0, x20
	bl	_decode_nal_units
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_12
; %bb.5:
	ldr	x9, [x20, #32]
	cbz	x9, LBB0_16
; %bb.6:
	ldr	x8, [x8]
	mov	x0, x23
	blr	x8
	tbz	w0, #31, LBB0_16
; %bb.7:
	mov	x24, x0
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
	mov	x0, x23
	bl	_av_log
LBB0_8:
	ldr	x1, [x20, #32]
	mov	x0, x20
	mov	w2, #-1
	bl	_ff_hevc_unref_frame
	b	LBB0_21
LBB0_9:
	mov	x0, x20
	mov	x1, x22
	mov	w2, #1
	bl	_ff_hevc_output_frame
	mov	x24, x0
	tbnz	w0, #31, LBB0_21
; %bb.10:
	str	w24, [x19]
	mov	w24, #0
	b	LBB0_21
LBB0_11:
	mov	x24, x0
	b	LBB0_21
LBB0_12:
	ldr	w8, [x23]
Lloh8:
	adrp	x9, _AV_EF_CRCCHECK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_EF_CRCCHECK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.13:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_16
; %bb.14:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	x8, [x20, #32]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_verify_md5
	tbnz	w0, #31, LBB0_22
LBB0_16:
	str	xzr, [x20, #24]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_18
; %bb.17:
Lloh11:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [x20, #16]
	str	x8, [sp]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_av_log
	str	xzr, [x20, #8]
LBB0_18:
	ldr	x1, [x20]
	ldr	x8, [x1]
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.19:
	mov	x0, x22
	bl	_av_frame_move_ref
	mov	w8, #1
	str	w8, [x19]
LBB0_20:
	ldr	w24, [x21]
LBB0_21:
	mov	x0, x24
	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
LBB0_22:
	ldr	w8, [x23]
Lloh16:
	adrp	x9, _AV_EF_EXPLODE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AV_EF_EXPLODE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.23:
	mov	x24, x0
	b	LBB0_8
	.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
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ; @AV_PKT_DATA_NEW_EXTRADATA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hardware accelerator failed to decode picture\n"

	.comm	_AV_EF_CRCCHECK,4,2             ; @AV_EF_CRCCHECK
	.comm	_AV_EF_EXPLODE,4,2              ; @AV_EF_EXPLODE
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Decoded frame with POC %d.\n"

	.no_dead_strip	_hevc_decode_frame
.subsections_via_symbols
