	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pte_osSemaphorePend            ## -- Begin function pte_osSemaphorePend
	.p2align	4, 0x90
_pte_osSemaphorePend:                   ## @pte_osSemaphorePend
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	imull	$1000, (%rsi), %eax             ## imm = 0x3E8
	movl	%eax, -4(%rbp)
	leaq	-4(%rbp), %rdx
	jmp	LBB0_3
LBB0_1:
	xorl	%edx, %edx
LBB0_3:
	movl	$1, %esi
	callq	_sceKernelWaitSema
	movq	_SCE_KERNEL_ERROR_OK@GOTPCREL(%rip), %rdx
	movq	_SCE_KERNEL_ERROR_WAIT_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	_PTE_OS_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rdx), %rax
	je	LBB0_7
	jmp	LBB0_8
LBB0_4:
	movq	_PTE_OS_GENERAL_FAILURE@GOTPCREL(%rip), %rcx
	cmpq	(%rdx), %rax
	jne	LBB0_8
LBB0_7:
	movq	_PTE_OS_OK@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %eax
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCE_KERNEL_ERROR_OK,8,3        ## @SCE_KERNEL_ERROR_OK
	.comm	_PTE_OS_OK,4,2                  ## @PTE_OS_OK
	.comm	_SCE_KERNEL_ERROR_WAIT_TIMEOUT,8,3 ## @SCE_KERNEL_ERROR_WAIT_TIMEOUT
	.comm	_PTE_OS_TIMEOUT,4,2             ## @PTE_OS_TIMEOUT
	.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_osSemaphorePend            ; -- Begin function pte_osSemaphorePend
	.p2align	2
_pte_osSemaphorePend:                   ; @pte_osSemaphorePend
	.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
	cbz	x1, LBB0_2
; %bb.1:
	ldr	w8, [x1]
	mov	w9, #1000
	mul	w8, w8, w9
	stur	w8, [x29, #-4]
	sub	x2, x29, #4
	b	LBB0_3
LBB0_2:
	mov	x2, #0
LBB0_3:
	mov	w1, #1
	bl	_sceKernelWaitSema
Lloh0:
	adrp	x8, _SCE_KERNEL_ERROR_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCE_KERNEL_ERROR_OK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _SCE_KERNEL_ERROR_WAIT_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SCE_KERNEL_ERROR_WAIT_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _PTE_OS_OK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PTE_OS_OK@GOTPAGEOFF]
Lloh8:
	adrp	x11, _PTE_OS_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x11, [x11, _PTE_OS_TIMEOUT@GOTPAGEOFF]
Lloh10:
	adrp	x12, _PTE_OS_GENERAL_FAILURE@GOTPAGE
Lloh11:
	ldr	x12, [x12, _PTE_OS_GENERAL_FAILURE@GOTPAGEOFF]
	cmp	x0, x9
	csel	x9, x11, x12, eq
	cmp	x0, x8
	csel	x8, x10, x9, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SCE_KERNEL_ERROR_OK,8,3        ; @SCE_KERNEL_ERROR_OK
	.comm	_PTE_OS_OK,4,2                  ; @PTE_OS_OK
	.comm	_SCE_KERNEL_ERROR_WAIT_TIMEOUT,8,3 ; @SCE_KERNEL_ERROR_WAIT_TIMEOUT
	.comm	_PTE_OS_TIMEOUT,4,2             ; @PTE_OS_TIMEOUT
	.comm	_PTE_OS_GENERAL_FAILURE,4,2     ; @PTE_OS_GENERAL_FAILURE
.subsections_via_symbols
