	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function render_greyscale
LCPI0_0:
	.quad	0x402499999999999a              ## double 10.300000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_render_greyscale:                      ## @render_greyscale
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	4(%rsi), %eax
	addl	(%rsi), %eax
	addl	8(%rsi), %eax
	cltq
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	addl	%ecx, %eax
	movl	4(%rdx), %ecx
	addl	(%rdx), %ecx
	addl	8(%rdx), %ecx
	movslq	%ecx, %rcx
	imulq	$1431655766, %rcx, %r15         ## imm = 0x55555556
	movq	%r15, %rcx
	shrq	$63, %rcx
	cvtsi2ss	%eax, %xmm0
	shrq	$32, %r15
	addl	%ecx, %r15d
	cvtss2sd	%xmm0, %xmm0
	divsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %edx
	cmpl	$2, %edx
	movl	$1, %ebx
	cmovll	%ebx, %edx
	addl	$231, %edx
	leaq	L_.str(%rip), %r14
	movq	%r14, %rdi
	movl	$48, %esi
	callq	*%r12
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %eax
	cmpl	$2, %eax
	cmovgel	%eax, %ebx
	addl	$231, %ebx
	movq	%r14, %rdi
	movl	$38, %esi
	movl	%ebx, %edx
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\033[%d;5;%dm"

	.no_dead_strip	_render_greyscale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function render_greyscale
_render_greyscale:                      ; @render_greyscale
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldp	w8, w9, [x1]
	ldr	w10, [x1, #8]
	add	w8, w9, w8
	add	w8, w8, w10
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x10, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w10
	ldp	w10, w11, [x2]
	ldr	w12, [x2, #8]
	add	w10, w11, w10
	add	w10, w10, w12
	smull	x9, w10, w9
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w20, w9, w10
	scvtf	s0, w8
	fcvt	d0, s0
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16420, lsl #48
	fmov	d8, x8
	fdiv	d0, d0, d8
	fcvtzs	w8, d0
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	add	w2, w8, #231
Lloh0:
	adrp	x19, l_.str@PAGE
Lloh1:
	add	x19, x19, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #48
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
	blr	x3
	scvtf	s0, w20
	fcvt	d0, s0
	fdiv	d0, d0, d8
	fcvtzs	w8, d0
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	add	w2, w8, #231
	mov	x0, x19
	mov	w1, #38
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #64
	br	x3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\033[%d;5;%dm"

	.no_dead_strip	_render_greyscale
.subsections_via_symbols
