	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ecma_builtin_helper_array_index_normalize ## -- Begin function ecma_builtin_helper_array_index_normalize
	.p2align	4, 0x90
_ecma_builtin_helper_array_index_normalize: ## @ecma_builtin_helper_array_index_normalize
	.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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movl	%edi, %ebx
	callq	_ecma_number_is_nan
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movl	%ebx, %edi
	callq	_ecma_number_is_zero
	testq	%rax, %rax
	je	LBB0_2
LBB0_13:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%ebx, %edi
	callq	_ecma_number_is_infinity
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	%ebx, %edi
	callq	_ecma_number_is_negative
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.4:
	decl	%r14d
	xorl	%r15d, %r15d
	negq	%rax
	sbbl	%r15d, %r15d
	orl	%r14d, %r15d
	jmp	LBB0_13
LBB0_5:
	movl	%ebx, %edi
	callq	_ecma_number_is_negative
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	negl	%ebx
	testl	%r12d, %r12d
	jne	LBB0_7
## %bb.8:
	cmpl	%r14d, %ebx
	jg	LBB0_13
LBB0_7:
	movl	%ebx, %edi
	callq	_ecma_number_to_uint32
	subl	%eax, %r14d
	movl	%r14d, %r15d
	jmp	LBB0_13
LBB0_12:
	xorl	%r15d, %r15d
	testq	%rax, %rax
	cmovel	%r14d, %r15d
	jmp	LBB0_13
LBB0_9:
	cmpl	%r14d, %ebx
	jle	LBB0_11
## %bb.10:
	cmpl	$1, %r12d
	adcl	$-1, %r14d
	movl	%r14d, %r15d
	jmp	LBB0_13
LBB0_11:
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ecma_number_to_uint32          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ecma_builtin_helper_array_index_normalize ; -- Begin function ecma_builtin_helper_array_index_normalize
	.p2align	2
_ecma_builtin_helper_array_index_normalize: ; @ecma_builtin_helper_array_index_normalize
	.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, x2
	mov	x19, x1
	mov	x21, x0
	bl	_ecma_number_is_nan
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_ecma_number_is_zero
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #0
LBB0_3:
	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
LBB0_4:
	mov	x0, x21
	bl	_ecma_number_is_infinity
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_ecma_number_is_negative
	cmp	x0, #0
	csel	w8, w19, wzr, eq
	sub	w9, w19, #1
	cmp	x0, #0
	csinv	w9, w9, wzr, eq
	cmp	w20, #0
	csel	w0, w8, w9, eq
	b	LBB0_3
LBB0_6:
	mov	x0, x21
	bl	_ecma_number_is_negative
	cbz	x0, LBB0_10
; %bb.7:
	neg	w0, w21
	cbnz	w20, LBB0_9
; %bb.8:
	cmp	w0, w19
	b.gt	LBB0_2
LBB0_9:
	bl	_ecma_number_to_uint32
	sub	w0, w19, w0
	b	LBB0_3
LBB0_10:
	cmp	w21, w19
	b.le	LBB0_12
; %bb.11:
	cmp	w20, #0
	cset	w8, ne
	sub	w0, w19, w8
	b	LBB0_3
LBB0_12:
	mov	x0, x21
	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
	b	_ecma_number_to_uint32
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
