	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_standard_palette
_init_standard_palette:                 ## @init_standard_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
	subq	$3080, %rsp                     ## imm = 0xC08
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	%ecx, %esi
	movl	%r8d, %edx
	callq	_make_standard_palette
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.6:
	movl	%ebx, %ecx
	addq	$8, %rax
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	-8(%rax), %esi
	movl	%esi, -3104(%rbp,%rdx)
	movl	-4(%rax), %esi
	movl	%esi, -3100(%rbp,%rdx)
	movl	(%rax), %esi
	movl	%esi, -3096(%rbp,%rdx)
	addq	$16, %rax
	addq	$12, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_7
## %bb.2:
	movl	%ebx, %eax
	cmpl	$255, %ebx
	jbe	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movl	%eax, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	-3104(,%rcx,4), %rdi
	addq	%rbp, %rdi
	movl	$255, %ecx
	subl	%eax, %ecx
	leaq	(%rcx,%rcx,2), %rax
	leaq	12(,%rax,4), %rdx
	leaq	L_.memset_pattern(%rip), %rsi
	callq	_memset_pattern16
LBB0_4:
	leaq	-3104(%rbp), %rdx
	movl	%r15d, %edi
	movl	%r14d, %esi
	movl	%ebx, %ecx
	callq	_png_set_PLTE
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_5
## %bb.8:
	addq	$3080, %rsp                     ## imm = 0xC08
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	42                              ## 0x2a
	.long	42                              ## 0x2a
	.long	42                              ## 0x2a
	.long	42                              ## 0x2a

	.no_dead_strip	_init_standard_palette
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_standard_palette
_init_standard_palette:                 ; @init_standard_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
	sub	sp, sp, #3088
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	x1, x3
	mov	x2, x4
	bl	_make_standard_palette
	cmp	w19, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w8, w19
	cmp	w19, #8
	b.hi	LBB0_4
; %bb.2:
	mov	x9, #0
	b	LBB0_6
LBB0_3:
	mov	w8, #0
	b	LBB0_9
LBB0_4:
	ands	x9, x8, #0x7
	mov	w10, #8
	csel	x9, x10, x9, eq
	sub	x9, x8, x9
	add	x10, x0, #64
	add	x12, sp, #8
	mov	x11, x9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x13, x10, #64
	ld4.4s	{ v0, v1, v2, v3 }, [x13]
	ld4.4s	{ v4, v5, v6, v7 }, [x10]
	add	x13, x12, #96
	st3.4s	{ v0, v1, v2 }, [x12], #48
	st3.4s	{ v4, v5, v6 }, [x12]
	add	x10, x10, #128
	mov	x12, x13
	subs	x11, x11, #8
	b.ne	LBB0_5
LBB0_6:
	add	x10, x0, x9, lsl #4
	add	x10, x10, #8
	mov	w11, #12
	add	x12, sp, #8
	madd	x11, x9, x11, x12
	add	x11, x11, #8
	sub	x8, x8, x9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldur	d0, [x10, #-8]
	stur	d0, [x11, #-8]
	ldr	w9, [x10], #16
	str	w9, [x11], #12
	subs	x8, x8, #1
	b.ne	LBB0_7
; %bb.8:
	mov	x8, x19
	cmp	w19, #255
	b.hi	LBB0_10
LBB0_9:
	mov	w9, #12
	add	x10, sp, #8
	umaddl	x0, w8, w9, x10
	mov	w10, #255
	sub	w8, w10, w8
	umull	x8, w8, w9
	add	x2, x8, #12
Lloh3:
	adrp	x1, l_.memset_pattern@PAGE
Lloh4:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	bl	_memset_pattern16
LBB0_10:
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_png_set_PLTE
	ldur	x8, [x29, #-40]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	add	sp, sp, #3088
	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
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	42                              ; 0x2a
	.long	42                              ; 0x2a
	.long	42                              ; 0x2a
	.long	42                              ; 0x2a

	.no_dead_strip	_init_standard_palette
.subsections_via_symbols
