	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwpmq_submit                 ## -- Begin function __lwpmq_submit
	.p2align	4, 0x90
___lwpmq_submit:                        ## @__lwpmq_submit
	.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
	cmpl	%ecx, (%rdi)
	jge	LBB0_3
## %bb.1:
	movq	_LWP_MQ_STATUS_INVALID_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movl	%r9d, %r14d
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	cmpq	16(%rbx), %rax
	jge	LBB0_11
LBB0_5:
	movq	%rbx, %rdi
	callq	___lwpmq_allocate_msg
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rax, %r14
	movq	16(%rax), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	___lwpmq_buffer_copy
	movl	%r15d, 8(%r14)
	movl	%r12d, (%r14)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	___lwpmq_msg_insert
	movq	_LWP_MQ_STATUS_SUCCESSFUL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	leaq	24(%rbx), %rdi
	callq	___lwp_threadqueue_dequeue
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	%rax, %r12
	movq	16(%rax), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	___lwpmq_buffer_copy
	movq	8(%r12), %rax
	movl	%r15d, (%rax)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	movq	_LWP_MQ_STATUS_SUCCESSFUL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_10:
	movq	8(%rbx), %rax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	cmpq	16(%rbx), %rax
	jl	LBB0_5
LBB0_11:
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.12:
	xorl	%eax, %eax
	callq	___lwp_isr_in_progress
	testq	%rax, %rax
	je	LBB0_15
LBB0_9:
	movq	_LWP_MQ_STATUS_UNSATISFIED@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_14:
	movq	_LWP_MQ_STATUS_TOO_MANY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_15:
	movq	__thr_executing@GOTPCREL(%rip), %rax
	movl	%r12d, %r14d
	movq	(%rax), %r12
	callq	__CPU_ISR_Disable
	addq	$24, %rbx
	movq	%rbx, %rdi
	callq	___lwp_threadqueue_csenter
	movq	%rbx, 24(%r12)
	movl	%r13d, 4(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r12)
	movslq	%r15d, %rax
	movq	%rax, 8(%r12)
	movl	%r14d, (%r12)
	callq	__CPU_ISR_Restore
	movq	%rbx, %rdi
	movl	16(%rbp), %esi
	callq	___lwp_threadqueue_enqueue
	movq	_LWP_MQ_STATUS_UNSATISFIED_WAIT@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LWP_MQ_STATUS_INVALID_SIZE,4,2 ## @LWP_MQ_STATUS_INVALID_SIZE
	.comm	_LWP_MQ_STATUS_SUCCESSFUL,4,2   ## @LWP_MQ_STATUS_SUCCESSFUL
	.comm	_LWP_MQ_STATUS_UNSATISFIED,4,2  ## @LWP_MQ_STATUS_UNSATISFIED
	.comm	_LWP_MQ_STATUS_TOO_MANY,4,2     ## @LWP_MQ_STATUS_TOO_MANY
	.comm	__thr_executing,8,3             ## @_thr_executing
	.comm	_LWP_MQ_STATUS_UNSATISFIED_WAIT,4,2 ## @LWP_MQ_STATUS_UNSATISFIED_WAIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwpmq_submit                 ; -- Begin function __lwpmq_submit
	.p2align	2
___lwpmq_submit:                        ; @__lwpmq_submit
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0]
	cmp	w8, w3
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _LWP_MQ_STATUS_INVALID_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LWP_MQ_STATUS_INVALID_SIZE@GOTPAGEOFF]
	b	LBB0_15
LBB0_2:
	mov	x22, x6
	mov	x25, x5
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x24, x1
	mov	x23, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_9
LBB0_3:
	ldr	x9, [x23, #16]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.4:
	mov	x0, x23
	bl	___lwpmq_allocate_msg
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
	ldr	x0, [x0, #16]
	mov	x1, x21
	mov	x2, x20
	bl	___lwpmq_buffer_copy
	str	w20, [x22, #8]
	str	w19, [x22]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	bl	___lwpmq_msg_insert
	b	LBB0_11
LBB0_6:
	cbz	w25, LBB0_12
; %bb.7:
	bl	___lwp_isr_in_progress
	cbz	x0, LBB0_14
LBB0_8:
Lloh2:
	adrp	x8, _LWP_MQ_STATUS_UNSATISFIED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LWP_MQ_STATUS_UNSATISFIED@GOTPAGEOFF]
	b	LBB0_15
LBB0_9:
	add	x0, x23, #24
	bl	___lwp_threadqueue_dequeue
	cbz	x0, LBB0_13
; %bb.10:
	mov	x26, x0
	ldr	x0, [x0, #16]
	mov	x1, x21
	mov	x2, x20
	bl	___lwpmq_buffer_copy
	ldr	x8, [x26, #8]
	str	w20, [x8]
	str	w19, [x26]
LBB0_11:
Lloh4:
	adrp	x8, _LWP_MQ_STATUS_SUCCESSFUL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LWP_MQ_STATUS_SUCCESSFUL@GOTPAGEOFF]
	b	LBB0_15
LBB0_12:
Lloh6:
	adrp	x8, _LWP_MQ_STATUS_TOO_MANY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LWP_MQ_STATUS_TOO_MANY@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	ldr	x8, [x23, #8]
	b	LBB0_3
LBB0_14:
Lloh8:
	adrp	x8, __thr_executing@GOTPAGE
Lloh9:
	ldr	x8, [x8, __thr_executing@GOTPAGEOFF]
Lloh10:
	ldr	x25, [x8]
	bl	__CPU_ISR_Disable
	add	x23, x23, #24
	mov	x0, x23
	bl	___lwp_threadqueue_csenter
	stp	x21, x23, [x25, #16]
	sxtw	x8, w20
	str	x8, [x25, #8]
	stp	w19, w24, [x25]
	bl	__CPU_ISR_Restore
	mov	x0, x23
	mov	x1, x22
	bl	___lwp_threadqueue_enqueue
Lloh11:
	adrp	x8, _LWP_MQ_STATUS_UNSATISFIED_WAIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LWP_MQ_STATUS_UNSATISFIED_WAIT@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LWP_MQ_STATUS_INVALID_SIZE,4,2 ; @LWP_MQ_STATUS_INVALID_SIZE
	.comm	_LWP_MQ_STATUS_SUCCESSFUL,4,2   ; @LWP_MQ_STATUS_SUCCESSFUL
	.comm	_LWP_MQ_STATUS_UNSATISFIED,4,2  ; @LWP_MQ_STATUS_UNSATISFIED
	.comm	_LWP_MQ_STATUS_TOO_MANY,4,2     ; @LWP_MQ_STATUS_TOO_MANY
	.comm	__thr_executing,8,3             ; @_thr_executing
	.comm	_LWP_MQ_STATUS_UNSATISFIED_WAIT,4,2 ; @LWP_MQ_STATUS_UNSATISFIED_WAIT
.subsections_via_symbols
