	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function test_promise_from_js
LCPI0_0:
	.quad	0x403f000000000000              ## double 31
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_test_promise_from_js:                  ## @test_promise_from_js
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movaps	L___const.test_promise_from_js.test_source+64(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	L___const.test_promise_from_js.test_source+48(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	L___const.test_promise_from_js.test_source+32(%rip), %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	L___const.test_promise_from_js.test_source+16(%rip), %xmm0
	movaps	%xmm0, -96(%rbp)
	movapd	L___const.test_promise_from_js.test_source(%rip), %xmm0
	movapd	%xmm0, -112(%rbp)
	movq	_JERRY_PARSE_NO_OPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-112(%rbp), %rdx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$79, %ecx
	callq	_jerry_parse
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_jerry_value_is_error
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_TEST_ASSERT
	movl	%r14d, %edi
	callq	_jerry_run
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_jerry_value_is_promise
	movl	%eax, %edi
	callq	_TEST_ASSERT
	movl	%r15d, %edi
	callq	_jerry_get_promise_state
	movq	_JERRY_PROMISE_STATE_PENDING@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_TEST_ASSERT
	xorl	%eax, %eax
	callq	_jerry_run_all_enqueued_jobs
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_jerry_value_is_undefined
	movl	%eax, %edi
	callq	_TEST_ASSERT
	movl	%ebx, %edi
	callq	_jerry_release_value
	movl	%r15d, %edi
	callq	_jerry_get_promise_state
	movq	_JERRY_PROMISE_STATE_FULFILLED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_TEST_ASSERT
	movl	%r15d, %edi
	callq	_jerry_get_promise_result
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_jerry_value_is_number
	movl	%eax, %edi
	callq	_TEST_ASSERT
	movl	%ebx, %edi
	callq	_jerry_get_number_value
	cmpeqsd	LCPI0_0(%rip), %xmm0
	movq	%xmm0, %rdi
	andl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_TEST_ASSERT
	movl	%ebx, %edi
	callq	_jerry_release_value
	movl	%r15d, %edi
	callq	_jerry_release_value
	movl	%r14d, %edi
	callq	_jerry_release_value
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$88, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
	.p2align	4                               ## @__const.test_promise_from_js.test_source
L___const.test_promise_from_js.test_source:
	.asciz	"(new Promise(function(rs, rj) { rs(30); })).then(function(v) { return v + 1; })"

	.comm	_JERRY_PARSE_NO_OPTS,4,2        ## @JERRY_PARSE_NO_OPTS
	.comm	_JERRY_PROMISE_STATE_PENDING,8,3 ## @JERRY_PROMISE_STATE_PENDING
	.comm	_JERRY_PROMISE_STATE_FULFILLED,8,3 ## @JERRY_PROMISE_STATE_FULFILLED
	.no_dead_strip	_test_promise_from_js
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_promise_from_js
_test_promise_from_js:                  ; @test_promise_from_js
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, l___const.test_promise_from_js.test_source@PAGE
Lloh4:
	add	x8, x8, l___const.test_promise_from_js.test_source@PAGEOFF
	ldp	q0, q1, [x8, #32]
	stp	q0, q1, [sp, #32]
	ldr	q0, [x8, #64]
	str	q0, [sp, #64]
	ldp	q1, q0, [x8]
	stp	q1, q0, [sp]
Lloh5:
	adrp	x8, _JERRY_PARSE_NO_OPTS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _JERRY_PARSE_NO_OPTS@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	mov	x2, sp
	mov	x0, #0
	mov	w1, #0
	mov	w3, #79
	bl	_jerry_parse
	mov	x19, x0
	bl	_jerry_value_is_error
	cmp	w0, #0
	cset	w0, eq
	bl	_TEST_ASSERT
	mov	x0, x19
	bl	_jerry_run
	mov	x20, x0
	bl	_jerry_value_is_promise
	bl	_TEST_ASSERT
	mov	x0, x20
	bl	_jerry_get_promise_state
Lloh8:
	adrp	x8, _JERRY_PROMISE_STATE_PENDING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _JERRY_PROMISE_STATE_PENDING@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_TEST_ASSERT
	bl	_jerry_run_all_enqueued_jobs
	mov	x21, x0
	bl	_jerry_value_is_undefined
	bl	_TEST_ASSERT
	mov	x0, x21
	bl	_jerry_release_value
	mov	x0, x20
	bl	_jerry_get_promise_state
Lloh11:
	adrp	x8, _JERRY_PROMISE_STATE_FULFILLED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _JERRY_PROMISE_STATE_FULFILLED@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_TEST_ASSERT
	mov	x0, x20
	bl	_jerry_get_promise_result
	mov	x21, x0
	bl	_jerry_value_is_number
	bl	_TEST_ASSERT
	mov	x0, x21
	bl	_jerry_get_number_value
	fmov	d1, #31.00000000
	fcmp	d0, d1
	cset	w0, eq
	bl	_TEST_ASSERT
	mov	x0, x21
	bl	_jerry_release_value
	mov	x0, x20
	bl	_jerry_release_value
	mov	x0, x19
	bl	_jerry_release_value
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l___const.test_promise_from_js.test_source: ; @__const.test_promise_from_js.test_source
	.asciz	"(new Promise(function(rs, rj) { rs(30); })).then(function(v) { return v + 1; })"

	.comm	_JERRY_PARSE_NO_OPTS,4,2        ; @JERRY_PARSE_NO_OPTS
	.comm	_JERRY_PROMISE_STATE_PENDING,8,3 ; @JERRY_PROMISE_STATE_PENDING
	.comm	_JERRY_PROMISE_STATE_FULFILLED,8,3 ; @JERRY_PROMISE_STATE_FULFILLED
	.no_dead_strip	_test_promise_from_js
.subsections_via_symbols
