	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_find_rpos                      ## -- Begin function find_rpos
	.p2align	4, 0x90
_find_rpos:                             ## @find_rpos
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %r8d
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movl	%r8d, %ebx
	testl	%r8d, %r8d
	jle	LBB0_9
## %bb.5:
	movl	$-1, %edx
	movl	%r8d, %edi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %ecx
	subl	%edx, %ecx
	movl	%ebx, %edi
	cmpl	$1, %ecx
	jle	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rdi,%rdx), %ecx
	movl	%ecx, %ebx
	shrl	$31, %ebx
	addl	%ecx, %ebx
	sarl	%ebx
	movslq	%ebx, %rcx
	cmpl	%esi, (%rax,%rcx,4)
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %edx
	movl	%edi, %ebx
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
	cmpl	%esi, 16(%r14)
	jl	LBB0_10
## %bb.2:
	movl	$-2, %eax
	testl	%r8d, %r8d
	jne	LBB0_10
## %bb.3:
	xorl	%ebx, %ebx
LBB0_9:
	cmpl	%r8d, %ebx
	setle	%al
	testl	%ebx, %ebx
	setns	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movl	(%r14), %eax
	subl	%ebx, %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	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	_find_rpos                      ; -- Begin function find_rpos
	.p2align	2
_find_rpos:                             ; @find_rpos
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	ldr	x9, [x0, #8]
	cbz	x9, LBB0_4
; %bb.1:
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	w10, #-1
	mov	x20, x8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w20, w10
	cmp	w11, #0
	cinc	w11, w11, lt
	asr	w11, w11, #1
	ldr	w12, [x9, w11, sxtw #2]
	cmp	w12, w1
	csel	w10, w11, w10, lt
	csel	w20, w20, w11, lt
	sub	w11, w20, w10
	cmp	w11, #1
	b.gt	LBB0_3
	b	LBB0_10
LBB0_4:
	ldr	w9, [x19, #16]
	cmp	w9, w1
	b.ge	LBB0_7
; %bb.5:
	mov	w0, #0
	b	LBB0_11
LBB0_6:
	mov	x20, x8
	b	LBB0_10
LBB0_7:
	cbz	w8, LBB0_9
; %bb.8:
	mov	w0, #-2
	b	LBB0_11
LBB0_9:
	mov	w20, #0
LBB0_10:
	cmp	w20, #0
	ccmp	w20, w8, #0, ge
	cset	w0, le
	bl	_assert
	ldr	w8, [x19]
	sub	w0, w8, w20
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
