	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LWLockQueueSelf
_LWLockQueueSelf:                       ## @LWLockQueueSelf
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_MyProc@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpl	$0, (%rax)
	je	LBB0_4
LBB0_3:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_4:
	movq	%rbx, %rdi
	callq	_LWLockWaitListLock
	leaq	8(%rbx), %rdi
	movq	_LW_FLAG_HAS_WAITERS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pg_atomic_fetch_or_u32
	movq	(%r15), %rax
	movl	$1, (%rax)
	movq	%r14, 8(%rax)
	movq	_LW_WAIT_UNTIL_FREE@GOTPCREL(%rip), %rcx
	leaq	4(%rbx), %rdi
	movl	4(%rax), %esi
	movq	_lwWaitLink@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpq	%r14, (%rcx)
	jne	LBB0_6
## %bb.5:
	callq	_proclist_push_head
	jmp	LBB0_7
LBB0_6:
	callq	_proclist_push_tail
LBB0_7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_LWLockWaitListUnlock           ## TAILCALL
LBB0_1:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	movq	(%r15), %rax
	cmpl	$0, (%rax)
	jne	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_MyProc,8,3                     ## @MyProc
	.comm	_PANIC,4,2                      ## @PANIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot wait without a PGPROC structure"

L_.str.1:                               ## @.str.1
	.asciz	"queueing for lock while waiting on another one"

	.comm	_LW_FLAG_HAS_WAITERS,4,2        ## @LW_FLAG_HAS_WAITERS
	.comm	_LW_WAIT_UNTIL_FREE,8,3         ## @LW_WAIT_UNTIL_FREE
	.comm	_lwWaitLink,4,2                 ## @lwWaitLink
	.no_dead_strip	_LWLockQueueSelf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LWLockQueueSelf
_LWLockQueueSelf:                       ; @LWLockQueueSelf
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _MyProc@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MyProc@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x22, _PANIC@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PANIC@GOTPAGEOFF]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
LBB0_2:
	ldr	w0, [x22]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_3:
	mov	x0, x19
	bl	_LWLockWaitListLock
	add	x0, x19, #8
Lloh6:
	adrp	x8, _LW_FLAG_HAS_WAITERS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LW_FLAG_HAS_WAITERS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_pg_atomic_fetch_or_u32
	ldr	x8, [x21]
	mov	w9, #1
	str	w9, [x8]
	str	x20, [x8, #8]
Lloh9:
	adrp	x9, _LW_WAIT_UNTIL_FREE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LW_WAIT_UNTIL_FREE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x19, #4
	ldr	w1, [x8, #4]
Lloh12:
	adrp	x8, _lwWaitLink@GOTPAGE
Lloh13:
	ldr	x8, [x8, _lwWaitLink@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	cmp	x9, x20
	b.ne	LBB0_5
; %bb.4:
	bl	_proclist_push_head
	b	LBB0_6
LBB0_5:
	bl	_proclist_push_tail
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_LWLockWaitListUnlock
LBB0_7:
	ldr	w0, [x22]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	ldr	x8, [x21]
	ldr	w8, [x8]
	cbnz	w8, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MyProc,8,3                     ; @MyProc
	.comm	_PANIC,4,2                      ; @PANIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot wait without a PGPROC structure"

l_.str.1:                               ; @.str.1
	.asciz	"queueing for lock while waiting on another one"

	.comm	_LW_FLAG_HAS_WAITERS,4,2        ; @LW_FLAG_HAS_WAITERS
	.comm	_LW_WAIT_UNTIL_FREE,8,3         ; @LW_WAIT_UNTIL_FREE
	.comm	_lwWaitLink,4,2                 ; @lwWaitLink
	.no_dead_strip	_LWLockQueueSelf
.subsections_via_symbols
