	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmdvideo_decode_frame
_vmdvideo_decode_frame:                 ## @vmdvideo_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rcx), %rax
	movl	(%rcx), %r12d
	movq	(%rdi), %rbx
	movq	%rax, 16(%rbx)
	movl	%r12d, (%rbx)
	cmpl	$15, %r12d
	jg	LBB0_2
## %bb.1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_9
LBB0_2:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	_AV_GET_BUFFER_FLAG_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_vmd_decode
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	(%r15), %rax
	movl	4(%rax), %edi
	movl	8(%rbx), %esi
	movq	_PALETTE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$2, %edx
	callq	_memcpy
	movl	4(%rbx), %edi
	callq	_av_frame_unref
	movl	4(%rbx), %edi
	movq	%r15, %rsi
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movl	$1, (%r14)
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %r12d
LBB0_9:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ## @AV_GET_BUFFER_FLAG_REF
	.comm	_PALETTE_COUNT,4,2              ## @PALETTE_COUNT
	.no_dead_strip	_vmdvideo_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmdvideo_decode_frame
_vmdvideo_decode_frame:                 ; @vmdvideo_decode_frame
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x3, #8]
	ldr	w22, [x3]
	ldr	x21, [x0]
	str	x8, [x21, #16]
	str	w22, [x21]
	cmp	w22, #15
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_2:
	mov	x19, x2
	mov	x20, x1
Lloh3:
	adrp	x8, _AV_GET_BUFFER_FLAG_REF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_GET_BUFFER_FLAG_REF@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x0, x21
	mov	x1, x20
	bl	_vmd_decode
	tbnz	w0, #31, LBB0_6
; %bb.4:
	ldr	x8, [x20]
	ldr	w0, [x8, #4]
	ldr	w1, [x21, #8]
Lloh6:
	adrp	x8, _PALETTE_COUNT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PALETTE_COUNT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w2, w8, #2
	bl	_memcpy
	ldr	w0, [x21, #4]
	bl	_av_frame_unref
	ldr	w0, [x21, #4]
	mov	x1, x20
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x22
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ; @AV_GET_BUFFER_FLAG_REF
	.comm	_PALETTE_COUNT,4,2              ; @PALETTE_COUNT
	.no_dead_strip	_vmdvideo_decode_frame
.subsections_via_symbols
