	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function best_effort_strncat_from_utf16
_best_effort_strncat_from_utf16:        ## @best_effort_strncat_from_utf16
	.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
	movl	%r8d, %r15d
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	leaq	(%rdx,%rax), %rsi
	incq	%rsi
	callq	_archive_string_ensure
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	8(%rbx), %r14
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	addq	(%rbx), %r14
	leaq	-44(%rbp), %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movl	%r15d, %ecx
	callq	_utf16_to_unicode
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	testl	%eax, %eax
	movl	$-1, %edx
	cmovsl	%edx, %ebx
	subq	%rcx, %r13
	addq	%rcx, %r12
	movl	-44(%rbp), %eax
	cmpl	$127, %eax
	movl	$63, %ecx
	cmovgl	%ecx, %eax
	cmovgl	%edx, %ebx
	movb	%al, (%r14)
	incq	%r14
	leaq	-44(%rbp), %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movl	%r15d, %ecx
	callq	_utf16_to_unicode
	testl	%eax, %eax
	jne	LBB0_3
LBB0_5:
	movq	%r14, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subq	8(%rcx), %rax
	movq	%rax, (%rcx)
	movb	$0, (%r14)
	jmp	LBB0_6
LBB0_1:
	movl	$-1, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_best_effort_strncat_from_utf16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function best_effort_strncat_from_utf16
_best_effort_strncat_from_utf16:        ; @best_effort_strncat_from_utf16
	.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	x20, x4
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x0]
	add	x8, x2, x8
	add	x1, x8, #1
	bl	_archive_string_ensure
	cbz	x0, LBB0_5
; %bb.1:
	ldp	x9, x8, [x19]
	add	x24, x8, x9
	add	x0, sp, #12
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_utf16_to_unicode
	mov	w23, #0
	cbz	w0, LBB0_4
; %bb.2:
	mov	w25, #63
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w0, #0
	cneg	w8, w0, mi
	csinv	w9, w23, wzr, ge
	sub	x21, x21, x8
	add	x22, x22, x8
	ldr	w8, [sp, #12]
	cmp	w8, #127
	csel	w8, w25, w8, gt
	csinv	w23, w9, wzr, le
	strb	w8, [x24], #1
	add	x0, sp, #12
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_utf16_to_unicode
	cbnz	w0, LBB0_3
LBB0_4:
	ldr	x8, [x19, #8]
	sub	x8, x24, x8
	str	x8, [x19]
	strb	wzr, [x24]
	b	LBB0_6
LBB0_5:
	mov	w23, #-1
LBB0_6:
	mov	x0, x23
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_best_effort_strncat_from_utf16
.subsections_via_symbols
