	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r_cons_rgb_gen
_r_cons_rgb_gen:                        ## @r_cons_rgb_gen
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rax
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	_ALPHA_BG@GOTPCREL(%rip), %rcx
	cmpq	%r8, (%rcx)
	movl	$48, %ecx
	movl	$38, %r15d
	cmoveq	%rcx, %r15
	cmpq	$3, %rdx
	ja	LBB0_2
## %bb.1:
	testq	%r14, %r14
	jne	LBB0_29
	jmp	LBB0_30
LBB0_2:
	movw	$23323, (%rbx)                  ## imm = 0x5B1B
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	$6, %esi
	movabsq	$228458640180, %r8              ## imm = 0x3531323334
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movb	$59, -3(%rbx,%rsi)
	leaq	-1(%rax), %rcx
	addq	$2, %rsi
	andq	%rcx, %rax
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, %rsi
	ja	LBB0_29
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rcx
	negq	%rcx
	andq	%rax, %rcx
	addq	$-128, %rcx
	cmpq	$4, %rcx
	ja	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	shll	$3, %ecx
	movq	%r8, %rdx
                                        ## kill: def $cl killed $cl killed $rcx
	shrq	%cl, %rdx
	movb	%dl, -4(%rbx,%rsi)
	jmp	LBB0_8
LBB0_3:
	movl	$2, %esi
	jmp	LBB0_10
LBB0_9:
	addq	$-4, %rsi
LBB0_10:
	movq	24(%rbp), %rcx
	movq	16(%rbp), %r10
	cmpl	$135, %edi
	je	LBB0_15
## %bb.11:
	cmpl	$134, %edi
	je	LBB0_14
## %bb.12:
	cmpl	$133, %edi
	jne	LBB0_29
## %bb.13:
	leaq	(%rbx,%rsi), %r12
	subq	%rsi, %r14
	movq	%r9, %rdi
	movq	%r10, %rsi
	movq	%rcx, %rdx
	callq	_rgb
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_snprintf
	testl	%eax, %eax
	jns	LBB0_28
	jmp	LBB0_29
LBB0_15:
	movl	32(%rbp), %edx
	addq	$-8, %r15
	cmpl	$15, %edx
	ja	LBB0_17
## %bb.16:
	movl	%edx, %eax
	andl	$7, %eax
	xorl	%ecx, %ecx
	cmpl	$8, %edx
	movl	$60, %edi
	cmovbq	%rcx, %rdi
	jmp	LBB0_26
LBB0_14:
	leaq	(%rbx,%rsi), %rdi
	subq	%rsi, %r14
	movq	%rcx, (%rsp)
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rsi
	movq	%r15, %rcx
	movq	%r9, %r8
	movq	%r10, %r9
	xorl	%eax, %eax
	callq	_snprintf
	testl	%eax, %eax
	jns	LBB0_28
	jmp	LBB0_29
LBB0_17:
	cmpq	$128, %r9
	jne	LBB0_20
## %bb.18:
	cmpq	$128, %r10
	jne	LBB0_20
## %bb.19:
	movl	$53, %edi
	cmpq	$128, %rcx
	je	LBB0_21
LBB0_20:
	xorl	%edi, %edi
	cmpq	$255, %rcx
	movl	$60, %eax
	cmoveq	%rax, %rdi
	cmpq	$255, %r10
	cmoveq	%rax, %rdi
	cmpq	$255, %r9
	cmoveq	%rax, %rdi
LBB0_21:
	cmpq	%r10, %r9
	jne	LBB0_24
## %bb.22:
	cmpq	%rcx, %r10
	jne	LBB0_24
## %bb.23:
	cmpq	$127, %r9
	setg	%dl
	movl	%edx, %eax
	movl	%edx, %r8d
	jmp	LBB0_25
LBB0_24:
	leaq	(%r10,%r9), %rax
	addq	%rcx, %rax
	movabsq	$6148914691236517206, %rdx      ## imm = 0x5555555555555556
	imulq	%rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	cmpq	%r9, %rax
	setle	%r8b
	cmpq	%r10, %rax
	setle	%dl
	cmpq	%rcx, %rax
	setle	%al
LBB0_25:
	movzbl	%r8b, %r8d
	movzbl	%al, %eax
	leaq	2(,%rax,4), %rcx
	shlq	$2, %rax
	testb	%dl, %dl
	cmovneq	%rcx, %rax
	orq	%r8, %rax
LBB0_26:
	addq	%rdi, %r15
	addq	%rax, %r15
	leaq	(%rbx,%rsi), %rdi
	subq	%rsi, %r14
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rsi
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	testl	%eax, %eax
	js	LBB0_29
LBB0_28:
	movl	%eax, %eax
	cmpq	%rax, %r14
	ja	LBB0_30
LBB0_29:
	movb	$0, (%rbx)
LBB0_30:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ALPHA_BG,8,3                   ## @ALPHA_BG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d;5;%dm"

L_.str.1:                               ## @.str.1
	.asciz	"%d;2;%d;%d;%dm"

L_.str.2:                               ## @.str.2
	.asciz	"%dm"

	.no_dead_strip	_r_cons_rgb_gen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r_cons_rgb_gen
_r_cons_rgb_gen:                        ; @r_cons_rgb_gen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
Lloh0:
	adrp	x8, _ALPHA_BG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ALPHA_BG@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	mov	w9, #38
	mov	w10, #48
	cmp	x8, x4
	csel	x20, x10, x9, eq
	cmp	x2, #3
	b.hi	LBB0_2
; %bb.1:
	cbnz	x2, LBB0_29
	b	LBB0_30
LBB0_2:
	mov	w8, #23323
	strh	w8, [x19]
	cbz	x3, LBB0_8
; %bb.3:
	mov	x8, #0
	mov	x9, #13108
	movk	x9, #12594, lsl #16
	movk	x9, #53, lsl #32
	mov	w10, #59
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x19, x8
	strb	w10, [x11, #3]
	sub	x11, x3, #1
	add	x8, x8, #2
	ands	x3, x11, x3
	b.eq	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x11, x8, #6
	cmp	x11, x2
	b.hi	LBB0_29
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	neg	x11, x3
	and	x11, x3, x11
	sub	x11, x11, #128
	cmp	x11, #4
	b.hi	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ubfiz	x11, x11, #3, #37
	lsr	x11, x9, x11
	add	x12, x19, x8
	strb	w11, [x12, #2]
	b	LBB0_4
LBB0_8:
	mov	w8, #2
	cmp	w0, #135
	b.eq	LBB0_13
LBB0_9:
	cmp	w0, #134
	b.eq	LBB0_15
; %bb.10:
	cmp	w0, #133
	b.ne	LBB0_29
; %bb.11:
	add	x22, x19, x8
	sub	x21, x2, x8
	mov	x0, x5
	mov	x1, x6
	mov	x2, x7
	bl	_rgb
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	b	LBB0_16
LBB0_12:
	add	x8, x8, #2
	cmp	w0, #135
	b.ne	LBB0_9
LBB0_13:
	ldr	w10, [x29, #16]
	sub	x9, x20, #8
	cmp	w10, #15
	b.hi	LBB0_17
; %bb.14:
	and	w11, w10, #0x7
	cmp	w10, #7
	mov	w10, #60
	csel	x10, x10, xzr, hi
	b	LBB0_27
LBB0_15:
	add	x0, x19, x8
	sub	x21, x2, x8
	stp	x6, x7, [sp, #8]
	str	x5, [sp]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_16:
	mov	x1, x21
	mov	x3, x20
	bl	_snprintf
	tbz	w0, #31, LBB0_28
	b	LBB0_29
LBB0_17:
	cmp	x5, #128
	b.ne	LBB0_21
; %bb.18:
	cmp	x6, #128
	b.ne	LBB0_21
; %bb.19:
	cmp	x7, #128
	b.ne	LBB0_21
; %bb.20:
	mov	w10, #53
	b	LBB0_22
LBB0_21:
	cmp	x7, #255
	mov	w10, #255
	ccmp	x6, x10, #4, ne
	ccmp	x5, x10, #4, ne
	mov	w10, #60
	csel	x10, x10, xzr, eq
LBB0_22:
	cmp	x5, x6
	b.ne	LBB0_25
; %bb.23:
	cmp	x6, x7
	b.ne	LBB0_25
; %bb.24:
	cmp	x5, #127
	cset	w11, gt
	mov	x13, x11
	mov	x12, x11
	b	LBB0_26
LBB0_25:
	add	x11, x6, x5
	add	x11, x11, x7
	mov	x12, #6148914691236517205
	movk	x12, #21846
	smulh	x11, x11, x12
	add	x13, x11, x11, lsr #63
	cmp	x13, x5
	cset	w12, le
	cmp	x13, x6
	cset	w11, le
	cmp	x13, x7
	cset	w13, le
LBB0_26:
	mov	w12, w12
	cmp	w13, #0
	mov	w13, #2
	mov	w14, #6
	csel	x13, x14, x13, ne
	mov	w14, #4
	csel	x14, x14, xzr, ne
	cmp	w11, #0
	csel	x11, x13, x14, ne
	orr	x11, x11, x12
LBB0_27:
	add	x0, x19, x8
	sub	x21, x2, x8
	add	x8, x9, x10
	add	x3, x8, x11
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_snprintf
	tbnz	w0, #31, LBB0_29
LBB0_28:
	mov	w8, w0
	cmp	x21, x8
	b.hi	LBB0_30
LBB0_29:
	strb	wzr, [x19]
LBB0_30:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ALPHA_BG,8,3                   ; @ALPHA_BG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d;5;%dm"

l_.str.1:                               ; @.str.1
	.asciz	"%d;2;%d;%d;%dm"

l_.str.2:                               ; @.str.2
	.asciz	"%dm"

	.no_dead_strip	_r_cons_rgb_gen
.subsections_via_symbols
