	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _UTF8_mbsnrtowcs
__UTF8_mbsnrtowcs:                      ## @_UTF8_mbsnrtowcs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rdx, %rbx
	movq	(%rsi), %r15
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.13:
	movq	%rcx, %r12
	movq	%rdi, %r13
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.14:
	testq	%r12, %r12
	je	LBB0_23
## %bb.15:
	cmpq	$0, (%r14)
	jle	LBB0_17
## %bb.16:
	cmpb	$0, (%r15)
	jg	LBB0_10
	jmp	LBB0_17
LBB0_1:
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.8:
	cmpq	$0, (%r14)
	jle	LBB0_2
## %bb.9:
	cmpb	$0, (%r15)
	jle	LBB0_2
LBB0_10:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %r12
	jmp	LBB0_32
LBB0_23:
	testq	%r12, %r12
	je	LBB0_24
LBB0_17:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rax
	negq	%rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%rax, (%r13)
	movl	$1, %eax
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	addq	%rax, %r15
	subq	%rax, %rbx
	addq	$8, %r13
	decq	%r14
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_22
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movzbl	(%r15), %eax
	testb	%al, %al
	jg	LBB0_20
LBB0_25:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	__UTF8_mbrtowc
	cmpq	$-2, %rax
	je	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_18 Depth=1
	testq	%rax, %rax
	je	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpq	$-1, %rax
	jne	LBB0_21
## %bb.28:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	$-1, %r12
	jmp	LBB0_32
LBB0_2:
	xorl	%r12d, %r12d
	leaq	-72(%rbp), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %r15
	subq	%rax, %rbx
	incq	%r12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %eax
	cmpb	$0, (%r15)
	jg	LBB0_12
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	__UTF8_mbrtowc
	cmpq	$-2, %rax
	je	LBB0_32
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$-1, %rax
	je	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_32
LBB0_24:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
LBB0_22:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	jmp	LBB0_32
LBB0_7:
	movq	%rax, %r12
	jmp	LBB0_32
LBB0_29:
	addq	%rbx, %r15
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	jmp	LBB0_31
LBB0_30:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
LBB0_31:
	negq	%r14
	movq	%r14, %r12
LBB0_32:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	__UTF8_mbsnrtowcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _UTF8_mbsnrtowcs
__UTF8_mbsnrtowcs:                      ; @_UTF8_mbsnrtowcs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x4
	mov	x22, x2
	ldr	x20, [x1]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x3
	mov	x23, x1
	mov	x24, x0
	cbz	x22, LBB0_9
; %bb.2:
	cbz	x19, LBB0_9
; %bb.3:
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_10
; %bb.4:
	ldrsb	w8, [x20]
	cmp	w8, #1
	b.ge	LBB0_8
	b	LBB0_10
LBB0_5:
	cbz	x22, LBB0_19
; %bb.6:
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_19
; %bb.7:
	ldrsb	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_19
LBB0_8:
Lloh0:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
	mov	x19, #-1
	b	LBB0_32
LBB0_9:
	cbz	x19, LBB0_27
LBB0_10:
	mov	x25, #0
	neg	x26, x19
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	and	x8, x8, #0xff
	str	x8, [x24]
	mov	w0, #1
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x20, x20, x0
	sub	x22, x22, x0
	add	x24, x24, #8
	sub	x25, x25, #1
	cmp	x26, x25
	b.eq	LBB0_27
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	cbz	x22, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldrsb	w8, [x20]
	cmp	w8, #1
	b.ge	LBB0_11
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x24
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	__UTF8_mbrtowc
	cmn	x0, #2
	b.eq	LBB0_29
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	cbz	x0, LBB0_30
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	cmn	x0, #1
	b.ne	LBB0_12
; %bb.18:
	str	x20, [x23]
	mov	x19, #-1
	b	LBB0_32
LBB0_19:
	mov	x19, #0
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_22 Depth=1
	mov	w0, #1
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x20, x20, x0
	sub	x22, x22, x0
	add	x19, x19, #1
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	cbz	x22, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldrsb	w8, [x20]
	cmp	w8, #0
	b.gt	LBB0_20
LBB0_24:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x0, sp, #8
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	__UTF8_mbrtowc
	cmn	x0, #2
	b.eq	LBB0_32
; %bb.25:                               ;   in Loop: Header=BB0_22 Depth=1
	cmn	x0, #1
	b.eq	LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_22 Depth=1
	cbnz	x0, LBB0_21
	b	LBB0_32
LBB0_27:
	str	x20, [x23]
	b	LBB0_32
LBB0_28:
	mov	x19, x0
	b	LBB0_32
LBB0_29:
	add	x8, x20, x22
	str	x8, [x23]
	b	LBB0_31
LBB0_30:
	str	xzr, [x23]
LBB0_31:
	neg	x19, x25
LBB0_32:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	__UTF8_mbsnrtowcs
.subsections_via_symbols
