	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PGReserveSemaphores            ## -- Begin function PGReserveSemaphores
	.p2align	4, 0x90
_PGReserveSemaphores:                   ## @PGReserveSemaphores
	.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
	movl	%edi, %ebx
	leal	(,%rbx,4), %edi
	callq	_malloc
	movq	_mySemSet@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_2:
	movq	_numSems@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_maxSems@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_ReleaseSemaphores@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_on_shmem_exit                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mySemSet,8,3                   ## @mySemSet
	.comm	_PANIC,4,2                      ## @PANIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory"

	.comm	_numSems,8,3                    ## @numSems
	.comm	_maxSems,4,2                    ## @maxSems
	.comm	_ReleaseSemaphores,4,2          ## @ReleaseSemaphores
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PGReserveSemaphores            ; -- Begin function PGReserveSemaphores
	.p2align	2
_PGReserveSemaphores:                   ; @PGReserveSemaphores
	.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
	mov	x19, x0
	lsl	w0, w0, #2
	bl	_malloc
Lloh0:
	adrp	x8, _mySemSet@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mySemSet@GOTPAGEOFF]
Lloh2:
	str	x0, [x8]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PANIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PANIC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_2:
Lloh8:
	adrp	x8, _numSems@GOTPAGE
Lloh9:
	ldr	x8, [x8, _numSems@GOTPAGEOFF]
Lloh10:
	str	xzr, [x8]
Lloh11:
	adrp	x8, _maxSems@GOTPAGE
Lloh12:
	ldr	x8, [x8, _maxSems@GOTPAGEOFF]
Lloh13:
	str	w19, [x8]
Lloh14:
	adrp	x8, _ReleaseSemaphores@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ReleaseSemaphores@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	w1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_on_shmem_exit
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_mySemSet,8,3                   ; @mySemSet
	.comm	_PANIC,4,2                      ; @PANIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory"

	.comm	_numSems,8,3                    ; @numSems
	.comm	_maxSems,4,2                    ; @maxSems
	.comm	_ReleaseSemaphores,4,2          ; @ReleaseSemaphores
.subsections_via_symbols
