	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AtPrepare_Locks                ## -- Begin function AtPrepare_Locks
	.p2align	4, 0x90
_AtPrepare_Locks:                       ## @AtPrepare_Locks
	.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	_LockMethodLocalHash@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_hash_seq_init
	movq	%rbx, %rdi
	callq	_hash_seq_search
	testq	%rax, %rax
	je	LBB0_19
## %bb.1:
	movq	%rax, %r12
	movl	$4294967294, %ebx               ## imm = 0xFFFFFFFE
	movq	_LOCKTAG_VIRTUALTRANSACTION@GOTPCREL(%rip), %r14
	leaq	-44(%rbp), %r13
	movl	$1, %r15d
	jmp	LBB0_2
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, 12(%r12)
	leaq	-52(%rbp), %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	16(%r12), %eax
	movl	%eax, -56(%rbp)
	movq	_TWOPHASE_RM_LOCK_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	leaq	-56(%rbp), %rdx
	movl	$8, %ecx
	callq	_RegisterTwoPhaseRecord
	leaq	-44(%rbp), %r13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_hash_seq_search
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_19
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	movq	24(%r12), %rax
	cmpq	(%r14), %rax
	je	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%r12)
	jle	LBB0_18
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	48(%r12), %r8
	leaq	-1(%rax), %rdi
	movl	%eax, %r9d
	andl	$3, %r9d
	xorl	%esi, %esi
	cmpq	$3, %rdi
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	jmp	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r10d
	andl	$-4, %r10d
	xorl	%esi, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	(%rax,%rbx), %rcx
	leal	1(%rcx), %edx
	movq	(%r8,%rdx,8), %r11
	movl	%ecx, %ebx
	movq	(%r8,%rbx,8), %r13
	movq	%r13, %rbx
	orq	%r11, %rbx
	decl	%ecx
	movq	(%r8,%rcx,8), %rcx
	addq	$-4, %rax
	movl	%eax, %edx
	movq	(%r8,%rdx,8), %r14
	movq	%r14, %rdx
	orq	%rcx, %rdx
	testq	%r11, %r11
	cmovel	%r15d, %edi
	testq	%r13, %r13
	cmovel	%r15d, %edi
	testq	%rcx, %rcx
	cmovel	%r15d, %edi
	testq	%r14, %r14
	cmovel	%r15d, %edi
	orq	%rbx, %rdx
	movl	$4294967294, %ebx               ## imm = 0xFFFFFFFE
	cmovnel	%r15d, %esi
	addq	$-4, %r10
	jne	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r9, %r9
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	decq	%rax
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %ecx
	cmpq	$0, (%r8,%rcx,8)
	cmovel	%r15d, %edi
	cmovnel	%r15d, %esi
	decq	%rax
	decq	%r9
	jne	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%esi, %esi
	movq	_LOCKTAG_VIRTUALTRANSACTION@GOTPCREL(%rip), %r14
	leaq	-44(%rbp), %r13
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	testl	%edi, %edi
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ERRCODE_FEATURE_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	24(%r12), %r13
	cmpq	$0, 32(%r12)
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_FastPathGetRelationLockEntry
	movq	%rax, 32(%r12)
	movl	(%rax), %eax
	movl	%eax, 40(%r12)
	jmp	LBB0_17
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LockMethodLocalHash,4,2        ## @LockMethodLocalHash
	.comm	_LOCKTAG_VIRTUALTRANSACTION,8,3 ## @LOCKTAG_VIRTUALTRANSACTION
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_FEATURE_NOT_SUPPORTED,4,2 ## @ERRCODE_FEATURE_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot PREPARE while holding both session-level and transaction-level locks on the same object"

	.comm	_TWOPHASE_RM_LOCK_ID,4,2        ## @TWOPHASE_RM_LOCK_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AtPrepare_Locks                ; -- Begin function AtPrepare_Locks
	.p2align	2
_AtPrepare_Locks:                       ; @AtPrepare_Locks
	.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
Lloh0:
	adrp	x8, _LockMethodLocalHash@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LockMethodLocalHash@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #12
	bl	_hash_seq_init
	add	x0, sp, #12
	bl	_hash_seq_search
	cbz	x0, LBB0_14
; %bb.1:
	mov	x21, x0
	mov	x8, sp
	orr	x19, x8, #0x4
Lloh3:
	adrp	x24, _LOCKTAG_VIRTUALTRANSACTION@GOTPAGE
Lloh4:
	ldr	x24, [x24, _LOCKTAG_VIRTUALTRANSACTION@GOTPAGEOFF]
Lloh5:
	adrp	x25, _TWOPHASE_RM_LOCK_ID@GOTPAGE
Lloh6:
	ldr	x25, [x25, _TWOPHASE_RM_LOCK_ID@GOTPAGEOFF]
Lloh7:
	adrp	x26, _ERROR@GOTPAGE
Lloh8:
	ldr	x26, [x26, _ERROR@GOTPAGEOFF]
Lloh9:
	adrp	x27, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGE
Lloh10:
	ldr	x27, [x27, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGEOFF]
Lloh11:
	adrp	x20, l_.str@PAGE
Lloh12:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x21, #12]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x21, #16]
	str	w8, [sp]
	ldr	w0, [x25]
	mov	x2, sp
	mov	w1, #0
	mov	w3, #8
	bl	_RegisterTwoPhaseRecord
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #12
	bl	_hash_seq_search
	mov	x21, x0
	cbz	x0, LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x22, x21
	ldr	x8, [x22, #24]!
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w11, [x21, #8]
	cmp	w11, #1
	b.lt	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #0
	mov	w8, #0
	ldr	x10, [x22, #24]
	add	x11, x11, #1
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w12, w11, #2
	ldr	x12, [x10, w12, uxtw #3]
	cmp	x12, #0
	csinc	w8, w8, wzr, ne
	csinc	w9, w9, wzr, eq
	sub	x11, x11, #1
	cmp	x11, #1
	b.hi	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w9, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	cbz	w8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w23, [x26]
	ldr	w0, [x27]
	bl	_errcode
	mov	x0, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #32]
	cbnz	x8, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_FastPathGetRelationLockEntry
	str	x0, [x21, #32]
	ldr	w8, [x0]
	str	w8, [x21, #40]
	b	LBB0_2
LBB0_14:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LockMethodLocalHash,4,2        ; @LockMethodLocalHash
	.comm	_LOCKTAG_VIRTUALTRANSACTION,8,3 ; @LOCKTAG_VIRTUALTRANSACTION
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_FEATURE_NOT_SUPPORTED,4,2 ; @ERRCODE_FEATURE_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot PREPARE while holding both session-level and transaction-level locks on the same object"

	.comm	_TWOPHASE_RM_LOCK_ID,4,2        ; @TWOPHASE_RM_LOCK_ID
.subsections_via_symbols
