	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_shm_mq_setup              ## -- Begin function test_shm_mq_setup
	.p2align	4, 0x90
_test_shm_mq_setup:                     ## @test_shm_mq_setup
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	leaq	-56(%rbp), %r8
	leaq	-48(%rbp), %r9
	callq	_setup_dynamic_shared_memory
	movq	-40(%rbp), %rsi
	movq	%rsi, (%rbx)
	movl	%r15d, %edi
	callq	_setup_background_workers
	movq	%rax, %rbx
	movq	-56(%rbp), %rdi
	movq	-40(%rbp), %rsi
	movq	(%rax), %rax
	movl	(%rax), %edx
	callq	_shm_mq_attach
	movq	%rax, (%r12)
	movq	-48(%rbp), %rdi
	movq	-40(%rbp), %rsi
	movq	(%rbx), %rax
	movslq	%r15d, %rcx
	movl	-4(%rax,%rcx,4), %edx
	callq	_shm_mq_attach
	movq	%rax, (%r14)
	movq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wait_for_workers_to_become_ready
	movq	-40(%rbp), %r14
	movq	_cleanup_background_workers@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_PointerGetDatum
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_cancel_on_dsm_detach
	movq	%rbx, %rdi
	callq	_pfree
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cleanup_background_workers,4,2 ## @cleanup_background_workers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_shm_mq_setup              ; -- Begin function test_shm_mq_setup
	.p2align	2
_test_shm_mq_setup:                     ; @test_shm_mq_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	stp	xzr, xzr, [sp]
	add	x2, sp, #24
	add	x3, sp, #16
	add	x4, sp, #8
	mov	x5, sp
	bl	_setup_dynamic_shared_memory
	ldr	x1, [sp, #24]
	str	x1, [x21]
	mov	x0, x22
	bl	_setup_background_workers
	mov	x21, x0
	ldr	x0, [sp, #8]
	ldr	x1, [sp, #24]
	ldr	x8, [x21]
	ldr	w2, [x8]
	bl	_shm_mq_attach
	str	x0, [x20]
	ldr	x0, [sp]
	ldr	x1, [sp, #24]
	ldr	x8, [x21]
	sub	w9, w22, #1
	ldr	w2, [x8, w9, sxtw #2]
	bl	_shm_mq_attach
	str	x0, [x19]
	ldr	x1, [sp, #16]
	mov	x0, x21
	bl	_wait_for_workers_to_become_ready
	ldr	x19, [sp, #24]
Lloh0:
	adrp	x8, _cleanup_background_workers@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cleanup_background_workers@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x0, x21
	bl	_PointerGetDatum
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_cancel_on_dsm_detach
	mov	x0, x21
	bl	_pfree
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_cleanup_background_workers,4,2 ; @cleanup_background_workers
.subsections_via_symbols
