	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwpmq_msg_insert             ## -- Begin function __lwpmq_msg_insert
	.p2align	4, 0x90
___lwpmq_msg_insert:                    ## @__lwpmq_msg_insert
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	incl	(%rdi)
	movq	%rsi, %r15
	movl	%edx, (%rsi)
	cmpl	$128, %edx
	je	LBB0_3
## %bb.1:
	cmpl	$129, %edx
	jne	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	___lwpmq_msg_append
	cmpl	$1, (%r14)
	je	LBB0_10
	jmp	LBB0_11
LBB0_3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	___lwpmq_msg_prepend
	cmpl	$1, (%r14)
	je	LBB0_10
	jmp	LBB0_11
LBB0_4:
	leaq	16(%r14), %r12
	movq	16(%r14), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	___lwp_queue_istail
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rbx), %eax
	cmpl	(%r15), %eax
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rbx), %rbx
	jmp	LBB0_5
LBB0_8:
	movl	(%rbx), %edi
	addq	$4, %r15
	movq	%r15, %rsi
	callq	___lwp_queue_insert
	cmpl	$1, (%r14)
	jne	LBB0_11
LBB0_10:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movl	4(%r14), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwpmq_msg_insert             ; -- Begin function __lwpmq_msg_insert
	.p2align	2
___lwpmq_msg_insert:                    ; @__lwpmq_msg_insert
	.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
	ldr	w8, [x0]
	add	w8, w8, #1
	str	w8, [x0]
	str	w2, [x1]
	cmp	w2, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w2, #129
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	___lwpmq_msg_append
	b	LBB0_9
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	bl	___lwpmq_msg_prepend
	b	LBB0_9
LBB0_4:
	mov	x22, x19
	ldr	x21, [x22, #16]!
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	___lwp_queue_istail
	cbnz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x20]
	cmp	w8, w9
	b.gt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x21, [x21, #8]
	b	LBB0_5
LBB0_8:
	ldr	w0, [x21]
	add	x1, x20, #4
	bl	___lwp_queue_insert
LBB0_9:
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.10:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_12
; %bb.11:
	ldr	w0, [x19, #4]
	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
	br	x1
LBB0_12:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
