	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rwm_check                      ## -- Begin function rwm_check
	.p2align	4, 0x90
_rwm_check:                             ## @rwm_check
	.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
	movq	(%rdi), %rax
	movq	_RM_INIT_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_RM_TMP_MAGIC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	32(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.1:
	movq	24(%r14), %rax
	leaq	16(%r14), %rsi
	xorl	%r8d, %r8d
	xorl	%ebx, %ebx
	movq	%rdx, %rdi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, %rdi
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdx, %rdi
	movq	%rdi, %rcx
	cmoveq	%rsi, %rcx
	addl	(%rdi), %ebx
	addl	4(%rdi), %ebx
	subl	(%rcx), %ebx
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
	jmp	LBB0_5
LBB0_7:
	movl	8(%r14), %ebx
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	cmpq	%rdx, %rax
	cmovneq	%rax, %rsi
	addl	12(%r14), %ebx
	subl	(%rsi), %ebx
	movq	%rax, %r8
LBB0_5:
	xorl	%edi, %edi
	cmpq	%rax, %r8
	sete	%dil
	callq	_assert
	movl	8(%r14), %eax
LBB0_6:
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	sete	%dil
	callq	_assert
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RM_INIT_MAGIC,8,3              ## @RM_INIT_MAGIC
	.comm	_RM_TMP_MAGIC,8,3               ## @RM_TMP_MAGIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rwm_check                      ; -- Begin function rwm_check
	.p2align	2
_rwm_check:                             ; @rwm_check
	.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	x8, [x0]
Lloh0:
	adrp	x9, _RM_INIT_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RM_INIT_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x9, _RM_TMP_MAGIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RM_TMP_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_5
; %bb.1:
	mov	w20, #0
	ldr	x8, [x19, #24]
	add	x10, x19, #16
	mov	x11, x9
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x11, x8
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w12, w13, [x11]
	cmp	x11, x9
	csel	x14, x10, x11, eq
	ldr	w14, [x14]
	add	w12, w12, w20
	add	w12, w12, w13
	sub	w20, w12, w14
	ldr	x11, [x11, #8]
	cbnz	x11, LBB0_2
; %bb.4:
	mov	x9, #0
	b	LBB0_7
LBB0_5:
	mov	w8, #0
	ldr	w20, [x19, #8]
	b	LBB0_8
LBB0_6:
	ldr	w11, [x19, #12]
	cmp	x8, x9
	csel	x9, x10, x8, eq
	ldr	w9, [x9]
	add	w10, w11, w20
	sub	w20, w10, w9
	mov	x9, x8
LBB0_7:
	cmp	x9, x8
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #8]
LBB0_8:
	cmp	w20, w8
	cset	w0, eq
	bl	_assert
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RM_INIT_MAGIC,8,3              ; @RM_INIT_MAGIC
	.comm	_RM_TMP_MAGIC,8,3               ; @RM_TMP_MAGIC
.subsections_via_symbols
