	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ecma_op_to_integer             ## -- Begin function ecma_op_to_integer
	.p2align	4, 0x90
_ecma_op_to_integer:                    ## @ecma_op_to_integer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %ebx
	callq	_ECMA_IS_VALUE_ERROR
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_ecma_get_number
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ECMA_IS_VALUE_ERROR
	testq	%rax, %rax
	jne	LBB0_9
## %bb.2:
	movl	(%r15), %r14d
	movl	%r14d, %edi
	callq	_ecma_number_is_nan
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_ECMA_NUMBER_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_7:
	movl	%ecx, (%r15)
	jmp	LBB0_8
LBB0_4:
	movl	%r14d, %edi
	callq	_ecma_number_is_zero
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movl	%r14d, %edi
	callq	_ecma_number_is_infinity
	testq	%rax, %rax
	je	LBB0_6
LBB0_8:
	movq	_ECMA_VALUE_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%r14d, %edi
	callq	_fabs
	movl	%eax, %edi
	callq	_floor
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_ecma_number_is_negative
	movl	%ebx, %ecx
	negl	%ecx
	testq	%rax, %rax
	cmovel	%ebx, %ecx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ECMA_NUMBER_ZERO,4,2           ## @ECMA_NUMBER_ZERO
	.comm	_ECMA_VALUE_EMPTY,4,2           ## @ECMA_VALUE_EMPTY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ecma_op_to_integer             ; -- Begin function ecma_op_to_integer
	.p2align	2
_ecma_op_to_integer:                    ; @ecma_op_to_integer
	.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	x19, x1
	mov	x20, x0
	bl	_ECMA_IS_VALUE_ERROR
	cbnz	x0, LBB0_8
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_ecma_get_number
	mov	x20, x0
	bl	_ECMA_IS_VALUE_ERROR
	cbnz	x0, LBB0_8
; %bb.2:
	ldr	w20, [x19]
	mov	x0, x20
	bl	_ecma_number_is_nan
	cbz	x0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _ECMA_NUMBER_ZERO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ECMA_NUMBER_ZERO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
LBB0_4:
	str	w8, [x19]
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	bl	_ecma_number_is_zero
	cbnz	x0, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_ecma_number_is_infinity
	cbz	x0, LBB0_9
LBB0_7:
Lloh3:
	adrp	x8, _ECMA_VALUE_EMPTY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ECMA_VALUE_EMPTY@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
LBB0_8:
	mov	x0, x20
	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_9:
	mov	x0, x20
	bl	_fabs
	bl	_floor
	mov	x21, x0
	mov	x0, x20
	bl	_ecma_number_is_negative
	cmp	x0, #0
	cneg	w8, w21, ne
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ECMA_NUMBER_ZERO,4,2           ; @ECMA_NUMBER_ZERO
	.comm	_ECMA_VALUE_EMPTY,4,2           ; @ECMA_VALUE_EMPTY
.subsections_via_symbols
