	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lm_heap_insert                 ## -- Begin function lm_heap_insert
	.p2align	4, 0x90
_lm_heap_insert:                        ## @lm_heap_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	_LX@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	cmpl	%edi, 4(%r11)
	jge	LBB0_9
## %bb.1:
	movq	_LN@GOTPCREL(%rip), %r8
	movl	$1, %r12d
	cmpl	$2, (%r8)
	jl	LBB0_8
## %bb.2:
	movq	_LY@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	_LZ@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movl	$1, %r14d
	movl	$2, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ecx, %r12
	movl	(%r11,%r12,4), %r15d
	orl	$1, %r12d
	movslq	%r12d, %rbx
	cmpl	(%r11,%rbx,4), %r15d
	jg	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, %r12d
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r12d, %rcx
	movl	(%r11,%rcx,4), %ebx
	cmpl	%edi, %ebx
	jge	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r14d, %rax
	movl	%ebx, (%r11,%rax,4)
	movl	(%r9,%rcx,4), %ebx
	movl	%ebx, (%r9,%rax,4)
	movl	(%r10,%rcx,4), %ebx
	movl	%ebx, (%r10,%rax,4)
	addl	%ecx, %ecx
	movl	%r12d, %r14d
	cmpl	(%r8), %ecx
	jle	LBB0_3
	jmp	LBB0_8
LBB0_6:
	movl	%r14d, %r12d
LBB0_8:
	movslq	%r12d, %rax
	movl	%edi, (%r11,%rax,4)
	movq	_LY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%esi, (%rcx,%rax,4)
	movq	_LZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%edx, (%rcx,%rax,4)
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LX,8,3                         ## @LX
	.comm	_LN,4,2                         ## @LN
	.comm	_LY,8,3                         ## @LY
	.comm	_LZ,8,3                         ## @LZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lm_heap_insert                 ; -- Begin function lm_heap_insert
	.p2align	2
_lm_heap_insert:                        ; @lm_heap_insert
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _LX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w9, [x8, #4]
	cmp	w9, w0
	b.ge	LBB0_8
; %bb.1:
Lloh3:
	adrp	x11, _LN@GOTPAGE
Lloh4:
	ldr	x11, [x11, _LN@GOTPAGEOFF]
	ldr	w12, [x11]
Lloh5:
	adrp	x10, _LY@GOTPAGE
Lloh6:
	ldr	x10, [x10, _LY@GOTPAGEOFF]
Lloh7:
	adrp	x9, _LZ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _LZ@GOTPAGEOFF]
	cmp	w12, #2
	b.ge	LBB0_3
; %bb.2:
	mov	w14, #1
	b	LBB0_7
LBB0_3:
	ldr	x12, [x10]
	ldr	x13, [x9]
	mov	w15, #1
	mov	w16, #2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x14, w16
	ldr	w17, [x8, w16, sxtw #2]
	orr	x14, x14, #0x1
	ldr	w3, [x8, x14, lsl #2]
	cmp	w17, w3
	csel	w14, w14, w16, gt
	ldr	w16, [x8, w14, sxtw #2]
	cmp	w16, w0
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x17, w14
	sbfiz	x15, x15, #2, #32
	str	w16, [x8, x15]
	lsl	x16, x17, #2
	ldr	w17, [x12, x16]
	str	w17, [x12, x15]
	ldr	w16, [x13, x16]
	str	w16, [x13, x15]
	lsl	w16, w14, #1
	ldr	w17, [x11]
	mov	x15, x14
	cmp	w16, w17
	b.le	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	x14, x15
LBB0_7:
                                        ; kill: def $w14 killed $w14 killed $x14 def $x14
	sbfiz	x11, x14, #2, #32
	str	w0, [x8, x11]
	ldr	x8, [x10]
	str	w1, [x8, x11]
	ldr	x8, [x9]
	str	w2, [x8, x11]
LBB0_8:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LX,8,3                         ; @LX
	.comm	_LN,4,2                         ; @LN
	.comm	_LY,8,3                         ; @LY
	.comm	_LZ,8,3                         ; @LZ
.subsections_via_symbols
