	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grapheme_strrpos_ascii         ## -- Begin function grapheme_strrpos_ascii
	.p2align	4, 0x90
_grapheme_strrpos_ascii:                ## @grapheme_strrpos_ascii
	.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	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	testq	%r8, %r8
	js	LBB0_2
## %bb.1:
	addq	%r14, %rbx
	addq	%r8, %r14
	subq	%r13, %rbx
	jmp	LBB0_5
LBB0_2:
	movq	%r8, %rax
	negq	%rax
	addq	%r14, %rbx
	cmpq	%r13, %rax
	jae	LBB0_4
## %bb.3:
	subq	%r13, %rbx
	jmp	LBB0_5
LBB0_4:
	addq	%r8, %rbx
LBB0_5:
	movl	$-1, %eax
	cmpq	$1, %r13
	jne	LBB0_6
## %bb.10:
	cmpq	%r14, %rbx
	jb	LBB0_17
## %bb.11:
	movb	(%r12), %cl
	xorl	%edx, %edx
	testq	%r8, %r8
	cmovgq	%r8, %rdx
	addl	%ebx, %edx
	subl	%r14d, %edx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpb	%cl, (%rbx)
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	decq	%rbx
	decl	%edx
	cmpq	%r14, %rbx
	jae	LBB0_12
	jmp	LBB0_17
LBB0_6:
	cmpq	%r14, %rbx
	jb	LBB0_17
## %bb.7:
	xorl	%r15d, %r15d
	testq	%r8, %r8
	cmovgq	%r8, %r15
	addl	%ebx, %r15d
	subl	%r14d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	decq	%rbx
	decl	%r15d
	cmpq	%r14, %rbx
	jae	LBB0_8
## %bb.16:
	movl	$-1, %eax
	jmp	LBB0_17
LBB0_13:
	movl	%edx, %eax
	jmp	LBB0_17
LBB0_9:
	movl	%r15d, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grapheme_strrpos_ascii         ; -- Begin function grapheme_strrpos_ascii
	.p2align	2
_grapheme_strrpos_ascii:                ; @grapheme_strrpos_ascii
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	add	x8, x0, x1
	add	x9, x8, x4
	sub	x8, x8, x3
	neg	x10, x4
	cmp	x10, x3
	csel	x9, x9, x8, hs
	add	x10, x0, x4
	tst	x4, #0x8000000000000000
	csel	x23, x0, x10, ne
	csel	x19, x9, x8, ne
	cmp	x3, #1
	b.ne	LBB0_5
; %bb.1:
	cmp	x19, x23
	b.lo	LBB0_9
; %bb.2:
	ldrb	w8, [x21]
	cmp	x4, #0
	csel	x9, x4, xzr, gt
	add	w9, w19, w9
	sub	w20, w9, w23
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x19]
	cmp	w9, w8
	b.eq	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x19, x19, #1
	sub	w20, w20, #1
	cmp	x19, x23
	b.hs	LBB0_3
	b	LBB0_9
LBB0_5:
	cmp	x19, x23
	b.lo	LBB0_9
; %bb.6:
	mov	x22, x3
	cmp	x4, #0
	csel	x8, x4, xzr, gt
	add	w8, w19, w8
	sub	w20, w8, w23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_memcmp
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	sub	x19, x19, #1
	sub	w20, w20, #1
	cmp	x19, x23
	b.hs	LBB0_7
LBB0_9:
	mov	w20, #-1
LBB0_10:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
