	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwpmq_initialize             ## -- Begin function __lwpmq_initialize
	.p2align	4, 0x90
___lwpmq_initialize:                    ## @__lwpmq_initialize
	.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	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movl	%edx, (%rdi)
	movq	$0, 32(%rdi)
	movl	%ecx, 4(%rdi)
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	___lwpmq_set_notify
	leal	4(%r14), %ebx
	andl	$-4, %ebx
	testb	$3, %r14b
	cmovel	%r14d, %ebx
	addl	$4, %ebx
	movl	%ebx, %edi
	imull	%r15d, %edi
	callq	___lwp_wkspace_allocate
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	leaq	24(%r13), %rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	___lwp_queue_initialize
	leaq	12(%r13), %rdi
	callq	___lwp_queue_init_empty
	addq	$8, %r13
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	___lwpmq_is_priority
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	_LWP_THREADQ_MODEFIFO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_LWP_THREADQ_MODEPRIORITY@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movq	_LWP_STATES_WAITING_FOR_MESSAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_LWP_MQ_STATUS_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	___lwp_threadqueue_init
	movl	$1, %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LWP_THREADQ_MODEPRIORITY,4,2   ## @LWP_THREADQ_MODEPRIORITY
	.comm	_LWP_THREADQ_MODEFIFO,4,2       ## @LWP_THREADQ_MODEFIFO
	.comm	_LWP_STATES_WAITING_FOR_MESSAGE,4,2 ## @LWP_STATES_WAITING_FOR_MESSAGE
	.comm	_LWP_MQ_STATUS_TIMEOUT,4,2      ## @LWP_MQ_STATUS_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwpmq_initialize             ; -- Begin function __lwpmq_initialize
	.p2align	2
___lwpmq_initialize:                    ; @__lwpmq_initialize
	.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	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	str	xzr, [x0, #32]
	stp	w2, w3, [x0]
	mov	x1, #0
	mov	x2, #0
	bl	___lwpmq_set_notify
	add	w8, w22, #4
	and	w8, w8, #0xfffffffc
	tst	w22, #0x3
	csel	w8, w22, w8, eq
	add	w22, w8, #4
	mul	w0, w22, w21
	bl	___lwp_wkspace_allocate
	str	x0, [x20, #16]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x0
	add	x0, x20, #24
	mov	x2, x21
	mov	x3, x22
	bl	___lwp_queue_initialize
	add	x0, x20, #12
	bl	___lwp_queue_init_empty
	add	x20, x20, #8
	mov	x0, x19
	bl	___lwpmq_is_priority
Lloh0:
	adrp	x8, _LWP_THREADQ_MODEPRIORITY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LWP_THREADQ_MODEPRIORITY@GOTPAGEOFF]
Lloh2:
	adrp	x9, _LWP_THREADQ_MODEFIFO@GOTPAGE
Lloh3:
	ldr	x9, [x9, _LWP_THREADQ_MODEFIFO@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
Lloh4:
	adrp	x8, _LWP_STATES_WAITING_FOR_MESSAGE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LWP_STATES_WAITING_FOR_MESSAGE@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
Lloh7:
	adrp	x8, _LWP_MQ_STATUS_TIMEOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LWP_MQ_STATUS_TIMEOUT@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	mov	x0, x20
	bl	___lwp_threadqueue_init
	mov	w0, #1
LBB0_2:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_LWP_THREADQ_MODEPRIORITY,4,2   ; @LWP_THREADQ_MODEPRIORITY
	.comm	_LWP_THREADQ_MODEFIFO,4,2       ; @LWP_THREADQ_MODEFIFO
	.comm	_LWP_STATES_WAITING_FOR_MESSAGE,4,2 ; @LWP_STATES_WAITING_FOR_MESSAGE
	.comm	_LWP_MQ_STATUS_TIMEOUT,4,2      ; @LWP_MQ_STATUS_TIMEOUT
.subsections_via_symbols
