	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rw_exit                        ## -- Begin function rw_exit
	.p2align	4, 0x90
_rw_exit:                               ## @rw_exit
	.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, %rbx
	movq	(%rdi), %rax
	movq	_B_TRUE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_ASSERT
	xorl	%edi, %edi
	cmpq	$-1, 8(%rbx)
	setne	%dil
	callq	_ASSERT
	movq	8(%rbx), %rcx
	movq	_curthread@GOTPCREL(%rip), %rdx
	movl	16(%rbx), %eax
	cmpq	(%rdx), %rcx
	je	LBB0_1
## %bb.2:
	leaq	16(%rbx), %r14
	xorl	%edi, %edi
	testl	%eax, %eax
	setg	%dil
	callq	_ASSERT
	movq	%r14, %rdi
	movl	$-1, %esi
	callq	_atomic_add_int
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
	cmpl	$-1, %eax
	sete	%dil
	callq	_ASSERT
	movl	$0, 16(%rbx)
	movq	$0, 8(%rbx)
LBB0_3:
	addq	$20, %rbx
	movq	%rbx, %rdi
	callq	_rw_unlock
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_VERIFY                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_B_TRUE,8,3                     ## @B_TRUE
	.comm	_curthread,8,3                  ## @curthread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rw_exit                        ; -- Begin function rw_exit
	.p2align	2
_rw_exit:                               ; @rw_exit
	.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, _B_TRUE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _B_TRUE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_ASSERT
	ldr	x8, [x19, #8]
	cmn	x8, #1
	cset	w0, ne
	bl	_ASSERT
Lloh3:
	adrp	x8, _curthread@GOTPAGE
Lloh4:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh5:
	ldr	x10, [x8]
	mov	x20, x19
	ldr	w8, [x20, #16]!
	cmp	x9, x10
	b.eq	LBB0_2
; %bb.1:
	cmp	w8, #0
	cset	w0, gt
	bl	_ASSERT
	mov	x0, x20
	mov	w1, #-1
	bl	_atomic_add_int
	b	LBB0_3
LBB0_2:
	cmn	w8, #1
	cset	w0, eq
	bl	_ASSERT
	str	wzr, [x19, #16]
	str	xzr, [x19, #8]
LBB0_3:
	add	x0, x19, #20
	bl	_rw_unlock
	cmp	x0, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_VERIFY
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_B_TRUE,8,3                     ; @B_TRUE
	.comm	_curthread,8,3                  ; @curthread
.subsections_via_symbols
