	.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, %r15
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	8(%rcx), %r14
	movl	(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rdi), %rbx
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	(%rcx,%rax,8), %r13
	xorq	$1, %rax
	movq	(%rcx,%rax,8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ff_set_dimensions
	testl	%eax, %eax
	js	LBB0_20
## %bb.1:
	xorb	$1, (%rbx)
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_ff_reget_buffer
	testl	%eax, %eax
	js	LBB0_20
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_bytestream2_init
	movq	%r15, %rdi
	callq	_bytestream2_get_byte
	movq	_C93_FIRST_FRAME@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	movl	(%rdx), %edx
	andl	%eax, %edx
	setne	%cl
	jne	LBB0_6
## %bb.3:
	movq	_AV_PICTURE_TYPE_P@GOTPCREL(%rip), %rdx
	jmp	LBB0_7
LBB0_6:
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rdx
LBB0_7:
	movl	(%rdx), %edx
	movl	%edx, 24(%r13)
	movl	%ecx, 8(%r13)
	movq	_HEIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_11
## %bb.8:
	movq	_WIDTH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	testl	%edx, %edx
	jg	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	addl	$8, %esi
	cmpl	%ecx, %esi
	jl	LBB0_9
LBB0_11:
	movq	_C93_HAS_PALETTE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.12:
	movq	16(%r13), %rax
	movq	8(%rax), %r15
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_bytestream2_get_be24
	orl	$-16777216, %eax                ## imm = 0xFF000000
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_13
## %bb.14:
	movl	$1, 12(%r13)
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_15:
	leaq	-48(%rbp), %rdi
	callq	_bytestream2_get_byte
	andl	$15, %eax
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_21
LBB0_16:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_18
## %bb.17:
	movq	16(%r13), %rax
	movq	8(%rax), %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_memcpy
LBB0_18:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_20
## %bb.19:
	movl	$1, (%r14)
	jmp	LBB0_21
LBB0_20:
	movl	%eax, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIDTH,4,2                      ## @WIDTH
	.comm	_HEIGHT,4,2                     ## @HEIGHT
	.comm	_C93_FIRST_FRAME,4,2            ## @C93_FIRST_FRAME
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ## @AV_PICTURE_TYPE_P
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"unexpected type %x at %dx%d\n"

	.comm	_C93_HAS_PALETTE,4,2            ## @C93_HAS_PALETTE
	.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	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x24, [x3, #8]
	ldr	w19, [x3]
	ldr	x28, [x0]
	ldp	x9, x8, [x28]
	ldr	x22, [x8, x9, lsl #3]
	eor	x9, x9, #0x1
	ldr	x25, [x8, x9, lsl #3]
Lloh0:
	adrp	x26, _WIDTH@GOTPAGE
Lloh1:
	ldr	x26, [x26, _WIDTH@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh2:
	adrp	x27, _HEIGHT@GOTPAGE
Lloh3:
	ldr	x27, [x27, _HEIGHT@GOTPAGEOFF]
	ldr	w2, [x27]
	bl	_ff_set_dimensions
	tbnz	w0, #31, LBB0_15
; %bb.1:
	ldr	x8, [x28]
	eor	x8, x8, #0x1
	str	x8, [x28]
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	bl	_ff_reget_buffer
	tbnz	w0, #31, LBB0_15
; %bb.2:
	add	x0, sp, #12
	mov	x1, x24
	mov	x2, x19
	bl	_bytestream2_init
	add	x0, sp, #12
	bl	_bytestream2_get_byte
Lloh4:
	adrp	x8, _C93_FIRST_FRAME@GOTPAGE
Lloh5:
	ldr	x8, [x8, _C93_FIRST_FRAME@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
Lloh7:
	adrp	x9, _AV_PICTURE_TYPE_P@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AV_PICTURE_TYPE_P@GOTPAGEOFF]
Lloh9:
	adrp	x10, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	str	w9, [x22, #24]
	str	w8, [x22, #8]
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w9, #0
	ldr	w10, [x26]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w10, #1
	b.ge	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w9, w9, #8
	cmp	w9, w8
	b.lt	LBB0_4
LBB0_6:
Lloh11:
	adrp	x8, _C93_HAS_PALETTE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _C93_HAS_PALETTE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.7:
	mov	x23, #0
	ldr	x8, [x22, #16]
	ldr	x24, [x8, #8]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_be24
	orr	w8, w0, #0xff000000
	str	w8, [x24, x23]
	add	x23, x23, #4
	cmp	x23, #1024
	b.ne	LBB0_8
; %bb.9:
	mov	w8, #1
	str	w8, [x22, #12]
	b	LBB0_13
LBB0_10:
	add	x0, sp, #12
	bl	_bytestream2_get_byte
	and	w3, w0, #0xf
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	w4, #0
	mov	w5, #0
	bl	_av_log
Lloh19:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh21:
	ldr	w19, [x8]
	b	LBB0_16
LBB0_11:
	ldr	x8, [x25, #16]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_13
; %bb.12:
	ldr	x8, [x22, #16]
	ldr	x0, [x8, #8]
	mov	w2, #1024
	bl	_memcpy
LBB0_13:
	mov	x0, x21
	mov	x1, x22
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_15
; %bb.14:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_16
LBB0_15:
	mov	x19, x0
LBB0_16:
	mov	x0, x19
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_WIDTH,4,2                      ; @WIDTH
	.comm	_HEIGHT,4,2                     ; @HEIGHT
	.comm	_C93_FIRST_FRAME,4,2            ; @C93_FIRST_FRAME
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ; @AV_PICTURE_TYPE_P
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"unexpected type %x at %dx%d\n"

	.comm	_C93_HAS_PALETTE,4,2            ; @C93_HAS_PALETTE
	.no_dead_strip	_decode_frame
.subsections_via_symbols
