	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_testcancel             ## -- Begin function pthread_testcancel
	.p2align	4, 0x90
_pthread_testcancel:                    ## @pthread_testcancel
	.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
	xorl	%eax, %eax
	callq	_pthread_self
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_PThreadStateCancelPending@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	%rbx, %r14
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	8(%rbx), %rcx
	movq	_PTHREAD_CANCEL_DISABLE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_4
## %bb.3:
	movq	_PThreadStateCanceling@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movq	_PTE_EPS_CANCEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pte_throw
LBB0_4:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PThreadStateCancelPending,8,3  ## @PThreadStateCancelPending
	.comm	_PTHREAD_CANCEL_DISABLE,8,3     ## @PTHREAD_CANCEL_DISABLE
	.comm	_PThreadStateCanceling,8,3      ## @PThreadStateCanceling
	.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	_pthread_testcancel             ; -- Begin function pthread_testcancel
	.p2align	2
_pthread_testcancel:                    ; @pthread_testcancel
	.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
	bl	_pthread_self
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PThreadStateCancelPending@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PThreadStateCancelPending@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	add	x20, x19, #16
	mov	x0, x20
	bl	_pthread_mutex_lock
	ldr	x9, [x19, #8]
Lloh3:
	adrp	x8, _PTHREAD_CANCEL_DISABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PTHREAD_CANCEL_DISABLE@GOTPAGEOFF]
	ldr	x10, [x8]
	cmp	x9, x10
	b.eq	LBB0_4
; %bb.3:
Lloh5:
	adrp	x9, _PThreadStateCanceling@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PThreadStateCanceling@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	str	x9, [x19]
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	x0, x20
	bl	_pthread_mutex_unlock
Lloh8:
	adrp	x8, _PTE_EPS_CANCEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PTE_EPS_CANCEL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_pte_throw
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pthread_mutex_unlock
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PThreadStateCancelPending,8,3  ; @PThreadStateCancelPending
	.comm	_PTHREAD_CANCEL_DISABLE,8,3     ; @PTHREAD_CANCEL_DISABLE
	.comm	_PThreadStateCanceling,8,3      ; @PThreadStateCanceling
	.comm	_PTE_EPS_CANCEL,4,2             ; @PTE_EPS_CANCEL
.subsections_via_symbols
