	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vb_decode_palette
_vb_decode_palette:                     ## @vb_decode_palette
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	8(%rdi), %r13
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	decl	%eax
	movzbl	%al, %eax
	leal	(%rax,%r15), %r12d
	cmpl	$255, %r12d
	jle	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_3:
	leal	(%rax,%rax,2), %eax
	addl	$2, %eax
	cmpl	%ebx, %eax
	jle	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	movl	12(%r14), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_log                         ## TAILCALL
LBB0_5:
	movslq	%r15d, %rbx
	cmpl	%r12d, %r15d
	cmovgl	%r15d, %r12d
	notl	%r12d
	addl	%r15d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_bytestream2_get_be24
	orl	$-16777216, %eax                ## imm = 0xFF000000
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	incl	%r12d
	jne	LBB0_6
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Palette change runs beyond entry 256\n"

L_.str.1:                               ## @.str.1
	.asciz	"Palette data runs beyond chunk size\n"

	.no_dead_strip	_vb_decode_palette
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vb_decode_palette
_vb_decode_palette:                     ; @vb_decode_palette
	.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
	mov	x22, x1
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_bytestream2_get_byte
	mov	x21, x0
	mov	x0, x20
	bl	_bytestream2_get_byte
	sub	w8, w0, #1
	and	w9, w8, #0xff
	add	w8, w9, w21
	cmp	w8, #255
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	add	w9, w9, w9, lsl #1
	add	w9, w9, #2
	cmp	w9, w22
	b.le	LBB0_5
; %bb.3:
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_4:
	ldr	w0, [x19, #12]
Lloh4:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	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
	b	_av_log
LBB0_5:
	cmp	w21, w8
	csel	w8, w21, w8, gt
	sbfiz	x22, x21, #2, #32
	mvn	w8, w8
	add	w21, w8, w21
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_bytestream2_get_be24
	orr	w8, w0, #0xff000000
	ldr	x9, [x19]
	str	w8, [x9, x22]
	add	x22, x22, #4
	adds	w21, w21, #1
	b.lo	LBB0_6
; %bb.7:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Palette change runs beyond entry 256\n"

l_.str.1:                               ; @.str.1
	.asciz	"Palette data runs beyond chunk size\n"

	.no_dead_strip	_vb_decode_palette
.subsections_via_symbols
