	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_archive_wstring_append_from_mbs ## -- Begin function archive_wstring_append_from_mbs
	.p2align	4, 0x90
_archive_wstring_append_from_mbs:       ## @archive_wstring_append_from_mbs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rax
	leaq	(%rdx,%rax), %rsi
	incq	%rsi
	callq	_archive_wstring_ensure
	movl	$-1, %ecx
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	(%r14), %rbx
	shlq	$2, %rbx
	addq	8(%r14), %rbx
	cmpb	$0, (%r12)
	je	LBB0_16
## %bb.2:
	testq	%r13, %r13
	je	LBB0_16
## %bb.3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r13, %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rax
	subq	8(%r14), %rax
	sarq	$2, %rax
	movq	%rax, (%r14)
	movl	$0, (%rbx)
	leaq	(%rax,%r13), %rsi
	incq	%rsi
	movq	%r14, %rdi
	callq	_archive_wstring_ensure
	testq	%rax, %rax
	je	LBB0_19
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rbx
	shlq	$2, %rbx
	addq	8(%r14), %rbx
	movq	%r13, %r15
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_mbtowc
	cmpq	$-2, %rax
	jae	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	subq	%rax, %r13
	jb	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	addq	$4, %rbx
	cmpb	$0, (%r12,%rax)
	je	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	decq	%r15
	addq	%rax, %r12
	testq	%r13, %r13
	jne	LBB0_4
	jmp	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EILSEQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, 1(%r12)
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	decq	%r13
	jne	LBB0_4
	jmp	LBB0_17
LBB0_16:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_17:
	movq	%rbx, %rax
	subq	8(%r14), %rax
	sarq	$2, %rax
	movq	%rax, (%r14)
	movl	$0, (%rbx)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_18:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	$-1, %ecx
	jmp	LBB0_18
LBB0_20:
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EILSEQ,8,3                     ## @EILSEQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_archive_wstring_append_from_mbs ; -- Begin function archive_wstring_append_from_mbs
	.p2align	2
_archive_wstring_append_from_mbs:       ; @archive_wstring_append_from_mbs
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x0]
	add	x8, x2, x8
	add	x1, x8, #1
	bl	_archive_wstring_ensure
	cbz	x0, LBB0_15
; %bb.1:
	ldp	x9, x8, [x19]
	add	x21, x8, x9, lsl #2
	ldrb	w8, [x23]
	cmp	w8, #0
	mov	w20, #0
	ccmp	x22, #0, #4, ne
	b.ne	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
	sub	x8, x21, x8
	asr	x8, x8, #2
	str	x8, [x19]
	str	wzr, [x21]
	b	LBB0_16
LBB0_3:
Lloh0:
	adrp	x25, _errno@GOTPAGE
Lloh1:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x26, _EILSEQ@GOTPAGE
Lloh3:
	ldr	x26, [x26, _EILSEQ@GOTPAGEOFF]
	mov	x24, x22
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	x24, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	sub	x8, x21, x8
	asr	x8, x8, #2
	str	x8, [x19]
	str	wzr, [x21]
	add	x8, x22, x8
	add	x1, x8, #1
	mov	x0, x19
	bl	_archive_wstring_ensure
	cbz	x0, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x9, x8, [x19]
	add	x21, x8, x9, lsl #2
	mov	x24, x22
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	bl	_mbtowc
	cmn	x0, #2
	b.hs	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x0, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	subs	x22, x22, x0
	b.lo	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #4
	add	x23, x23, x0
	ldrb	w8, [x23]
	cbz	w8, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	x24, x24, #1
	cbnz	x22, LBB0_4
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x23, #1]!
	mov	w20, #-1
	cbz	w8, LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	x22, x22, #1
	cbnz	x22, LBB0_4
	b	LBB0_2
LBB0_15:
	mov	w20, #-1
LBB0_16:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	w20, #-1
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EILSEQ,8,3                     ; @EILSEQ
.subsections_via_symbols
