	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movq	%rsi, -72(%rbp)
	movl	8(%rcx), %ebx
	cmpl	$28, %ebx
	jl	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	movq	(%rcx), %r15
	leaq	4(%r15), %rdi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	callq	_AV_RL32
	movq	%rax, %r12
	leaq	L_.str(%rip), %rdi
	callq	_AV_RL32
	cmpq	%rax, %r12
	jne	LBB0_2
## %bb.3:
	movq	%r14, 16(%r13)
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movl	$1, (%r14)
	movl	$1, (%r13)
	addq	$8, %r15
	addl	$-8, %ebx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_decode_frame_header
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_17
## %bb.4:
	movl	%r12d, %eax
	addq	%rax, %r15
	subl	%r12d, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_decode_picture_header
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, (%r13)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	-72(%rbp), %rsi
	xorl	%edx, %edx
	callq	_ff_thread_get_buffer
	testl	%eax, %eax
	js	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_decode_picture
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, 8(%r13)
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	subl	%r12d, %ebx
	testl	%ebx, %ebx
	jle	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, (%r13)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %eax
	addq	%rax, %r15
	movl	$0, (%r13)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_17:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	jmp	LBB0_17
LBB0_16:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %r12d
	jmp	LBB0_17
LBB0_11:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movl	%r14d, %r12d
	jmp	LBB0_17
LBB0_9:
	movl	%eax, %r12d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"icpf"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"invalid frame header\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
L_.str.2:                               ## @.str.2
	.asciz	"error decoding picture header\n"

L_.str.3:                               ## @.str.3
	.asciz	"error decoding picture\n"

	.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, #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	x19, x0
	ldr	x22, [x0]
	str	x1, [sp, #8]
	ldr	w25, [x3, #8]
	cmp	w25, #28
	b.lt	LBB0_12
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	ldr	x26, [x3]
	add	x0, x26, #4
	bl	_AV_RL32
	mov	x24, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_AV_RL32
	cmp	x24, x0
	b.ne	LBB0_12
; %bb.2:
	str	x23, [x22, #16]
Lloh2:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [x23]
	str	w9, [x22]
	add	x24, x26, #8
	sub	w25, w25, #8
	mov	x0, x22
	mov	x1, x24
	mov	x2, x25
	mov	x3, x19
	bl	_decode_frame_header
	mov	x23, x0
	tbnz	w0, #31, LBB0_13
; %bb.3:
	add	x24, x24, w23, uxtw
	sub	w25, w25, w23
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x25
	bl	_decode_picture_header
	mov	x23, x0
	tbnz	w0, #31, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22]
	cbz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	_ff_thread_get_buffer
	tbnz	w0, #31, LBB0_17
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_decode_picture
	tbnz	w0, #31, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w25, w25, w23
	cmp	w25, #1
	b.lt	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22]
	cbz	w8, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, w23, uxtw
	str	wzr, [x22]
	b	LBB0_4
LBB0_12:
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
	mov	x0, x19
	bl	_av_log
Lloh10:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh12:
	ldr	w23, [x8]
LBB0_13:
	mov	x0, x23
	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
LBB0_14:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_13
LBB0_15:
	mov	w8, #1
	str	w8, [x21]
	ldr	w23, [x20, #8]
	b	LBB0_13
LBB0_16:
	mov	x26, x0
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str.3@PAGE
Lloh22:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	x23, x26
	b	LBB0_13
LBB0_17:
	mov	x23, x0
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"icpf"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"invalid frame header\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
l_.str.2:                               ; @.str.2
	.asciz	"error decoding picture header\n"

l_.str.3:                               ; @.str.3
	.asciz	"error decoding picture\n"

	.no_dead_strip	_decode_frame
.subsections_via_symbols
