	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MQ_Init                        ## -- Begin function MQ_Init
	.p2align	4, 0x90
_MQ_Init:                               ## @MQ_Init
	.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
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	___lwp_mqbox_allocate
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	movq	_LWP_MQ_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	%rbx, %rdi
	addq	$4, %rdi
	leaq	-32(%rbp), %rsi
	movl	%r15d, %edx
	movl	$4, %ecx
	callq	___lwpmq_initialize
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	_LWP_OBJTYPE_MBOX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWP_OBJMASKTYPE
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_LWP_OBJMASKID
	orl	%r15d, %eax
	cltq
	movq	%rax, (%r14)
	xorl	%eax, %eax
	callq	___lwp_thread_dispatchenable
	movq	_MQ_ERROR_SUCCESSFUL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movl	$-1, %eax
	jmp	LBB0_9
LBB0_6:
	movq	%rbx, %rdi
	callq	___lwp_mqbox_free
	xorl	%eax, %eax
	callq	___lwp_thread_dispatchenable
LBB0_7:
	movq	_MQ_ERROR_TOOMANY@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MQ_ERROR_TOOMANY,4,2           ## @MQ_ERROR_TOOMANY
	.comm	_LWP_MQ_FIFO,4,2                ## @LWP_MQ_FIFO
	.comm	_LWP_OBJTYPE_MBOX,4,2           ## @LWP_OBJTYPE_MBOX
	.comm	_MQ_ERROR_SUCCESSFUL,4,2        ## @MQ_ERROR_SUCCESSFUL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MQ_Init                        ; -- Begin function MQ_Init
	.p2align	2
_MQ_Init:                               ; @MQ_Init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	bl	___lwp_mqbox_allocate
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
Lloh0:
	adrp	x8, _LWP_MQ_FIFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LWP_MQ_FIFO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x0, x0, #4
	add	x1, sp, #8
	mov	x2, x21
	mov	w3, #4
	bl	___lwpmq_initialize
	cbz	w0, LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _LWP_OBJTYPE_MBOX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LWP_OBJTYPE_MBOX@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_LWP_OBJMASKTYPE
	mov	x21, x0
	ldr	w0, [x20]
	bl	_LWP_OBJMASKID
	orr	w8, w0, w21
	sxtw	x8, w8
	str	x8, [x19]
	bl	___lwp_thread_dispatchenable
Lloh6:
	adrp	x8, _MQ_ERROR_SUCCESSFUL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MQ_ERROR_SUCCESSFUL@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	mov	w0, #-1
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	___lwp_mqbox_free
	bl	___lwp_thread_dispatchenable
LBB0_6:
Lloh8:
	adrp	x8, _MQ_ERROR_TOOMANY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MQ_ERROR_TOOMANY@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MQ_ERROR_TOOMANY,4,2           ; @MQ_ERROR_TOOMANY
	.comm	_LWP_MQ_FIFO,4,2                ; @LWP_MQ_FIFO
	.comm	_LWP_OBJTYPE_MBOX,4,2           ; @LWP_OBJTYPE_MBOX
	.comm	_MQ_ERROR_SUCCESSFUL,4,2        ; @MQ_ERROR_SUCCESSFUL
.subsections_via_symbols
