	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fname_ext
_fname_ext:                             ## @fname_ext
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r12
	movb	$0, (%rdi)
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r13
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_plat_get_root_dir
	movslq	%eax, %r14
	leaq	(%r12,%r14), %rdi
	movq	%r13, %rsi
	callq	_strcpy
	movq	%r13, %rdi
	callq	_strlen
	addl	%eax, %r14d
	jmp	LBB0_3
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	movq	%rbx, %rdi
	callq	_strlen
	movslq	%eax, %rcx
	movq	_PATH_SEP_C@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	addq	%rbx, %rcx
	decq	%rcx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rsi
	cmpq	%rbx, %rcx
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	-1(%rsi), %rcx
	cmpb	%al, (%rsi)
	jne	LBB0_4
LBB0_6:
	movslq	%r14d, %rdx
	leaq	(%r12,%rdx), %rdi
	notl	%edx
	addl	%r15d, %edx
	incq	%rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strncpy
	movslq	%r15d, %rax
	movb	$0, -8(%rax,%r12)
	movq	%r12, %rdi
	callq	_strlen
	cltq
	cmpb	$46, -4(%rax,%r12)
	jne	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_strlen
	cltq
	movb	$0, -4(%rax,%r12)
LBB0_8:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.10:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_strcat                         ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_SEP_C,1,0                 ## @PATH_SEP_C
	.no_dead_strip	_fname_ext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fname_ext
_fname_ext:                             ; @fname_ext
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x4
	mov	x19, x3
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
	strb	wzr, [x0]
	cbz	x2, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_plat_get_root_dir
	mov	x24, x0
	add	x0, x20, w0, sxtw
	mov	x1, x23
	bl	_strcpy
	mov	x0, x23
	bl	_strlen
	add	w23, w0, w24
LBB0_2:
	mov	x0, x22
	bl	_strlen
Lloh0:
	adrp	x8, _PATH_SEP_C@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PATH_SEP_C@GOTPAGEOFF]
	ldrb	w8, [x8]
	add	x9, x22, w0, sxtw
	sub	x10, x9, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x10
	cmp	x10, x22
	b.lo	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x10, x9
	ldrb	w11, [x10], #-1
	cmp	w11, w8
	b.ne	LBB0_3
LBB0_5:
	add	x0, x20, w23, sxtw
	mvn	w8, w23
	add	w2, w8, w21
	add	x1, x9, #1
	bl	_strncpy
	add	x8, x20, w21, sxtw
	sturb	wzr, [x8, #-8]
	mov	x0, x20
	bl	_strlen
	add	x8, x20, w0, sxtw
	ldurb	w8, [x8, #-4]
	cmp	w8, #46
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_strlen
	add	x8, x20, w0, sxtw
	sturb	wzr, [x8, #-4]
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_strcat
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_SEP_C,1,0                 ; @PATH_SEP_C
	.no_dead_strip	_fname_ext
.subsections_via_symbols
