	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_on_exit_nicely                 ## -- Begin function on_exit_nicely
	.p2align	4, 0x90
_on_exit_nicely:                        ## @on_exit_nicely
	.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
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_on_exit_nicely_index@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_MAX_ON_EXIT_NICELY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pg_log_fatal
	movl	$1, %edi
	callq	_exit_nicely
	movq	(%r15), %rax
LBB0_2:
	movq	_on_exit_nicely_list@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	shlq	$4, %rdx
	movl	%ebx, 8(%rcx,%rdx)
	movq	%r14, (%rcx,%rdx)
	incq	%rax
	movq	%rax, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_on_exit_nicely_index,8,3       ## @on_exit_nicely_index
	.comm	_MAX_ON_EXIT_NICELY,8,3         ## @MAX_ON_EXIT_NICELY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of on_exit_nicely slots"

	.comm	_on_exit_nicely_list,8,3        ## @on_exit_nicely_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_on_exit_nicely                 ; -- Begin function on_exit_nicely
	.p2align	2
_on_exit_nicely:                        ; @on_exit_nicely
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _on_exit_nicely_index@GOTPAGE
Lloh1:
	ldr	x21, [x21, _on_exit_nicely_index@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _MAX_ON_EXIT_NICELY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_ON_EXIT_NICELY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lo	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_fatal
	mov	w0, #1
	bl	_exit_nicely
	ldr	x8, [x21]
LBB0_2:
Lloh7:
	adrp	x9, _on_exit_nicely_list@GOTPAGE
Lloh8:
	ldr	x9, [x9, _on_exit_nicely_list@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x9, x9, x8, lsl #4
	str	w20, [x9, #8]
	str	x19, [x9]
	add	x8, x8, #1
	str	x8, [x21]
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_on_exit_nicely_index,8,3       ; @on_exit_nicely_index
	.comm	_MAX_ON_EXIT_NICELY,8,3         ; @MAX_ON_EXIT_NICELY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of on_exit_nicely slots"

	.comm	_on_exit_nicely_list,8,3        ; @on_exit_nicely_list
.subsections_via_symbols
