	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_on_shmem_exit                  ## -- Begin function on_shmem_exit
	.p2align	4, 0x90
_on_shmem_exit:                         ## @on_shmem_exit
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_on_shmem_exit_index@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_MAX_ON_EXITS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_2
## %bb.1:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg_internal
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	(%r12), %rax
LBB0_2:
	movq	_on_shmem_exit_list@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%ebx, 4(%rcx,%rax,8)
	movl	%r14d, (%rcx,%rax,8)
	incq	%rax
	movq	%rax, (%r12)
	movq	_atexit_callback_setup@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_4
## %bb.3:
	movq	_atexit_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atexit
	movl	$1, (%rbx)
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_on_shmem_exit_index,8,3        ## @on_shmem_exit_index
	.comm	_MAX_ON_EXITS,8,3               ## @MAX_ON_EXITS
	.comm	_FATAL,4,2                      ## @FATAL
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ## @ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of on_shmem_exit slots"

	.comm	_on_shmem_exit_list,8,3         ## @on_shmem_exit_list
	.comm	_atexit_callback_setup,4,2      ## @atexit_callback_setup
	.comm	_atexit_callback,4,2            ## @atexit_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_on_shmem_exit                  ; -- Begin function on_shmem_exit
	.p2align	2
_on_shmem_exit:                         ; @on_shmem_exit
	.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	x22, _on_shmem_exit_index@GOTPAGE
Lloh1:
	ldr	x22, [x22, _on_shmem_exit_index@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _MAX_ON_EXITS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_ON_EXITS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lo	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _FATAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
Lloh8:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_errcode
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg_internal
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
	ldr	x8, [x22]
LBB0_2:
Lloh13:
	adrp	x9, _on_shmem_exit_list@GOTPAGE
Lloh14:
	ldr	x9, [x9, _on_shmem_exit_list@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x9, x9, x8, lsl #3
	stp	w19, w20, [x9]
	add	x8, x8, #1
	str	x8, [x22]
Lloh16:
	adrp	x19, _atexit_callback_setup@GOTPAGE
Lloh17:
	ldr	x19, [x19, _atexit_callback_setup@GOTPAGEOFF]
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh18:
	adrp	x8, _atexit_callback@GOTPAGE
Lloh19:
	ldr	x8, [x8, _atexit_callback@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_atexit
	mov	w8, #1
	str	w8, [x19]
LBB0_4:
	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	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_on_shmem_exit_index,8,3        ; @on_shmem_exit_index
	.comm	_MAX_ON_EXITS,8,3               ; @MAX_ON_EXITS
	.comm	_FATAL,4,2                      ; @FATAL
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ; @ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of on_shmem_exit slots"

	.comm	_on_shmem_exit_list,8,3         ; @on_shmem_exit_list
	.comm	_atexit_callback_setup,4,2      ; @atexit_callback_setup
	.comm	_atexit_callback,4,2            ; @atexit_callback
.subsections_via_symbols
