	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_frame
_decode_frame:                          ## @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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r8d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	24(%rdi), %r13
	movq	8(%r13), %rbx
	leaq	-80(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	callq	_decode_frame_header
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_23
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %r8
	movq	16(%r15), %rdi
	movslq	-52(%rbp), %rax
	movq	%rax, %r12
	shlq	$4, %r12
	movq	_FLAG_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdi,%r12)
	je	LBB0_2
## %bb.3:
	movq	$0, 8(%rdi,%r12)
	movq	(%r13), %rcx
	movq	(%rcx,%rax,8), %rcx
	movl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	movq	(%r13), %rcx
	movq	(%rcx,%rax,8), %rcx
	movl	(%rcx), %eax
	movq	_AVDISCARD_NONKEY@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jge	LBB0_7
LBB0_4:
	movq	8(%rcx), %rcx
	movq	_AVDISCARD_BIDIR@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	setl	%dl
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	sete	%bl
	cmpq	-80(%rbp), %rcx
	setle	%cl
	orb	%bl, %cl
	orb	%dl, %cl
	cmpb	$1, %cl
	jne	LBB0_7
## %bb.5:
	movq	_AVDISCARD_ALL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_7
## %bb.6:
	cmpq	$0, 8(%rdi,%r12)
	je	LBB0_8
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_avio_skip
	movl	$1, %r14d
LBB0_23:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edx
	movq	(%r15), %rax
	movq	-64(%rbp), %rcx
	movq	(%rax,%rcx,8), %rsi
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	addq	%rdx, %rsi
	movq	%r8, %rbx
	movq	%r8, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	addq	%r12, -72(%rbp)                 ## 8-byte Folded Spill
	movq	8(%r15), %rcx
	movq	-64(%rbp), %rax
	movq	(%rcx,%rax,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:
	movq	32(%rbx), %rdi
	movq	(%r15), %rcx
	movq	(%rcx,%rax,8), %rdx
	callq	_memcpy
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_tell
	movq	%rax, (%rbx)
	movq	_FLAG_SM_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	testl	%ecx, (%rdx)
	je	LBB0_18
## %bb.13:
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	addq	%r12, %rax
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	movq	%rax, %r8
	callq	_read_sm_data
	testq	%rax, %rax
	js	LBB0_14
## %bb.16:
	addq	(%rbx), %r12
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_read_sm_data
	testq	%rax, %rax
	js	LBB0_14
## %bb.17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_tell
	subl	(%rbx), %eax
	subl	%eax, %r14d
	subl	%eax, 8(%rbx)
LBB0_18:
	movq	(%r15), %rax
	movq	-64(%rbp), %rcx
	movq	(%rax,%rcx,8), %rsi
	addq	32(%rbx), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_avio_read
	cmpl	%r14d, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_15
LBB0_20:
	movq	(%r15), %rcx
	movq	-64(%rbp), %rdx
	movslq	%eax, %rsi
	addq	(%rcx,%rdx,8), %rsi
	movq	%rbx, %rdi
	callq	_av_shrink_packet
	movl	-52(%rbp), %eax
	movl	%eax, 12(%rbx)
	movq	_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_22
## %bb.21:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
LBB0_22:
	movq	-80(%rbp), %rax
	movq	%rax, 16(%rbx)
	xorl	%r14d, %r14d
	jmp	LBB0_23
LBB0_9:
	movl	%eax, %r14d
	jmp	LBB0_23
LBB0_14:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_15:
	movq	%rbx, %rdi
	callq	_av_packet_unref
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAG_KEY,4,2                   ## @FLAG_KEY
	.comm	_AVDISCARD_NONKEY,4,2           ## @AVDISCARD_NONKEY
	.comm	_AVDISCARD_BIDIR,4,2            ## @AVDISCARD_BIDIR
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AVDISCARD_ALL,4,2              ## @AVDISCARD_ALL
	.comm	_FLAG_SM_DATA,4,2               ## @FLAG_SM_DATA
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_frame
_decode_frame:                          ; @decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x4, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x23, [x0, #24]
	ldr	x22, [x23, #8]
	add	x1, sp, #16
	add	x2, sp, #28
	add	x3, sp, #8
	bl	_decode_frame_header
	mov	x20, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	x8, [x21, #16]
	ldrsw	x9, [sp, #28]
	add	x24, x8, x9, lsl #4
	ldr	w10, [x24]
Lloh0:
	adrp	x25, _FLAG_KEY@GOTPAGE
Lloh1:
	ldr	x25, [x25, _FLAG_KEY@GOTPAGEOFF]
	ldr	w11, [x25]
	tst	w11, w10
	b.eq	LBB0_3
; %bb.2:
	str	xzr, [x24, #8]
	ldr	x10, [x23]
	ldr	x11, [x10, x9, lsl #3]
	ldr	w10, [x11]
	b	LBB0_4
LBB0_3:
	ldr	x10, [x23]
	ldr	x11, [x10, x9, lsl #3]
	ldr	w10, [x11]
Lloh2:
	adrp	x12, _AVDISCARD_NONKEY@GOTPAGE
Lloh3:
	ldr	x12, [x12, _AVDISCARD_NONKEY@GOTPAGEOFF]
Lloh4:
	ldr	w12, [x12]
	cmp	w10, w12
	b.ge	LBB0_6
LBB0_4:
	ldr	x11, [x11, #8]
Lloh5:
	adrp	x12, _AVDISCARD_BIDIR@GOTPAGE
Lloh6:
	ldr	x12, [x12, _AVDISCARD_BIDIR@GOTPAGEOFF]
Lloh7:
	ldr	w12, [x12]
Lloh8:
	adrp	x13, _AV_NOPTS_VALUE@GOTPAGE
Lloh9:
	ldr	x13, [x13, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh10:
	ldr	x13, [x13]
	ldr	x14, [sp, #16]
	cmp	x11, x14
	ccmp	x11, x13, #4, gt
	ccmp	w10, w12, #8, ne
Lloh11:
	adrp	x11, _AVDISCARD_ALL@GOTPAGE
Lloh12:
	ldr	x11, [x11, _AVDISCARD_ALL@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	ccmp	w10, w11, #0, lt
	b.ge	LBB0_6
; %bb.5:
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_8
LBB0_6:
	mov	x0, x22
	mov	x1, x20
	bl	_avio_skip
	mov	w20, #1
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	mov	w26, w20
	ldr	x8, [x21]
	ldr	x9, [sp, #8]
	ldr	x8, [x8, x9, lsl #3]
	add	x1, x8, x26
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_20
; %bb.9:
	ldr	x9, [x21, #8]
	ldr	x8, [sp, #8]
	ldr	x1, [x9, x8, lsl #3]
	cbz	x1, LBB0_11
; %bb.10:
	ldr	x0, [x19, #32]
	ldr	x9, [x21]
	ldr	x2, [x9, x8, lsl #3]
	bl	_memcpy
LBB0_11:
	mov	x0, x22
	bl	_avio_tell
	str	x0, [x19]
	ldr	w8, [x24]
Lloh14:
	adrp	x9, _FLAG_SM_DATA@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FLAG_SM_DATA@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.12:
	add	x4, x0, x26
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	mov	w3, #0
	bl	_read_sm_data
	tbnz	x0, #63, LBB0_21
; %bb.13:
	ldr	x8, [x19]
	add	x4, x8, x26
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	mov	w3, #1
	bl	_read_sm_data
	tbnz	x0, #63, LBB0_21
; %bb.14:
	mov	x0, x22
	bl	_avio_tell
	ldr	w8, [x19]
	sub	w8, w0, w8
	sub	w20, w20, w8
	ldr	w9, [x19, #8]
	sub	w8, w9, w8
	str	w8, [x19, #8]
LBB0_15:
	ldr	x8, [x19, #32]
	ldr	x9, [x21]
	ldr	x10, [sp, #8]
	ldr	x9, [x9, x10, lsl #3]
	add	x1, x9, x8
	mov	x0, x22
	mov	x2, x20
	bl	_avio_read
	cmp	w0, w20
	b.eq	LBB0_17
; %bb.16:
	mov	x20, x0
	tbnz	w0, #31, LBB0_22
LBB0_17:
	ldr	x8, [x21]
	ldr	x9, [sp, #8]
	ldr	x8, [x8, x9, lsl #3]
	add	x1, x8, w0, sxtw
	mov	x0, x19
	bl	_av_shrink_packet
	ldr	w8, [sp, #28]
	str	w8, [x19, #12]
	ldr	w8, [x24]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.18:
Lloh17:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
LBB0_19:
	mov	w20, #0
	ldr	x8, [sp, #16]
	str	x8, [x19, #16]
	b	LBB0_7
LBB0_20:
	mov	x20, x0
	b	LBB0_7
LBB0_21:
Lloh20:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
LBB0_22:
	mov	x0, x19
	bl	_av_packet_unref
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAG_KEY,4,2                   ; @FLAG_KEY
	.comm	_AVDISCARD_NONKEY,4,2           ; @AVDISCARD_NONKEY
	.comm	_AVDISCARD_BIDIR,4,2            ; @AVDISCARD_BIDIR
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AVDISCARD_ALL,4,2              ; @AVDISCARD_ALL
	.comm	_FLAG_SM_DATA,4,2               ; @FLAG_SM_DATA
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_decode_frame
.subsections_via_symbols
