	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ztest_rll_lock
_ztest_rll_lock:                        ## @ztest_rll_lock
	.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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_mutex_enter
	movq	_RL_READER@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_1
## %bb.5:
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.6:
	leaq	16(%rbx), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cv_wait
	cmpq	$0, 8(%rbx)
	jne	LBB0_7
LBB0_8:
	incq	24(%rbx)
	jmp	LBB0_10
LBB0_1:
	leaq	16(%rbx), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cv_wait
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rbx)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 24(%rbx)
	jne	LBB0_4
## %bb.9:
	movq	_curthread@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_10:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_exit                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RL_READER,8,3                  ## @RL_READER
	.comm	_curthread,8,3                  ## @curthread
	.no_dead_strip	_ztest_rll_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ztest_rll_lock
_ztest_rll_lock:                        ; @ztest_rll_lock
	.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	x20, x1
	mov	x19, x0
	bl	_mutex_enter
Lloh0:
	adrp	x8, _RL_READER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RL_READER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.2:
	add	x20, x19, #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_cv_wait
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_3
LBB0_4:
	ldr	x8, [x19, #24]
	add	x8, x8, #1
	str	x8, [x19, #24]
	b	LBB0_10
LBB0_5:
	add	x20, x19, #16
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_cv_wait
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_6
; %bb.9:
Lloh3:
	adrp	x8, _curthread@GOTPAGE
Lloh4:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RL_READER,8,3                  ; @RL_READER
	.comm	_curthread,8,3                  ; @curthread
	.no_dead_strip	_ztest_rll_lock
.subsections_via_symbols
