	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RelationSetNewRelfilenode      ## -- Begin function RelationSetNewRelfilenode
	.p2align	4, 0x90
_RelationSetNewRelfilenode:             ## @RelationSetNewRelfilenode
	.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
	movl	%esi, %edx
	movq	%rdi, %r13
	movq	_InvalidMultiXactId@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)
	movq	_InvalidTransactionId@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movq	8(%rdi), %rax
	movl	8(%rax), %edi
	xorl	%esi, %esi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_GetNewRelFileNode
	movq	%rax, %r15
	movq	_RelationRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RowExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_table_open
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_RELOID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_RelationGetRelid
	movl	%eax, %edi
	callq	_ObjectIdGetDatum
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_SearchSysCacheCopy1
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_HeapTupleIsValid
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_RelationGetRelid
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_elog
LBB0_2:
	movq	%r12, %rdi
	callq	_GETSTRUCT
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_RelationDropStorage
	movq	%r15, -88(%rbp)
	movq	8(%r13), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	ja	LBB0_6
## %bb.3:
	movl	$13, %ecx
	btl	%eax, %ecx
	jae	LBB0_4
## %bb.5:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movsbl	%bl, %edx
	leaq	-88(%rbp), %rsi
	leaq	-64(%rbp), %rcx
	leaq	-72(%rbp), %r8
	movq	%r13, %rdi
	callq	_table_relation_set_new_filenode
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_4:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movsbl	%bl, %esi
	movq	%r15, %rdi
	callq	_RelationCreateStorage
	movl	%eax, %edi
	callq	_smgrclose
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_6:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_RelationGetRelationName
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_elog
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_7:
	movq	%r13, %rdi
	callq	_RelationIsMapped
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	8(%r13), %rax
	xorl	%edi, %edi
	cmpl	$132, (%rax)
	sete	%dil
	callq	_Assert
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	-64(%rbp), %rax
	sete	%dil
	callq	_Assert
	movq	8(%r14), %rax
	xorl	%edi, %edi
	cmpq	-72(%rbp), %rax
	sete	%dil
	callq	_Assert
	xorl	%edi, %edi
	cmpb	%bl, 16(%r14)
	sete	%dil
	callq	_Assert
	xorl	%eax, %eax
	callq	_GetCurrentTransactionId
	movq	%r13, %rdi
	callq	_RelationGetRelid
	movq	8(%r13), %rcx
	movl	4(%rcx), %edx
	movl	%eax, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_RelationMapUpdateMap
	movq	%r13, %rdi
	callq	_CacheInvalidateRelcache
	jmp	LBB0_12
LBB0_9:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 48(%r14)
	movq	8(%r13), %rax
	cmpl	$129, (%rax)
	je	LBB0_11
## %bb.10:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r14)
	movq	$0, 40(%r14)
LBB0_11:
	movq	-64(%rbp), %rax
	movq	%rax, (%r14)
	movq	-72(%rbp), %rax
	movq	%rax, 8(%r14)
	movb	%bl, 16(%r14)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r12, %rdx
	callq	_CatalogTupleUpdate
LBB0_12:
	movq	%r12, %rdi
	callq	_heap_freetuple
	movq	_RowExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_table_close
	xorl	%eax, %eax
	callq	_CommandCounterIncrement
	xorl	%eax, %eax
	callq	_GetCurrentSubTransactionId
	movl	%eax, (%r13)
	movq	%r13, %rdi
	callq	_EOXactListAdd
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidMultiXactId,8,3         ## @InvalidMultiXactId
	.comm	_InvalidTransactionId,8,3       ## @InvalidTransactionId
	.comm	_RelationRelationId,4,2         ## @RelationRelationId
	.comm	_RowExclusiveLock,4,2           ## @RowExclusiveLock
	.comm	_RELOID,4,2                     ## @RELOID
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not find tuple for relation %u"

L_.str.1:                               ## @.str.1
	.asciz	"relation \"%s\" does not have storage"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RelationSetNewRelfilenode      ; -- Begin function RelationSetNewRelfilenode
	.p2align	2
_RelationSetNewRelfilenode:             ; @RelationSetNewRelfilenode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _InvalidMultiXactId@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InvalidMultiXactId@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _InvalidTransactionId@GOTPAGE
Lloh4:
	ldr	x8, [x8, _InvalidTransactionId@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp, #16]
	ldr	x8, [x0, #8]
	ldr	w0, [x8, #8]
	mov	x1, #0
	mov	x2, x21
	bl	_GetNewRelFileNode
	mov	x23, x0
Lloh6:
	adrp	x8, _RelationRelationId@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RelationRelationId@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x26, _RowExclusiveLock@GOTPAGE
Lloh10:
	ldr	x26, [x26, _RowExclusiveLock@GOTPAGEOFF]
	ldr	w1, [x26]
	bl	_table_open
	mov	x20, x0
Lloh11:
	adrp	x8, _RELOID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RELOID@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_RelationGetRelid
	bl	_ObjectIdGetDatum
	mov	x1, x0
	mov	x0, x22
	bl	_SearchSysCacheCopy1
	mov	x22, x0
	bl	_HeapTupleIsValid
	cbnz	w0, LBB0_2
; %bb.1:
Lloh14:
	adrp	x8, _ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w24, [x8]
	mov	x0, x19
	bl	_RelationGetRelid
	mov	x2, x0
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_elog
LBB0_2:
	mov	x0, x22
	bl	_GETSTRUCT
	mov	x24, x0
	mov	x0, x19
	bl	_RelationDropStorage
	str	x23, [sp, #8]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_6
; %bb.3:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #13
	tst	w8, w9
	b.eq	LBB0_5
; %bb.4:
	add	x1, sp, #8
	add	x3, sp, #16
	add	x4, sp, #24
	mov	x0, x19
	mov	x2, x21
	bl	_table_relation_set_new_filenode
	b	LBB0_7
LBB0_5:
	mov	x0, x23
	mov	x1, x21
	bl	_RelationCreateStorage
	bl	_smgrclose
	b	LBB0_7
LBB0_6:
Lloh19:
	adrp	x8, _ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w25, [x8]
	mov	x0, x19
	bl	_RelationGetRelationName
	mov	x2, x0
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x25
	bl	_elog
LBB0_7:
	mov	x0, x19
	bl	_RelationIsMapped
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #132
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x24]
	ldr	x9, [sp, #16]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x24, #8]
	ldr	x9, [sp, #24]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldrb	w8, [x24, #16]
	cmp	w8, w21, uxtb
	cset	w0, eq
	bl	_Assert
	bl	_GetCurrentTransactionId
	mov	x0, x19
	bl	_RelationGetRelid
	ldr	x8, [x19, #8]
	ldr	w2, [x8, #4]
	mov	x1, x23
	mov	w3, #0
	bl	_RelationMapUpdateMap
	mov	x0, x19
	bl	_CacheInvalidateRelcache
	b	LBB0_12
LBB0_9:
	str	x23, [x24, #48]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #129
	b.eq	LBB0_11
; %bb.10:
	stp	xzr, xzr, [x24, #24]
	str	xzr, [x24, #40]
LBB0_11:
	ldr	x8, [sp, #16]
	str	x8, [x24]
	ldr	x8, [sp, #24]
	str	x8, [x24, #8]
	strb	w21, [x24, #16]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x22
	bl	_CatalogTupleUpdate
LBB0_12:
	mov	x0, x22
	bl	_heap_freetuple
	ldr	w1, [x26]
	mov	x0, x20
	bl	_table_close
	bl	_CommandCounterIncrement
	bl	_GetCurrentSubTransactionId
	str	w0, [x19]
	mov	x0, x19
	bl	_EOXactListAdd
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidMultiXactId,8,3         ; @InvalidMultiXactId
	.comm	_InvalidTransactionId,8,3       ; @InvalidTransactionId
	.comm	_RelationRelationId,4,2         ; @RelationRelationId
	.comm	_RowExclusiveLock,4,2           ; @RowExclusiveLock
	.comm	_RELOID,4,2                     ; @RELOID
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not find tuple for relation %u"

l_.str.1:                               ; @.str.1
	.asciz	"relation \"%s\" does not have storage"

.subsections_via_symbols
