	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apply_handle_update
_apply_handle_update:                   ## @apply_handle_update
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_ensure_transaction
	leaq	-44(%rbp), %rsi
	leaq	-72(%rbp), %r12
	leaq	-56(%rbp), %rcx
	movl	%ebx, %edi
	movq	%r12, %rdx
	callq	_logicalrep_read_update
	movq	_RowExclusiveLock@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_logicalrep_rel_open
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_should_apply_changes_for_rel
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	callq	_check_relation_updatable
	movq	%r13, %rdi
	callq	_create_estate_for_relation
	movq	%rax, %r14
	movl	(%r13), %edi
	callq	_RelationGetDescr
	movq	_TTSOpsVirtual@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ExecInitExtraTupleSlot
	movq	%rax, %r15
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_table_slot_create
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_NIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	movl	$-1, %r8d
	callq	_EvalPlanQualInit
	xorl	%eax, %eax
	callq	_GetTransactionSnapshot
	movl	%eax, %edi
	callq	_PushActiveSnapshot
	movl	4(%r14), %edi
	xorl	%esi, %esi
	callq	_ExecOpenIndices
	movq	%r14, %rdi
	callq	_GetPerTupleMemoryContext
	movl	%eax, %edi
	callq	_MemoryContextSwitchTo
	cmpl	$0, -44(%rbp)
	movl	%eax, %ebx
	leaq	-56(%rbp), %rax
	cmoveq	%rax, %r12
	movl	4(%r12), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_slot_store_cstrings
	movl	%ebx, %edi
	callq	_MemoryContextSwitchTo
	movl	(%r13), %edi
	callq	_GetRelationIdentityOrPK
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_OidIsValid
	movl	$1, %edi
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	8(%r13), %rax
	movq	_REPLICA_IDENTITY_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%al
	cmpl	$0, -44(%rbp)
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
LBB0_4:
	callq	_Assert
	movl	%ebx, %edi
	callq	_OidIsValid
	movl	(%r13), %edi
	movq	_LockTupleExclusive@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	%ebx, %esi
	movq	%r15, %rcx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %r8
	callq	_RelationFindReplTupleByIndex
	jmp	LBB0_7
LBB0_1:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_logicalrep_rel_close
	jmp	LBB0_11
LBB0_6:
	movl	%edx, %esi
	movq	%r15, %rdx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	_RelationFindReplTupleSeq
LBB0_7:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_ExecClearTuple
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_GetPerTupleMemoryContext
	movl	%eax, %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, %ebx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ExecCopySlot
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_slot_modify_cstrings
	movl	%ebx, %edi
	callq	_MemoryContextSwitchTo
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_EvalPlanQualSetSlot
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_ExecSimpleRelationUpdate
	jmp	LBB0_10
LBB0_9:
	movq	_DEBUG1@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r13), %edi
	callq	_RelationGetRelationName
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_elog
LBB0_10:
	movl	4(%r14), %edi
	callq	_ExecCloseIndices
	xorl	%eax, %eax
	callq	_PopActiveSnapshot
	movq	%r14, %rdi
	callq	_AfterTriggerEndQuery
	leaq	-48(%rbp), %rdi
	callq	_EvalPlanQualEnd
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_ExecResetTupleTable
	movq	%r14, %rdi
	callq	_FreeExecutorState
	movq	_NoLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_logicalrep_rel_close
	xorl	%eax, %eax
	callq	_CommandCounterIncrement
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RowExclusiveLock,4,2           ## @RowExclusiveLock
	.comm	_TTSOpsVirtual,4,2              ## @TTSOpsVirtual
	.comm	_NIL,4,2                        ## @NIL
	.comm	_REPLICA_IDENTITY_FULL,8,3      ## @REPLICA_IDENTITY_FULL
	.comm	_LockTupleExclusive,4,2         ## @LockTupleExclusive
	.comm	_DEBUG1,4,2                     ## @DEBUG1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"logical replication did not find row for update in replication target relation \"%s\""

	.comm	_NoLock,4,2                     ## @NoLock
	.no_dead_strip	_apply_handle_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apply_handle_update
_apply_handle_update:                   ; @apply_handle_update
	.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	x19, x0
	bl	_ensure_transaction
	add	x24, sp, #16
	add	x25, sp, #8
	add	x1, sp, #4
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x19
	bl	_logicalrep_read_update
Lloh0:
	adrp	x20, _RowExclusiveLock@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RowExclusiveLock@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_logicalrep_rel_open
	mov	x19, x0
	bl	_should_apply_changes_for_rel
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_check_relation_updatable
	mov	x0, x19
	bl	_create_estate_for_relation
	mov	x20, x0
	ldr	w0, [x19]
	bl	_RelationGetDescr
	mov	x1, x0
Lloh2:
	adrp	x2, _TTSOpsVirtual@GOTPAGE
Lloh3:
	ldr	x2, [x2, _TTSOpsVirtual@GOTPAGEOFF]
	mov	x0, x20
	bl	_ExecInitExtraTupleSlot
	mov	x21, x0
	ldr	w0, [x19]
	mov	x1, x20
	bl	_table_slot_create
	mov	x22, x0
Lloh4:
	adrp	x8, _NIL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NIL@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	add	x0, sp, #28
	mov	x1, x20
	mov	x2, #0
	mov	w4, #-1
	bl	_EvalPlanQualInit
	bl	_GetTransactionSnapshot
	bl	_PushActiveSnapshot
	ldr	w0, [x20, #4]
	mov	w1, #0
	bl	_ExecOpenIndices
	mov	x0, x20
	bl	_GetPerTupleMemoryContext
	bl	_MemoryContextSwitchTo
	mov	x23, x0
	ldr	w8, [sp, #4]
	orr	x9, x24, #0x4
	orr	x10, x25, #0x4
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x19
	bl	_slot_store_cstrings
	mov	x0, x23
	bl	_MemoryContextSwitchTo
	ldr	w0, [x19]
	bl	_GetRelationIdentityOrPK
	mov	x23, x0
	bl	_OidIsValid
	cbz	x0, LBB0_4
; %bb.2:
	mov	w0, #1
	b	LBB0_5
LBB0_3:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_logicalrep_rel_close
	b	LBB0_12
LBB0_4:
Lloh7:
	adrp	x8, _REPLICA_IDENTITY_FULL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REPLICA_IDENTITY_FULL@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh9:
	ldr	x8, [x8]
	cmp	x9, x8
	ldr	w8, [sp, #4]
	ccmp	w8, #0, #4, eq
	cset	w0, ne
LBB0_5:
	bl	_Assert
	mov	x0, x23
	bl	_OidIsValid
	mov	x8, x0
	ldr	w0, [x19]
Lloh10:
	adrp	x9, _LockTupleExclusive@GOTPAGE
Lloh11:
	ldr	x9, [x9, _LockTupleExclusive@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x9]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x1, x23
	mov	x3, x21
	mov	x4, x22
	bl	_RelationFindReplTupleByIndex
	b	LBB0_8
LBB0_7:
	mov	x1, x2
	mov	x2, x21
	mov	x3, x22
	bl	_RelationFindReplTupleSeq
LBB0_8:
	mov	x23, x0
	mov	x0, x21
	bl	_ExecClearTuple
	cbz	w23, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_GetPerTupleMemoryContext
	bl	_MemoryContextSwitchTo
	mov	x23, x0
	mov	x0, x21
	mov	x1, x22
	bl	_ExecCopySlot
	ldp	w3, w2, [sp, #8]
	mov	x0, x21
	mov	x1, x19
	bl	_slot_modify_cstrings
	mov	x0, x23
	bl	_MemoryContextSwitchTo
	add	x0, sp, #28
	mov	x1, x21
	bl	_EvalPlanQualSetSlot
	add	x1, sp, #28
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
	bl	_ExecSimpleRelationUpdate
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x8, _DEBUG1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DEBUG1@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
	ldr	w0, [x19]
	bl	_RelationGetRelationName
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_elog
LBB0_11:
	ldr	w0, [x20, #4]
	bl	_ExecCloseIndices
	bl	_PopActiveSnapshot
	mov	x0, x20
	bl	_AfterTriggerEndQuery
	add	x0, sp, #28
	bl	_EvalPlanQualEnd
	ldr	w0, [x20]
	mov	w1, #0
	bl	_ExecResetTupleTable
	mov	x0, x20
	bl	_FreeExecutorState
Lloh18:
	adrp	x8, _NoLock@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NoLock@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_logicalrep_rel_close
	bl	_CommandCounterIncrement
LBB0_12:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_RowExclusiveLock,4,2           ; @RowExclusiveLock
	.comm	_TTSOpsVirtual,4,2              ; @TTSOpsVirtual
	.comm	_NIL,4,2                        ; @NIL
	.comm	_REPLICA_IDENTITY_FULL,8,3      ; @REPLICA_IDENTITY_FULL
	.comm	_LockTupleExclusive,4,2         ; @LockTupleExclusive
	.comm	_DEBUG1,4,2                     ; @DEBUG1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"logical replication did not find row for update in replication target relation \"%s\""

	.comm	_NoLock,4,2                     ; @NoLock
	.no_dead_strip	_apply_handle_update
.subsections_via_symbols
