	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xo_set_color_map
_xo_set_color_map:                      ## @xo_set_color_map
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_xo_text_only
	testq	%rax, %rax
	jne	LBB0_30
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_strlen
	incl	%eax
	cltq
	jmp	LBB0_4
LBB0_2:
	xorl	%eax, %eax
LBB0_4:
	addq	%rbx, %rax
	decq	%rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %r13d
	movq	_XO_NUM_COLORS@GOTPCREL(%rip), %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	testl	%ebx, %ebx
	movl	%r13d, %eax
	cmovnsl	%ebx, %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%r13,4)
	movq	_XO_NUM_COLORS@GOTPCREL(%rip), %r15
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r13d, %eax
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r14), %rcx
	movl	%eax, (%rcx,%r13,4)
	leaq	1(%r13), %rax
	movslq	(%r15), %rcx
	movq	%r12, %rbx
	cmpq	%rcx, %r13
	movq	%rax, %r13
	jge	LBB0_23
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$0, (%rbx)
	je	LBB0_24
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	jae	LBB0_24
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	movl	$43, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r12
	incq	%r12
	movb	$0, (%rax)
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r12d, %r12d
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r15
	incq	%r15
	movb	$0, (%rax)
	cmpb	$0, (%rbx)
	je	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_xo_color_find
	movl	%eax, %ebx
	testq	%r15, %r15
	jne	LBB0_18
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r15d, %r15d
	cmpb	$0, (%rbx)
	jne	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$-1, %ebx
	testq	%r15, %r15
	je	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$0, (%r15)
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	callq	_xo_color_find
	testl	%ebx, %ebx
	movl	%r13d, %ecx
	cmovnsl	%ebx, %ecx
	movq	(%r14), %rdx
	movl	%ecx, (%rdx,%r13,4)
	testl	%eax, %eax
	movq	_XO_NUM_COLORS@GOTPCREL(%rip), %r15
	jns	LBB0_22
	jmp	LBB0_21
LBB0_24:
	cmpl	$2, %r13d
	jae	LBB0_25
## %bb.26:
	movq	_XOF_COLOR_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_XOF_CLEAR
	cmpl	(%r15), %r13d
	jl	LBB0_28
	jmp	LBB0_30
LBB0_23:
	movl	%eax, %r13d
LBB0_25:
	movq	_XOF_COLOR_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_XOF_SET
	cmpl	(%r15), %r13d
	jge	LBB0_30
LBB0_28:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movslq	%r13d, %rdx
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, (%rcx,%rdx,4)
	movl	%edx, (%rax,%rdx,4)
	incq	%rdx
	movslq	(%r15), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_29
LBB0_30:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XO_NUM_COLORS,4,2              ## @XO_NUM_COLORS
	.comm	_XOF_COLOR_MAP,4,2              ## @XOF_COLOR_MAP
	.no_dead_strip	_xo_set_color_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xo_set_color_map
_xo_set_color_map:                      ; @xo_set_color_map
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_xo_text_only
	cbnz	x0, LBB0_26
; %bb.1:
	cbz	x20, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_strlen
	add	w8, w0, #1
	sxtw	x8, w8
	b	LBB0_4
LBB0_3:
	mov	x8, #0
LBB0_4:
	add	x8, x20, x8
	sub	x25, x8, #1
	mov	w24, #1
Lloh0:
	adrp	x23, _XO_NUM_COLORS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _XO_NUM_COLORS@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	cmp	w20, #0
	csel	w8, w24, w20, lt
	ldr	x9, [x19]
	str	w8, [x9, x24, lsl #2]
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x24
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19, #8]
	str	w0, [x8, x24, lsl #2]
	add	x8, x24, #1
	ldrsw	x9, [x23]
	mov	x20, x21
	cmp	x24, x9
	mov	x24, x8
	b.ge	LBB0_21
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x20, LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldrb	w8, [x20]
	cmp	w8, #0
	ccmp	x20, x25, #2, ne
	b.hs	LBB0_19
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	w1, #43
	bl	_strchr
	mov	x21, x0
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	strb	wzr, [x21], #1
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	w1, #47
	bl	_strchr
	mov	x22, x0
	cbz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	strb	wzr, [x22], #1
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	ldrb	w8, [x20]
	cbz	w8, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	bl	_xo_color_find
	mov	x20, x0
	cbnz	x22, LBB0_17
	b	LBB0_5
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w20, #-1
	cbz	x22, LBB0_5
LBB0_17:                                ;   in Loop: Header=BB0_8 Depth=1
	ldrb	w8, [x22]
	cbz	w8, LBB0_5
; %bb.18:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x22
	bl	_xo_color_find
	cmp	w20, #0
	csel	w8, w24, w20, lt
	ldr	x9, [x19]
	str	w8, [x9, x24, lsl #2]
	tbz	w0, #31, LBB0_7
	b	LBB0_6
LBB0_19:
	cmp	w24, #2
	b.hs	LBB0_22
; %bb.20:
Lloh2:
	adrp	x8, _XOF_COLOR_MAP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XOF_COLOR_MAP@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_XOF_CLEAR
	b	LBB0_23
LBB0_21:
	mov	x24, x8
LBB0_22:
Lloh5:
	adrp	x8, _XOF_COLOR_MAP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XOF_COLOR_MAP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_XOF_SET
LBB0_23:
	ldr	w8, [x23]
	cmp	w24, w8
	b.ge	LBB0_26
; %bb.24:
	ldp	x9, x8, [x19]
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	sxtw	x10, w24
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	lsl	x11, x10, #2
	str	w10, [x8, x11]
	str	w10, [x9, x11]
	add	x10, x10, #1
	ldrsw	x11, [x23]
	cmp	x10, x11
	b.lt	LBB0_25
LBB0_26:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_XO_NUM_COLORS,4,2              ; @XO_NUM_COLORS
	.comm	_XOF_COLOR_MAP,4,2              ; @XOF_COLOR_MAP
	.no_dead_strip	_xo_set_color_map
.subsections_via_symbols
