	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PGSharedMemoryDetach           ## -- Begin function PGSharedMemoryDetach
	.p2align	4, 0x90
_PGSharedMemoryDetach:                  ## @PGSharedMemoryDetach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_UsedShmemSegAddr@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	callq	_shmdt
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_3:
	movq	$0, (%rbx)
LBB0_4:
	movq	_AnonymousShmem@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.5:
	movq	_AnonymousShmemSize@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_munmap
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	movl	(%r14), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_7:
	movq	$0, (%rbx)
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UsedShmemSegAddr,8,3           ## @UsedShmemSegAddr
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"shmdt(%p) failed: %m"

	.comm	_AnonymousShmem,8,3             ## @AnonymousShmem
	.comm	_AnonymousShmemSize,4,2         ## @AnonymousShmemSize
L_.str.1:                               ## @.str.1
	.asciz	"munmap(%p, %zu) failed: %m"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PGSharedMemoryDetach           ; -- Begin function PGSharedMemoryDetach
	.p2align	2
_PGSharedMemoryDetach:                  ; @PGSharedMemoryDetach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x19, _UsedShmemSegAddr@GOTPAGE
Lloh1:
	ldr	x19, [x19, _UsedShmemSegAddr@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_4
; %bb.1:
	bl	_shmdt
	tbz	x0, #63, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _LOG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x2, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_3:
	str	xzr, [x19]
LBB0_4:
Lloh7:
	adrp	x19, _AnonymousShmem@GOTPAGE
Lloh8:
	ldr	x19, [x19, _AnonymousShmem@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_8
; %bb.5:
Lloh9:
	adrp	x20, _AnonymousShmemSize@GOTPAGE
Lloh10:
	ldr	x20, [x20, _AnonymousShmemSize@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_munmap
	tbz	x0, #63, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _LOG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x2, [x19]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_7:
	str	xzr, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_UsedShmemSegAddr,8,3           ; @UsedShmemSegAddr
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"shmdt(%p) failed: %m"

	.comm	_AnonymousShmem,8,3             ; @AnonymousShmem
	.comm	_AnonymousShmemSize,4,2         ; @AnonymousShmemSize
l_.str.1:                               ; @.str.1
	.asciz	"munmap(%p, %zu) failed: %m"

.subsections_via_symbols
