	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function proc_exit_prepare
_proc_exit_prepare:                     ## @proc_exit_prepare
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_proc_exit_inprogress@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_InterruptPending@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_ProcDiePending@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_QueryCancelPending@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_InterruptHoldoffCount@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_CritSectionCount@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_error_context_stack@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_debug_query_string@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	callq	_shmem_exit
	movq	_DEBUG3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_on_proc_exit_index@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_elog
	movq	(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%rbx)
	testq	%rax, %rax
	jle	LBB0_3
## %bb.1:
	movq	_on_proc_exit_list@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	shlq	$4, %rcx
	movl	(%rax,%rcx), %esi
	movl	%r14d, %edi
	callq	*8(%rax,%rcx)
	movq	(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%rbx)
	testq	%rax, %rax
	jg	LBB0_2
LBB0_3:
	movq	$0, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_proc_exit_inprogress,4,2       ## @proc_exit_inprogress
	.comm	_InterruptPending,4,2           ## @InterruptPending
	.comm	_ProcDiePending,4,2             ## @ProcDiePending
	.comm	_QueryCancelPending,4,2         ## @QueryCancelPending
	.comm	_InterruptHoldoffCount,4,2      ## @InterruptHoldoffCount
	.comm	_CritSectionCount,8,3           ## @CritSectionCount
	.comm	_error_context_stack,8,3        ## @error_context_stack
	.comm	_debug_query_string,8,3         ## @debug_query_string
	.comm	_DEBUG3,4,2                     ## @DEBUG3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"proc_exit(%d): %d callbacks to make"

	.comm	_on_proc_exit_index,8,3         ## @on_proc_exit_index
	.comm	_on_proc_exit_list,8,3          ## @on_proc_exit_list
	.no_dead_strip	_proc_exit_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function proc_exit_prepare
_proc_exit_prepare:                     ; @proc_exit_prepare
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _proc_exit_inprogress@GOTPAGE
Lloh1:
	ldr	x8, [x8, _proc_exit_inprogress@GOTPAGEOFF]
	mov	w9, #1
Lloh2:
	str	w9, [x8]
Lloh3:
	adrp	x8, _InterruptPending@GOTPAGE
Lloh4:
	ldr	x8, [x8, _InterruptPending@GOTPAGEOFF]
Lloh5:
	str	wzr, [x8]
Lloh6:
	adrp	x8, _ProcDiePending@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ProcDiePending@GOTPAGEOFF]
Lloh8:
	str	wzr, [x8]
Lloh9:
	adrp	x8, _QueryCancelPending@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QueryCancelPending@GOTPAGEOFF]
Lloh11:
	str	wzr, [x8]
Lloh12:
	adrp	x8, _InterruptHoldoffCount@GOTPAGE
Lloh13:
	ldr	x8, [x8, _InterruptHoldoffCount@GOTPAGEOFF]
Lloh14:
	str	w9, [x8]
Lloh15:
	adrp	x8, _CritSectionCount@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CritSectionCount@GOTPAGEOFF]
Lloh17:
	str	xzr, [x8]
Lloh18:
	adrp	x8, _error_context_stack@GOTPAGE
Lloh19:
	ldr	x8, [x8, _error_context_stack@GOTPAGEOFF]
Lloh20:
	str	xzr, [x8]
Lloh21:
	adrp	x8, _debug_query_string@GOTPAGE
Lloh22:
	ldr	x8, [x8, _debug_query_string@GOTPAGEOFF]
Lloh23:
	str	xzr, [x8]
	bl	_shmem_exit
Lloh24:
	adrp	x8, _DEBUG3@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DEBUG3@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x20, _on_proc_exit_index@GOTPAGE
Lloh28:
	ldr	x20, [x20, _on_proc_exit_index@GOTPAGEOFF]
	ldr	x3, [x20]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_elog
	ldr	x8, [x20]
	subs	x8, x8, #1
	str	x8, [x20]
	b.lt	LBB0_3
; %bb.1:
Lloh31:
	adrp	x21, _on_proc_exit_list@GOTPAGE
Lloh32:
	ldr	x21, [x21, _on_proc_exit_list@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	add	x8, x9, x8, lsl #4
	ldr	x9, [x8, #8]
	ldr	w1, [x8]
	mov	x0, x19
	blr	x9
	ldr	x9, [x20]
	sub	x8, x9, #1
	str	x8, [x20]
	cmp	x9, #0
	b.gt	LBB0_2
LBB0_3:
	str	xzr, [x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_proc_exit_inprogress,4,2       ; @proc_exit_inprogress
	.comm	_InterruptPending,4,2           ; @InterruptPending
	.comm	_ProcDiePending,4,2             ; @ProcDiePending
	.comm	_QueryCancelPending,4,2         ; @QueryCancelPending
	.comm	_InterruptHoldoffCount,4,2      ; @InterruptHoldoffCount
	.comm	_CritSectionCount,8,3           ; @CritSectionCount
	.comm	_error_context_stack,8,3        ; @error_context_stack
	.comm	_debug_query_string,8,3         ; @debug_query_string
	.comm	_DEBUG3,4,2                     ; @DEBUG3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"proc_exit(%d): %d callbacks to make"

	.comm	_on_proc_exit_index,8,3         ; @on_proc_exit_index
	.comm	_on_proc_exit_list,8,3          ; @on_proc_exit_list
	.no_dead_strip	_proc_exit_prepare
.subsections_via_symbols
