	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pte_cond_unblock
_pte_cond_unblock:                      ## @pte_cond_unblock
	.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
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_8
## %bb.2:
	movq	_PTHREAD_COND_INITIALIZER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_11
## %bb.3:
	movl	%esi, %r15d
	leaq	16(%r13), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movl	(%r13), %eax
	movl	4(%r13), %r12d
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.6:
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.7:
	addl	%r12d, %eax
	movl	%eax, (%r13)
LBB0_22:
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_12:
	cmpl	8(%r13), %r12d
	jle	LBB0_15
## %bb.13:
	leaq	20(%r13), %rdi
	callq	_sem_wait
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_10
LBB0_15:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
LBB0_16:
	incl	%eax
	movl	%eax, (%r13)
	decl	%r12d
	movl	%r12d, %eax
LBB0_17:
	movl	$1, %r12d
LBB0_23:
	movl	%eax, 4(%r13)
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.24:
	addq	$12, %r13
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_sem_post_multiple
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_10
## %bb.25:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_18:
	movl	8(%r13), %eax
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	subl	%eax, 4(%r13)
	movl	$0, 8(%r13)
LBB0_20:
	testl	%r15d, %r15d
	je	LBB0_26
## %bb.21:
	movl	4(%r13), %r12d
	movl	%r12d, (%r13)
	jmp	LBB0_22
LBB0_26:
	movl	$1, (%r13)
	movl	4(%r13), %eax
	decl	%eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_COND_INITIALIZER,8,3   ## @PTHREAD_COND_INITIALIZER
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_pte_cond_unblock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pte_cond_unblock
_pte_cond_unblock:                      ; @pte_cond_unblock
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_8
; %bb.1:
	ldr	x23, [x0]
	cbz	x23, LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, _PTHREAD_COND_INITIALIZER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_COND_INITIALIZER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x23, x8
	b.eq	LBB0_10
; %bb.3:
	mov	x21, x1
	add	x19, x23, #16
	mov	x0, x19
	bl	_pthread_mutex_lock
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.4:
	ldp	w9, w20, [x23]
	cbz	w9, LBB0_11
; %bb.5:
	cbz	w20, LBB0_14
; %bb.6:
	cbz	w21, LBB0_15
; %bb.7:
	mov	w8, #0
	add	w9, w20, w9
	str	w9, [x23]
	b	LBB0_21
LBB0_8:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
LBB0_9:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w22, #0
	b	LBB0_9
LBB0_11:
	ldr	w8, [x23, #8]
	cmp	w20, w8
	b.le	LBB0_14
; %bb.12:
	add	x0, x23, #20
	bl	_sem_wait
	cbz	x0, LBB0_16
; %bb.13:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_pthread_mutex_unlock
	b	LBB0_9
LBB0_14:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_pthread_mutex_unlock
LBB0_15:
	add	w8, w9, #1
	str	w8, [x23]
	sub	w8, w20, #1
	mov	w20, #1
	b	LBB0_21
LBB0_16:
	ldr	w8, [x23, #8]
	cbz	w8, LBB0_18
; %bb.17:
	ldr	w9, [x23, #4]
	sub	w8, w9, w8
	stp	w8, wzr, [x23, #4]
LBB0_18:
	cbz	w21, LBB0_20
; %bb.19:
	mov	w8, #0
	ldr	w20, [x23, #4]
	str	w20, [x23]
	b	LBB0_21
LBB0_20:
	mov	w20, #1
	str	w20, [x23]
	ldr	w8, [x23, #4]
	sub	w8, w8, #1
LBB0_21:
	str	w8, [x23, #4]
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.22:
	add	x0, x23, #12
	mov	x1, x20
	bl	_sem_post_multiple
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w22, wzr, w8, eq
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_COND_INITIALIZER,8,3   ; @PTHREAD_COND_INITIALIZER
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_pte_cond_unblock
.subsections_via_symbols
