	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_on_ctr_state
_wait_on_ctr_state:                     ## @wait_on_ctr_state
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	movq	%rbx, %rdi
	callq	_capi_ctr_get
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r12
	movq	%rax, %r14
	addq	$4, %r14
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_prepare_to_wait
	movl	(%r12), %eax
	xorl	%ebx, %ebx
	cmpl	%r15d, %eax
	je	LBB0_9
## %bb.2:
	movq	_capi_controller_lock@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_CAPI_CTR_DETACHED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_schedule
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_prepare_to_wait
	movl	(%r12), %eax
	cmpl	%r15d, %eax
	jne	LBB0_3
	jmp	LBB0_9
LBB0_11:
	movq	_ESRCH@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movq	_ESRCH@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	movq	_EINTR@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_finish_wait
	movq	%r12, %rdi
	callq	_capi_ctr_put
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_ESRCH,4,2                      ## @ESRCH
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_CAPI_CTR_DETACHED,4,2          ## @CAPI_CTR_DETACHED
	.comm	_current,4,2                    ## @current
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_capi_controller_lock,4,2       ## @capi_controller_lock
	.no_dead_strip	_wait_on_ctr_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_on_ctr_state
_wait_on_ctr_state:                     ; @wait_on_ctr_state
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DEFINE_WAIT
	mov	x0, x19
	bl	_capi_ctr_get
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	add	x20, x0, #4
Lloh3:
	adrp	x24, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh5:
	adrp	x1, _wait@GOTPAGE
Lloh6:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x20
	bl	_prepare_to_wait
	ldr	w8, [x19]
	cmp	w8, w21
	b.eq	LBB0_6
; %bb.2:
Lloh7:
	adrp	x25, _CAPI_CTR_DETACHED@GOTPAGE
Lloh8:
	ldr	x25, [x25, _CAPI_CTR_DETACHED@GOTPAGEOFF]
Lloh9:
	adrp	x26, _current@GOTPAGE
Lloh10:
	ldr	x26, [x26, _current@GOTPAGEOFF]
Lloh11:
	adrp	x22, _capi_controller_lock@GOTPAGE
Lloh12:
	ldr	x22, [x22, _capi_controller_lock@GOTPAGEOFF]
Lloh13:
	adrp	x23, _wait@GOTPAGE
Lloh14:
	ldr	x23, [x23, _wait@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x25]
	cmp	w8, w9
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x26]
	bl	_signal_pending
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_mutex_unlock
	bl	_schedule
	mov	x0, x22
	bl	_mutex_lock
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x23
	bl	_prepare_to_wait
	ldr	w8, [x19]
	cmp	w8, w21
	b.ne	LBB0_3
LBB0_6:
	mov	w21, #0
	b	LBB0_11
LBB0_7:
Lloh15:
	adrp	x8, _ESRCH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_8:
Lloh18:
	adrp	x8, _ESRCH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh20:
	adrp	x8, _EINTR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
Lloh22:
	adrp	x1, _wait@GOTPAGE
Lloh23:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x20
	bl	_finish_wait
	mov	x0, x19
	bl	_capi_ctr_put
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_ESRCH,4,2                      ; @ESRCH
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_CAPI_CTR_DETACHED,4,2          ; @CAPI_CTR_DETACHED
	.comm	_current,4,2                    ; @current
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_capi_controller_lock,4,2       ; @capi_controller_lock
	.no_dead_strip	_wait_on_ctr_state
.subsections_via_symbols
