	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tts_virtual_materialize
_tts_virtual_materialize:               ## @tts_virtual_materialize
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r12
	callq	_TTS_SHOULDFREE
	testq	%rax, %rax
	je	LBB0_1
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$0, (%r12)
	jle	LBB0_21
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%r15), %esi
	movq	%r13, %rdi
	callq	_att_align_nominal
	movl	(%r15), %esi
	movq	%rax, %rdi
	movq	%r14, %rdx
	callq	_att_addlength_datum
	movq	%rax, %r13
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_TupleDescAttr
	cmpq	$0, 8(%rax)
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movq	8(%r14), %rax
	cmpq	$0, (%rax,%rbx,8)
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %r14
	cmpl	$-1, (%r15)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_DatumGetPointer
	movl	%eax, %edi
	callq	_VARATT_IS_EXTERNAL_EXPANDED
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%r15), %esi
	movq	%r13, %rdi
	callq	_att_align_nominal
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_DatumGetEOHP
	movq	%rax, %rdi
	callq	_EOH_get_flat_size
	movq	%rax, %r13
	addq	%r15, %r13
	jmp	LBB0_9
LBB0_11:
	testq	%r13, %r13
	je	LBB0_21
## %bb.12:
	movl	20(%r14), %edi
	movq	%r13, %rsi
	callq	_MemoryContextAlloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, (%r14)
	movq	_TTS_FLAG_SHOULDFREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r14)
	cmpl	$0, (%r12)
	jle	LBB0_21
## %bb.13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	4(%r13), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_att_align_nominal
	movq	%r15, %rdx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	movl	(%r13), %esi
	xorl	%edi, %edi
	callq	_att_addlength_datum
	movq	%rax, %r13
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_DatumGetPointer
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_PointerGetDatum
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	addq	%r13, %r15
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_21
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_TupleDescAttr
	cmpq	$0, 8(%rax)
	jne	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%rax, %r13
	movq	8(%r14), %rax
	cmpq	$0, (%rax,%rbx,8)
	jne	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %r15
	cmpl	$-1, (%r13)
	jne	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	callq	_DatumGetPointer
	movl	%eax, %edi
	callq	_VARATT_IS_EXTERNAL_EXPANDED
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	callq	_DatumGetEOHP
	movq	%rax, %r15
	movl	4(%r13), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_att_align_nominal
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_EOH_get_flat_size
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rax, %rdx
	movq	%rax, %r15
	callq	_EOH_flatten_into
	movq	%r13, %rdi
	callq	_PointerGetDatum
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	addq	%r15, %r13
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_TTS_FLAG_SHOULDFREE,4,2        ## @TTS_FLAG_SHOULDFREE
	.no_dead_strip	_tts_virtual_materialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tts_virtual_materialize
_tts_virtual_materialize:               ; @tts_virtual_materialize
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0, #24]
	bl	_TTS_SHOULDFREE
	cbz	x0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.3:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x24, #4]
	mov	x0, x22
	bl	_att_align_nominal
	ldr	w1, [x24]
	mov	x2, x23
	bl	_att_addlength_datum
	mov	x22, x0
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_TupleDescAttr
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	cbnz	x8, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x24, x0
	ldr	x8, [x19]
	ldr	x23, [x8, x21, lsl #3]
	ldr	w8, [x0]
	cmn	w8, #1
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_DatumGetPointer
	bl	_VARATT_IS_EXTERNAL_EXPANDED
	cbz	x0, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x24, #4]
	mov	x0, x22
	bl	_att_align_nominal
	mov	x22, x0
	mov	x0, x23
	bl	_DatumGetEOHP
	bl	_EOH_get_flat_size
	add	x22, x0, x22
	b	LBB0_5
LBB0_11:
	cbz	x22, LBB0_1
; %bb.12:
	ldr	w0, [x19, #20]
	mov	x1, x22
	bl	_MemoryContextAlloc
	str	x0, [x19]
Lloh0:
	adrp	x8, _TTS_FLAG_SHOULDFREE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTS_FLAG_SHOULDFREE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.13:
	mov	x22, x0
	mov	x21, #0
	b	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w1, [x23, #4]
	mov	x0, x22
	bl	_att_align_nominal
	mov	x22, x0
	ldr	w1, [x23]
	mov	x0, #0
	mov	x2, x24
	bl	_att_addlength_datum
	mov	x23, x0
	mov	x0, x24
	bl	_DatumGetPointer
	mov	x1, x0
	mov	x0, x22
	mov	x2, x23
	bl	_memcpy
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x22
	bl	_PointerGetDatum
	ldr	x8, [x19]
	str	x0, [x8, x21, lsl #3]
	add	x22, x22, x23
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_TupleDescAttr
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	cbnz	x8, LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x23, x0
	ldr	x8, [x19]
	ldr	x24, [x8, x21, lsl #3]
	ldr	w8, [x0]
	cmn	w8, #1
	b.ne	LBB0_14
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x24
	bl	_DatumGetPointer
	bl	_VARATT_IS_EXTERNAL_EXPANDED
	cbz	x0, LBB0_14
; %bb.21:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x24
	bl	_DatumGetEOHP
	mov	x24, x0
	ldr	w1, [x23, #4]
	mov	x0, x22
	bl	_att_align_nominal
	mov	x22, x0
	mov	x0, x24
	bl	_EOH_get_flat_size
	mov	x23, x0
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	bl	_EOH_flatten_into
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TTS_FLAG_SHOULDFREE,4,2        ; @TTS_FLAG_SHOULDFREE
	.no_dead_strip	_tts_virtual_materialize
.subsections_via_symbols
