	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function strncat_from_utf8_libarchive2
_strncat_from_utf8_libarchive2:         ## @strncat_from_utf8_libarchive2
	.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	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_wctomb
	movq	(%rbx), %rax
	leaq	(%rax,%r13), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	callq	_archive_string_ensure
	movl	$-1, %ecx
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	8(%rbx), %rax
	movq	(%rbx), %r14
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	%rax, %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movslq	16(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_MB_CUR_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	-56(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	__utf8_to_unicode
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movl	%eax, %r12d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	notq	%rbx
	addq	%rax, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %r14
	jb	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	subq	8(%rbx), %r14
	movq	%r14, (%rbx)
	leaq	(%r14,%r13,2), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	callq	_archive_string_ensure
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	movq	(%rbx), %r14
	addq	%rax, %r14
	movslq	16(%rbx), %rcx
	addq	%rax, %rcx
	movq	_MB_CUR_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	notq	%rbx
	addq	%rcx, %rbx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$63, %esi
	testl	%r12d, %r12d
	js	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-56(%rbp), %esi
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_wctomb
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %ecx
	negl	%ecx
	cmovsl	%r12d, %ecx
	subq	%rcx, %r13
	addq	%rcx, %r15
	cltq
	addq	%rax, %r14
	leaq	-56(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	__utf8_to_unicode
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_3
LBB0_10:
	movq	%r14, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	subq	8(%rcx), %rax
	movq	%rax, (%rcx)
	movb	$0, (%r14)
	xorl	%ecx, %ecx
	jmp	LBB0_13
LBB0_12:
	movl	$-1, %ecx
LBB0_13:
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_CUR_MAX,8,3                 ## @MB_CUR_MAX
	.no_dead_strip	_strncat_from_utf8_libarchive2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function strncat_from_utf8_libarchive2
_strncat_from_utf8_libarchive2:         ; @strncat_from_utf8_libarchive2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, #0
	mov	w1, #0
	bl	_wctomb
	ldr	x8, [x19]
	add	x8, x20, x8
	add	x1, x8, #1
	mov	x0, x19
	bl	_archive_string_ensure
	cbz	x0, LBB0_9
; %bb.1:
	ldp	x8, x25, [x19]
	add	x22, x25, x8
	ldrsw	x26, [x19, #16]
Lloh0:
	adrp	x24, _MB_CUR_MAX@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MB_CUR_MAX@GOTPAGEOFF]
	ldr	x27, [x24]
	add	x0, sp, #8
	mov	x1, x21
	mov	x2, x20
	bl	__utf8_to_unicode
	cbz	w0, LBB0_8
; %bb.2:
	mov	x23, x0
	mvn	x8, x27
	add	x9, x25, x26
	add	x26, x9, x8
	mov	w25, #63
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x22, x26
	b.lo	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	sub	x8, x22, x8
	str	x8, [x19]
	add	x8, x8, x20, lsl #1
	add	x1, x8, #1
	mov	x0, x19
	bl	_archive_string_ensure
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x9, x8, [x19]
	add	x22, x8, x9
	ldrsw	x9, [x19, #16]
	ldr	x10, [x24]
	mvn	x10, x10
	add	x8, x8, x9
	add	x26, x8, x10
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #8]
	cmp	w23, #0
	csel	w1, w25, w8, lt
	mov	x0, x22
	bl	_wctomb
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w23, #0
	cneg	w8, w23, mi
	sub	x20, x20, x8
	add	x21, x21, x8
	add	x22, x22, w0, sxtw
	add	x0, sp, #8
	mov	x1, x21
	mov	x2, x20
	bl	__utf8_to_unicode
	mov	x23, x0
	cbnz	w0, LBB0_3
LBB0_8:
	mov	w0, #0
	ldr	x8, [x19, #8]
	sub	x8, x22, x8
	str	x8, [x19]
	strb	wzr, [x22]
	b	LBB0_10
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_CUR_MAX,8,3                 ; @MB_CUR_MAX
	.no_dead_strip	_strncat_from_utf8_libarchive2
.subsections_via_symbols
