	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LockGXact
_LockGXact:                             ## @LockGXact
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	_twophaseExitRegistered@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_AtProcExit_Twophase@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_before_shmem_exit
	movl	$1, (%rbx)
LBB0_2:
	movq	_TwoPhaseStateLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	_TwoPhaseState@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.3:
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	movslq	(%rax), %rcx
	cmpq	%rcx, %r15
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rcx
	movq	(%rcx,%r15,8), %rbx
	cmpl	$0, 28(%rbx)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %r12
	movq	_ProcGlobal@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	movl	24(%rbx), %edi
	movq	%r14, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_TwoPhaseState@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_7
LBB0_8:
	movq	_TwoPhaseStateLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_UNDEFINED_OBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.5(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_17
LBB0_9:
	movq	8(%rbx), %rax
	movq	_InvalidBackendId@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rdi, 16(%rbx)
	je	LBB0_14
## %bb.12:
	callq	_superuser_arg
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	leaq	L_.str.2(%rip), %rdi
	callq	_errhint
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_14:
	movq	_MyDatabaseId@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r13,%r12,8), %rax
	je	LBB0_16
## %bb.15:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_FEATURE_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	leaq	L_.str.4(%rip), %rdi
	callq	_errhint
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_16:
	movq	_MyBackendId@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_MyLockedGxact@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	_TwoPhaseStateLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
LBB0_17:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_twophaseExitRegistered,4,2     ## @twophaseExitRegistered
	.comm	_AtProcExit_Twophase,4,2        ## @AtProcExit_Twophase
	.comm	_TwoPhaseStateLock,4,2          ## @TwoPhaseStateLock
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_TwoPhaseState,8,3              ## @TwoPhaseState
	.comm	_ProcGlobal,8,3                 ## @ProcGlobal
	.comm	_InvalidBackendId,8,3           ## @InvalidBackendId
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE,4,2 ## @ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prepared transaction with identifier \"%s\" is busy"

	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ## @ERRCODE_INSUFFICIENT_PRIVILEGE
L_.str.1:                               ## @.str.1
	.asciz	"permission denied to finish prepared transaction"

L_.str.2:                               ## @.str.2
	.asciz	"Must be superuser or the user that prepared the transaction."

	.comm	_MyDatabaseId,8,3               ## @MyDatabaseId
	.comm	_ERRCODE_FEATURE_NOT_SUPPORTED,4,2 ## @ERRCODE_FEATURE_NOT_SUPPORTED
L_.str.3:                               ## @.str.3
	.asciz	"prepared transaction belongs to another database"

L_.str.4:                               ## @.str.4
	.asciz	"Connect to the database where the transaction was prepared to finish it."

	.comm	_MyBackendId,8,3                ## @MyBackendId
	.comm	_MyLockedGxact,8,3              ## @MyLockedGxact
	.comm	_ERRCODE_UNDEFINED_OBJECT,4,2   ## @ERRCODE_UNDEFINED_OBJECT
L_.str.5:                               ## @.str.5
	.asciz	"prepared transaction with identifier \"%s\" does not exist"

	.no_dead_strip	_LockGXact
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LockGXact
_LockGXact:                             ; @LockGXact
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x19, _twophaseExitRegistered@GOTPAGE
Lloh1:
	ldr	x19, [x19, _twophaseExitRegistered@GOTPAGEOFF]
	ldr	w8, [x19]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _AtProcExit_Twophase@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AtProcExit_Twophase@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_before_shmem_exit
	mov	w8, #1
	str	w8, [x19]
LBB0_2:
Lloh5:
	adrp	x23, _TwoPhaseStateLock@GOTPAGE
Lloh6:
	ldr	x23, [x23, _TwoPhaseStateLock@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh7:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_LWLockAcquire
Lloh10:
	adrp	x22, _TwoPhaseState@GOTPAGE
Lloh11:
	ldr	x22, [x22, _TwoPhaseState@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x26, #0
Lloh12:
	adrp	x27, _ProcGlobal@GOTPAGE
Lloh13:
	ldr	x27, [x27, _ProcGlobal@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x26, #1
	ldrsw	x9, [x8]
	cmp	x26, x9
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, #8]
	ldr	x19, [x9, x26, lsl #3]
	ldr	w9, [x19, #28]
	cbz	w9, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x24, [x19]
	ldr	x8, [x27]
	ldr	x25, [x8]
	ldr	w0, [x19, #24]
	mov	x1, x21
	bl	_strcmp
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22]
	b	LBB0_4
LBB0_8:
	ldr	w0, [x23]
	bl	_LWLockRelease
Lloh14:
	adrp	x8, _ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w19, [x8]
Lloh17:
	adrp	x8, _ERRCODE_UNDEFINED_OBJECT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERRCODE_UNDEFINED_OBJECT@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_errcode
	str	x21, [sp]
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
	mov	x19, #0
	b	LBB0_17
LBB0_9:
	ldr	x8, [x19, #8]
Lloh22:
	adrp	x9, _InvalidBackendId@GOTPAGE
Lloh23:
	ldr	x9, [x9, _InvalidBackendId@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
Lloh25:
	adrp	x8, _ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w22, [x8]
Lloh28:
	adrp	x8, _ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_errcode
	str	x21, [sp]
Lloh31:
	adrp	x0, l_.str@PAGE
Lloh32:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_11:
	ldr	x8, [x19, #16]
	cmp	x8, x20
	b.eq	LBB0_14
; %bb.12:
	mov	x0, x20
	bl	_superuser_arg
	cbnz	w0, LBB0_14
; %bb.13:
Lloh33:
	adrp	x8, _ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w20, [x8]
Lloh36:
	adrp	x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_errcode
Lloh39:
	adrp	x0, l_.str.1@PAGE
Lloh40:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
Lloh41:
	adrp	x0, l_.str.2@PAGE
Lloh42:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_14:
Lloh43:
	adrp	x8, _MyDatabaseId@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MyDatabaseId@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	ldr	x9, [x25, x24, lsl #3]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.15:
Lloh46:
	adrp	x8, _ERROR@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh48:
	ldr	w20, [x8]
Lloh49:
	adrp	x8, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	bl	_errcode
Lloh52:
	adrp	x0, l_.str.3@PAGE
Lloh53:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_errmsg
Lloh54:
	adrp	x0, l_.str.4@PAGE
Lloh55:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_16:
Lloh56:
	adrp	x8, _MyBackendId@GOTPAGE
Lloh57:
	ldr	x8, [x8, _MyBackendId@GOTPAGEOFF]
Lloh58:
	ldr	x8, [x8]
	str	x8, [x19, #8]
Lloh59:
	adrp	x8, _MyLockedGxact@GOTPAGE
Lloh60:
	ldr	x8, [x8, _MyLockedGxact@GOTPAGEOFF]
Lloh61:
	str	x19, [x8]
	ldr	w0, [x23]
	bl	_LWLockRelease
LBB0_17:
	mov	x0, x19
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotStr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_twophaseExitRegistered,4,2     ; @twophaseExitRegistered
	.comm	_AtProcExit_Twophase,4,2        ; @AtProcExit_Twophase
	.comm	_TwoPhaseStateLock,4,2          ; @TwoPhaseStateLock
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_TwoPhaseState,8,3              ; @TwoPhaseState
	.comm	_ProcGlobal,8,3                 ; @ProcGlobal
	.comm	_InvalidBackendId,8,3           ; @InvalidBackendId
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE,4,2 ; @ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prepared transaction with identifier \"%s\" is busy"

	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ; @ERRCODE_INSUFFICIENT_PRIVILEGE
l_.str.1:                               ; @.str.1
	.asciz	"permission denied to finish prepared transaction"

l_.str.2:                               ; @.str.2
	.asciz	"Must be superuser or the user that prepared the transaction."

	.comm	_MyDatabaseId,8,3               ; @MyDatabaseId
	.comm	_ERRCODE_FEATURE_NOT_SUPPORTED,4,2 ; @ERRCODE_FEATURE_NOT_SUPPORTED
l_.str.3:                               ; @.str.3
	.asciz	"prepared transaction belongs to another database"

l_.str.4:                               ; @.str.4
	.asciz	"Connect to the database where the transaction was prepared to finish it."

	.comm	_MyBackendId,8,3                ; @MyBackendId
	.comm	_MyLockedGxact,8,3              ; @MyLockedGxact
	.comm	_ERRCODE_UNDEFINED_OBJECT,4,2   ; @ERRCODE_UNDEFINED_OBJECT
l_.str.5:                               ; @.str.5
	.asciz	"prepared transaction with identifier \"%s\" does not exist"

	.no_dead_strip	_LockGXact
.subsections_via_symbols
