	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rid_alloc
_rid_alloc:                             ## @rid_alloc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_nrids@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.4:
	movq	_ridtbl@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$-1, (%rcx,%rbx,4)
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_5
## %bb.7:
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
LBB0_2:
	cmpl	%eax, %ebx
	jne	LBB0_3
LBB0_8:
	leal	1(%rax), %ecx
	movl	%ecx, (%r14)
	movq	_ridtbl@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	leal	4(,%rax,4), %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, (%r15)
	jmp	LBB0_11
LBB0_3:
	movq	_ridtbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_11:
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edx
	movl	%ecx, (%rax,%rdx,4)
	jmp	LBB0_12
LBB0_9:
	decl	(%r14)
	movl	$-1, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nrids,4,2                      ## @nrids
	.comm	_ridtbl,8,3                     ## @ridtbl
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_rid_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rid_alloc
_rid_alloc:                             ; @rid_alloc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x20, _nrids@GOTPAGE
Lloh1:
	ldr	x20, [x20, _nrids@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x21, _ridtbl@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ridtbl@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, #0
	ldr	x9, [x21]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9, x19, lsl #2]
	cmn	w10, #1
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x19, #1
	cmp	x8, x19
	b.ne	LBB0_2
; %bb.4:
	mov	x19, x8
	b	LBB0_7
LBB0_5:
	mov	w19, #0
LBB0_6:
	cmp	w19, w8
	b.ne	LBB0_9
LBB0_7:
	add	w8, w8, #1
	str	w8, [x20]
	ldr	x0, [x21]
	lsl	w1, w8, #2
	bl	_realloc
	cbz	x0, LBB0_11
; %bb.8:
	str	x0, [x21]
	b	LBB0_10
LBB0_9:
	ldr	x0, [x21]
LBB0_10:
Lloh4:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x0, w19, uxtw #2]
	b	LBB0_12
LBB0_11:
	ldr	w8, [x20]
	sub	w8, w8, #1
	str	w8, [x20]
	mov	w19, #-1
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_nrids,4,2                      ; @nrids
	.comm	_ridtbl,8,3                     ; @ridtbl
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_rid_alloc
.subsections_via_symbols
