	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_utf8toutf32                    ## -- Begin function utf8toutf32
	.p2align	4, 0x90
_utf8toutf32:                           ## @utf8toutf32
	.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
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.1:
	movq	%rdi, %r12
	callq	_strlen
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	movl	$4, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movq	%rax, %r14
	testl	%r15d, %r15d
	jle	LBB0_17
## %bb.3:
	xorl	%eax, %eax
	movq	%r14, %rcx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_7 Depth=1
	andl	$31, %edx
	shll	$6, %edx
	movl	4(%r12,%rsi,4), %edi
	andl	$63, %edi
	movl	$2, %ebx
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	orl	%edi, %edx
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	addl	%ebx, %eax
	movl	%edx, (%rcx)
	addq	$4, %rcx
	cmpl	%r15d, %eax
	jge	LBB0_17
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %rsi
	movl	(%r12,%rsi,4), %edx
	movl	$1, %ebx
	cmpl	$128, %edx
	jb	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%edx, %edi
	andl	$-32, %edi
	cmpl	$192, %edi
	je	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%edx, %edi
	andl	$-16, %edi
	cmpl	$224, %edi
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	shll	$12, %edx
	movzwl	%dx, %ebx
	movl	4(%r12,%rsi,4), %edi
	movl	8(%r12,%rsi,4), %edx
	andl	$63, %edi
	shll	$6, %edi
	orl	%ebx, %edi
	andl	$63, %edx
	movl	$3, %ebx
	jmp	LBB0_5
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%edx, %edi
	andl	$-8, %edi
	cmpl	$240, %edi
	jne	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	andl	$7, %edx
	shll	$18, %edx
	movl	4(%r12,%rsi,4), %ebx
	movl	8(%r12,%rsi,4), %edi
	andl	$63, %ebx
	shll	$12, %ebx
	orl	%edx, %ebx
	andl	$63, %edi
	shll	$6, %edi
	orl	%ebx, %edi
	movl	12(%r12,%rsi,4), %edx
	andl	$63, %edx
	movl	$4, %ebx
	jmp	LBB0_5
LBB0_13:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
LBB0_15:
	callq	_eprintf
LBB0_16:
	xorl	%r14d, %r14d
LBB0_17:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	leaq	L_.str.2(%rip), %rdi
	callq	_eprintf
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR input is null\n"

L_.str.1:                               ## @.str.1
	.asciz	"ERROR: out of memory\n"

L_.str.2:                               ## @.str.2
	.asciz	"ERROR in toutf32. Seems like input is invalid.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_utf8toutf32                    ; -- Begin function utf8toutf32
	.p2align	2
_utf8toutf32:                           ; @utf8toutf32
	.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
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	bl	_strlen
	mov	x21, x0
	mov	x0, x19
	bl	_strlen
	add	w0, w0, #1
	mov	w1, #4
	bl	_calloc
	mov	x20, x0
	cbz	x0, LBB0_15
; %bb.2:
	cmp	w21, #1
	b.lt	LBB0_16
; %bb.3:
	mov	w10, #0
	mov	x8, x20
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w11, #1
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w10, [x8], #4
	add	w10, w9, w11
	cmp	w10, w21
	b.ge	LBB0_16
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x9, w10
	ldr	w10, [x19, w10, sxtw #2]
	cmp	w10, #128
	b.lo	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	and	w11, w10, #0xffffffe0
	cmp	w11, #192
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ubfiz	w12, w10, #6, #5
	add	x10, x19, x9, lsl #2
	ldr	w10, [x10, #4]
	and	w10, w10, #0x3f
	mov	w11, #2
	b	LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	and	w11, w10, #0xfffffff0
	cmp	w11, #224
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ubfiz	w10, w10, #12, #4
	add	x11, x19, x9, lsl #2
	ldp	w12, w11, [x11, #4]
	bfi	w10, w12, #6, #6
	and	w12, w11, #0x3f
	mov	w11, #3
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	and	w11, w10, #0xfffffff8
	cmp	w11, #240
	b.ne	LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ubfiz	w10, w10, #18, #3
	add	x11, x19, x9, lsl #2
	ldp	w12, w13, [x11, #4]
	bfi	w10, w12, #12, #6
	bfi	w10, w13, #6, #6
	ldr	w11, [x11, #12]
	and	w12, w11, #0x3f
	mov	w11, #4
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	orr	w10, w10, w12
	b	LBB0_5
LBB0_14:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_eprintf
	mov	x20, #0
	b	LBB0_16
LBB0_15:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_eprintf
LBB0_16:
	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_17:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_eprintf
	mov	x0, x20
	bl	_free
	mov	x20, #0
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR input is null\n"

l_.str.1:                               ; @.str.1
	.asciz	"ERROR: out of memory\n"

l_.str.2:                               ; @.str.2
	.asciz	"ERROR in toutf32. Seems like input is invalid.\n"

.subsections_via_symbols
