	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_find_rpos_global               ## -- Begin function find_rpos_global
	.p2align	4, 0x90
_find_rpos_global:                      ## @find_rpos_global
	.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
	movl	%r8d, %ebx
	testl	%r8d, %r8d
	jle	LBB0_6
## %bb.1:
	movq	8(%r14), %r9
	movq	16(%r14), %rdx
	movl	$-1, %edi
	movl	%r8d, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %eax
	subl	%edi, %eax
	cmpl	$1, %eax
	jle	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rdi,%rbx), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movslq	%eax, %rcx
	movq	(%r9,%rcx,8), %rcx
	cmpq	%rsi, (%rdx,%rcx,8)
	jge	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %edi
	jmp	LBB0_5
LBB0_6:
	cmpl	%r8d, %ebx
	setle	%al
	testl	%ebx, %ebx
	setns	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movl	(%r14), %eax
	subl	%ebx, %eax
	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_global               ; -- Begin function find_rpos_global
	.p2align	2
_find_rpos_global:                      ; @find_rpos_global
	.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]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	ldp	x10, x9, [x19, #8]
	mov	w11, #-1
	mov	x20, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w12, w11, w20
	cmp	w12, #0
	cinc	w12, w12, lt
	asr	w12, w12, #1
	ldr	x13, [x10, w12, sxtw #3]
	ldr	x13, [x9, x13, lsl #3]
	cmp	x13, x1
	csel	w20, w20, w12, lt
	csel	w11, w12, w11, lt
	sub	w12, w20, w11
	cmp	w12, #1
	b.gt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x20, x8
LBB0_4:
	cmp	w20, #0
	ccmp	w20, w8, #0, ge
	cset	w0, le
	bl	_assert
	ldr	w8, [x19]
	sub	w0, w8, w20
	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
