	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ecma_builtin_helper_array_to_heap
_ecma_builtin_helper_array_to_heap:     ## @ecma_builtin_helper_array_to_heap
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
                                        ## kill: def $esi killed $esi def $rsi
	movq	_ECMA_VALUE_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leal	1(%rsi,%rsi), %r14d
	movslq	%esi, %rax
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdi,%rax,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	%edx, %r14d
	jle	LBB0_1
LBB0_14:
	movl	%r14d, %eax
	decl	%eax
	shrl	$31, %eax
	leal	(%r14,%rax), %ebx
	decl	%ebx
	sarl	%ebx
	xorl	%edi, %edi
	cmpl	%r12d, %ebx
	setle	%dil
	callq	_JERRY_ASSERT
	movslq	%ebx, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%rcx,%rax,4)
	movl	%r15d, %edi
	callq	_ecma_is_value_empty
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_ECMA_VALUE_UNDEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	xorl	%ebx, %ebx
	movl	%r12d, -64(%rbp)                ## 4-byte Spill
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_swap_compare_value@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ECMA_FINALIZE
	movl	-60(%rbp), %r15d                ## 4-byte Reload
	cmpl	%r12d, %r14d
	jg	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_ecma_is_value_empty
	testl	%ebx, %ebx
	jne	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r12d, %r14d
	jge	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_child_compare_value@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r13d
	movslq	%r14d, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %edi
	movl	4(%rcx,%rax,4), %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	*-72(%rbp)                      ## 8-byte Folded Reload
	movl	%r13d, %edi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_ECMA_TRY_CATCH
	movl	(%rbx), %edi
	callq	_ecma_is_value_number
	movl	%eax, %edi
	callq	_JERRY_ASSERT
	movl	(%rbx), %edi
	callq	_ecma_get_number_from_value
	movq	_ECMA_NUMBER_ZERO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_child_compare_value@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ECMA_FINALIZE
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %edi
	callq	_ecma_is_value_empty
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	cmpl	%r12d, %r14d
	setle	%dil
	callq	_JERRY_ASSERT
	movq	_swap_compare_value@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movslq	%r14d, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r13,4), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	*-72(%rbp)                      ## 8-byte Folded Reload
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_ECMA_TRY_CATCH
	movl	(%r12), %edi
	callq	_ecma_is_value_number
	movl	%eax, %edi
	callq	_JERRY_ASSERT
	movl	(%r12), %edi
	movl	-64(%rbp), %r12d                ## 4-byte Reload
	callq	_ecma_get_number_from_value
	movl	$1, %ebx
	movq	_ECMA_NUMBER_ZERO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%r13), %eax
	shrl	$31, %eax
	leal	(%rax,%r13), %ebx
	decl	%ebx
	sarl	%ebx
	xorl	%edi, %edi
	cmpl	%r12d, %ebx
	setle	%dil
	callq	_JERRY_ASSERT
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx,%r13,4), %eax
	movslq	%ebx, %rcx
	movl	%eax, (%rdx,%rcx,4)
	leal	1(%r13,%r13), %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	cmpl	%r12d, %r14d
	jle	LBB0_2
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ECMA_VALUE_EMPTY,4,2           ## @ECMA_VALUE_EMPTY
	.comm	_child_compare_value,4,2        ## @child_compare_value
	.comm	_ECMA_NUMBER_ZERO,8,3           ## @ECMA_NUMBER_ZERO
	.comm	_swap_compare_value,4,2         ## @swap_compare_value
	.comm	_ECMA_VALUE_UNDEFINED,4,2       ## @ECMA_VALUE_UNDEFINED
	.no_dead_strip	_ecma_builtin_helper_array_to_heap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ecma_builtin_helper_array_to_heap
_ecma_builtin_helper_array_to_heap:     ; @ecma_builtin_helper_array_to_heap
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x0
	mov	w26, #1
Lloh0:
	adrp	x8, _ECMA_VALUE_EMPTY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ECMA_VALUE_EMPTY@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	bfi	w26, w1, #1, #31
	ldr	w27, [x0, w1, sxtw #2]
	cmp	w26, w2
	b.gt	LBB0_12
; %bb.1:
	mov	x23, x4
	mov	x24, x3
	mov	w25, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w25, #0
	cmp	w26, w21
	b.gt	LBB0_12
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_ecma_is_value_empty
	cbnz	w25, LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w26, w21
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh3:
	adrp	x28, _child_compare_value@GOTPAGE
Lloh4:
	ldr	x28, [x28, _child_compare_value@GOTPAGEOFF]
	ldr	w25, [x28]
	sxtw	x8, w26
	ldr	w0, [x20, w26, sxtw #2]
	add	x22, x8, #1
	ldr	w1, [x20, x22, lsl #2]
	mov	x2, x24
	blr	x23
	mov	x1, x0
	mov	x0, x25
	mov	x2, x19
	bl	_ECMA_TRY_CATCH
	ldr	w0, [x28]
	bl	_ecma_is_value_number
	bl	_JERRY_ASSERT
	ldr	w0, [x28]
	bl	_ecma_get_number_from_value
Lloh5:
	adrp	x8, _ECMA_NUMBER_ZERO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ECMA_NUMBER_ZERO@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	csel	w26, w22, w26, lt
	ldr	w0, [x28]
	bl	_ECMA_FINALIZE
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_ecma_is_value_empty
	cbz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w26, w21
	cset	w0, le
	bl	_JERRY_ASSERT
Lloh8:
	adrp	x22, _swap_compare_value@GOTPAGE
Lloh9:
	ldr	x22, [x22, _swap_compare_value@GOTPAGEOFF]
	ldr	w25, [x22]
	ldr	w0, [x20, w26, sxtw #2]
	mov	x1, x27
	mov	x2, x24
	blr	x23
	mov	x1, x0
	mov	x0, x25
	mov	x2, x19
	bl	_ECMA_TRY_CATCH
	ldr	w0, [x22]
	bl	_ecma_is_value_number
	bl	_JERRY_ASSERT
	ldr	w0, [x22]
	bl	_ecma_get_number_from_value
Lloh10:
	adrp	x8, _ECMA_NUMBER_ZERO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ECMA_NUMBER_ZERO@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, x26
	sxtw	x22, w8
	sub	w8, w26, #1
	cmp	w8, #0
	csel	w8, w26, w8, lt
	mov	x28, x24
	mov	x24, x23
	mov	x23, x27
	asr	w27, w8, #1
	cmp	w27, w21
	cset	w0, le
	bl	_JERRY_ASSERT
	mov	w25, #0
	ldr	w8, [x20, x22, lsl #2]
	str	w8, [x20, w27, sxtw #2]
	mov	x27, x23
	mov	x23, x24
	mov	x24, x28
	mov	w8, #1
	bfi	w8, w26, #1, #31
	mov	x26, x8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w25, #1
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh13:
	adrp	x8, _swap_compare_value@GOTPAGE
Lloh14:
	ldr	x8, [x8, _swap_compare_value@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_ECMA_FINALIZE
	cmp	w26, w21
	b.le	LBB0_3
LBB0_12:
	sub	w8, w26, #1
	cmp	w8, #0
	csel	w8, w26, w8, lt
	asr	w22, w8, #1
	cmp	w22, w21
	cset	w0, le
	bl	_JERRY_ASSERT
	str	w27, [x20, w22, sxtw #2]
	mov	x0, x19
	bl	_ecma_is_value_empty
Lloh16:
	adrp	x8, _ECMA_VALUE_UNDEFINED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ECMA_VALUE_UNDEFINED@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w19, w8, eq
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ECMA_VALUE_EMPTY,4,2           ; @ECMA_VALUE_EMPTY
	.comm	_child_compare_value,4,2        ; @child_compare_value
	.comm	_ECMA_NUMBER_ZERO,8,3           ; @ECMA_NUMBER_ZERO
	.comm	_swap_compare_value,4,2         ; @swap_compare_value
	.comm	_ECMA_VALUE_UNDEFINED,4,2       ; @ECMA_VALUE_UNDEFINED
	.no_dead_strip	_ecma_builtin_helper_array_to_heap
.subsections_via_symbols
