	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_palette
_set_palette:                           ## @set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rax), %rax
	movq	8(%rax), %r15
	leaq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$768, %eax                      ## imm = 0x300
	jge	LBB0_1
## %bb.5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_be24u
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %ecx
	shrl	$4, %eax
	andl	$197379, %eax                   ## imm = 0x30303
	orl	%ecx, %eax
	orl	$-16777216, %eax                ## imm = 0xFF000000
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_2
## %bb.3:
	movq	(%r14), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_set_palette
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_palette
_set_palette:                           ; @set_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	x19, x0
	mov	x20, x0
	ldr	x8, [x20], #8
	ldr	x8, [x8, #8]
	ldr	x21, [x8, #8]
	mov	x0, x20
	bl	_bytestream2_get_bytes_left
	cmp	w0, #768
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_2:
	mov	x22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_bytestream2_get_be24u
	lsr	w8, w0, #4
	and	w8, w8, #0x3030303
	orr	w8, w8, w0, lsl #2
	orr	w8, w8, #0xff000000
	str	w8, [x21, x22]
	add	x22, x22, #4
	cmp	x22, #1024
	b.ne	LBB0_3
; %bb.4:
	mov	w0, #0
	ldr	x8, [x19]
	mov	w9, #1
	str	w9, [x8]
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_set_palette
.subsections_via_symbols
