	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bethsoftvid_decode_frame
_bethsoftvid_decode_frame:              ## @bethsoftvid_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %r14
	movq	8(%rdi), %rbx
	movq	(%rbx), %rsi
	xorl	%edx, %edx
	callq	_ff_reget_buffer
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	cmpq	$0, (%r14)
	jle	LBB0_4
## %bb.2:
	movq	16(%r14), %rax
	movq	(%rax), %rcx
	movq	_AV_PKT_DATA_PALETTE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.3:
	leaq	8(%rbx), %rdi
	movl	8(%rax), %edx
	movl	12(%rax), %esi
	callq	_bytestream2_init
	movq	%rbx, %rdi
	callq	_set_palette
	testl	%eax, %eax
	js	LBB0_5
LBB0_4:
	addq	$8, %rbx
	movl	8(%r14), %edx
	movl	12(%r14), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_init
	movq	%rbx, %rdi
	callq	_bytestream2_get_byte
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_DATA_PALETTE,8,3        ## @AV_PKT_DATA_PALETTE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_bethsoftvid_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bethsoftvid_decode_frame
_bethsoftvid_decode_frame:              ; @bethsoftvid_decode_frame
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
	ldr	x20, [x0, #8]
	ldr	x1, [x20]
	mov	w2, #0
	bl	_ff_reget_buffer
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _AV_PKT_DATA_PALETTE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AV_PKT_DATA_PALETTE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.3:
	add	x0, x20, #8
	ldp	w2, w1, [x8, #8]
	bl	_bytestream2_init
	mov	x0, x20
	bl	_set_palette
	tbnz	w0, #31, LBB0_5
LBB0_4:
	add	x20, x20, #8
	ldp	w2, w1, [x19, #8]
	mov	x0, x20
	bl	_bytestream2_init
	mov	x0, x20
	bl	_bytestream2_get_byte
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_DATA_PALETTE,8,3        ; @AV_PKT_DATA_PALETTE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_bethsoftvid_decode_frame
.subsections_via_symbols
