	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VirtualXactLock                ## -- Begin function VirtualXactLock
	.p2align	4, 0x90
_VirtualXactLock:                       ## @VirtualXactLock
	.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	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_VirtualTransactionIdIsValid
	movl	%eax, %edi
	callq	_Assert
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_SET_LOCKTAG_VIRTUALTRANSACTION
	movq	%r14, %rdi
	callq	_BackendIdGetProc
	movq	%rax, %r15
	movl	$1, %eax
	testq	%r15, %r15
	je	LBB0_12
## %bb.1:
	movq	%r15, %r13
	addq	$20, %r13
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_LWLockAcquire
	cmpq	%r14, (%r15)
	jne	LBB0_3
## %bb.2:
	cmpq	%rbx, 8(%r15)
	jne	LBB0_3
## %bb.4:
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.6:
	cmpl	$0, 16(%r15)
	je	LBB0_10
## %bb.7:
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	callq	_LockTagHashCode
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_LockHashPartitionLock
	movq	%rax, %r12
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_LWLockAcquire
	movq	_LockMethods@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_DEFAULT_LOCKMETHOD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	_ExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_SetupLockInTable
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_LWLockRelease
	movq	%r13, %rdi
	callq	_LWLockRelease
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	leaq	L_.str.1(%rip), %rdi
	callq	_errhint
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_9:
	movl	(%rbx), %edi
	movq	_ExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_GrantLock
	movq	%r12, %rdi
	callq	_LWLockRelease
	movl	$0, 16(%r15)
LBB0_10:
	movq	%r13, %rdi
	callq	_LWLockRelease
	movq	_ShareLock@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_LockAcquire
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_LockRelease
	jmp	LBB0_11
LBB0_3:
	movq	%r13, %rdi
	callq	_LWLockRelease
LBB0_11:
	movl	$1, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r13, %rdi
	callq	_LWLockRelease
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_LockMethods,8,3                ## @LockMethods
	.comm	_DEFAULT_LOCKMETHOD,8,3         ## @DEFAULT_LOCKMETHOD
	.comm	_ExclusiveLock,4,2              ## @ExclusiveLock
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ## @ERRCODE_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of shared memory"

L_.str.1:                               ## @.str.1
	.asciz	"You might need to increase max_locks_per_transaction."

	.comm	_ShareLock,4,2                  ## @ShareLock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VirtualXactLock                ; -- Begin function VirtualXactLock
	.p2align	2
_VirtualXactLock:                       ; @VirtualXactLock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	bl	_VirtualTransactionIdIsValid
	bl	_Assert
	mov	x1, x23
	mov	x2, x22
	bl	_SET_LOCKTAG_VIRTUALTRANSACTION
	mov	x0, x23
	bl	_BackendIdGetProc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	add	x19, x0, #20
Lloh0:
	adrp	x24, _LW_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _LW_EXCLUSIVE@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_LWLockAcquire
	ldr	x8, [x20]
	cmp	x8, x23
	b.ne	LBB0_9
; %bb.2:
	ldr	x8, [x20, #8]
	cmp	x8, x22
	b.ne	LBB0_9
; %bb.3:
	cbz	w21, LBB0_12
; %bb.4:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_8
; %bb.5:
	add	x0, sp, #12
	bl	_LockTagHashCode
	mov	x22, x0
	bl	_LockHashPartitionLock
	mov	x21, x0
	ldr	w1, [x24]
	bl	_LWLockAcquire
Lloh2:
	adrp	x8, _LockMethods@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LockMethods@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _DEFAULT_LOCKMETHOD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DEFAULT_LOCKMETHOD@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
Lloh8:
	adrp	x24, _ExclusiveLock@GOTPAGE
Lloh9:
	ldr	x24, [x24, _ExclusiveLock@GOTPAGEOFF]
	ldr	w4, [x24]
	add	x2, sp, #12
	mov	x1, x20
	mov	x3, x22
	bl	_SetupLockInTable
	mov	x22, x0
	cbnz	x0, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_LWLockRelease
	mov	x0, x19
	bl	_LWLockRelease
Lloh10:
	adrp	x8, _ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w23, [x8]
Lloh13:
	adrp	x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_errcode
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_7:
	ldr	w0, [x22]
	ldr	w2, [x24]
	mov	x1, x22
	bl	_GrantLock
	mov	x0, x21
	bl	_LWLockRelease
	str	wzr, [x20, #16]
LBB0_8:
	mov	x0, x19
	bl	_LWLockRelease
Lloh20:
	adrp	x19, _ShareLock@GOTPAGE
Lloh21:
	ldr	x19, [x19, _ShareLock@GOTPAGEOFF]
	ldr	w1, [x19]
	add	x0, sp, #12
	mov	w2, #0
	mov	w3, #0
	bl	_LockAcquire
	ldr	w1, [x19]
	add	x0, sp, #12
	mov	w2, #0
	bl	_LockRelease
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_LWLockRelease
LBB0_10:
	mov	w0, #1
LBB0_11:
	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
	add	sp, sp, #80
	ret
LBB0_12:
	mov	x0, x19
	bl	_LWLockRelease
	mov	w0, #0
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_LockMethods,8,3                ; @LockMethods
	.comm	_DEFAULT_LOCKMETHOD,8,3         ; @DEFAULT_LOCKMETHOD
	.comm	_ExclusiveLock,4,2              ; @ExclusiveLock
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ; @ERRCODE_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of shared memory"

l_.str.1:                               ; @.str.1
	.asciz	"You might need to increase max_locks_per_transaction."

	.comm	_ShareLock,4,2                  ; @ShareLock
.subsections_via_symbols
