	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SV_RankAsciiEncode
_SV_RankAsciiEncode:                    ## @SV_RankAsciiEncode
	.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
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_assert
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.2:
	movl	%ebx, %r8d
	movl	%ebx, %r9d
	leaq	1(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movq	_s_ascii_encoding@GOTPCREL(%rip), %r13
	xorl	%r11d, %r11d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdi, %r11
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	$3, %rsi
	cmpq	%r9, %rsi
	jae	LBB0_21
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	leaq	1(%rsi), %rax
	cmpq	%r9, %rax
	jae	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	(%r12,%rax), %bl
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	2(%rsi), %rax
	cmpq	%r9, %rax
	jae	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	(%r12,%rax), %dil
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%r12,%rsi), %ecx
	movq	%rcx, %r10
	shrq	$2, %r10
	movl	%ebx, %edx
	shrb	$4, %dl
	shlb	$4, %cl
	orb	%dl, %cl
	andb	$63, %cl
	movl	%edi, %edx
	shrb	$6, %dl
	shlb	$2, %bl
	orb	%dl, %bl
	andb	$63, %bl
	andb	$63, %dil
	movb	%cl, -43(%rbp)
	movb	%bl, -42(%rbp)
	movb	%dil, -41(%rbp)
	movl	$4, %ebx
	cmpq	%r9, %rax
	jb	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r8d, %eax
	subl	%esi, %eax
	js	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	shll	$2, %eax
	cltq
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %rcx
	shrq	$32, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %ebx
	incl	%ebx
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r11d, %r11
	movq	(%r13), %rax
	movb	(%rax,%r10), %al
	leaq	1(%r11), %rdi
	movb	%al, (%r15,%r11)
	cmpl	$1, %ebx
	je	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %r14d
	decq	%r14
	movl	$1, %eax
	cmpl	$2, %ebx
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r8d, %r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r11), %rdi
	movq	%r14, %rbx
	andq	$-2, %rbx
	negq	%rbx
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	-44(%rbp,%rax), %edx
	movq	(%r13), %r8
	movzbl	(%r8,%rdx), %edx
	movb	%dl, -1(%rdi,%rax)
	movzbl	-43(%rbp,%rax), %edx
	movq	(%r13), %rcx
	movzbl	(%rcx,%rdx), %ecx
	movb	%cl, (%rdi,%rax)
	leaq	(%rbx,%rax), %rcx
	addq	$2, %rcx
	addq	$2, %rax
	cmpq	$1, %rcx
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %r11
	movq	%r11, %rdi
	movl	%r15d, %r8d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r14b
	je	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	movzbl	-44(%rbp,%rax), %eax
	movq	(%r13), %rcx
	movb	(%rcx,%rax), %al
	movb	%al, (%r15,%rdi)
	incq	%rdi
	jmp	LBB0_19
LBB0_21:
	movb	%r10b, -44(%rbp)
	jmp	LBB0_22
LBB0_1:
	xorl	%r11d, %r11d
LBB0_22:
	movslq	%r11d, %rax
	movb	$0, (%r15,%rax)
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_s_ascii_encoding,8,3           ## @s_ascii_encoding
	.no_dead_strip	_SV_RankAsciiEncode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SV_RankAsciiEncode
_SV_RankAsciiEncode:                    ; @SV_RankAsciiEncode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [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 w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x21, #0
	cset	w0, ne
	bl	_assert
	cmp	w20, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x8, #0
	mov	w0, #0
	mov	w9, w20
	add	x10, sp, #12
	add	x10, x10, #1
Lloh0:
	adrp	x11, _s_ascii_encoding@GOTPAGE
Lloh1:
	ldr	x11, [x11, _s_ascii_encoding@GOTPAGEOFF]
	mov	w12, #21846
	movk	w12, #21845, lsl #16
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x14
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x8, #3
	cmp	x8, x9
	b.hs	LBB0_18
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	add	x13, x8, #1
	cmp	x13, x9
	b.hs	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w14, [x21, x13]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w14, #0
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x15, x8, #2
	cmp	x15, x9
	b.hs	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w16, [x21, x15]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w16, #0
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w17, [x21, x8]
	lsr	x13, x17, #2
	lsr	w1, w14, #4
	bfi	w1, w17, #4, #2
	strb	w1, [sp, #13]
	lsr	w17, w16, #6
	bfi	w17, w14, #2, #4
	strb	w17, [sp, #14]
	and	w14, w16, #0x3f
	strb	w14, [sp, #15]
	cmp	x15, x9
	b.hs	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w15, #4
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	subs	w14, w20, w8
	b.mi	LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	lsl	w14, w14, #2
	smull	x14, w14, w12
	lsr	x15, x14, #63
	lsr	x14, x14, #32
	add	w14, w14, w15
	add	w15, w14, #1
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x16, w0
	ldr	x14, [x11]
	ldrb	w17, [x14, x13]
	add	x14, x16, #1
	strb	w17, [x19, x16]
	cmp	w15, #1
	b.eq	LBB0_2
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w15, w15
	sub	x15, x15, #1
	mov	x16, x10
LBB0_17:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w17, [x16], #1
	ldr	x0, [x11]
	ldrb	w17, [x0, x17]
	add	x0, x14, #1
	strb	w17, [x19, x14]
	mov	x14, x0
	subs	x15, x15, #1
	b.ne	LBB0_17
	b	LBB0_3
LBB0_18:
	strb	w13, [sp, #12]
	b	LBB0_20
LBB0_19:
	mov	w0, #0
LBB0_20:
	strb	wzr, [x19, w0, sxtw]
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_s_ascii_encoding,8,3           ; @s_ascii_encoding
	.no_dead_strip	_SV_RankAsciiEncode
.subsections_via_symbols
