	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function raw_heap_insert
_raw_heap_insert:                       ## @raw_heap_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	24(%rdi), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movq	(%rax), %r15
	movq	_RELKIND_TOASTVALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%rsi, %rdi
	callq	_HeapTupleHasExternal
	cmpq	%r12, %r15
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_Assert
	movq	%rbx, %rax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_2:
	testq	%rax, %rax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_4
## %bb.3:
	movq	(%rbx), %rdx
	movq	_TOAST_TUPLE_THRESHOLD@GOTPCREL(%rip), %rcx
	movq	%rbx, %rax
	cmpq	(%rcx), %rdx
	jle	LBB0_7
LBB0_4:
	movq	_HEAP_INSERT_SKIP_FSM@GOTPCREL(%rip), %rax
	cmpq	$0, 16(%r14)
	movl	$0, %ecx
	jne	LBB0_6
## %bb.5:
	movq	_HEAP_INSERT_SKIP_WAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_6:
	orl	(%rax), %ecx
	movq	_HEAP_INSERT_NO_LOGICAL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	8(%r14), %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_heap_toast_insert_or_update
LBB0_7:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rdi
	callq	_MAXALIGN
	movq	%rax, %r13
	movq	_MaxHeapTupleSize@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jle	LBB0_9
## %bb.8:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	(%r15), %rdx
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_9:
	movq	8(%r14), %rdi
	movq	_HEAP_DEFAULT_FILLFACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RelationGetTargetPageFreeSpace
	cmpl	$0, (%r14)
	je	LBB0_15
## %bb.10:
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_PageGetHeapFreeSpace
	addq	%r13, %rbx
	cmpq	%rax, %rbx
	jle	LBB0_14
## %bb.11:
	cmpq	$0, 16(%r14)
	je	LBB0_13
## %bb.12:
	movq	8(%r14), %rdi
	addq	$4, %rdi
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	%r12, %rcx
	movl	$1, %r8d
	callq	_log_newpage
LBB0_13:
	movq	8(%r14), %rdi
	callq	_RelationOpenSmgr
	movl	4(%r14), %esi
	movq	%r12, %rdi
	callq	_PageSetChecksumInplace
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movq	_MAIN_FORKNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	%r12, %rcx
	movl	$1, %r8d
	callq	_smgrextend
	incl	4(%r14)
	movl	$0, (%r14)
	jmp	LBB0_15
LBB0_14:
	cmpl	$0, (%r14)
	jne	LBB0_16
LBB0_15:
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_PageInit
	movl	$1, (%r14)
LBB0_16:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %esi
	movq	(%rax), %rdx
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_PageAddItem
	movq	%rax, %r12
	cmpq	(%r15), %rax
	jne	LBB0_18
## %bb.17:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_18:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leaq	8(%rbx), %r13
	movl	4(%r14), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_ItemPointerSet
	movq	16(%rbx), %rdi
	callq	_ItemPointerIsValid
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_PageGetItemId
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_PageGetItem
	movl	(%r13), %ecx
	movl	%ecx, (%rax)
LBB0_20:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$24, %rsp
	cmpq	%rbx, %rdi
	je	LBB0_21
## %bb.22:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_heap_freetuple                 ## TAILCALL
LBB0_21:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RELKIND_TOASTVALUE,8,3         ## @RELKIND_TOASTVALUE
	.comm	_TOAST_TUPLE_THRESHOLD,8,3      ## @TOAST_TUPLE_THRESHOLD
	.comm	_HEAP_INSERT_SKIP_FSM,4,2       ## @HEAP_INSERT_SKIP_FSM
	.comm	_HEAP_INSERT_SKIP_WAL,4,2       ## @HEAP_INSERT_SKIP_WAL
	.comm	_HEAP_INSERT_NO_LOGICAL,4,2     ## @HEAP_INSERT_NO_LOGICAL
	.comm	_MaxHeapTupleSize,8,3           ## @MaxHeapTupleSize
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ## @ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"row is too big: size %zu, maximum size %zu"

	.comm	_HEAP_DEFAULT_FILLFACTOR,4,2    ## @HEAP_DEFAULT_FILLFACTOR
	.comm	_MAIN_FORKNUM,4,2               ## @MAIN_FORKNUM
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
L_.str.1:                               ## @.str.1
	.asciz	"failed to add tuple"

	.no_dead_strip	_raw_heap_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function raw_heap_insert
_raw_heap_insert:                       ; @raw_heap_insert
	.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	x19, x1
	mov	x21, x0
	ldr	x20, [x0, #24]
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #8]
	ldr	x22, [x8]
Lloh0:
	adrp	x8, _RELKIND_TOASTVALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RELKIND_TOASTVALUE@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	mov	x0, x1
	bl	_HeapTupleHasExternal
	cmp	x22, x23
	b.ne	LBB0_2
; %bb.1:
	cmp	x0, #0
	cset	w0, eq
	bl	_Assert
	mov	x22, x19
	b	LBB0_5
LBB0_2:
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _TOAST_TUPLE_THRESHOLD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TOAST_TUPLE_THRESHOLD@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	x22, x19
	cmp	x8, x9
	b.le	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _HEAP_INSERT_SKIP_FSM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HEAP_INSERT_SKIP_FSM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _HEAP_INSERT_SKIP_WAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HEAP_INSERT_SKIP_WAL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldp	x0, x10, [x21, #8]
	cmp	x10, #0
	csel	w9, w9, wzr, eq
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _HEAP_INSERT_NO_LOGICAL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HEAP_INSERT_NO_LOGICAL@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x1, x19
	mov	x2, #0
	bl	_heap_toast_insert_or_update
	mov	x22, x0
LBB0_5:
	ldr	x0, [x22]
	bl	_MAXALIGN
	mov	x23, x0
Lloh15:
	adrp	x26, _MaxHeapTupleSize@GOTPAGE
Lloh16:
	ldr	x26, [x26, _MaxHeapTupleSize@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh17:
	adrp	x25, _ERROR@GOTPAGE
Lloh18:
	ldr	x25, [x25, _ERROR@GOTPAGEOFF]
	cmp	x0, x8
	b.le	LBB0_7
; %bb.6:
	ldr	w24, [x25]
Lloh19:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_errcode
	ldr	x2, [x26]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
LBB0_7:
	ldr	x0, [x21, #8]
Lloh24:
	adrp	x8, _HEAP_DEFAULT_FILLFACTOR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HEAP_DEFAULT_FILLFACTOR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_RelationGetTargetPageFreeSpace
	ldr	w8, [x21]
	cbz	w8, LBB0_13
; %bb.8:
	mov	x24, x0
	mov	x0, x20
	bl	_PageGetHeapFreeSpace
	add	x8, x24, x23
	cmp	x8, x0
	b.le	LBB0_12
; %bb.9:
	ldr	x8, [x21, #16]
Lloh27:
	adrp	x23, _MAIN_FORKNUM@GOTPAGE
Lloh28:
	ldr	x23, [x23, _MAIN_FORKNUM@GOTPAGEOFF]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	x8, [x21, #8]
	add	x0, x8, #4
	ldr	w1, [x23]
	ldr	w2, [x21, #4]
	mov	x3, x20
	mov	w4, #1
	bl	_log_newpage
LBB0_11:
	ldr	x0, [x21, #8]
	bl	_RelationOpenSmgr
	ldr	w1, [x21, #4]
	mov	x0, x20
	bl	_PageSetChecksumInplace
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	ldr	w1, [x23]
	ldr	w2, [x21, #4]
	mov	x3, x20
	mov	w4, #1
	bl	_smgrextend
	ldr	w8, [x21, #4]
	add	w8, w8, #1
	stp	wzr, w8, [x21]
	b	LBB0_13
LBB0_12:
	ldr	w8, [x21]
	cbnz	w8, LBB0_14
LBB0_13:
Lloh29:
	adrp	x8, _BLCKSZ@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BLCKSZ@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_PageInit
	mov	w8, #1
	str	w8, [x21]
LBB0_14:
	ldr	w1, [x22, #16]
	ldr	x2, [x22]
Lloh32:
	adrp	x24, _InvalidOffsetNumber@GOTPAGE
Lloh33:
	ldr	x24, [x24, _InvalidOffsetNumber@GOTPAGEOFF]
	ldr	x3, [x24]
	mov	x0, x20
	mov	w4, #0
	mov	w5, #1
	bl	_PageAddItem
	mov	x23, x0
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.15:
	ldr	w0, [x25]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_16:
	add	x24, x19, #8
	ldr	w1, [x21, #4]
	mov	x0, x24
	mov	x2, x23
	bl	_ItemPointerSet
	ldr	x0, [x19, #16]
	bl	_ItemPointerIsValid
	cbz	w0, LBB0_19
; %bb.17:
	cmp	x22, x19
	b.eq	LBB0_20
LBB0_18:
	mov	x0, x22
	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	_heap_freetuple
LBB0_19:
	mov	x0, x20
	mov	x1, x23
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x20
	bl	_PageGetItem
	ldr	w8, [x24]
	str	w8, [x0]
	cmp	x22, x19
	b.ne	LBB0_18
LBB0_20:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_RELKIND_TOASTVALUE,8,3         ; @RELKIND_TOASTVALUE
	.comm	_TOAST_TUPLE_THRESHOLD,8,3      ; @TOAST_TUPLE_THRESHOLD
	.comm	_HEAP_INSERT_SKIP_FSM,4,2       ; @HEAP_INSERT_SKIP_FSM
	.comm	_HEAP_INSERT_SKIP_WAL,4,2       ; @HEAP_INSERT_SKIP_WAL
	.comm	_HEAP_INSERT_NO_LOGICAL,4,2     ; @HEAP_INSERT_NO_LOGICAL
	.comm	_MaxHeapTupleSize,8,3           ; @MaxHeapTupleSize
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ; @ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"row is too big: size %zu, maximum size %zu"

	.comm	_HEAP_DEFAULT_FILLFACTOR,4,2    ; @HEAP_DEFAULT_FILLFACTOR
	.comm	_MAIN_FORKNUM,4,2               ; @MAIN_FORKNUM
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
l_.str.1:                               ; @.str.1
	.asciz	"failed to add tuple"

	.no_dead_strip	_raw_heap_insert
.subsections_via_symbols
