	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dsm_cleanup_using_control_segment ## -- Begin function dsm_cleanup_using_control_segment
	.p2align	4, 0x90
_dsm_cleanup_using_control_segment:     ## @dsm_cleanup_using_control_segment
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	$0, -56(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -80(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -64(%rbp)
	movq	_DSM_OP_ATTACH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DEBUG1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	-72(%rbp), %rcx
	leaq	-56(%rbp), %r8
	leaq	-44(%rbp), %r9
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_dsm_impl_op
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	-56(%rbp), %rbx
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	_dsm_control_segment_sane
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movq	(%rbx), %r12
	testq	%r12, %r12
	je	LBB0_8
## %bb.4:
	movl	$8, %r13d
	leaq	-64(%rbp), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	$16, %r13
	decq	%r12
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	-8(%rax,%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rax,%r13), %r15d
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_elog
	movq	_DSM_OP_DESTROY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movl	%r15d, %esi
	xorl	%edx, %edx
	leaq	-80(%rbp), %rcx
	leaq	-88(%rbp), %r8
	movq	%r14, %r9
	callq	_dsm_impl_op
	jmp	LBB0_7
LBB0_8:
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_elog
	movq	_DSM_OP_DESTROY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	_DSM_OP_DETACH@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edi
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	-72(%rbp), %rcx
	leaq	-56(%rbp), %r8
	leaq	-44(%rbp), %r9
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_dsm_impl_op
LBB0_10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSM_OP_ATTACH,4,2              ## @DSM_OP_ATTACH
	.comm	_DEBUG1,4,2                     ## @DEBUG1
	.comm	_DSM_OP_DETACH,4,2              ## @DSM_OP_DETACH
	.comm	_LOG,4,2                        ## @LOG
	.comm	_DEBUG2,4,2                     ## @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cleaning up orphaned dynamic shared memory with ID %u (reference count %u)"

	.comm	_DSM_OP_DESTROY,4,2             ## @DSM_OP_DESTROY
L_.str.1:                               ## @.str.1
	.asciz	"cleaning up dynamic shared memory control segment with ID %u"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dsm_cleanup_using_control_segment ; -- Begin function dsm_cleanup_using_control_segment
	.p2align	2
_dsm_cleanup_using_control_segment:     ; @dsm_cleanup_using_control_segment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	stp	xzr, xzr, [sp, #32]
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _DSM_OP_ATTACH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSM_OP_ATTACH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _DEBUG1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEBUG1@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
	add	x3, sp, #24
	add	x4, sp, #40
	add	x5, sp, #12
	mov	x1, x19
	mov	w2, #0
	bl	_dsm_impl_op
	cbz	w0, LBB0_10
; %bb.1:
	ldr	x20, [sp, #40]
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_dsm_control_segment_sane
Lloh6:
	adrp	x23, _LOG@GOTPAGE
Lloh7:
	ldr	x23, [x23, _LOG@GOTPAGEOFF]
	cbz	w0, LBB0_8
; %bb.2:
	ldr	x25, [x20]
Lloh8:
	adrp	x24, _DEBUG2@GOTPAGE
Lloh9:
	ldr	x24, [x24, _DEBUG2@GOTPAGEOFF]
	cbz	x25, LBB0_7
; %bb.3:
	mov	x26, #0
Lloh10:
	adrp	x21, l_.str@PAGE
Lloh11:
	add	x21, x21, l_.str@PAGEOFF
Lloh12:
	adrp	x27, _DSM_OP_DESTROY@GOTPAGE
Lloh13:
	ldr	x27, [x27, _DSM_OP_DESTROY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x26, #16
	subs	x25, x25, #1
	b.eq	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	ldr	x8, [x9, x26]
	cbz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, x26
	ldr	w22, [x9, #8]
	ldr	w0, [x24]
	str	x8, [sp]
	mov	x1, x21
	mov	x2, x22
	bl	_elog
	ldr	w0, [x27]
	ldr	w6, [x23]
	add	x3, sp, #16
	add	x4, sp, #32
	add	x5, sp, #8
	mov	x1, x22
	mov	w2, #0
	bl	_dsm_impl_op
	b	LBB0_4
LBB0_7:
	ldr	w0, [x24]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_elog
Lloh16:
	adrp	x8, _DSM_OP_DESTROY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DSM_OP_DESTROY@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh18:
	adrp	x8, _DSM_OP_DETACH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DSM_OP_DETACH@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldr	w6, [x23]
	add	x3, sp, #24
	add	x4, sp, #40
	add	x5, sp, #12
	mov	x1, x19
	mov	w2, #0
	bl	_dsm_impl_op
LBB0_10:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DSM_OP_ATTACH,4,2              ; @DSM_OP_ATTACH
	.comm	_DEBUG1,4,2                     ; @DEBUG1
	.comm	_DSM_OP_DETACH,4,2              ; @DSM_OP_DETACH
	.comm	_LOG,4,2                        ; @LOG
	.comm	_DEBUG2,4,2                     ; @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cleaning up orphaned dynamic shared memory with ID %u (reference count %u)"

	.comm	_DSM_OP_DESTROY,4,2             ; @DSM_OP_DESTROY
l_.str.1:                               ; @.str.1
	.asciz	"cleaning up dynamic shared memory control segment with ID %u"

.subsections_via_symbols
