	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_filename
_open_filename:                         ## @open_filename
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$8, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	4(%rax), %rdi
	movq	%r15, %rsi
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	callq	_archive_mstring_copy_mbs
	testl	%eax, %eax
	js	LBB0_6
LBB0_8:
	movl	$-1, (%rbx)
	movq	_file_open@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_file_write@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_file_close@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_archive_write_open             ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	jmp	LBB0_7
LBB0_4:
	callq	_archive_mstring_copy_wcs
	testl	%eax, %eax
	jns	LBB0_8
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_9
LBB0_7:
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	testl	%r12d, %r12d
	movq	_ARCHIVE_ERRNO_MISC@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	%r14, %rdi
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_archive_set_error
	movq	_ARCHIVE_FAILED@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,8,3                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No memory"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
	.comm	_errno,8,3                      ## @errno
	.comm	_ARCHIVE_ERRNO_MISC,4,2         ## @ARCHIVE_ERRNO_MISC
L_.str.1:                               ## @.str.1
	.asciz	"Can't convert '%s' to WCS"

L_.str.2:                               ## @.str.2
	.asciz	"Can't convert '%S' to MBS"

	.comm	_ARCHIVE_FAILED,4,2             ## @ARCHIVE_FAILED
	.comm	_file_open,4,2                  ## @file_open
	.comm	_file_write,4,2                 ## @file_write
	.comm	_file_close,4,2                 ## @file_close
	.no_dead_strip	_open_filename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_filename
_open_filename:                         ; @open_filename
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w0, #1
	mov	w1, #8
	bl	_calloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	add	x0, x0, #4
	mov	x1, x20
	cbz	w21, LBB0_5
; %bb.2:
	bl	_archive_mstring_copy_mbs
	tbnz	w0, #31, LBB0_6
LBB0_3:
	mov	w8, #-1
	str	w8, [x22]
Lloh0:
	adrp	x8, _file_open@GOTPAGE
Lloh1:
	ldr	x8, [x8, _file_open@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _file_write@GOTPAGE
Lloh4:
	ldr	x8, [x8, _file_write@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _file_close@GOTPAGE
Lloh7:
	ldr	x8, [x8, _file_close@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x1, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_archive_write_open
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x8]
	b	LBB0_7
LBB0_5:
	bl	_archive_mstring_copy_wcs
	tbz	w0, #31, LBB0_3
LBB0_6:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_8
LBB0_7:
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_archive_set_error
Lloh20:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh22:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh24:
	ldrsw	x1, [x8]
Lloh25:
	adrp	x8, l_.str.1@PAGE
Lloh26:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh27:
	adrp	x9, l_.str.2@PAGE
Lloh28:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w21, #0
	csel	x2, x9, x8, eq
	str	x20, [sp]
	mov	x0, x19
	bl	_archive_set_error
Lloh29:
	adrp	x8, _ARCHIVE_FAILED@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ARCHIVE_FAILED@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,8,3                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No memory"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
	.comm	_errno,8,3                      ; @errno
	.comm	_ARCHIVE_ERRNO_MISC,4,2         ; @ARCHIVE_ERRNO_MISC
l_.str.1:                               ; @.str.1
	.asciz	"Can't convert '%s' to WCS"

l_.str.2:                               ; @.str.2
	.asciz	"Can't convert '%S' to MBS"

	.comm	_ARCHIVE_FAILED,4,2             ; @ARCHIVE_FAILED
	.comm	_file_open,4,2                  ; @file_open
	.comm	_file_write,4,2                 ; @file_write
	.comm	_file_close,4,2                 ; @file_close
	.no_dead_strip	_open_filename
.subsections_via_symbols
