	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ResourceArrayRemove
_ResourceArrayRemove:                   ## @ResourceArrayRemove
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, -40(%rbp)
	movq	(%rdi), %r12
	xorl	%edi, %edi
	cmpq	%rsi, 8(%r14)
	setne	%dil
	callq	_Assert
	movq	%r14, %rdi
	callq	_RESARRAY_IS_ARRAY
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	16(%r14), %rax
	cmpq	%rax, %r12
	jae	LBB0_7
## %bb.2:
	movq	24(%r14), %rcx
	cmpq	%rbx, (%rcx,%r12,8)
	jne	LBB0_8
## %bb.3:
	movq	-8(%rcx,%rax,8), %rax
	movq	%rax, (%rcx,%r12,8)
	jmp	LBB0_17
LBB0_4:
	movslq	32(%r14), %r15
	cmpq	%r15, %r12
	jae	LBB0_12
## %bb.5:
	movq	24(%r14), %rax
	cmpq	%rbx, (%rax,%r12,8)
	jne	LBB0_12
## %bb.6:
	movq	8(%r14), %rcx
	movq	%rcx, (%rax,%r12,8)
	jmp	LBB0_20
LBB0_7:
	testq	%rax, %rax
	je	LBB0_18
LBB0_8:
	movq	24(%r14), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rcx,%rdx,8)
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_9
LBB0_18:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_12:
	leaq	-40(%rbp), %rdi
	movl	$8, %esi
	callq	_hash_any
	movl	%eax, %edi
	callq	_DatumGetUInt32
	movq	%rax, %rcx
	movslq	32(%r14), %rdx
	xorl	%eax, %eax
	testq	%rdx, %rdx
	je	LBB0_22
## %bb.13:
	decq	%r15
	movq	24(%r14), %rsi
	movq	-40(%rbp), %rdi
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	andq	%r15, %rcx
	cmpq	%rdi, (%rsi,%rcx,8)
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%rcx
	decq	%rdx
	jne	LBB0_14
	jmp	LBB0_22
LBB0_16:
	movq	-8(%rcx,%rax,8), %rax
	movq	%rax, (%rcx,%rdx,8)
LBB0_17:
	movq	16(%r14), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, 16(%r14)
	addq	$-2, %rax
	movq	%rax, (%r14)
	jmp	LBB0_21
LBB0_19:
	movq	8(%r14), %rax
	movq	%rax, (%rsi,%rcx,8)
LBB0_20:
	decq	16(%r14)
LBB0_21:
	movl	$1, %eax
LBB0_22:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ResourceArrayRemove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ResourceArrayRemove
_ResourceArrayRemove:                   ; @ResourceArrayRemove
	.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, x1
	mov	x19, x0
	str	x1, [sp, #8]
	ldp	x21, x8, [x0]
	cmp	x8, x1
	cset	w0, ne
	bl	_Assert
	mov	x0, x19
	bl	_RESARRAY_IS_ARRAY
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #16]
	cmp	x21, x8
	b.hs	LBB0_7
; %bb.2:
	ldr	x9, [x19, #24]
	ldr	x10, [x9, x21, lsl #3]
	cmp	x10, x20
	b.ne	LBB0_8
; %bb.3:
	add	x8, x9, x8, lsl #3
	ldur	x8, [x8, #-8]
	str	x8, [x9, x21, lsl #3]
	b	LBB0_17
LBB0_4:
	ldrsw	x22, [x19, #32]
	cmp	x21, x22
	b.hs	LBB0_11
; %bb.5:
	ldr	x8, [x19, #24]
	ldr	x9, [x8, x21, lsl #3]
	cmp	x9, x20
	b.ne	LBB0_11
; %bb.6:
	ldr	x9, [x19, #8]
	str	x9, [x8, x21, lsl #3]
	b	LBB0_19
LBB0_7:
	cbz	x8, LBB0_15
LBB0_8:
	ldr	x9, [x19, #24]
	mov	x11, x8
	mov	x10, x9
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	cmp	x12, x20
	b.eq	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x10, x10, #8
	subs	x11, x11, #1
	b.ne	LBB0_9
	b	LBB0_15
LBB0_11:
	add	x0, sp, #8
	mov	w1, #8
	bl	_hash_any
	bl	_DatumGetUInt32
	ldrsw	x8, [x19, #32]
	cbz	w8, LBB0_15
; %bb.12:
	sub	x10, x22, #1
	ldr	x9, [x19, #24]
	ldr	x11, [sp, #8]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	and	x12, x0, x10
	ldr	x13, [x9, x12, lsl #3]
	cmp	x13, x11
	b.eq	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x0, x12, #1
	subs	x8, x8, #1
	b.ne	LBB0_13
LBB0_15:
	mov	w0, #0
	b	LBB0_21
LBB0_16:
	add	x8, x9, x8, lsl #3
	ldur	x8, [x8, #-8]
	str	x8, [x10]
LBB0_17:
	ldr	x8, [x19, #16]
	sub	x9, x8, #1
	str	x9, [x19, #16]
	sub	x8, x8, #2
	str	x8, [x19]
	b	LBB0_20
LBB0_18:
	ldr	x8, [x19, #8]
	str	x8, [x9, x12, lsl #3]
LBB0_19:
	ldr	x8, [x19, #16]
	sub	x8, x8, #1
	str	x8, [x19, #16]
LBB0_20:
	mov	w0, #1
LBB0_21:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ResourceArrayRemove
.subsections_via_symbols
