	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_construct_md_array             ## -- Begin function construct_md_array
	.p2align	4, 0x90
_construct_md_array:                    ## @construct_md_array
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movb	32(%rbp), %al
	movb	%al, -45(%rbp)                  ## 1-byte Spill
	movl	24(%rbp), %r12d
	movl	16(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jns	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_INVALID_PARAMETER_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r15d, %edi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movq	_MAXDIM@GOTPCREL(%rip), %r14
	cmpl	%r15d, (%r14)
	jge	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r15d, %edi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_4:
	movl	%r15d, %edi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_ArrayGetNItems
	testl	%eax, %eax
	jle	LBB0_6
## %bb.5:
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movl	%r12d, -76(%rbp)                ## 4-byte Spill
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%eax, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	leaq	-1(%rax), %r15
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r14
	cmpq	-120(%rbp), %r14                ## 8-byte Folded Reload
	je	LBB0_17
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movsbl	-45(%rbp), %eax                 ## 1-byte Folded Reload
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, (%rbx,%r14,4)
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_10 Depth=2
	cmpq	%r14, %r15
	je	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_10 Depth=2
	incq	%r14
	movl	$1, %r12d
	testq	%rbx, %rbx
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13,%r14,4), %edx
	cmpl	$-1, -52(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%edx, %edi
	callq	_PG_DETOAST_DATUM
	movl	%eax, %edi
	callq	_PointerGetDatum
	movl	%eax, %edx
	movl	%eax, (%r13,%r14,4)
LBB0_13:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_att_addlength_datum
	movq	%rax, %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_att_align_nominal
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_AllocSizeIsValid
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	_MaxAllocSize@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_15
LBB0_6:
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_construct_empty_array          ## TAILCALL
LBB0_17:
	testl	%r12d, %r12d
	je	LBB0_19
LBB0_18:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_ARR_OVERHEAD_WITHNULLS
	movq	%rax, %r14
LBB0_20:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	addq	%rax, %r13
	movq	%r13, %rdi
	callq	_palloc0
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_SET_VARSIZE
	movl	%r15d, (%r12)
	movq	%r14, 8(%r12)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_ARR_DIMS
	shll	$2, %r15d
	movl	%eax, %edi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
	movq	%r12, %rdi
	callq	_ARR_LBOUND
	movl	%eax, %edi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
	movq	%r12, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	-76(%rbp), %r9d                 ## 4-byte Reload
	pushq	$0
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	callq	_CopyArrayEls
	addq	$16, %rsp
	movq	%r12, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_ARR_OVERHEAD_NONULLS
	xorl	%r14d, %r14d
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.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	"invalid number of dimensions: %d"

	.comm	_MAXDIM,4,2                     ## @MAXDIM
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ## @ERRCODE_PROGRAM_LIMIT_EXCEEDED
L_.str.1:                               ## @.str.1
	.asciz	"number of array dimensions (%d) exceeds the maximum allowed (%d)"

L_.str.2:                               ## @.str.2
	.asciz	"array size exceeds the maximum allowed (%d)"

	.comm	_MaxAllocSize,8,3               ## @MaxAllocSize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_construct_md_array             ; -- Begin function construct_md_array
	.p2align	2
_construct_md_array:                    ; @construct_md_array
	.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	x23, x7
	str	w6, [sp, #44]                   ; 4-byte Folded Spill
	str	w5, [sp, #36]                   ; 4-byte Folded Spill
	mov	x20, x4
	mov	x27, x3
	mov	x26, x2
	mov	x22, x1
	mov	x25, x0
	ldrsb	w24, [x29, #16]
	tbz	w2, #31, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x8, _ERRCODE_INVALID_PARAMETER_VALUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERRCODE_INVALID_PARAMETER_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_errcode
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x26
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_2:
Lloh8:
	adrp	x21, _MAXDIM@GOTPAGE
Lloh9:
	ldr	x21, [x21, _MAXDIM@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w26
	b.ge	LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
Lloh13:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_errcode
	ldr	w8, [x21]
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x26
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_4:
	mov	x0, x26
	mov	x1, x27
	bl	_ArrayGetNItems
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.5:
	stp	x27, x20, [sp, #16]             ; 16-byte Folded Spill
	mov	x20, x25
	str	w23, [sp, #32]                  ; 4-byte Folded Spill
	mov	x27, #0
	mov	x19, #0
	mov	w23, #0
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	mov	w25, w0
	sub	x21, x25, #1
	str	w24, [sp, #40]                  ; 4-byte Folded Spill
	cbnz	x22, LBB0_7
	b	LBB0_10
LBB0_6:
	ldr	w0, [sp, #36]                   ; 4-byte Folded Reload
	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
	b	_construct_empty_array
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22, x27, lsl #2]
	cbz	w8, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	x21, x27
	b.eq	LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x27, x27, #1
	mov	w23, #1
	cbnz	x22, LBB0_7
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x20, x27, lsl #2]
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	cmn	w8, #1
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x28, x20
	mov	x0, x2
	bl	_PG_DETOAST_DATUM
	bl	_PointerGetDatum
	mov	x2, x0
	str	w0, [x20, x27, lsl #2]
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	ldr	w1, [sp, #44]                   ; 4-byte Folded Reload
	bl	_att_addlength_datum
	mov	x1, x24
	bl	_att_align_nominal
	mov	x19, x0
	bl	_AllocSizeIsValid
	cbnz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh18:
	adrp	x8, _ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w24, [x8]
Lloh21:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_errcode
Lloh24:
	adrp	x8, _MaxAllocSize@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MaxAllocSize@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	ldr	w24, [sp, #40]                  ; 4-byte Folded Reload
	bl	_ereport
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	add	x27, x27, #1
	cmp	x27, x25
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	cbnz	x22, LBB0_7
	b	LBB0_10
LBB0_16:
	cbz	w23, LBB0_19
LBB0_17:
	mov	x25, x20
	ldr	x27, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x26
	ldr	w28, [sp, #12]                  ; 4-byte Folded Reload
	mov	x1, x28
	bl	_ARR_OVERHEAD_WITHNULLS
	mov	x21, x0
	ldr	w23, [sp, #32]                  ; 4-byte Folded Reload
	ldr	x20, [sp, #24]                  ; 8-byte Folded Reload
LBB0_18:
	add	x19, x0, x19
	mov	x0, x19
	bl	_palloc0
	mov	x24, x0
	mov	x1, x19
	bl	_SET_VARSIZE
	str	x21, [x24, #8]
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	stp	w26, w8, [x24]
	mov	x0, x24
	bl	_ARR_DIMS
	lsl	w19, w26, #2
	mov	x1, x27
	mov	x2, x19
	bl	_memcpy
	mov	x0, x24
	bl	_ARR_LBOUND
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
	mov	x0, x24
	mov	x1, x25
	mov	x2, x22
	mov	x3, x28
	ldp	w6, w4, [sp, #40]               ; 8-byte Folded Reload
	mov	x5, x23
	mov	w7, #0
	bl	_CopyArrayEls
	mov	x0, x24
	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
LBB0_19:
	mov	x0, x26
	bl	_ARR_OVERHEAD_NONULLS
	mov	x21, #0
	ldr	w23, [sp, #32]                  ; 4-byte Folded Reload
	mov	x25, x20
	ldp	x27, x20, [sp, #16]             ; 16-byte Folded Reload
	ldr	w28, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_18
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.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	"invalid number of dimensions: %d"

	.comm	_MAXDIM,4,2                     ; @MAXDIM
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ; @ERRCODE_PROGRAM_LIMIT_EXCEEDED
l_.str.1:                               ; @.str.1
	.asciz	"number of array dimensions (%d) exceeds the maximum allowed (%d)"

l_.str.2:                               ; @.str.2
	.asciz	"array size exceeds the maximum allowed (%d)"

	.comm	_MaxAllocSize,8,3               ; @MaxAllocSize
.subsections_via_symbols
