	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FS_Rename                      ## -- Begin function FS_Rename
	.p2align	4, 0x90
_FS_Rename:                             ## @FS_Rename
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_fs_searchpaths@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_Com_Error
LBB0_2:
	xorl	%eax, %eax
	callq	_S_ClearSoundBuffer
	movq	_fs_homepath@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	_fs_gamedir@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdx
	callq	_FS_BuildOSPath
	movq	%rax, %r15
	movq	(%r12), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	movq	%r14, %rdx
	callq	_FS_BuildOSPath
	movq	%rax, %rbx
	movq	_fs_debug@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_Com_Printf
LBB0_4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rename
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_FS_CopyFile
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FS_Remove                      ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fs_searchpaths,4,2             ## @fs_searchpaths
	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Filesystem call made without initialization\n"

	.comm	_fs_homepath,8,3                ## @fs_homepath
	.comm	_fs_gamedir,4,2                 ## @fs_gamedir
	.comm	_fs_debug,8,3                   ## @fs_debug
L_.str.1:                               ## @.str.1
	.asciz	"FS_Rename: %s --> %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FS_Rename                      ; -- Begin function FS_Rename
	.p2align	2
_FS_Rename:                             ; @FS_Rename
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _fs_searchpaths@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fs_searchpaths@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ERR_FATAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_FATAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
LBB0_2:
	bl	_S_ClearSoundBuffer
Lloh8:
	adrp	x21, _fs_homepath@GOTPAGE
Lloh9:
	ldr	x21, [x21, _fs_homepath@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh10:
	adrp	x22, _fs_gamedir@GOTPAGE
Lloh11:
	ldr	x22, [x22, _fs_gamedir@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, x19
	bl	_FS_BuildOSPath
	mov	x19, x0
	ldr	x8, [x21]
	ldr	w0, [x8]
	ldr	w1, [x22]
	mov	x2, x20
	bl	_FS_BuildOSPath
	mov	x20, x0
Lloh12:
	adrp	x8, _fs_debug@GOTPAGE
Lloh13:
	ldr	x8, [x8, _fs_debug@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_Com_Printf
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_rename
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_FS_CopyFile
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_FS_Remove
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_fs_searchpaths,4,2             ; @fs_searchpaths
	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Filesystem call made without initialization\n"

	.comm	_fs_homepath,8,3                ; @fs_homepath
	.comm	_fs_gamedir,4,2                 ; @fs_gamedir
	.comm	_fs_debug,8,3                   ; @fs_debug
l_.str.1:                               ; @.str.1
	.asciz	"FS_Rename: %s --> %s\n"

.subsections_via_symbols
