	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FilenameW2A_N                  ## -- Begin function FilenameW2A_N
	.p2align	4, 0x90
_FilenameW2A_N:                         ## @FilenameW2A_N
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r8d
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	testl	%ecx, %ecx
	jns	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_wcslen
	movl	%eax, %r8d
	incl	%r8d
LBB0_2:
	movq	_bIsFileApiAnsi@GOTPCREL(%rip), %rax
	shll	$2, %r8d
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %ecx
	callq	_RtlUnicodeToMultiByteN
	jmp	LBB0_5
LBB0_4:
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %ecx
	callq	_RtlUnicodeToOemN
LBB0_5:
	movslq	-28(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	$0, -8(%r14,%rax,8)
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bIsFileApiAnsi,8,3             ## @bIsFileApiAnsi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FilenameW2A_N                  ; -- Begin function FilenameW2A_N
	.p2align	2
_FilenameW2A_N:                         ; @FilenameW2A_N
	.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
	tbz	w3, #31, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_wcslen
	add	w3, w0, #1
LBB0_2:
Lloh0:
	adrp	x8, _bIsFileApiAnsi@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bIsFileApiAnsi@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	lsl	w4, w3, #2
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	cbz	x8, LBB0_6
; %bb.3:
	bl	_RtlUnicodeToMultiByteN
	ldr	w0, [sp, #12]
	cbz	w0, LBB0_5
LBB0_4:
	sub	w8, w0, #1
	str	xzr, [x19, w8, sxtw #3]
LBB0_5:
	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
LBB0_6:
	bl	_RtlUnicodeToOemN
	ldr	w0, [sp, #12]
	cbnz	w0, LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_bIsFileApiAnsi,8,3             ; @bIsFileApiAnsi
.subsections_via_symbols
