	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lit_get_utf8_size_of_cesu8_string ## -- Begin function lit_get_utf8_size_of_cesu8_string
	.p2align	4, 0x90
_lit_get_utf8_size_of_cesu8_string:     ## @lit_get_utf8_size_of_cesu8_string
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	testq	%rsi, %rsi
	jle	LBB0_1
## %bb.2:
	movq	%r14, %r13
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %r12d
	cmpq	%r14, %r15
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rdi
	leaq	-44(%rbp), %rsi
	callq	_lit_read_code_unit_from_utf8
	movq	%rax, %r15
	addq	%rbx, %r15
	movl	-44(%rbp), %edi
	callq	_lit_is_code_point_utf16_low_surrogate
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %edi
	callq	_lit_is_code_point_utf16_high_surrogate
	leaq	-2(%r13), %rcx
	testq	%rax, %rax
	cmovneq	%rcx, %r13
	jmp	LBB0_5
LBB0_1:
	xorl	%r15d, %r15d
	movq	%r14, %r13
LBB0_6:
	xorl	%edi, %edi
	cmpq	%r14, %r15
	sete	%dil
	callq	_JERRY_ASSERT
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lit_get_utf8_size_of_cesu8_string ; -- Begin function lit_get_utf8_size_of_cesu8_string
	.p2align	2
_lit_get_utf8_size_of_cesu8_string:     ; @lit_get_utf8_size_of_cesu8_string
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	cmp	x1, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, x0
	mov	w22, #0
	mov	x24, #0
	mov	x20, x19
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w22, [sp, #12]
	add	x24, x23, x24
	cmp	x24, x19
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x21, x24, lsl #2
	add	x1, sp, #12
	bl	_lit_read_code_unit_from_utf8
	mov	x23, x0
	ldr	w0, [sp, #12]
	bl	_lit_is_code_point_utf16_low_surrogate
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_lit_is_code_point_utf16_high_surrogate
	sub	x8, x20, #2
	cmp	x0, #0
	csel	x20, x20, x8, eq
	b	LBB0_2
LBB0_5:
	mov	x24, #0
	mov	x20, x19
LBB0_6:
	cmp	x24, x19
	cset	w0, eq
	bl	_JERRY_ASSERT
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
