	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function on2avc_decode_frame
_on2avc_decode_frame:                   ## @on2avc_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rcx), %r12
	movl	(%rcx), %r13d
	movq	(%rdi), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.1:
	movq	_ON2AVC_SUBFRAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_14
## %bb.2:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	callq	_on2avc_decode_subframe
	testl	%eax, %eax
	js	LBB0_14
LBB0_3:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_19
LBB0_4:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edx
	callq	_bytestream2_init
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$3, %eax
	jl	LBB0_15
## %bb.5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_bytestream2_get_le16
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%eax, %r12d
	jg	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_bytestream2_skip
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$2, %eax
	jg	LBB0_6
## %bb.9:
	movq	_ON2AVC_SUBFRAME_SIZE@GOTPCREL(%rip), %rax
	movq	%rax, %r12
	imull	(%rax), %r15d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, (%rsi)
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_14
## %bb.10:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_bytestream2_init
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$3, %eax
	jl	LBB0_3
## %bb.11:
	movq	%r12, %r15
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_bytestream2_get_le16
	movl	%eax, %ebx
	movq	-48(%rbp), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r12d, %r8d
	callq	_on2avc_decode_subframe
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	addl	(%r15), %r12d
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_bytestream2_skip
	movq	%r14, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$2, %eax
	jg	LBB0_12
	jmp	LBB0_3
LBB0_14:
	movl	%eax, %r13d
	jmp	LBB0_19
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_18
LBB0_17:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_18:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_19:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ON2AVC_SUBFRAME_SIZE,4,2       ## @ON2AVC_SUBFRAME_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid subframe size %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"No subframes present\n"

	.no_dead_strip	_on2avc_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function on2avc_decode_frame
_on2avc_decode_frame:                   ; @on2avc_decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x24, x0
	ldr	x23, [x3, #8]
	ldr	w19, [x3]
	ldr	x22, [x0]
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _ON2AVC_SUBFRAME_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ON2AVC_SUBFRAME_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x21]
	mov	x0, x24
	mov	x1, x21
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_14
; %bb.2:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x19
	mov	x3, x21
	mov	w4, #0
	bl	_on2avc_decode_subframe
	tbnz	w0, #31, LBB0_14
LBB0_3:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_18
LBB0_4:
	add	x0, sp, #8
	mov	x1, x23
	mov	x2, x19
	bl	_bytestream2_init
	add	x0, sp, #8
	bl	_bytestream2_get_bytes_left
	cmp	w0, #3
	b.lt	LBB0_15
; %bb.5:
	mov	w26, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	bl	_bytestream2_get_le16
	mov	x25, x0
	cbz	w0, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #8
	bl	_bytestream2_get_bytes_left
	cmp	w25, w0
	b.gt	LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w26, w26, #1
	add	x0, sp, #8
	mov	x1, x25
	bl	_bytestream2_skip
	add	x0, sp, #8
	bl	_bytestream2_get_bytes_left
	cmp	w0, #2
	b.gt	LBB0_6
; %bb.9:
Lloh3:
	adrp	x25, _ON2AVC_SUBFRAME_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ON2AVC_SUBFRAME_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	mul	w8, w8, w26
	str	w8, [x21]
	mov	x0, x24
	mov	x1, x21
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_14
; %bb.10:
	add	x0, sp, #8
	mov	x1, x23
	mov	x2, x19
	bl	_bytestream2_init
	add	x0, sp, #8
	bl	_bytestream2_get_bytes_left
	cmp	w0, #3
	b.lt	LBB0_3
; %bb.11:
	mov	w23, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	bl	_bytestream2_get_le16
	mov	x24, x0
	ldr	x1, [sp, #8]
	mov	x0, x22
	mov	x2, x24
	mov	x3, x21
	mov	x4, x23
	bl	_on2avc_decode_subframe
	tbnz	w0, #31, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x25]
	add	w23, w8, w23
	add	x0, sp, #8
	mov	x1, x24
	bl	_bytestream2_skip
	add	x0, sp, #8
	bl	_bytestream2_get_bytes_left
	cmp	w0, #2
	b.gt	LBB0_12
	b	LBB0_3
LBB0_14:
	mov	x19, x0
	b	LBB0_18
LBB0_15:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_16:
Lloh10:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	str	x25, [sp]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
LBB0_17:
	mov	x0, x24
	bl	_av_log
Lloh15:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh17:
	ldr	w19, [x8]
LBB0_18:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ON2AVC_SUBFRAME_SIZE,4,2       ; @ON2AVC_SUBFRAME_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid subframe size %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"No subframes present\n"

	.no_dead_strip	_on2avc_decode_frame
.subsections_via_symbols
