	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _FAT_directory_lfnLength
__FAT_directory_lfnLength:              ## @_FAT_directory_lfnLength
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	%rdi, -40(%rbp)
	movq	_NAME_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rsi
	callq	_strnlen
	movl	$-1, %r14d
	cmpq	%rbx, %rax
	jae	LBB0_8
## %bb.1:
	movq	%rax, %r15
	movq	_ILLEGAL_LFN_CHARACTERS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_strpbrk
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	testq	%r15, %r15
	je	LBB0_7
## %bb.3:
	movq	_ABOVE_UCS_RANGE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r12,%rcx), %edx
	cmpb	$32, %dl
	jb	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpb	%al, %dl
	jae	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ecx
	cmpq	%rcx, %r15
	ja	LBB0_5
LBB0_7:
	movq	_MAX_LFN_LENGTH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	-40(%rbp), %rsi
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	callq	_mbsrtowcs
	cmpl	(%rbx), %eax
	movl	$-1, %r14d
	cmovll	%eax, %r14d
	movl	$-1, %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAME_MAX,8,3                   ## @NAME_MAX
	.comm	_ILLEGAL_LFN_CHARACTERS,4,2     ## @ILLEGAL_LFN_CHARACTERS
	.comm	_ABOVE_UCS_RANGE,1,0            ## @ABOVE_UCS_RANGE
	.comm	_MAX_LFN_LENGTH,4,2             ## @MAX_LFN_LENGTH
	.no_dead_strip	__FAT_directory_lfnLength
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _FAT_directory_lfnLength
__FAT_directory_lfnLength:              ; @_FAT_directory_lfnLength
	.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	x19, x0
	str	x0, [sp, #8]
Lloh0:
	adrp	x8, _NAME_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAME_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	mov	x1, x21
	bl	_strnlen
	cmp	x0, x21
	b.hs	LBB0_2
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _ILLEGAL_LFN_CHARACTERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ILLEGAL_LFN_CHARACTERS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_strpbrk
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #-1
LBB0_3:
	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_4:
	cbz	x20, LBB0_8
; %bb.5:
	mov	x8, #0
Lloh6:
	adrp	x9, _ABOVE_UCS_RANGE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ABOVE_UCS_RANGE@GOTPAGEOFF]
	ldrb	w9, [x9]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x19, x8]
	cmp	w10, #32
	ccmp	w10, w9, #2, hs
	b.hs	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w8, #1
	cmp	x20, x8
	b.hi	LBB0_6
LBB0_8:
Lloh8:
	adrp	x19, _MAX_LFN_LENGTH@GOTPAGE
Lloh9:
	ldr	x19, [x19, _MAX_LFN_LENGTH@GOTPAGEOFF]
	ldr	w2, [x19]
	add	x1, sp, #8
	mov	x0, #0
	mov	x3, #0
	bl	_mbsrtowcs
	ldr	w8, [x19]
	cmp	w0, w8
	mov	w8, #-1
	ccmp	w0, w8, #4, lt
	csinv	w0, w0, wzr, gt
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_NAME_MAX,8,3                   ; @NAME_MAX
	.comm	_ILLEGAL_LFN_CHARACTERS,4,2     ; @ILLEGAL_LFN_CHARACTERS
	.comm	_ABOVE_UCS_RANGE,1,0            ; @ABOVE_UCS_RANGE
	.comm	_MAX_LFN_LENGTH,4,2             ; @MAX_LFN_LENGTH
	.no_dead_strip	__FAT_directory_lfnLength
.subsections_via_symbols
