	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_str_utf16be
_set_str_utf16be:                       ## @set_str_utf16be
	.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	%rsi, %r12
	testq	%rdx, %rdx
	leaq	L_.str(%rip), %r13
	cmovneq	%rdx, %r13
	movq	%rcx, %rbx
	andq	$-2, %rbx
	movq	_VDC_UCS2@GOTPCREL(%rip), %rax
	cmpl	%r9d, (%rax)
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	movq	%r13, %rdi
	callq	_strlen
	movl	16(%rbx), %ecx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_archive_strncpy_l
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_3
## %bb.4:
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_5:
	cmpl	$0, (%r13)
	je	LBB0_6
## %bb.7:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leaq	2(%rax), %r14
	cmpl	$0, 4(%r13,%rax,2)
	movq	%r14, %rax
	jne	LBB0_8
	jmp	LBB0_9
LBB0_3:
	movq	(%rbx), %r14
	movq	8(%rbx), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%rbx, %r14
	cmovaeq	%rbx, %r14
	movq	%r12, %rdi
	jmp	LBB0_10
LBB0_6:
	xorl	%r14d, %r14d
LBB0_9:
	cmpq	%rbx, %r14
	cmovaeq	%rbx, %r14
	movq	%r12, %rdi
	movq	%r13, %rsi
LBB0_10:
	movq	%r14, %rdx
	callq	_memcpy
	testq	%r14, %r14
	je	LBB0_16
## %bb.11:
	movq	%rbx, %r13
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	addq	$2, %rbx
	cmpq	%r14, %rbx
	jae	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%r12,%rbx), %edi
	movzbl	1(%r12,%rbx), %esi
	callq	_joliet_allowed_char
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	(%r12,%rbx), %rdi
	movl	$95, %esi
	callq	_archive_be16enc
	jmp	LBB0_14
LBB0_15:
	addq	%rbx, %r12
	movq	%r13, %rbx
LBB0_16:
	cmpq	%r14, %rbx
	je	LBB0_19
## %bb.17:
	subq	%rbx, %r14
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_archive_be16enc
	addq	$2, %r12
	addq	$2, %r14
	jne	LBB0_18
LBB0_19:
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rax
	testb	$1, -56(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_21
## %bb.20:
	movb	$0, (%r12)
LBB0_21:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_VDC_UCS2,4,2                   ## @VDC_UCS2
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOMEM,8,3                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Can't allocate memory for UTF-16BE"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
	.no_dead_strip	_set_str_utf16be
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_str_utf16be
_set_str_utf16be:                       ; @set_str_utf16be
	.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	x21, x4
	mov	x20, x3
	mov	x19, x1
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x2, #0
	csel	x23, x8, x2, eq
	and	x25, x3, #0xfffffffffffffffe
Lloh2:
	adrp	x8, _VDC_UCS2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VDC_UCS2@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w5
	b.ne	LBB0_4
; %bb.1:
	mov	x22, x0
	ldr	x24, [x0, #8]
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	ldr	w3, [x24, #16]
	mov	x0, x24
	mov	x1, x23
	bl	_archive_strncpy_l
	cbz	x0, LBB0_7
; %bb.2:
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x8]
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_7
; %bb.3:
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_archive_set_error
Lloh13:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
	b	LBB0_22
LBB0_4:
	ldr	w8, [x23]
	cbz	w8, LBB0_8
; %bb.5:
	mov	x8, #0
	add	x9, x23, #4
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, #2
	ldr	w10, [x9], #4
	cbnz	w10, LBB0_6
	b	LBB0_9
LBB0_7:
	ldp	x8, x1, [x24]
	cmp	x8, x25
	csel	x22, x8, x25, lo
	mov	x0, x19
	b	LBB0_10
LBB0_8:
	mov	x8, #0
LBB0_9:
	cmp	x8, x25
	csel	x22, x8, x25, lo
	mov	x0, x19
	mov	x1, x23
LBB0_10:
	mov	x2, x22
	bl	_memcpy
	cbz	x22, LBB0_16
; %bb.11:
	mov	x24, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x24, x24, #2
	cmp	x24, x22
	b.hs	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	x23, x19, x24
	ldrb	w0, [x23]
	ldrb	w1, [x23, #1]
	bl	_joliet_allowed_char
	cbnz	w0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x23
	mov	w1, #95
	bl	_archive_be16enc
	b	LBB0_12
LBB0_15:
	add	x19, x19, x24
LBB0_16:
	cmp	x25, x22
	b.eq	LBB0_19
; %bb.17:
	sub	x22, x22, x25
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_archive_be16enc
	add	x19, x19, #2
	adds	x22, x22, #2
	b.ne	LBB0_18
LBB0_19:
	tbz	w20, #0, LBB0_21
; %bb.20:
	strb	wzr, [x19]
LBB0_21:
Lloh15:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_VDC_UCS2,4,2                   ; @VDC_UCS2
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOMEM,8,3                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Can't allocate memory for UTF-16BE"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
	.no_dead_strip	_set_str_utf16be
.subsections_via_symbols
