	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_dynamic_shared_memory
_setup_dynamic_shared_memory:           ## @setup_dynamic_shared_memory
	.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
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	_shm_mq_minimum_size@GOTPCREL(%rip), %r15
	testq	%rdi, %rdi
	js	LBB0_2
## %bb.1:
	cmpq	%r13, (%r15)
	jle	LBB0_3
LBB0_2:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_INVALID_PARAMETER_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	(%r15), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_3:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	callq	_shm_toc_initialize_estimator
	movl	$32, %esi
	movq	%r14, %rdi
	callq	_shm_toc_estimate_chunk
	movq	%rbx, %r12
	testl	%ebx, %ebx
	js	LBB0_6
## %bb.4:
	leal	1(%r12), %ebx
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_shm_toc_estimate_chunk
	decl	%ebx
	jne	LBB0_5
LBB0_6:
	leal	2(%r12), %esi
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	callq	_shm_toc_estimate_keys
	movq	%r15, %rdi
	callq	_shm_toc_estimate
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_shm_toc_estimate
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_dsm_create
	movq	%rax, %rdi
	movq	_PG_TEST_SHM_MQ_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_dsm_segment_address
	movl	%r15d, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_shm_toc_create
	movq	%rax, %r14
	movl	$32, %esi
	movq	%rax, %rdi
	callq	_shm_toc_allocate
	movq	%rax, %r15
	leaq	24(%rax), %rdi
	callq	_SpinLockInit
	movl	%r12d, (%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_shm_toc_insert
	movq	%r12, %rbx
	testl	%r12d, %r12d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	js	LBB0_12
## %bb.7:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_shm_toc_allocate
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_shm_mq_create
	movq	%rax, %r15
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%rax, %rdx
	callq	_shm_toc_insert
	movq	_MyProc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_shm_mq_set_sender
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.8:
	negl	%ebx
	movl	$2, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_shm_toc_allocate
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_shm_mq_create
	movq	%rax, %r15
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rax, %rdx
	callq	_shm_toc_insert
	leal	(%rbx,%r12), %eax
	incl	%eax
	movl	%r12d, %ecx
	incl	%ecx
	movl	%ecx, %r12d
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.10:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	movq	_MyProc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_shm_mq_set_receiver
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_12:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	%r15, (%r12)
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_shm_mq_minimum_size,8,3        ## @shm_mq_minimum_size
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INVALID_PARAMETER_VALUE,4,2 ## @ERRCODE_INVALID_PARAMETER_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"queue size must be at least %zu bytes"

	.comm	_PG_TEST_SHM_MQ_MAGIC,4,2       ## @PG_TEST_SHM_MQ_MAGIC
	.comm	_MyProc,4,2                     ## @MyProc
	.no_dead_strip	_setup_dynamic_shared_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_dynamic_shared_memory
_setup_dynamic_shared_memory:           ; @setup_dynamic_shared_memory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x28, x5
	mov	x24, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x20, _shm_mq_minimum_size@GOTPAGE
Lloh1:
	ldr	x20, [x20, _shm_mq_minimum_size@GOTPAGEOFF]
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	cmp	x8, x23
	b.le	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w25, [x8]
Lloh5:
	adrp	x8, _ERRCODE_INVALID_PARAMETER_VALUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERRCODE_INVALID_PARAMETER_VALUE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_errcode
	ldr	x8, [x20]
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x25
	bl	_ereport
LBB0_3:
	add	x0, sp, #28
	bl	_shm_toc_initialize_estimator
	add	x0, sp, #28
	mov	w1, #32
	bl	_shm_toc_estimate_chunk
	tbnz	w22, #31, LBB0_6
; %bb.4:
	add	w20, w22, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #28
	mov	x1, x23
	bl	_shm_toc_estimate_chunk
	subs	w20, w20, #1
	b.ne	LBB0_5
LBB0_6:
	add	w1, w22, #2
	add	x0, sp, #28
	bl	_shm_toc_estimate_keys
	add	x0, sp, #28
	bl	_shm_toc_estimate
	mov	x26, x0
	add	x0, sp, #28
	bl	_shm_toc_estimate
	mov	w1, #0
	bl	_dsm_create
	mov	x25, x0
Lloh10:
	adrp	x8, _PG_TEST_SHM_MQ_MAGIC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PG_TEST_SHM_MQ_MAGIC@GOTPAGEOFF]
Lloh12:
	ldr	w27, [x8]
	bl	_dsm_segment_address
	mov	x1, x0
	mov	x0, x27
	mov	x2, x26
	bl	_shm_toc_create
	mov	x27, x0
	mov	w1, #32
	bl	_shm_toc_allocate
	mov	x26, x0
	add	x0, x0, #24
	bl	_SpinLockInit
	str	w22, [x26]
	stp	xzr, xzr, [x26, #8]
	mov	x0, x27
	mov	w1, #0
	mov	x2, x26
	bl	_shm_toc_insert
	tbnz	w22, #31, LBB0_11
; %bb.7:
	str	x21, [sp, #16]                  ; 8-byte Folded Spill
	mov	x21, x19
	mov	x19, x28
	mov	x0, x27
	mov	x1, x23
	bl	_shm_toc_allocate
	mov	x1, x23
	bl	_shm_mq_create
	mov	x28, x0
	mov	x0, x27
	mov	w1, #1
	mov	x2, x28
	bl	_shm_toc_insert
Lloh13:
	adrp	x20, _MyProc@GOTPAGE
Lloh14:
	ldr	x20, [x20, _MyProc@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x28
	bl	_shm_mq_set_sender
	str	x28, [x24]
	cbz	w22, LBB0_10
; %bb.8:
	mov	w24, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x27
	mov	x1, x23
	bl	_shm_toc_allocate
	mov	x1, x23
	bl	_shm_mq_create
	mov	x28, x0
	add	w1, w24, #2
	mov	x0, x27
	mov	x2, x28
	bl	_shm_toc_insert
	add	w24, w24, #1
	cmp	w22, w24
	b.ne	LBB0_9
LBB0_10:
	ldr	w1, [x20]
	mov	x0, x28
	bl	_shm_mq_set_receiver
	str	x28, [x19]
	mov	x19, x21
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
LBB0_11:
	str	x25, [x21]
	str	x26, [x19]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_shm_mq_minimum_size,8,3        ; @shm_mq_minimum_size
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INVALID_PARAMETER_VALUE,4,2 ; @ERRCODE_INVALID_PARAMETER_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"queue size must be at least %zu bytes"

	.comm	_PG_TEST_SHM_MQ_MAGIC,4,2       ; @PG_TEST_SHM_MQ_MAGIC
	.comm	_MyProc,4,2                     ; @MyProc
	.no_dead_strip	_setup_dynamic_shared_memory
.subsections_via_symbols
