	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shmem_exit                     ## -- Begin function shmem_exit
	.p2align	4, 0x90
_shmem_exit:                            ## @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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_shmem_exit_inprogress@GOTPCREL(%rip), %r14
	movl	$1, (%r14)
	movq	_DEBUG3@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_before_shmem_exit_index@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_elog
	movq	(%r12), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%r12)
	testq	%rax, %rax
	jle	LBB0_3
## %bb.1:
	movq	_before_shmem_exit_list@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	shlq	$4, %rcx
	movl	(%rax,%rcx), %esi
	movl	%ebx, %edi
	callq	*8(%rax,%rcx)
	movq	(%r12), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%r12)
	testq	%rax, %rax
	jg	LBB0_2
LBB0_3:
	movq	$0, (%r12)
	xorl	%eax, %eax
	callq	_dsm_backend_shutdown
	movl	(%r15), %edi
	movq	_on_shmem_exit_index@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_elog
	movq	(%r15), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%r15)
	testq	%rax, %rax
	jle	LBB0_6
## %bb.4:
	movq	_on_shmem_exit_list@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	shlq	$4, %rcx
	movl	(%rax,%rcx), %esi
	movl	%ebx, %edi
	callq	*8(%rax,%rcx)
	movq	(%r15), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%r15)
	testq	%rax, %rax
	jg	LBB0_5
LBB0_6:
	movq	$0, (%r15)
	movl	$0, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_shmem_exit_inprogress,4,2      ## @shmem_exit_inprogress
	.comm	_DEBUG3,4,2                     ## @DEBUG3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"shmem_exit(%d): %d before_shmem_exit callbacks to make"

	.comm	_before_shmem_exit_index,8,3    ## @before_shmem_exit_index
	.comm	_before_shmem_exit_list,8,3     ## @before_shmem_exit_list
L_.str.1:                               ## @.str.1
	.asciz	"shmem_exit(%d): %d on_shmem_exit callbacks to make"

	.comm	_on_shmem_exit_index,8,3        ## @on_shmem_exit_index
	.comm	_on_shmem_exit_list,8,3         ## @on_shmem_exit_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shmem_exit                     ; -- Begin function shmem_exit
	.p2align	2
_shmem_exit:                            ; @shmem_exit
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x20, _shmem_exit_inprogress@GOTPAGE
Lloh1:
	ldr	x20, [x20, _shmem_exit_inprogress@GOTPAGEOFF]
	mov	w8, #1
	str	w8, [x20]
Lloh2:
	adrp	x21, _DEBUG3@GOTPAGE
Lloh3:
	ldr	x21, [x21, _DEBUG3@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh4:
	adrp	x22, _before_shmem_exit_index@GOTPAGE
Lloh5:
	ldr	x22, [x22, _before_shmem_exit_index@GOTPAGEOFF]
	ldr	x3, [x22]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_elog
	ldr	x8, [x22]
	subs	x8, x8, #1
	str	x8, [x22]
	b.lt	LBB0_3
; %bb.1:
Lloh8:
	adrp	x23, _before_shmem_exit_list@GOTPAGE
Lloh9:
	ldr	x23, [x23, _before_shmem_exit_list@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	add	x8, x9, x8, lsl #4
	ldr	x9, [x8, #8]
	ldr	w1, [x8]
	mov	x0, x19
	blr	x9
	ldr	x9, [x22]
	sub	x8, x9, #1
	str	x8, [x22]
	cmp	x9, #0
	b.gt	LBB0_2
LBB0_3:
	str	xzr, [x22]
	bl	_dsm_backend_shutdown
	ldr	w0, [x21]
Lloh10:
	adrp	x21, _on_shmem_exit_index@GOTPAGE
Lloh11:
	ldr	x21, [x21, _on_shmem_exit_index@GOTPAGEOFF]
	ldr	x3, [x21]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_elog
	ldr	x8, [x21]
	subs	x8, x8, #1
	str	x8, [x21]
	b.lt	LBB0_6
; %bb.4:
Lloh14:
	adrp	x22, _on_shmem_exit_list@GOTPAGE
Lloh15:
	ldr	x22, [x22, _on_shmem_exit_list@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	add	x8, x9, x8, lsl #4
	ldr	x9, [x8, #8]
	ldr	w1, [x8]
	mov	x0, x19
	blr	x9
	ldr	x9, [x21]
	sub	x8, x9, #1
	str	x8, [x21]
	cmp	x9, #0
	b.gt	LBB0_5
LBB0_6:
	str	xzr, [x21]
	str	wzr, [x20]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_shmem_exit_inprogress,4,2      ; @shmem_exit_inprogress
	.comm	_DEBUG3,4,2                     ; @DEBUG3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"shmem_exit(%d): %d before_shmem_exit callbacks to make"

	.comm	_before_shmem_exit_index,8,3    ; @before_shmem_exit_index
	.comm	_before_shmem_exit_list,8,3     ; @before_shmem_exit_list
l_.str.1:                               ; @.str.1
	.asciz	"shmem_exit(%d): %d on_shmem_exit callbacks to make"

	.comm	_on_shmem_exit_index,8,3        ; @on_shmem_exit_index
	.comm	_on_shmem_exit_list,8,3         ; @on_shmem_exit_list
.subsections_via_symbols
