	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DeadLockCheck                  ## -- Begin function DeadLockCheck
	.p2align	4, 0x90
_DeadLockCheck:                         ## @DeadLockCheck
	.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	%rdi, %r14
	movq	_nCurConstraints@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_nPossibleConstraints@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_nWaitOrders@GOTPCREL(%rip), %rbx
	movl	$0, (%rbx)
	movq	_blocking_autovacuum_proc@GOTPCREL(%rip), %r15
	movq	$0, (%r15)
	callq	_DeadLockCheckRecurse
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	xorl	%eax, %eax
	callq	_TRACE_POSTGRESQL_DEADLOCK_FOUND
	movl	$0, (%rbx)
	movq	_possibleConstraints@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
	callq	_FindLockCycle
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_11:
	movq	_DS_HARD_DEADLOCK@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$0, (%rbx)
	jle	LBB0_12
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_GetLocksMethodTable
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_ProcLockWakeup
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	_nWaitOrders@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rcx
	jge	LBB0_7
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	_waitOrders@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rcx,2), %rcx
	movq	16(%rax,%rcx,8), %r14
	movq	8(%rax,%rcx,8), %r12
	movl	(%rax,%rcx,8), %r15d
	xorl	%edi, %edi
	cmpl	(%r14), %r15d
	sete	%dil
	callq	_Assert
	movq	%r14, %rdi
	callq	_ProcQueueInit
	testl	%r15d, %r15d
	jle	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	4(%r14), %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12,%r13,8), %rsi
	movq	%rbx, %rdi
	callq	_SHMQueueInsertBefore
	incl	(%r14)
	incq	%r13
	cmpq	%r13, %r15
	jne	LBB0_5
	jmp	LBB0_6
LBB0_7:
	testl	%eax, %eax
	movq	_blocking_autovacuum_proc@GOTPCREL(%rip), %r15
	jle	LBB0_12
## %bb.8:
	movq	_DS_SOFT_DEADLOCK@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	cmpq	$0, (%r15)
	je	LBB0_14
## %bb.13:
	movq	_DS_BLOCKED_BY_AUTOVACUUM@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_DS_NO_DEADLOCK@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_nCurConstraints,8,3            ## @nCurConstraints
	.comm	_nPossibleConstraints,8,3       ## @nPossibleConstraints
	.comm	_nWaitOrders,4,2                ## @nWaitOrders
	.comm	_blocking_autovacuum_proc,8,3   ## @blocking_autovacuum_proc
	.comm	_possibleConstraints,4,2        ## @possibleConstraints
	.comm	_FATAL,4,2                      ## @FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"deadlock seems to have disappeared"

	.comm	_DS_HARD_DEADLOCK,4,2           ## @DS_HARD_DEADLOCK
	.comm	_waitOrders,8,3                 ## @waitOrders
	.comm	_DS_SOFT_DEADLOCK,4,2           ## @DS_SOFT_DEADLOCK
	.comm	_DS_BLOCKED_BY_AUTOVACUUM,4,2   ## @DS_BLOCKED_BY_AUTOVACUUM
	.comm	_DS_NO_DEADLOCK,4,2             ## @DS_NO_DEADLOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DeadLockCheck                  ; -- Begin function DeadLockCheck
	.p2align	2
_DeadLockCheck:                         ; @DeadLockCheck
	.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	x19, x0
Lloh0:
	adrp	x8, _nCurConstraints@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nCurConstraints@GOTPAGEOFF]
Lloh2:
	str	xzr, [x8]
Lloh3:
	adrp	x8, _nPossibleConstraints@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nPossibleConstraints@GOTPAGEOFF]
Lloh5:
	str	xzr, [x8]
Lloh6:
	adrp	x21, _nWaitOrders@GOTPAGE
Lloh7:
	ldr	x21, [x21, _nWaitOrders@GOTPAGEOFF]
	str	wzr, [x21]
Lloh8:
	adrp	x22, _blocking_autovacuum_proc@GOTPAGE
Lloh9:
	ldr	x22, [x22, _blocking_autovacuum_proc@GOTPAGEOFF]
	str	xzr, [x22]
	bl	_DeadLockCheckRecurse
	cbz	x0, LBB0_5
; %bb.1:
	bl	_TRACE_POSTGRESQL_DEADLOCK_FOUND
	str	wzr, [x21]
Lloh10:
	adrp	x8, _possibleConstraints@GOTPAGE
Lloh11:
	ldr	x8, [x8, _possibleConstraints@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_FindLockCycle
	cbnz	w0, LBB0_3
; %bb.2:
Lloh13:
	adrp	x8, _FATAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_3:
Lloh18:
	adrp	x8, _DS_HARD_DEADLOCK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DS_HARD_DEADLOCK@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	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
LBB0_5:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.6:
	mov	x23, #0
Lloh20:
	adrp	x24, _waitOrders@GOTPAGE
Lloh21:
	ldr	x24, [x24, _waitOrders@GOTPAGEOFF]
	mov	w25, #24
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_GetLocksMethodTable
	mov	x1, x19
	bl	_ProcLockWakeup
	add	x23, x23, #1
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	x8, [x24]
	madd	x8, x23, x25, x8
	ldp	x26, x19, [x8, #8]
	ldr	w27, [x8]
	ldr	w8, [x19]
	cmp	w27, w8
	cset	w0, eq
	bl	_Assert
	mov	x0, x19
	bl	_ProcQueueInit
	cmp	w27, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x20, x19, #4
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x26], #8
	mov	x0, x20
	bl	_SHMQueueInsertBefore
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	subs	x27, x27, #1
	b.ne	LBB0_10
	b	LBB0_7
LBB0_11:
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.12:
Lloh22:
	adrp	x8, _DS_SOFT_DEADLOCK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DS_SOFT_DEADLOCK@GOTPAGEOFF]
	b	LBB0_4
LBB0_13:
	ldr	x8, [x22]
	cbz	x8, LBB0_15
; %bb.14:
Lloh24:
	adrp	x8, _DS_BLOCKED_BY_AUTOVACUUM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DS_BLOCKED_BY_AUTOVACUUM@GOTPAGEOFF]
	b	LBB0_4
LBB0_15:
Lloh26:
	adrp	x8, _DS_NO_DEADLOCK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DS_NO_DEADLOCK@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_nCurConstraints,8,3            ; @nCurConstraints
	.comm	_nPossibleConstraints,8,3       ; @nPossibleConstraints
	.comm	_nWaitOrders,4,2                ; @nWaitOrders
	.comm	_blocking_autovacuum_proc,8,3   ; @blocking_autovacuum_proc
	.comm	_possibleConstraints,4,2        ; @possibleConstraints
	.comm	_FATAL,4,2                      ; @FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"deadlock seems to have disappeared"

	.comm	_DS_HARD_DEADLOCK,4,2           ; @DS_HARD_DEADLOCK
	.comm	_waitOrders,8,3                 ; @waitOrders
	.comm	_DS_SOFT_DEADLOCK,4,2           ; @DS_SOFT_DEADLOCK
	.comm	_DS_BLOCKED_BY_AUTOVACUUM,4,2   ; @DS_BLOCKED_BY_AUTOVACUUM
	.comm	_DS_NO_DEADLOCK,4,2             ; @DS_NO_DEADLOCK
.subsections_via_symbols
