	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function guess_palette
_guess_palette:                         ## @guess_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
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movaps	%xmm0, -176(%rbp)
	movq	(%rdi), %r12
	movq	8(%rdi), %rbx
	cmpq	$0, 24(%rdi)
	je	LBB0_1
## %bb.34:
	movq	16(%rdi), %rcx
	movq	(%r12), %rdx
	movl	$16777215, %eax                 ## imm = 0xFFFFFF
	movl	(%rcx,%rdx,4), %edx
	imull	$285212672, (%rbx), %esi        ## imm = 0x11000000
	andl	%eax, %edx
	orl	%edx, %esi
	movl	%esi, (%r15)
	movq	8(%r12), %rdx
	movl	(%rcx,%rdx,4), %edx
	andl	%eax, %edx
	imull	$285212672, 8(%rbx), %esi       ## imm = 0x11000000
	orl	%edx, %esi
	movl	%esi, 4(%r15)
	movq	16(%r12), %rdx
	movl	(%rcx,%rdx,4), %edx
	andl	%eax, %edx
	imull	$285212672, 16(%rbx), %esi      ## imm = 0x11000000
	orl	%edx, %esi
	movl	%esi, 8(%r15)
	movq	24(%r12), %rdx
	andl	(%rcx,%rdx,4), %eax
	imull	$285212672, 24(%rbx), %ecx      ## imm = 0x11000000
LBB0_30:
	orl	%eax, %ecx
	movl	%ecx, 12(%r15)
LBB0_32:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.33:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%edx, %r14d
	movups	%xmm0, (%r15)
	xorl	%r13d, %r13d
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.2:
	movq	(%r12), %rax
	cmpq	$0, -176(%rbp,%rax,8)
	jne	LBB0_4
## %bb.3:
	movq	$1, -176(%rbp,%rax,8)
	movl	$1, %r13d
LBB0_4:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.5:
	movq	8(%r12), %rax
	cmpq	$0, -176(%rbp,%rax,8)
	jne	LBB0_7
## %bb.6:
	movq	$1, -176(%rbp,%rax,8)
	incl	%r13d
LBB0_7:
	cmpq	$0, 16(%rbx)
	je	LBB0_10
## %bb.8:
	movq	16(%r12), %rax
	cmpq	$0, -176(%rbp,%rax,8)
	je	LBB0_9
LBB0_10:
	cmpq	$0, 24(%rbx)
	je	LBB0_13
LBB0_11:
	movq	24(%r12), %rax
	cmpq	$0, -176(%rbp,%rax,8)
	je	LBB0_12
LBB0_13:
	testl	%r13d, %r13d
	jne	LBB0_14
	jmp	LBB0_32
LBB0_9:
	movq	$1, -176(%rbp,%rax,8)
	incl	%r13d
	cmpq	$0, 24(%rbx)
	jne	LBB0_11
	jmp	LBB0_13
LBB0_12:
	movq	$1, -176(%rbp,%rax,8)
	incl	%r13d
LBB0_14:
	leaq	-176(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	decl	%r13d
	movl	%r14d, %eax
	shrl	$8, %eax
	movzbl	%al, %r8d
	movzbl	%r14b, %r9d
	andl	$65280, %eax                    ## imm = 0xFF00
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.15:
	movq	(%r12), %r10
	movq	-176(%rbp,%r10,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.17:
	movl	$16777215, %edx                 ## imm = 0xFFFFFF
	andl	-4(%r15,%rcx,4), %edx
	imull	$285212672, %esi, %ecx          ## imm = 0x11000000
	orl	%edx, %ecx
	movl	%ecx, (%r15)
LBB0_18:
	xorl	%r14d, %r14d
	jmp	LBB0_19
LBB0_16:
	movq	%r13, %rcx
	shlq	$5, %rcx
	leaq	_guess_palette.level_map(%rip), %rdx
	movl	(%rcx,%rdx), %ecx
	movl	%r8d, %edx
	imull	%ecx, %edx
	andl	$-256, %edx
	movl	%r9d, %edi
	imull	%ecx, %edi
	sarl	$8, %edi
	orl	%edx, %edi
	imull	%eax, %ecx
	andl	$-65536, %ecx                   ## imm = 0xFFFF0000
	imull	$285212672, %esi, %edx          ## imm = 0x11000000
	orl	%edi, %edx
	orl	%ecx, %edx
	movl	%edx, (%r15)
	movq	$1, -176(%rbp,%r10,8)
	movl	$1, %r14d
LBB0_19:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_23
## %bb.20:
	movq	8(%r12), %r11
	movq	-176(%rbp,%r11,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.21:
	movl	$16777215, %edx                 ## imm = 0xFFFFFF
	andl	-4(%r15,%rcx,4), %edx
	imull	$285212672, %esi, %ecx          ## imm = 0x11000000
	orl	%edx, %ecx
	movl	%ecx, 4(%r15)
	jmp	LBB0_23
LBB0_22:
	movl	%r14d, %r10d
	movq	%r13, %rdx
	shlq	$5, %rdx
	leaq	_guess_palette.level_map(%rip), %rcx
	addq	%rdx, %rcx
	movl	(%rcx,%r10,8), %ecx
	movl	%r8d, %edx
	imull	%ecx, %edx
	andl	$-256, %edx
	movl	%r9d, %edi
	imull	%ecx, %edi
	sarl	$8, %edi
	imull	%eax, %ecx
	andl	$-65536, %ecx                   ## imm = 0xFFFF0000
	orl	%edi, %ecx
	imull	$285212672, %esi, %esi          ## imm = 0x11000000
	orl	%edx, %esi
	orl	%ecx, %esi
	movl	%esi, 4(%r15)
	movq	$2, -176(%rbp,%r11,8)
	incl	%r14d
LBB0_23:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_27
## %bb.24:
	movq	16(%r12), %r11
	movq	-176(%rbp,%r11,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_26
## %bb.25:
	movl	$16777215, %edx                 ## imm = 0xFFFFFF
	andl	-4(%r15,%rcx,4), %edx
	imull	$285212672, %esi, %ecx          ## imm = 0x11000000
	orl	%edx, %ecx
	movl	%ecx, 8(%r15)
	jmp	LBB0_27
LBB0_26:
	movl	%r14d, %r10d
	movq	%r13, %rdx
	shlq	$5, %rdx
	leaq	_guess_palette.level_map(%rip), %rcx
	addq	%rdx, %rcx
	movl	(%rcx,%r10,8), %ecx
	movl	%r8d, %edx
	imull	%ecx, %edx
	andl	$-256, %edx
	movl	%r9d, %edi
	imull	%ecx, %edi
	sarl	$8, %edi
	imull	%eax, %ecx
	andl	$-65536, %ecx                   ## imm = 0xFFFF0000
	orl	%edi, %ecx
	imull	$285212672, %esi, %esi          ## imm = 0x11000000
	orl	%edx, %esi
	orl	%ecx, %esi
	movl	%esi, 8(%r15)
	movq	$3, -176(%rbp,%r11,8)
	incl	%r14d
LBB0_27:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_32
## %bb.28:
	movq	24(%r12), %rdi
	movq	-176(%rbp,%rdi,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_31
## %bb.29:
	movl	$16777215, %eax                 ## imm = 0xFFFFFF
	andl	-4(%r15,%rcx,4), %eax
	imull	$285212672, %esi, %ecx          ## imm = 0x11000000
	jmp	LBB0_30
LBB0_31:
	movl	%r14d, %ecx
	shlq	$5, %r13
	leaq	_guess_palette.level_map(%rip), %rdx
	addq	%r13, %rdx
	movl	(%rdx,%rcx,8), %ecx
	imull	%ecx, %r8d
	andl	$-256, %r8d
	imull	%ecx, %r9d
	sarl	$8, %r9d
	imull	%ecx, %eax
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	orl	%r9d, %eax
	imull	$285212672, %esi, %ecx          ## imm = 0x11000000
	orl	%r8d, %ecx
	orl	%eax, %ecx
	movl	%ecx, 12(%r15)
	movq	$4, -176(%rbp,%rdi,8)
	jmp	LBB0_32
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @guess_palette.level_map
_guess_palette.level_map:
	.quad	255                             ## 0xff
	.quad	0                               ## 0x0
	.quad	0                               ## 0x0
	.quad	0                               ## 0x0
	.quad	0                               ## 0x0
	.quad	255                             ## 0xff
	.quad	0                               ## 0x0
	.quad	0                               ## 0x0
	.quad	0                               ## 0x0
	.quad	128                             ## 0x80
	.quad	255                             ## 0xff
	.quad	0                               ## 0x0
	.quad	0                               ## 0x0
	.quad	85                              ## 0x55
	.quad	170                             ## 0xaa
	.quad	255                             ## 0xff

	.no_dead_strip	_guess_palette
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function guess_palette
_guess_palette:                         ; @guess_palette
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #96]
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp]
	ldp	x21, x22, [x0]
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x8, [x0, #16]
	ldr	x9, [x21]
	ldr	w9, [x8, x9, lsl #2]
	ldr	w10, [x22]
	add	w10, w10, w10, lsl #4
	bfi	w9, w10, #24, #8
	str	w9, [x19]
	ldr	x9, [x21, #8]
	ldr	w9, [x8, x9, lsl #2]
	ldr	w10, [x22, #8]
	add	w10, w10, w10, lsl #4
	bfi	w9, w10, #24, #8
	str	w9, [x19, #4]
	ldr	x9, [x21, #16]
	ldr	w9, [x8, x9, lsl #2]
	ldr	w10, [x22, #16]
	add	w10, w10, w10, lsl #4
	bfi	w9, w10, #24, #8
	str	w9, [x19, #8]
	ldr	x9, [x21, #24]
	ldr	w8, [x8, x9, lsl #2]
	ldr	w9, [x22, #24]
	add	w9, w9, w9, lsl #4
LBB0_2:
	bfi	w8, w9, #24, #8
	str	w8, [x19, #12]
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_34
; %bb.4:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_5:
	mov	x20, x2
	stp	xzr, xzr, [x19]
	ldr	x8, [x22]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x21]
	mov	x9, sp
	ldr	x10, [x9, x8, lsl #3]
	cbz	x10, LBB0_8
LBB0_7:
	mov	w23, #0
	ldr	x8, [x22, #8]
	cbnz	x8, LBB0_9
	b	LBB0_10
LBB0_8:
	mov	w23, #1
	str	x23, [x9, x8, lsl #3]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_10
LBB0_9:
	ldr	x8, [x21, #8]
	mov	x9, sp
	ldr	x10, [x9, x8, lsl #3]
	cbz	x10, LBB0_15
LBB0_10:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_12
LBB0_11:
	ldr	x8, [x21, #16]
	mov	x9, sp
	ldr	x10, [x9, x8, lsl #3]
	cbz	x10, LBB0_16
LBB0_12:
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_14
LBB0_13:
	ldr	x8, [x21, #24]
	mov	x9, sp
	ldr	x10, [x9, x8, lsl #3]
	cbz	x10, LBB0_17
LBB0_14:
	cbnz	w23, LBB0_18
	b	LBB0_3
LBB0_15:
	mov	w10, #1
	str	x10, [x9, x8, lsl #3]
	add	w23, w23, #1
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_11
	b	LBB0_12
LBB0_16:
	mov	w10, #1
	str	x10, [x9, x8, lsl #3]
	add	w23, w23, #1
	ldr	x8, [x22, #24]
	cbnz	x8, LBB0_13
	b	LBB0_14
LBB0_17:
	mov	w10, #1
	str	x10, [x9, x8, lsl #3]
	add	w23, w23, #1
LBB0_18:
	mov	x24, sp
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	sub	w10, w23, #1
	lsr	w9, w20, #8
	ubfx	w11, w20, #8, #8
	and	w8, w20, #0xff
	and	w9, w9, #0xff00
	ldr	x13, [x22]
	cbz	x13, LBB0_21
; %bb.19:
	ldr	x14, [x21]
	ldr	x15, [x24, x14, lsl #3]
	cbz	x15, LBB0_22
; %bb.20:
	mov	w12, #0
	add	x14, x19, x15, lsl #2
	ldur	w14, [x14, #-4]
	add	w13, w13, w13, lsl #4
	bfi	w14, w13, #24, #8
	str	w14, [x19]
	ldr	x13, [x22, #8]
	cbnz	x13, LBB0_23
	b	LBB0_25
LBB0_21:
	mov	w12, #0
	ldr	x13, [x22, #8]
	cbnz	x13, LBB0_23
	b	LBB0_25
LBB0_22:
	lsl	x12, x10, #5
Lloh6:
	adrp	x15, _guess_palette.level_map@PAGE
Lloh7:
	add	x15, x15, _guess_palette.level_map@PAGEOFF
	ldr	w12, [x15, x12]
	mul	w15, w11, w12
	and	w15, w15, #0xffffff00
	mul	w16, w8, w12
	mul	w12, w9, w12
	and	w12, w12, #0xffff0000
	add	w13, w13, w13, lsl #4
	orr	w13, w15, w13, lsl #24
	orr	w13, w13, w16, asr #8
	orr	w12, w13, w12
	str	w12, [x19]
	mov	w12, #1
	mov	x13, sp
	str	x12, [x13, x14, lsl #3]
	ldr	x13, [x22, #8]
	cbz	x13, LBB0_25
LBB0_23:
	ldr	x14, [x21, #8]
	mov	x15, sp
	ldr	x16, [x15, x14, lsl #3]
	cbz	x16, LBB0_28
; %bb.24:
	add	x14, x19, x16, lsl #2
	ldur	w14, [x14, #-4]
	add	w13, w13, w13, lsl #4
	bfi	w14, w13, #24, #8
	str	w14, [x19, #4]
LBB0_25:
	ldr	x13, [x22, #16]
	cbz	x13, LBB0_30
LBB0_26:
	ldr	x14, [x21, #16]
	mov	x15, sp
	ldr	x16, [x15, x14, lsl #3]
	cbz	x16, LBB0_29
; %bb.27:
	add	x14, x19, x16, lsl #2
	ldur	w14, [x14, #-4]
	add	w13, w13, w13, lsl #4
	bfi	w14, w13, #24, #8
	str	w14, [x19, #8]
	b	LBB0_30
LBB0_28:
Lloh8:
	adrp	x16, _guess_palette.level_map@PAGE
Lloh9:
	add	x16, x16, _guess_palette.level_map@PAGEOFF
	add	x16, x16, x10, lsl #5
	ldr	x16, [x16, w12, uxtw #3]
	mul	w17, w11, w16
	and	w17, w17, #0xffffff00
	mul	w0, w8, w16
	mul	w16, w9, w16
	and	w16, w16, #0xffff0000
	add	w13, w13, w13, lsl #4
	orr	w13, w17, w13, lsl #24
	orr	w13, w13, w0, asr #8
	orr	w13, w13, w16
	str	w13, [x19, #4]
	mov	w13, #2
	str	x13, [x15, x14, lsl #3]
	add	w12, w12, #1
	ldr	x13, [x22, #16]
	cbnz	x13, LBB0_26
	b	LBB0_30
LBB0_29:
Lloh10:
	adrp	x16, _guess_palette.level_map@PAGE
Lloh11:
	add	x16, x16, _guess_palette.level_map@PAGEOFF
	add	x16, x16, x10, lsl #5
	ldr	x16, [x16, w12, uxtw #3]
	mul	w17, w11, w16
	and	w17, w17, #0xffffff00
	mul	w0, w8, w16
	mul	w16, w9, w16
	and	w16, w16, #0xffff0000
	add	w13, w13, w13, lsl #4
	orr	w13, w17, w13, lsl #24
	orr	w13, w13, w0, asr #8
	orr	w13, w13, w16
	str	w13, [x19, #8]
	mov	w13, #3
	str	x13, [x15, x14, lsl #3]
	add	w12, w12, #1
LBB0_30:
	ldr	x13, [x22, #24]
	cbz	x13, LBB0_3
; %bb.31:
	ldr	x14, [x21, #24]
	mov	x15, sp
	ldr	x16, [x15, x14, lsl #3]
	cbz	x16, LBB0_33
; %bb.32:
	add	x8, x19, x16, lsl #2
	ldur	w8, [x8, #-4]
	add	w9, w13, w13, lsl #4
	b	LBB0_2
LBB0_33:
Lloh12:
	adrp	x16, _guess_palette.level_map@PAGE
Lloh13:
	add	x16, x16, _guess_palette.level_map@PAGEOFF
	add	x10, x16, x10, lsl #5
	ldr	x10, [x10, w12, uxtw #3]
	mul	w11, w11, w10
	and	w11, w11, #0xffffff00
	mul	w8, w8, w10
	mul	w9, w9, w10
	and	w9, w9, #0xffff0000
	add	w10, w13, w13, lsl #4
	orr	w10, w11, w10, lsl #24
	orr	w8, w10, w8, asr #8
	orr	w8, w8, w9
	str	w8, [x19, #12]
	mov	w8, #4
	str	x8, [x15, x14, lsl #3]
	b	LBB0_3
LBB0_34:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	3                               ; @guess_palette.level_map
_guess_palette.level_map:
	.quad	255                             ; 0xff
	.quad	0                               ; 0x0
	.quad	0                               ; 0x0
	.quad	0                               ; 0x0
	.quad	0                               ; 0x0
	.quad	255                             ; 0xff
	.quad	0                               ; 0x0
	.quad	0                               ; 0x0
	.quad	0                               ; 0x0
	.quad	128                             ; 0x80
	.quad	255                             ; 0xff
	.quad	0                               ; 0x0
	.quad	0                               ; 0x0
	.quad	85                              ; 0x55
	.quad	170                             ; 0xaa
	.quad	255                             ; 0xff

	.no_dead_strip	_guess_palette
.subsections_via_symbols
