	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function removeHeapElement
_removeHeapElement:                     ## @removeHeapElement
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	movl	(%rdi), %eax
	cmpl	$2, %esi
	jl	LBB0_12
## %bb.1:
	leal	-1(%rsi), %r9d
	movl	%r9d, %ecx
	movl	(%rdi,%rcx,4), %r8d
	xorl	%edx, %edx
	cmpl	$2, %esi
	je	LBB0_11
## %bb.2:
	xorl	%ecx, %ecx
	movl	$1, %esi
	xorl	%r10d, %r10d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addl	$2, %ecx
	cmpl	%r9d, %ecx
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%esi, %rdx
	movl	(%rdi,%rdx,4), %r11d
	movslq	%ecx, %rdx
	cmpl	(%rdi,%rdx,4), %r11d
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%esi, %ecx
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, %edx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%esi, %edx
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movslq	%edx, %rcx
	movl	(%rdi,%rcx,4), %ecx
	cmpl	%ecx, %r8d
	jge	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r10d, %rsi
	movl	%ecx, (%rdi,%rsi,4)
	leal	(%rdx,%rdx), %ecx
	leal	(%rdx,%rdx), %esi
	incl	%esi
	movl	%edx, %r10d
	cmpl	%r9d, %esi
	jl	LBB0_3
	jmp	LBB0_11
LBB0_9:
	movl	%r10d, %edx
LBB0_11:
	movslq	%edx, %rcx
	movl	%r8d, (%rdi,%rcx,4)
LBB0_12:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_removeHeapElement
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function removeHeapElement
_removeHeapElement:                     ; @removeHeapElement
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	ldr	w0, [x0]
	cmp	w1, #2
	b.lt	LBB0_11
; %bb.1:
	sub	w10, w1, #1
	ldr	w9, [x8, w10, uxtw #2]
	cmp	w1, #2
	b.ne	LBB0_3
; %bb.2:
	mov	w12, #0
	b	LBB0_10
LBB0_3:
	mov	w14, #0
	mov	w11, #0
	mov	w13, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w12, w14, #2
	cmp	w12, w10
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w14, [x8, w13, sxtw #2]
	ldr	w15, [x8, w12, sxtw #2]
	cmp	w14, w15
	csel	w12, w12, w13, lt
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x12, x13
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w13, [x8, w12, sxtw #2]
	cmp	w9, w13
	b.ge	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w13, [x8, w11, sxtw #2]
	lsl	w14, w12, #1
	mov	w13, #1
	bfi	w13, w12, #1, #31
	mov	x11, x12
	cmp	w13, w10
	b.lt	LBB0_4
	b	LBB0_10
LBB0_9:
	mov	x12, x11
LBB0_10:
	str	w9, [x8, w12, sxtw #2]
LBB0_11:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_removeHeapElement
.subsections_via_symbols
