	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_color                      ## -- Begin function set_color
	.p2align	4, 0x90
_set_color:                             ## @set_color
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_write_only@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_index_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
LBB0_2:
	movslq	(%r14), %r12
	movq	_LEV_LOGS_SET_COLOR@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	subq	%rax, %r12
	movq	8(%r14), %r15
	testl	%r12d, %r12d
	setns	%al
	movq	_FN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	movl	16(%r14), %ebx
	setl	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	jle	LBB0_13
## %bb.3:
	xorl	%r13d, %r13d
	leaq	(,%r12,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_color_int@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	-48(%rbp), %rdi                 ## 8-byte Folded Reload
	leaq	(%r15,%r13), %rsi
	callq	_map_int_int_add
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, (%rax)
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	cmpq	%r13, -56(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_get_color
	movl	%eax, %ebx
	andl	20(%r14), %ebx
	xorl	24(%r14), %ebx
	movq	_std_t@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r12,8), %rax
	je	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_color_ll@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	-48(%rbp), %rdi                 ## 8-byte Folded Reload
	leaq	(%r15,%r13), %rsi
	callq	_map_ll_int_add
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_color_ll@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	-48(%rbp), %rdi                 ## 8-byte Folded Reload
	leaq	(%r15,%r13), %rsi
	callq	_map_ll_int_del
	jmp	LBB0_12
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_color_int@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	-48(%rbp), %rdi                 ## 8-byte Folded Reload
	leaq	(%r15,%r13), %rsi
	callq	_map_int_int_del
	jmp	LBB0_12
LBB0_13:
	movl	$1, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_write_only,4,2                 ## @write_only
	.comm	_index_mode,8,3                 ## @index_mode
	.comm	_LEV_LOGS_SET_COLOR,4,2         ## @LEV_LOGS_SET_COLOR
	.comm	_FN,4,2                         ## @FN
	.comm	_std_t,8,3                      ## @std_t
	.comm	_color_ll,8,3                   ## @color_ll
	.comm	_color_int,8,3                  ## @color_int
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_color                      ; -- Begin function set_color
	.p2align	2
_set_color:                             ; @set_color
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _write_only@GOTPAGE
Lloh1:
	ldr	x8, [x8, _write_only@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _index_mode@GOTPAGE
Lloh4:
	ldr	x9, [x9, _index_mode@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	w8, #0
	ccmp	x9, #0, #0, ne
	b.eq	LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh6:
	adrp	x9, _LEV_LOGS_SET_COLOR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LEV_LOGS_SET_COLOR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sub	w20, w8, w9
	ldr	x21, [x0, #8]
	ldr	w22, [x0, #16]
	cmp	w20, #0
Lloh9:
	adrp	x8, _FN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ccmp	w20, w8, #0, ge
	cset	w0, lt
	bl	_assert
	cmp	w22, #1
	b.lt	LBB0_12
; %bb.2:
	mov	x23, #0
	sxtw	x24, w20
Lloh12:
	adrp	x25, _std_t@GOTPAGE
Lloh13:
	ldr	x25, [x25, _std_t@GOTPAGEOFF]
Lloh14:
	adrp	x26, _color_int@GOTPAGE
Lloh15:
	ldr	x26, [x26, _color_int@GOTPAGEOFF]
Lloh16:
	adrp	x27, _color_ll@GOTPAGE
Lloh17:
	ldr	x27, [x27, _color_ll@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26]
	add	x0, x8, x24, lsl #2
	add	x1, x21, x23
	bl	_map_int_int_add
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w28, [x0]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	cmp	x22, x23
	b.eq	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_get_color
	ldp	w8, w9, [x19, #20]
	and	w10, w8, w0
	ldr	x8, [x25]
	ldr	x8, [x8, x24, lsl #3]
	eor	w28, w10, w9
	cbz	w28, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x27]
	add	x0, x8, x24, lsl #2
	add	x1, x21, x23
	bl	_map_ll_int_add
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x27]
	add	x0, x8, x24, lsl #2
	add	x1, x21, x23
	bl	_map_ll_int_del
	b	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26]
	add	x0, x8, x24, lsl #2
	add	x1, x21, x23
	bl	_map_int_int_del
	b	LBB0_5
LBB0_12:
	mov	w0, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_write_only,4,2                 ; @write_only
	.comm	_index_mode,8,3                 ; @index_mode
	.comm	_LEV_LOGS_SET_COLOR,4,2         ; @LEV_LOGS_SET_COLOR
	.comm	_FN,4,2                         ; @FN
	.comm	_std_t,8,3                      ; @std_t
	.comm	_color_ll,8,3                   ; @color_ll
	.comm	_color_int,8,3                  ; @color_int
.subsections_via_symbols
