	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reset_palette                  ## -- Begin function reset_palette
	.p2align	4, 0x90
_reset_palette:                         ## @reset_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	%rbx
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_default_red@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	(%rdi), %rax
	movq	_default_grn@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_default_blu@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	leaq	192(%rax), %rcx
	leaq	64(%r8), %rbx
	leaq	64(%rdx), %r9
	leaq	64(%rsi), %r10
	cmpq	%rbx, %rax
	setb	%r14b
	cmpq	%rcx, %r8
	setb	%r15b
	cmpq	%r9, %rax
	setb	%bl
	cmpq	%rcx, %rdx
	setb	%r11b
	cmpq	%r10, %rax
	setb	%r9b
	cmpq	%rcx, %rsi
	setb	%r10b
	testb	%r15b, %r14b
	jne	LBB0_3
## %bb.1:
	andb	%r11b, %bl
	jne	LBB0_3
## %bb.2:
	andb	%r10b, %r9b
	jne	LBB0_3
## %bb.6:
	movdqu	(%r8), %xmm0
	movdqu	(%rdx), %xmm1
	movdqu	(%rsi), %xmm2
	pshufd	$80, %xmm1, %xmm3               ## xmm3 = xmm1[0,0,1,1]
	pshufd	$68, %xmm0, %xmm4               ## xmm4 = xmm0[0,1,0,1]
	pblendw	$12, %xmm3, %xmm4               ## xmm4 = xmm4[0,1],xmm3[2,3],xmm4[4,5,6,7]
	pshufd	$68, %xmm2, %xmm3               ## xmm3 = xmm2[0,1,0,1]
	pblendw	$207, %xmm4, %xmm3              ## xmm3 = xmm4[0,1,2,3],xmm3[4,5],xmm4[6,7]
	pshufd	$165, %xmm1, %xmm4              ## xmm4 = xmm1[1,1,2,2]
	pblendw	$48, %xmm0, %xmm4               ## xmm4 = xmm4[0,1,2,3],xmm0[4,5],xmm4[6,7]
	pblendw	$12, %xmm2, %xmm4               ## xmm4 = xmm4[0,1],xmm2[2,3],xmm4[4,5,6,7]
	shufps	$255, %xmm1, %xmm0              ## xmm0 = xmm0[3,3],xmm1[3,3]
	pshufd	$238, %xmm2, %xmm1              ## xmm1 = xmm2[2,3,2,3]
	pblendw	$60, %xmm0, %xmm1               ## xmm1 = xmm1[0,1],xmm0[2,3,4,5],xmm1[6,7]
	movdqu	%xmm1, 32(%rax)
	movdqu	%xmm4, 16(%rax)
	movdqu	%xmm3, (%rax)
	movdqu	16(%r8), %xmm0
	movdqu	16(%rdx), %xmm1
	movdqu	16(%rsi), %xmm2
	pshufd	$80, %xmm1, %xmm3               ## xmm3 = xmm1[0,0,1,1]
	pshufd	$68, %xmm0, %xmm4               ## xmm4 = xmm0[0,1,0,1]
	pblendw	$12, %xmm3, %xmm4               ## xmm4 = xmm4[0,1],xmm3[2,3],xmm4[4,5,6,7]
	pshufd	$68, %xmm2, %xmm3               ## xmm3 = xmm2[0,1,0,1]
	pblendw	$207, %xmm4, %xmm3              ## xmm3 = xmm4[0,1,2,3],xmm3[4,5],xmm4[6,7]
	pshufd	$165, %xmm1, %xmm4              ## xmm4 = xmm1[1,1,2,2]
	pblendw	$48, %xmm0, %xmm4               ## xmm4 = xmm4[0,1,2,3],xmm0[4,5],xmm4[6,7]
	pblendw	$12, %xmm2, %xmm4               ## xmm4 = xmm4[0,1],xmm2[2,3],xmm4[4,5,6,7]
	shufps	$255, %xmm1, %xmm0              ## xmm0 = xmm0[3,3],xmm1[3,3]
	pshufd	$238, %xmm2, %xmm1              ## xmm1 = xmm2[2,3,2,3]
	pblendw	$60, %xmm0, %xmm1               ## xmm1 = xmm1[0,1],xmm0[2,3,4,5],xmm1[6,7]
	movdqu	%xmm1, 80(%rax)
	movdqu	%xmm4, 64(%rax)
	movdqu	%xmm3, 48(%rax)
	movdqu	32(%r8), %xmm0
	movdqu	32(%rdx), %xmm1
	movdqu	32(%rsi), %xmm2
	pshufd	$80, %xmm1, %xmm3               ## xmm3 = xmm1[0,0,1,1]
	pshufd	$68, %xmm0, %xmm4               ## xmm4 = xmm0[0,1,0,1]
	pblendw	$12, %xmm3, %xmm4               ## xmm4 = xmm4[0,1],xmm3[2,3],xmm4[4,5,6,7]
	pshufd	$68, %xmm2, %xmm3               ## xmm3 = xmm2[0,1,0,1]
	pblendw	$207, %xmm4, %xmm3              ## xmm3 = xmm4[0,1,2,3],xmm3[4,5],xmm4[6,7]
	pshufd	$165, %xmm1, %xmm4              ## xmm4 = xmm1[1,1,2,2]
	pblendw	$48, %xmm0, %xmm4               ## xmm4 = xmm4[0,1,2,3],xmm0[4,5],xmm4[6,7]
	pblendw	$12, %xmm2, %xmm4               ## xmm4 = xmm4[0,1],xmm2[2,3],xmm4[4,5,6,7]
	shufps	$255, %xmm1, %xmm0              ## xmm0 = xmm0[3,3],xmm1[3,3]
	pshufd	$238, %xmm2, %xmm1              ## xmm1 = xmm2[2,3,2,3]
	pblendw	$60, %xmm0, %xmm1               ## xmm1 = xmm1[0,1],xmm0[2,3,4,5],xmm1[6,7]
	movdqu	%xmm1, 128(%rax)
	movdqu	%xmm4, 112(%rax)
	movdqu	%xmm3, 96(%rax)
	movdqu	48(%r8), %xmm0
	movdqu	48(%rdx), %xmm1
	movdqu	48(%rsi), %xmm2
	pshufd	$80, %xmm1, %xmm3               ## xmm3 = xmm1[0,0,1,1]
	pshufd	$68, %xmm0, %xmm4               ## xmm4 = xmm0[0,1,0,1]
	pblendw	$12, %xmm3, %xmm4               ## xmm4 = xmm4[0,1],xmm3[2,3],xmm4[4,5,6,7]
	pshufd	$68, %xmm2, %xmm3               ## xmm3 = xmm2[0,1,0,1]
	pblendw	$207, %xmm4, %xmm3              ## xmm3 = xmm4[0,1,2,3],xmm3[4,5],xmm4[6,7]
	pshufd	$165, %xmm1, %xmm4              ## xmm4 = xmm1[1,1,2,2]
	pblendw	$48, %xmm0, %xmm4               ## xmm4 = xmm4[0,1,2,3],xmm0[4,5],xmm4[6,7]
	pblendw	$12, %xmm2, %xmm4               ## xmm4 = xmm4[0,1],xmm2[2,3],xmm4[4,5,6,7]
	shufps	$255, %xmm1, %xmm0              ## xmm0 = xmm0[3,3],xmm1[3,3]
	pshufd	$238, %xmm2, %xmm1              ## xmm1 = xmm2[2,3,2,3]
	pblendw	$60, %xmm0, %xmm1               ## xmm1 = xmm1[0,1],xmm0[2,3,4,5],xmm1[6,7]
	movdqu	%xmm1, 176(%rax)
	movdqu	%xmm4, 160(%rax)
	movdqu	%xmm3, 144(%rax)
	jmp	LBB0_5
LBB0_3:
	addq	$20, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r8,%rcx,4), %ebx
	movl	%ebx, -20(%rax)
	movl	(%rdx,%rcx,4), %ebx
	movl	%ebx, -16(%rax)
	movl	(%rsi,%rcx,4), %ebx
	movl	%ebx, -12(%rax)
	movl	4(%r8,%rcx,4), %ebx
	movl	%ebx, -8(%rax)
	movl	4(%rdx,%rcx,4), %ebx
	movl	%ebx, -4(%rax)
	movl	4(%rsi,%rcx,4), %ebx
	movl	%ebx, (%rax)
	addq	$2, %rcx
	addq	$24, %rax
	cmpq	$16, %rcx
	jne	LBB0_4
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_palette                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_default_red,8,3                ## @default_red
	.comm	_default_grn,8,3                ## @default_grn
	.comm	_default_blu,8,3                ## @default_blu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reset_palette                  ; -- Begin function reset_palette
	.p2align	2
_reset_palette:                         ; @reset_palette
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _default_red@GOTPAGE
Lloh1:
	ldr	x8, [x8, _default_red@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x11, [x0]
Lloh3:
	adrp	x9, _default_grn@GOTPAGE
Lloh4:
	ldr	x9, [x9, _default_grn@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _default_blu@GOTPAGE
Lloh7:
	ldr	x10, [x10, _default_blu@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	add	x14, x11, #192
	add	x15, x8, #64
	add	x12, x9, #64
	add	x13, x10, #64
	cmp	x11, x12
	ccmp	x9, x14, #2, lo
	cset	w12, lo
	cmp	x11, x13
	ccmp	x10, x14, #2, lo
	cset	w13, lo
	cmp	x8, x14
	ccmp	x11, x15, #2, lo
	b.lo	LBB0_4
; %bb.1:
	tbnz	w12, #0, LBB0_4
; %bb.2:
	cbnz	w13, LBB0_4
; %bb.3:
	ldr	q0, [x8]
	ldr	q1, [x9]
	ldr	q2, [x10]
	mov	x12, x11
	st3.4s	{ v0, v1, v2 }, [x12], #48
	ldr	q0, [x8, #16]
	ldr	q1, [x9, #16]
	ldr	q2, [x10, #16]
	st3.4s	{ v0, v1, v2 }, [x12]
	ldr	q0, [x8, #32]
	ldr	q1, [x9, #32]
	ldr	q2, [x10, #32]
	add	x12, x11, #96
	st3.4s	{ v0, v1, v2 }, [x12]
	ldr	q0, [x8, #48]
	ldr	q1, [x9, #48]
	ldr	q2, [x10, #48]
	add	x8, x11, #144
	st3.4s	{ v0, v1, v2 }, [x8]
	b	_set_palette
LBB0_4:
	mov	x12, #0
	add	x11, x11, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x8, x12]
	stur	w13, [x11, #-8]
	ldr	w13, [x9, x12]
	stur	w13, [x11, #-4]
	ldr	w13, [x10, x12]
	str	w13, [x11], #12
	add	x12, x12, #4
	cmp	x12, #64
	b.ne	LBB0_5
; %bb.6:
	b	_set_palette
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_default_red,8,3                ; @default_red
	.comm	_default_grn,8,3                ; @default_grn
	.comm	_default_blu,8,3                ; @default_blu
.subsections_via_symbols
