	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dsm_postmaster_startup         ## -- Begin function dsm_postmaster_startup
	.p2align	4, 0x90
_dsm_postmaster_startup:                ## @dsm_postmaster_startup
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	$0, -48(%rbp)
	movq	_IsUnderPostmaster@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_Assert
	movq	_dynamic_shared_memory_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_DSM_IMPL_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_dsm_cleanup_for_mmap
LBB0_2:
	movq	_PG_DYNSHMEM_FIXED_SLOTS@GOTPCREL(%rip), %rax
	movq	_PG_DYNSHMEM_SLOTS_PER_BACKEND@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	_MaxBackends@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rbx
	imulq	%rcx, %rbx
	addq	(%rax), %rbx
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_elog
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_dsm_control_bytes_needed
	movl	%eax, %r12d
	movq	_dsm_control_mapped_size@GOTPCREL(%rip), %rbx
	movq	_dsm_control_handle@GOTPCREL(%rip), %r15
	movq	_DSM_HANDLE_INVALID@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r14
	xorl	%eax, %eax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_Assert
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_Assert
	xorl	%eax, %eax
	callq	_random
	movq	%rax, (%r15)
	cmpq	(%r13), %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_DSM_OP_CREATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rsp)
	movq	%rax, %rsi
	movl	%r12d, %edx
	movq	_dsm_control_impl_private@GOTPCREL(%rip), %rcx
	movq	%r14, %r8
	movq	%rbx, %r9
	callq	_dsm_impl_op
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	-48(%rbp), %rax
	movq	_dsm_control@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	movq	_dsm_postmaster_shutdown@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_PointerGetDatum
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_on_shmem_exit
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_elog
	movq	(%r15), %rax
	movq	%rax, (%r13)
	movq	_PG_DYNSHMEM_CONTROL_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rcx
	movl	%eax, 16(%rcx)
	movq	$0, 8(%rcx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rcx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IsUnderPostmaster,4,2          ## @IsUnderPostmaster
	.comm	_dynamic_shared_memory_type,8,3 ## @dynamic_shared_memory_type
	.comm	_DSM_IMPL_MMAP,8,3              ## @DSM_IMPL_MMAP
	.comm	_PG_DYNSHMEM_FIXED_SLOTS,8,3    ## @PG_DYNSHMEM_FIXED_SLOTS
	.comm	_PG_DYNSHMEM_SLOTS_PER_BACKEND,4,2 ## @PG_DYNSHMEM_SLOTS_PER_BACKEND
	.comm	_MaxBackends,4,2                ## @MaxBackends
	.comm	_DEBUG2,4,2                     ## @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dynamic shared memory system will support %u segments"

	.comm	_dsm_control_mapped_size,8,3    ## @dsm_control_mapped_size
	.comm	_dsm_control_handle,8,3         ## @dsm_control_handle
	.comm	_DSM_HANDLE_INVALID,8,3         ## @DSM_HANDLE_INVALID
	.comm	_DSM_OP_CREATE,4,2              ## @DSM_OP_CREATE
	.comm	_dsm_control_impl_private,4,2   ## @dsm_control_impl_private
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_dsm_control,8,3                ## @dsm_control
	.comm	_dsm_postmaster_shutdown,4,2    ## @dsm_postmaster_shutdown
L_.str.1:                               ## @.str.1
	.asciz	"created dynamic shared memory control segment %u (%zu bytes)"

	.comm	_PG_DYNSHMEM_CONTROL_MAGIC,4,2  ## @PG_DYNSHMEM_CONTROL_MAGIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dsm_postmaster_startup         ; -- Begin function dsm_postmaster_startup
	.p2align	2
_dsm_postmaster_startup:                ; @dsm_postmaster_startup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _IsUnderPostmaster@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IsUnderPostmaster@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_Assert
Lloh3:
	adrp	x8, _dynamic_shared_memory_type@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dynamic_shared_memory_type@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _DSM_IMPL_MMAP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DSM_IMPL_MMAP@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_dsm_cleanup_for_mmap
LBB0_2:
Lloh9:
	adrp	x8, _PG_DYNSHMEM_FIXED_SLOTS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PG_DYNSHMEM_FIXED_SLOTS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _PG_DYNSHMEM_SLOTS_PER_BACKEND@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PG_DYNSHMEM_SLOTS_PER_BACKEND@GOTPAGEOFF]
Lloh14:
	adrp	x10, _MaxBackends@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MaxBackends@GOTPAGEOFF]
Lloh16:
	ldrsw	x9, [x9]
Lloh17:
	ldrsw	x10, [x10]
	madd	x20, x10, x9, x8
Lloh18:
	adrp	x24, _DEBUG2@GOTPAGE
Lloh19:
	ldr	x24, [x24, _DEBUG2@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_elog
	mov	x0, x20
	bl	_dsm_control_bytes_needed
	mov	x21, x0
	mov	x8, #0
Lloh22:
	adrp	x22, _dsm_control_mapped_size@GOTPAGE
Lloh23:
	ldr	x22, [x22, _dsm_control_mapped_size@GOTPAGEOFF]
Lloh24:
	adrp	x25, _dsm_control_handle@GOTPAGE
Lloh25:
	ldr	x25, [x25, _dsm_control_handle@GOTPAGEOFF]
Lloh26:
	adrp	x26, _DSM_HANDLE_INVALID@GOTPAGE
Lloh27:
	ldr	x26, [x26, _DSM_HANDLE_INVALID@GOTPAGEOFF]
Lloh28:
	adrp	x27, _DSM_OP_CREATE@GOTPAGE
Lloh29:
	ldr	x27, [x27, _DSM_OP_CREATE@GOTPAGEOFF]
Lloh30:
	adrp	x28, _ERROR@GOTPAGE
Lloh31:
	ldr	x28, [x28, _ERROR@GOTPAGEOFF]
Lloh32:
	adrp	x23, _dsm_control_impl_private@GOTPAGE
Lloh33:
	ldr	x23, [x23, _dsm_control_impl_private@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
	bl	_random
	str	x0, [x25]
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	ldr	w0, [x27]
	ldr	w6, [x28]
	add	x4, sp, #8
	mov	x2, x21
	mov	x3, x23
	mov	x5, x22
	bl	_dsm_impl_op
	cbz	x0, LBB0_3
; %bb.6:
	ldr	x8, [sp, #8]
Lloh34:
	adrp	x23, _dsm_control@GOTPAGE
Lloh35:
	ldr	x23, [x23, _dsm_control@GOTPAGEOFF]
	str	x8, [x23]
Lloh36:
	adrp	x8, _dsm_postmaster_shutdown@GOTPAGE
Lloh37:
	ldr	x8, [x8, _dsm_postmaster_shutdown@GOTPAGEOFF]
Lloh38:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_PointerGetDatum
	mov	x1, x0
	mov	x0, x22
	bl	_on_shmem_exit
	ldr	w0, [x24]
	ldr	x2, [x25]
	str	x21, [sp]
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
	ldr	x8, [x25]
Lloh41:
	adrp	x9, _PG_DYNSHMEM_CONTROL_MAGIC@GOTPAGE
Lloh42:
	ldr	x9, [x9, _PG_DYNSHMEM_CONTROL_MAGIC@GOTPAGEOFF]
	str	x8, [x19]
Lloh43:
	ldr	w8, [x9]
	ldr	x9, [x23]
	str	w8, [x9, #16]
	stp	x20, xzr, [x9]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_IsUnderPostmaster,4,2          ; @IsUnderPostmaster
	.comm	_dynamic_shared_memory_type,8,3 ; @dynamic_shared_memory_type
	.comm	_DSM_IMPL_MMAP,8,3              ; @DSM_IMPL_MMAP
	.comm	_PG_DYNSHMEM_FIXED_SLOTS,8,3    ; @PG_DYNSHMEM_FIXED_SLOTS
	.comm	_PG_DYNSHMEM_SLOTS_PER_BACKEND,4,2 ; @PG_DYNSHMEM_SLOTS_PER_BACKEND
	.comm	_MaxBackends,4,2                ; @MaxBackends
	.comm	_DEBUG2,4,2                     ; @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dynamic shared memory system will support %u segments"

	.comm	_dsm_control_mapped_size,8,3    ; @dsm_control_mapped_size
	.comm	_dsm_control_handle,8,3         ; @dsm_control_handle
	.comm	_DSM_HANDLE_INVALID,8,3         ; @DSM_HANDLE_INVALID
	.comm	_DSM_OP_CREATE,4,2              ; @DSM_OP_CREATE
	.comm	_dsm_control_impl_private,4,2   ; @dsm_control_impl_private
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_dsm_control,8,3                ; @dsm_control
	.comm	_dsm_postmaster_shutdown,4,2    ; @dsm_postmaster_shutdown
l_.str.1:                               ; @.str.1
	.asciz	"created dynamic shared memory control segment %u (%zu bytes)"

	.comm	_PG_DYNSHMEM_CONTROL_MAGIC,4,2  ; @PG_DYNSHMEM_CONTROL_MAGIC
.subsections_via_symbols
