	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shm_mq_wait_internal
_shm_mq_wait_internal:                  ## @shm_mq_wait_internal
	.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	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_SpinLockAcquire
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	(%r14), %r13
	testq	%r13, %r13
	setne	%r14b
	movq	%r15, %rdi
	callq	_SpinLockRelease
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%rbx)
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_MyLatch@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_WL_EXIT_ON_PM_DEATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_WAIT_EVENT_MQ_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edx, %edx
	callq	_WaitLatch
	movl	(%rbx), %edi
	callq	_ResetLatch
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	%r15, %rdi
	callq	_SpinLockAcquire
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r13
	testq	%r13, %r13
	setne	%r14b
	movq	%r15, %rdi
	callq	_SpinLockRelease
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	setne	%al
	jne	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testq	%r13, %r13
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testq	%r12, %r12
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	leaq	-60(%rbp), %rsi
	callq	_GetBackgroundWorkerPid
	movq	_BGWH_STARTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_BGWH_NOT_YET_STARTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	notb	%al
	andb	%r14b, %al
	movzbl	%al, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGWH_STARTED,8,3               ## @BGWH_STARTED
	.comm	_BGWH_NOT_YET_STARTED,8,3       ## @BGWH_NOT_YET_STARTED
	.comm	_MyLatch,4,2                    ## @MyLatch
	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ## @WL_EXIT_ON_PM_DEATH
	.comm	_WAIT_EVENT_MQ_INTERNAL,4,2     ## @WAIT_EVENT_MQ_INTERNAL
	.no_dead_strip	_shm_mq_wait_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shm_mq_wait_internal
_shm_mq_wait_internal:                  ; @shm_mq_wait_internal
	.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, x2
	mov	x20, x1
	mov	x21, x0
	add	x22, x0, #8
	mov	x0, x22
	bl	_SpinLockAcquire
	ldr	x23, [x20]
	cmp	x23, #0
	cset	w27, ne
	mov	x0, x22
	bl	_SpinLockRelease
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w8, ne
	ccmp	x23, #0, #0, eq
	b.ne	LBB0_6
; %bb.1:
Lloh0:
	adrp	x23, _MyLatch@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MyLatch@GOTPAGEOFF]
Lloh2:
	adrp	x24, _WL_LATCH_SET@GOTPAGE
Lloh3:
	ldr	x24, [x24, _WL_LATCH_SET@GOTPAGEOFF]
Lloh4:
	adrp	x25, _WL_EXIT_ON_PM_DEATH@GOTPAGE
Lloh5:
	ldr	x25, [x25, _WL_EXIT_ON_PM_DEATH@GOTPAGEOFF]
Lloh6:
	adrp	x26, _WAIT_EVENT_MQ_INTERNAL@GOTPAGE
Lloh7:
	ldr	x26, [x26, _WAIT_EVENT_MQ_INTERNAL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x19, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #12
	mov	x0, x19
	bl	_GetBackgroundWorkerPid
Lloh8:
	adrp	x8, _BGWH_STARTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BGWH_STARTED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _BGWH_NOT_YET_STARTED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BGWH_NOT_YET_STARTED@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	b.ne	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x23]
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w1, w9, w8
	ldr	w3, [x26]
	mov	w2, #0
	bl	_WaitLatch
	ldr	w0, [x23]
	bl	_ResetLatch
	bl	_CHECK_FOR_INTERRUPTS
	mov	x0, x22
	bl	_SpinLockAcquire
	ldr	x28, [x20]
	cmp	x28, #0
	cset	w27, ne
	mov	x0, x22
	bl	_SpinLockRelease
	ldr	x9, [x21]
	cmp	x9, #0
	cset	w8, ne
	cbnz	x9, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	x28, LBB0_2
LBB0_6:
	bic	w0, w27, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BGWH_STARTED,8,3               ; @BGWH_STARTED
	.comm	_BGWH_NOT_YET_STARTED,8,3       ; @BGWH_NOT_YET_STARTED
	.comm	_MyLatch,4,2                    ; @MyLatch
	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ; @WL_EXIT_ON_PM_DEATH
	.comm	_WAIT_EVENT_MQ_INTERNAL,4,2     ; @WAIT_EVENT_MQ_INTERNAL
	.no_dead_strip	_shm_mq_wait_internal
.subsections_via_symbols
