	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _UTF8_wcsnrtombs
__UTF8_wcsnrtombs:                      ## @_UTF8_wcsnrtombs
	.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, %r15
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_30:
	movq	$-1, %r15
	jmp	LBB0_31
LBB0_2:
	movq	(%r14), %rcx
	testq	%r12, %r12
	je	LBB0_15
## %bb.3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	je	LBB0_22
## %bb.4:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	subq	$1, %rbx
	jb	LBB0_23
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rcx), %esi
	cmpl	$127, %esi
	ja	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movb	%sil, (%r12)
	movl	$1, %r14d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	_MB_CUR_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jbe	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	__UTF8_wcrtomb
	movq	%rax, %r14
	cmpq	$-1, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_13
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	__UTF8_wcrtomb
	cmpq	$-1, %rax
	je	LBB0_29
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r14
	movslq	%r13d, %rax
	cmpq	%rax, %r14
	ja	LBB0_33
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_memcpy
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, (%rcx)
	je	LBB0_25
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %rcx
	addq	%r14, %r12
	addq	%r14, %r15
	subq	%r14, %r13
	jne	LBB0_5
	jmp	LBB0_23
LBB0_15:
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.16:
	movq	%rbx, %r12
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %r14
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rbx,4), %esi
	movl	$1, %eax
	cmpl	$128, %esi
	jb	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rcx, %r13
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	__UTF8_wcrtomb
	cmpq	$-1, %rax
	je	LBB0_30
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r13, %rcx
	movl	(%r13,%rbx,4), %esi
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	testl	%esi, %esi
	je	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	addq	%rax, %r15
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_17
	jmp	LBB0_31
LBB0_22:
	xorl	%r15d, %r15d
LBB0_23:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%rax)
	jmp	LBB0_31
LBB0_24:
	xorl	%r15d, %r15d
	jmp	LBB0_31
LBB0_25:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	addq	%r14, %r15
	decq	%r15
	jmp	LBB0_31
LBB0_26:
	addq	%rax, %r15
	decq	%r15
LBB0_31:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_34
## %bb.32:
	movq	%r15, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%rax)
	jmp	LBB0_30
LBB0_29:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_30
LBB0_33:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_34:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_LEN_MAX,4,2                 ## @MB_LEN_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_MB_CUR_MAX,8,3                 ## @MB_CUR_MAX
	.no_dead_strip	__UTF8_wcsnrtombs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _UTF8_wcsnrtombs
__UTF8_wcsnrtombs:                      ; @_UTF8_wcsnrtombs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x20, x4
	mov	x24, x3
	mov	x21, x2
	mov	x23, x1
	mov	x25, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MB_LEN_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MB_LEN_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	x8, [x4]
	cbz	x8, LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _errno@GOTPAGE
Lloh12:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
LBB0_2:
	mov	x19, #-1
	b	LBB0_26
LBB0_3:
	ldr	x27, [x23]
	mov	x19, #0
	cbz	x25, LBB0_17
; %bb.4:
	cbz	x24, LBB0_16
; %bb.5:
Lloh14:
	adrp	x28, _MB_CUR_MAX@GOTPAGE
Lloh15:
	ldr	x28, [x28, _MB_CUR_MAX@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x21, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x27]
	cmp	w1, #127
	b.hi	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	strb	w1, [x25]
	mov	w26, #1
	b	LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x28]
	cmp	x24, x8
	b.ls	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	mov	x2, x20
	bl	__UTF8_wcrtomb
	mov	x26, x0
	cmn	x0, #1
	b.ne	LBB0_14
	b	LBB0_28
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	mov	x2, x20
	bl	__UTF8_wcrtomb
	cmn	x0, #1
	b.eq	LBB0_28
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x26, x0
	cmp	x0, w24, sxtw
	b.hi	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	mov	x1, x22
	mov	x2, x26
	bl	_memcpy
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27]
	cbz	w8, LBB0_24
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x27, x27, #4
	add	x25, x25, x26
	add	x19, x26, x19
	sub	x21, x21, #1
	sub	x24, x24, x26
	cbnz	x24, LBB0_6
LBB0_16:
	str	x27, [x23]
	b	LBB0_26
LBB0_17:
	cbnz	x21, LBB0_20
	b	LBB0_26
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	mov	w0, #1
	cbz	w1, LBB0_23
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x27, x27, #4
	add	x19, x0, x19
	sub	x21, x21, #1
	cbz	x21, LBB0_26
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x27]
	cmp	w1, #128
	b.lo	LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x0, x22
	mov	x2, x20
	bl	__UTF8_wcrtomb
	cmn	x0, #1
	b.eq	LBB0_2
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	w1, [x27]
	cbnz	w1, LBB0_19
LBB0_23:
	add	x8, x0, x19
	b	LBB0_25
LBB0_24:
	str	xzr, [x23]
	add	x8, x26, x19
LBB0_25:
	sub	x19, x8, #1
LBB0_26:
	ldur	x8, [x29, #-88]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.27:
	mov	x0, x19
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_28:
	str	x27, [x23]
	b	LBB0_2
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_LEN_MAX,4,2                 ; @MB_LEN_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_MB_CUR_MAX,8,3                 ; @MB_CUR_MAX
	.no_dead_strip	__UTF8_wcsnrtombs
.subsections_via_symbols
