	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function heap_prepare_insert
_heap_prepare_insert:                   ## @heap_prepare_insert
	.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
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_IsParallelWorker
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_INVALID_TRANSACTION_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movq	_HEAP_XACT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	16(%r12), %rdi
	andl	(%rdi), %eax
	movl	%eax, (%rdi)
	movq	_HEAP2_XACT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, 4(%rdi)
	movq	_HEAP_XMAX_INVALID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rdi)
	movl	%r13d, %esi
	callq	_HeapTupleHeaderSetXmin
	movq	_HEAP_INSERT_FROZEN@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	16(%r12), %rdi
	callq	_HeapTupleHeaderSetXminFrozen
LBB0_4:
	movq	16(%r12), %rdi
	movl	%ebx, %esi
	callq	_HeapTupleHeaderSetCmin
	movq	16(%r12), %rdi
	xorl	%esi, %esi
	callq	_HeapTupleHeaderSetXmax
	movq	%r15, %rdi
	callq	_RelationGetRelid
	movl	%eax, 8(%r12)
	movq	(%r15), %rax
	movq	(%rax), %rbx
	movq	_RELKIND_RELATION@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_RELKIND_MATVIEW@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%r12, %rdi
	callq	_HeapTupleHasExternal
	cmpq	%r13, %rbx
	je	LBB0_7
## %bb.5:
	cmpq	%r14, %rbx
	je	LBB0_7
## %bb.6:
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_Assert
LBB0_9:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movq	(%r12), %rax
	movq	_TOAST_TUPLE_THRESHOLD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_9
LBB0_10:
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_heap_toast_insert_or_update    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INVALID_TRANSACTION_STATE,4,2 ## @ERRCODE_INVALID_TRANSACTION_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot insert tuples in a parallel worker"

	.comm	_HEAP_XACT_MASK,4,2             ## @HEAP_XACT_MASK
	.comm	_HEAP2_XACT_MASK,4,2            ## @HEAP2_XACT_MASK
	.comm	_HEAP_XMAX_INVALID,4,2          ## @HEAP_XMAX_INVALID
	.comm	_HEAP_INSERT_FROZEN,4,2         ## @HEAP_INSERT_FROZEN
	.comm	_RELKIND_RELATION,8,3           ## @RELKIND_RELATION
	.comm	_RELKIND_MATVIEW,8,3            ## @RELKIND_MATVIEW
	.comm	_TOAST_TUPLE_THRESHOLD,8,3      ## @TOAST_TUPLE_THRESHOLD
	.no_dead_strip	_heap_prepare_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function heap_prepare_insert
_heap_prepare_insert:                   ; @heap_prepare_insert
	.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	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	bl	_IsParallelWorker
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
Lloh3:
	adrp	x8, _ERRCODE_INVALID_TRANSACTION_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERRCODE_INVALID_TRANSACTION_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_errcode
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
LBB0_2:
Lloh8:
	adrp	x8, _HEAP_XACT_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HEAP_XACT_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	x0, [x19, #16]
	ldp	w9, w10, [x0]
	bic	w8, w9, w8
	str	w8, [x0]
Lloh11:
	adrp	x9, _HEAP2_XACT_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _HEAP2_XACT_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	bic	w9, w10, w9
Lloh14:
	adrp	x10, _HEAP_XMAX_INVALID@GOTPAGE
Lloh15:
	ldr	x10, [x10, _HEAP_XMAX_INVALID@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w8, w10, w8
	stp	w8, w9, [x0]
	mov	x1, x23
	bl	_HeapTupleHeaderSetXmin
Lloh17:
	adrp	x8, _HEAP_INSERT_FROZEN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HEAP_INSERT_FROZEN@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	x0, [x19, #16]
	bl	_HeapTupleHeaderSetXminFrozen
LBB0_4:
	ldr	x0, [x19, #16]
	mov	x1, x22
	bl	_HeapTupleHeaderSetCmin
	ldr	x0, [x19, #16]
	mov	w1, #0
	bl	_HeapTupleHeaderSetXmax
	mov	x0, x21
	bl	_RelationGetRelid
	str	w0, [x19, #8]
	ldr	x8, [x21]
	ldr	x22, [x8]
Lloh20:
	adrp	x8, _RELKIND_RELATION@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RELKIND_RELATION@GOTPAGEOFF]
Lloh22:
	ldr	x24, [x8]
Lloh23:
	adrp	x8, _RELKIND_MATVIEW@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RELKIND_MATVIEW@GOTPAGEOFF]
Lloh25:
	ldr	x23, [x8]
	mov	x0, x19
	bl	_HeapTupleHasExternal
	cmp	x22, x24
	b.eq	LBB0_8
; %bb.5:
	cmp	x22, x23
	b.eq	LBB0_8
; %bb.6:
	cmp	x0, #0
	cset	w0, eq
	bl	_Assert
LBB0_7:
	mov	x0, x19
	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_8:
	cbnz	x0, LBB0_10
; %bb.9:
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _TOAST_TUPLE_THRESHOLD@GOTPAGE
Lloh27:
	ldr	x9, [x9, _TOAST_TUPLE_THRESHOLD@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_7
LBB0_10:
	mov	x0, x21
	mov	x1, x19
	mov	x2, #0
	mov	x3, x20
	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
	b	_heap_toast_insert_or_update
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INVALID_TRANSACTION_STATE,4,2 ; @ERRCODE_INVALID_TRANSACTION_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot insert tuples in a parallel worker"

	.comm	_HEAP_XACT_MASK,4,2             ; @HEAP_XACT_MASK
	.comm	_HEAP2_XACT_MASK,4,2            ; @HEAP2_XACT_MASK
	.comm	_HEAP_XMAX_INVALID,4,2          ; @HEAP_XMAX_INVALID
	.comm	_HEAP_INSERT_FROZEN,4,2         ; @HEAP_INSERT_FROZEN
	.comm	_RELKIND_RELATION,8,3           ; @RELKIND_RELATION
	.comm	_RELKIND_MATVIEW,8,3            ; @RELKIND_MATVIEW
	.comm	_TOAST_TUPLE_THRESHOLD,8,3      ; @TOAST_TUPLE_THRESHOLD
	.no_dead_strip	_heap_prepare_insert
.subsections_via_symbols
