	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pte_cancellable_wait           ## -- Begin function pte_cancellable_wait
	.p2align	4, 0x90
_pte_cancellable_wait:                  ## @pte_cancellable_wait
	.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
	movq	%rsi, %r15
	movl	%edi, %r12d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_pthread_self
	movq	%rax, %rbx
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%r13), %rax
	movq	_PTHREAD_CANCEL_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_pte_osSemaphoreCancellablePend
	cmpl	$130, %eax
	jne	LBB0_5
LBB0_9:
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.10:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_pthread_mutex_lock
	movq	_PThreadStateCanceling@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, 12(%r13)
	jge	LBB0_12
## %bb.11:
	movl	%eax, 12(%r13)
	movq	_PTHREAD_CANCEL_DISABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movq	%rbx, %rdi
	callq	_pthread_mutex_unlock
	movq	_PTE_EPS_CANCEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pte_throw
LBB0_12:
	movq	%rbx, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_15
LBB0_3:
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_pte_osSemaphorePend
	cmpl	$130, %eax
	je	LBB0_9
LBB0_5:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_13
## %bb.8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_6:
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_CANCEL_ENABLE,8,3      ## @PTHREAD_CANCEL_ENABLE
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_PThreadStateCanceling,4,2      ## @PThreadStateCanceling
	.comm	_PTHREAD_CANCEL_DISABLE,8,3     ## @PTHREAD_CANCEL_DISABLE
	.comm	_PTE_EPS_CANCEL,4,2             ## @PTE_EPS_CANCEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pte_cancellable_wait           ; -- Begin function pte_cancellable_wait
	.p2align	2
_pte_cancellable_wait:                  ; @pte_cancellable_wait
	.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
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _EINVAL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EINVAL@GOTPAGEOFF]
	ldr	w19, [x23]
	bl	_pthread_self
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.1:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _PTHREAD_CANCEL_ENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PTHREAD_CANCEL_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	mov	x0, x22
	mov	x1, x21
	bl	_pte_osSemaphoreCancellablePend
	cmp	w0, #130
	b.ne	LBB0_8
LBB0_3:
	cbz	x20, LBB0_13
; %bb.4:
	add	x21, x20, #8
	mov	x0, x21
	bl	_pthread_mutex_lock
	ldr	w9, [x20, #12]
Lloh5:
	adrp	x8, _PThreadStateCanceling@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PThreadStateCanceling@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w9, w8
	b.ge	LBB0_6
; %bb.5:
	str	w8, [x20, #12]
Lloh8:
	adrp	x8, _PTHREAD_CANCEL_DISABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PTHREAD_CANCEL_DISABLE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x20]
	mov	x0, x21
	bl	_pthread_mutex_unlock
Lloh11:
	adrp	x8, _PTE_EPS_CANCEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PTE_EPS_CANCEL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_pte_throw
LBB0_6:
	mov	x0, x21
	bl	_pthread_mutex_unlock
	b	LBB0_13
LBB0_7:
	mov	x0, x22
	mov	x1, x21
	bl	_pte_osSemaphorePend
	cmp	w0, #130
	b.eq	LBB0_3
LBB0_8:
	cmp	w0, #129
	b.eq	LBB0_11
; %bb.9:
	cmp	w0, #128
	b.ne	LBB0_12
; %bb.10:
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh16:
	ldr	w19, [x8]
	b	LBB0_13
LBB0_11:
	mov	w19, #0
	b	LBB0_13
LBB0_12:
	ldr	w19, [x23]
LBB0_13:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_CANCEL_ENABLE,8,3      ; @PTHREAD_CANCEL_ENABLE
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_PThreadStateCanceling,4,2      ; @PThreadStateCanceling
	.comm	_PTHREAD_CANCEL_DISABLE,8,3     ; @PTHREAD_CANCEL_DISABLE
	.comm	_PTE_EPS_CANCEL,4,2             ; @PTE_EPS_CANCEL
.subsections_via_symbols
