	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pte_osThreadCheckCancel        ## -- Begin function pte_osThreadCheckCancel
	.p2align	4, 0x90
_pte_osThreadCheckCancel:               ## @pte_osThreadCheckCancel
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_getThreadData
	movq	_PTE_OS_GENERAL_FAILURE@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movl	(%rax), %edi
	leaq	-16(%rbp), %rsi
	callq	_sceKernelReferSemaStatus
	movq	_SCE_KERNEL_ERROR_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	cmpq	$0, -16(%rbp)
	jle	LBB0_3
## %bb.4:
	movq	_PTE_OS_INTERRUPTED@GOTPCREL(%rip), %rbx
	jmp	LBB0_5
LBB0_3:
	movq	_PTE_OS_OK@GOTPCREL(%rip), %rbx
LBB0_5:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCE_KERNEL_ERROR_OK,8,3        ## @SCE_KERNEL_ERROR_OK
	.comm	_PTE_OS_INTERRUPTED,4,2         ## @PTE_OS_INTERRUPTED
	.comm	_PTE_OS_OK,4,2                  ## @PTE_OS_OK
	.comm	_PTE_OS_GENERAL_FAILURE,4,2     ## @PTE_OS_GENERAL_FAILURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pte_osThreadCheckCancel        ; -- Begin function pte_osThreadCheckCancel
	.p2align	2
_pte_osThreadCheckCancel:               ; @pte_osThreadCheckCancel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
	bl	_getThreadData
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x0]
	add	x1, sp, #8
	bl	_sceKernelReferSemaStatus
Lloh0:
	adrp	x8, _SCE_KERNEL_ERROR_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCE_KERNEL_ERROR_OK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [sp, #8]
Lloh3:
	adrp	x9, _PTE_OS_OK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PTE_OS_OK@GOTPAGEOFF]
Lloh5:
	adrp	x10, _PTE_OS_INTERRUPTED@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PTE_OS_INTERRUPTED@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, gt
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _PTE_OS_GENERAL_FAILURE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PTE_OS_GENERAL_FAILURE@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SCE_KERNEL_ERROR_OK,8,3        ; @SCE_KERNEL_ERROR_OK
	.comm	_PTE_OS_INTERRUPTED,4,2         ; @PTE_OS_INTERRUPTED
	.comm	_PTE_OS_OK,4,2                  ; @PTE_OS_OK
	.comm	_PTE_OS_GENERAL_FAILURE,4,2     ; @PTE_OS_GENERAL_FAILURE
.subsections_via_symbols
