	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generate_palette
_generate_palette:                      ## @generate_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%r8), %eax
	cmpq	$4, %rax
	ja	LBB0_2
## %bb.1:
	movl	%ecx, %r10d
	movq	%rsi, %rbx
	movq	%rdi, %rsi
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:
	cmpl	$1, %edx
	jne	LBB0_11
## %bb.10:
	movl	%r10d, (%rsp)
	movq	%rsi, %rdi
	movq	%rsi, %r14
	movq	%rbx, %rsi
	movl	$255, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	movl	%r10d, %r15d
	callq	_set_color
	incq	%r14
	incq	%rbx
	movl	%r15d, (%rsp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$255, %edx
	movl	$255, %ecx
	movl	$255, %r8d
	movl	$255, %r9d
	callq	_set_color
	movl	$2, %eax
	jmp	LBB0_16
LBB0_3:
	movl	4(%r8), %ecx
	movl	%r10d, (%rsp)
	movq	%rsi, %rdi
	movq	%rbx, %rsi
	movl	%ecx, %edx
	movl	%ecx, %r8d
	jmp	LBB0_4
LBB0_6:
	movl	4(%r8), %ecx
	movl	8(%r8), %r9d
	movl	%r10d, (%rsp)
	movq	%rsi, %rdi
	movq	%rbx, %rsi
	movl	%ecx, %edx
	movl	%ecx, %r8d
	jmp	LBB0_5
LBB0_7:
	movl	4(%r8), %edx
	movl	8(%r8), %ecx
	movl	12(%r8), %r8d
	movl	%r10d, (%rsp)
	movq	%rsi, %rdi
	movq	%rbx, %rsi
LBB0_4:
	movl	$255, %r9d
	jmp	LBB0_5
LBB0_8:
	movl	4(%r8), %edx
	movl	8(%r8), %ecx
	movl	12(%r8), %eax
	movl	16(%r8), %r9d
	movl	%r10d, (%rsp)
	movq	%rsi, %rdi
	movq	%rbx, %rsi
	movl	%eax, %r8d
LBB0_5:
	callq	_set_color
	movl	$1, %eax
LBB0_16:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	%edx, %r11d
	shrl	$31, %r11d
	addl	%edx, %r11d
	movl	%r11d, %edi
	sarl	%edi
	movl	$1, %r9d
	movl	%edi, %ecx
	shll	%cl, %r9d
	movl	%r9d, %edx
	shll	%cl, %edx
	movl	$0, -48(%rbp)
	shrl	%edx
	andl	$-2, %r11d
	movl	$255, %eax
	shll	%cl, %eax
	movl	%r9d, %ecx
	imull	%r9d, %ecx
	movl	%ecx, %r15d
	shll	$8, %r15d
	subl	%ecx, %r15d
	addl	%edx, %r15d
	imull	$51, %r9d, %ecx
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	imull	$-153, %r9d, %r8d
	movl	%r9d, %ecx
	shll	$8, %ecx
	movl	%r9d, %r14d
	subl	%ecx, %r14d
	subl	%r9d, %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	imull	%eax, %r9d
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	addl	%edx, %r9d
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r15d, %r12d
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movl	%r11d, -88(%rbp)                ## 4-byte Spill
	movl	%edi, -84(%rbp)                 ## 4-byte Spill
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	subl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ecx, %r9d
	shll	$8, %r9d
	subl	%ecx, %r9d
	movl	%edi, %ecx
	shll	%cl, %r9d
	addl	-68(%rbp), %r9d                 ## 4-byte Folded Reload
	movl	%r11d, %ecx
	shrl	%cl, %r9d
	movl	%r9d, -92(%rbp)                 ## 4-byte Spill
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	movl	%r15d, -76(%rbp)                ## 4-byte Spill
	movl	%r12d, -72(%rbp)                ## 4-byte Spill
	xorl	%r14d, %r14d
	movl	%r8d, -100(%rbp)                ## 4-byte Spill
	movl	%edx, -96(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r14d, %eax
	movl	%edi, %ecx
	shll	%cl, %eax
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, -48(%rbp)
	movl	-48(%rbp), %edi
	addq	%rsi, %rdi
	movl	%r15d, %eax
	movl	%r11d, %ecx
	shrl	%cl, %eax
	movl	-48(%rbp), %esi
	movl	%r13d, %r8d
	shrl	%cl, %r8d
	addq	%rbx, %rsi
	movl	%r12d, %r9d
	shrl	%cl, %r9d
	movl	%r10d, (%rsp)
	movl	-92(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	movl	%r10d, %ebx
	callq	_set_color
	movl	-96(%rbp), %edx                 ## 4-byte Reload
	movl	-100(%rbp), %r8d                ## 4-byte Reload
	movl	-80(%rbp), %eax                 ## 4-byte Reload
	movl	-84(%rbp), %edi                 ## 4-byte Reload
	movl	-88(%rbp), %r11d                ## 4-byte Reload
	movl	%ebx, %r10d
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	incl	%r14d
	addl	%r8d, %r12d
	addl	%edx, %r15d
	subl	%eax, %r13d
	cmpl	%r14d, -52(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	subl	-64(%rbp), %r12d                ## 4-byte Folded Reload
	addl	$-51, %r8d
	movl	-76(%rbp), %r15d                ## 4-byte Reload
	subl	-60(%rbp), %r15d                ## 4-byte Folded Reload
	addl	$510, %edx                      ## imm = 0x1FE
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cmpl	-52(%rbp), %ecx                 ## 4-byte Folded Reload
	jne	LBB0_12
## %bb.15:
	movl	-48(%rbp), %eax
	incl	%eax
	jmp	LBB0_16
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"makepng: --colors=...: invalid count %u\n"

	.no_dead_strip	_generate_palette
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generate_palette
_generate_palette:                      ; @generate_palette
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x4]
	cmp	w8, #4
	b.hi	LBB0_16
; %bb.1:
	mov	x25, x3
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	cmp	w2, #1
	b.ne	LBB0_11
; %bb.3:
	mov	x0, x22
	mov	x1, x23
	mov	w2, #255
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	x6, x25
	bl	_set_color
	add	x0, x22, #1
	add	x1, x23, #1
	mov	w2, #255
	mov	w3, #255
	mov	w4, #255
	mov	w5, #255
	mov	x6, x25
	bl	_set_color
	mov	w0, #2
	b	LBB0_10
LBB0_4:
	ldr	w2, [x4, #4]
	mov	x0, x22
	mov	x1, x23
	mov	x3, x2
	mov	x4, x2
	b	LBB0_7
LBB0_5:
	ldp	w2, w5, [x4, #4]
	mov	x0, x22
	mov	x1, x23
	mov	x3, x2
	mov	x4, x2
	b	LBB0_9
LBB0_6:
	ldp	w2, w3, [x4, #4]
	ldr	w4, [x4, #12]
	mov	x0, x22
	mov	x1, x23
LBB0_7:
	mov	w5, #255
	b	LBB0_9
LBB0_8:
	ldp	w2, w3, [x4, #4]
	ldp	w8, w5, [x4, #12]
	mov	x0, x22
	mov	x1, x23
	mov	x4, x8
LBB0_9:
	mov	x6, x25
	bl	_set_color
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_11:
	str	wzr, [sp, #56]                  ; 4-byte Folded Spill
	cmp	w2, #0
	cinc	w8, w2, lt
	asr	w19, w8, #1
	mov	w9, #1
	lsl	w11, w9, w19
	str	wzr, [sp, #60]
	lsl	w9, w11, w19
	lsr	w12, w9, #1
	and	w26, w8, #0xfffffffe
	mov	w8, #255
	lsl	w13, w8, w19
	mul	w8, w11, w11
	lsl	w9, w8, #8
	sub	w8, w9, w8
	add	w24, w12, w8
	mov	w8, #51
	mul	w10, w11, w8
	mov	w8, #-153
	mul	w27, w11, w8
	lsl	w8, w11, #8
	sub	w9, w8, w11
	stp	w9, w10, [sp, #12]              ; 8-byte Folded Spill
	sub	w16, w11, w8
	str	w11, [sp, #52]                  ; 4-byte Folded Spill
	str	w12, [sp, #20]                  ; 4-byte Folded Spill
	madd	w8, w11, w13, w12
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	mov	x28, x24
	stp	x23, x22, [sp, #32]             ; 16-byte Folded Spill
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	mov	w20, #0
	ldp	w9, w8, [sp, #52]               ; 8-byte Folded Reload
	sub	w8, w9, w8
	lsl	w9, w8, #8
	sub	w8, w9, w8
	lsl	w8, w8, w19
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	add	w8, w8, w9
	lsr	w8, w8, w26
	str	w8, [sp, #48]                   ; 4-byte Folded Spill
	ldr	w21, [sp, #8]                   ; 4-byte Folded Reload
	stp	w28, w24, [sp, #24]             ; 8-byte Folded Spill
LBB0_13:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	w8, w20, w19
	ldr	w9, [sp, #56]                   ; 4-byte Folded Reload
	add	w8, w8, w9
	str	w8, [sp, #60]
	ldr	w8, [sp, #60]
	add	x0, x8, x22
	lsr	w3, w24, w26
	ldr	w8, [sp, #60]
	add	x1, x8, x23
	lsr	w4, w21, w26
	lsr	w5, w28, w26
	ldr	w2, [sp, #48]                   ; 4-byte Folded Reload
	mov	x6, x25
	mov	x22, x13
	mov	x23, x16
	bl	_set_color
	mov	x16, x23
	mov	x13, x22
	ldp	x23, x22, [sp, #32]             ; 16-byte Folded Reload
	add	w20, w20, #1
	add	w28, w28, w27
	add	w24, w24, w16
	sub	w21, w21, w13
	ldr	w8, [sp, #52]                   ; 4-byte Folded Reload
	cmp	w8, w20
	b.ne	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #56]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	ldp	w28, w24, [sp, #24]             ; 8-byte Folded Reload
	sub	w28, w28, w9
	sub	w27, w27, #51
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	sub	w24, w24, w9
	add	w16, w16, #510
	str	w8, [sp, #56]                   ; 4-byte Folded Spill
	ldr	w9, [sp, #52]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.15:
	ldr	w8, [sp, #60]
	add	w0, w8, #1
	b	LBB0_10
LBB0_16:
Lloh2:
	adrp	x9, _stderr@GOTPAGE
Lloh3:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x9]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x8
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"makepng: --colors=...: invalid count %u\n"

	.no_dead_strip	_generate_palette
.subsections_via_symbols
