	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function heapam_relation_copy_data
_heapam_relation_copy_data:             ## @heapam_relation_copy_data
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rsi), %edi
	movl	12(%r12), %esi
	callq	_smgropen
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_RelationOpenSmgr
	movq	%r12, %rdi
	callq	_FlushRelationBuffers
	movl	(%r14), %edi
	movq	(%r12), %rax
	movl	(%rax), %esi
	callq	_RelationCreateStorage
	movl	8(%r12), %edi
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	(%r12), %rax
	movl	(%rax), %ecx
	movl	%r15d, %esi
	callq	_RelationCopyStorage
	movq	(%rbx), %rbx
	movq	_MAX_FORKNUM@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_log_smgrcreate
	movq	(%r12), %rax
	movl	(%rax), %ecx
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%r12), %edi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_RelationCopyStorage
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r13), %rbx
	jge	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	movl	8(%r12), %edi
	movq	%rbx, %rsi
	callq	_smgrexists
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_smgrcreate
	movq	(%r12), %rax
	movl	(%rax), %ecx
	movq	_RELPERSISTENCE_PERMANENT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_RELPERSISTENCE_UNLOGGED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_INIT_FORKNUM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_6
	jmp	LBB0_7
LBB0_8:
	movq	%r12, %rdi
	callq	_RelationDropStorage
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_smgrclose                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAIN_FORKNUM,8,3               ## @MAIN_FORKNUM
	.comm	_MAX_FORKNUM,8,3                ## @MAX_FORKNUM
	.comm	_RELPERSISTENCE_PERMANENT,4,2   ## @RELPERSISTENCE_PERMANENT
	.comm	_RELPERSISTENCE_UNLOGGED,4,2    ## @RELPERSISTENCE_UNLOGGED
	.comm	_INIT_FORKNUM,8,3               ## @INIT_FORKNUM
	.no_dead_strip	_heapam_relation_copy_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function heapam_relation_copy_data
_heapam_relation_copy_data:             ; @heapam_relation_copy_data
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1]
	ldr	w1, [x19, #12]
	bl	_smgropen
	mov	x21, x0
	mov	x0, x19
	bl	_RelationOpenSmgr
	mov	x0, x19
	bl	_FlushRelationBuffers
	ldr	w0, [x20]
	ldr	x8, [x19]
	ldr	w1, [x8]
	bl	_RelationCreateStorage
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x22, _MAIN_FORKNUM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAIN_FORKNUM@GOTPAGEOFF]
	ldr	x2, [x22]
	ldr	x8, [x19]
	ldr	w3, [x8]
	mov	x1, x21
	bl	_RelationCopyStorage
	ldr	x22, [x22]
Lloh2:
	adrp	x23, _MAX_FORKNUM@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MAX_FORKNUM@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x22, x8
	b.ge	LBB0_8
; %bb.1:
Lloh4:
	adrp	x24, _RELPERSISTENCE_PERMANENT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _RELPERSISTENCE_PERMANENT@GOTPAGEOFF]
Lloh6:
	adrp	x25, _RELPERSISTENCE_UNLOGGED@GOTPAGE
Lloh7:
	ldr	x25, [x25, _RELPERSISTENCE_UNLOGGED@GOTPAGEOFF]
Lloh8:
	adrp	x26, _INIT_FORKNUM@GOTPAGE
Lloh9:
	ldr	x26, [x26, _INIT_FORKNUM@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_log_smgrcreate
	ldr	x8, [x19]
	ldr	w3, [x8]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #8]
	mov	x1, x21
	mov	x2, x22
	bl	_RelationCopyStorage
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x23]
	cmp	x22, x8
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x22, #1
	ldr	w0, [x19, #8]
	mov	x1, x22
	bl	_smgrexists
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	bl	_smgrcreate
	ldr	x8, [x19]
	ldr	w3, [x8]
	ldr	w8, [x24]
	cmp	w3, w8
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	ldr	x9, [x26]
	cmp	w3, w8
	ccmp	x22, x9, #0, eq
	b.eq	LBB0_2
	b	LBB0_3
LBB0_8:
	mov	x0, x19
	bl	_RelationDropStorage
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_smgrclose
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAIN_FORKNUM,8,3               ; @MAIN_FORKNUM
	.comm	_MAX_FORKNUM,8,3                ; @MAX_FORKNUM
	.comm	_RELPERSISTENCE_PERMANENT,4,2   ; @RELPERSISTENCE_PERMANENT
	.comm	_RELPERSISTENCE_UNLOGGED,4,2    ; @RELPERSISTENCE_UNLOGGED
	.comm	_INIT_FORKNUM,8,3               ; @INIT_FORKNUM
	.no_dead_strip	_heapam_relation_copy_data
.subsections_via_symbols
