	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_backup_file                    ## -- Begin function backup_file
	.p2align	4, 0x90
_backup_file:                           ## @backup_file
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	%rsp, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_backup_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_none@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_33
## %bb.1:
	leaq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_33
## %bb.2:
	movq	_origprae@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.3:
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.4:
	movq	_simple_backup_suffix@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.6:
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_strlcpy
	cltq
	cmpq	%r12, %rax
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	jae	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_strlcat
	cltq
	cmpq	%r12, %rax
	jb	LBB0_15
LBB0_8:
	movq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_fatal
	jmp	LBB0_15
LBB0_9:
	movq	_simple_backup_suffix@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.10:
	movq	-64(%rbp), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_find_backup_file_name
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_fatal
LBB0_12:
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_strlcpy
	cltq
	cmpq	%r12, %rax
	jb	LBB0_14
## %bb.13:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_fatal
LBB0_14:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_free
LBB0_15:
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_strrchr
	leaq	1(%rax), %r14
	testq	%rax, %rax
	cmoveq	%r15, %r14
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_29
## %bb.16:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	-64(%rbp), %rax
	jne	LBB0_29
## %bb.17:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	-56(%rbp), %rax
	jne	LBB0_29
## %bb.18:
	leaq	1(%r14), %r12
	leaq	-64(%rbp), %r13
	.p2align	4, 0x90
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	movb	(%r14), %al
	testb	%al, %al
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	%al, %edi
	callq	_islower
	testl	%eax, %eax
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	movzbl	1(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_21
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=1
	movb	(%rbx), %al
	testb	%al, %al
	je	LBB0_23
## %bb.25:                              ##   in Loop: Header=BB0_19 Depth=1
	movzbl	%al, %edi
	callq	_toupper
	movb	%al, (%rbx)
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r12, %rdi
	callq	_strlen
	leaq	1(%rax), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_memmove
LBB0_26:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	-64(%rbp), %rax
	jne	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	-56(%rbp), %rax
	je	LBB0_19
LBB0_29:
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_rename
	testq	%rax, %rax
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	jns	LBB0_32
## %bb.30:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EXDEV@GOTPCREL(%rip), %rcx
	movl	$-1, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_33
## %bb.31:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_copy_file
	testq	%rax, %rax
	jns	LBB0_32
	jmp	LBB0_33
LBB0_5:
	movq	%r13, %rdi
	callq	_unlink
LBB0_32:
	xorl	%ebx, %ebx
LBB0_33:
	movq	%r14, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.34:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.comm	_backup_type,8,3                ## @backup_type
	.comm	_none,8,3                       ## @none
	.comm	_origprae,8,3                   ## @origprae
	.comm	_simple_backup_suffix,8,3       ## @simple_backup_suffix
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"filename %s too long for buffer\n"

L_.str.1:                               ## @.str.1
	.asciz	"out of memory\n"

	.comm	_errno,8,3                      ## @errno
	.comm	_EXDEV,8,3                      ## @EXDEV
	.comm	_debug,4,2                      ## @debug
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_backup_file                    ; -- Begin function backup_file
	.p2align	2
_backup_file:                           ; @backup_file
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #32
	mov	x19, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh8:
	adrp	x8, _backup_type@GOTPAGE
Lloh9:
	ldr	x8, [x8, _backup_type@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _none@GOTPAGE
Lloh12:
	ldr	x9, [x9, _none@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_31
; %bb.1:
	sub	x1, x29, #88
	mov	x0, x19
	bl	_stat
	cbnz	x0, LBB0_31
; %bb.2:
Lloh14:
	adrp	x22, _origprae@GOTPAGE
Lloh15:
	ldr	x22, [x22, _origprae@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	x9, [x8]
	cbz	x9, LBB0_30
; %bb.4:
Lloh16:
	adrp	x9, _simple_backup_suffix@GOTPAGE
Lloh17:
	ldr	x9, [x9, _simple_backup_suffix@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	ldr	x9, [x9]
	cbz	x9, LBB0_30
; %bb.5:
	ldp	x24, x25, [x29, #-88]
	stp	x8, x21, [sp, #-16]!
	mov	x0, x20
	bl	_strlcpy
	add	sp, sp, #16
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x21
	b.hs	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_strlcat
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x21
	b.lo	LBB0_14
LBB0_7:
	ldr	x8, [x22]
	str	x8, [sp, #-16]!
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
	add	sp, sp, #16
	b	LBB0_14
LBB0_8:
Lloh21:
	adrp	x8, _simple_backup_suffix@GOTPAGE
Lloh22:
	ldr	x8, [x8, _simple_backup_suffix@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_30
; %bb.9:
	ldp	x24, x25, [x29, #-88]
	mov	x0, x19
	bl	_find_backup_file_name
	mov	x22, x0
	cbnz	x0, LBB0_11
; %bb.10:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fatal
LBB0_11:
	stp	x22, x21, [sp, #-16]!
	mov	x0, x20
	bl	_strlcpy
	add	sp, sp, #16
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x21
	b.lo	LBB0_13
; %bb.12:
	str	x22, [sp, #-16]!
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
	add	sp, sp, #16
LBB0_13:
	mov	x0, x22
	bl	_free
LBB0_14:
	mov	x0, x20
	mov	w1, #47
	bl	_strrchr
	cmp	x0, #0
	csinc	x21, x20, x0, eq
	sub	x1, x29, #88
	mov	x0, x20
	bl	_stat
	ldp	x8, x9, [x29, #-88]
	cmp	x0, #0
	ccmp	x24, x8, #0, eq
	ccmp	x25, x9, #0, eq
	b.ne	LBB0_26
; %bb.15:
	add	x22, x21, #1
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	ldrb	w8, [x21]
	cbz	w8, LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x26, x21
LBB0_18:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w0, w8, #0xff
	bl	_islower
	cbnz	w0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	ldrb	w8, [x26, #1]!
	cbnz	w8, LBB0_18
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_16 Depth=1
	ldrb	w0, [x26]
	cbz	w0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	bl	_toupper
	strb	w0, [x26]
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x22
	bl	_strlen
	add	x2, x0, #1
	mov	x0, x21
	mov	x1, x22
	bl	_memmove
LBB0_23:                                ;   in Loop: Header=BB0_16 Depth=1
	sub	x1, x29, #88
	mov	x0, x20
	bl	_stat
	cbnz	x0, LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_16 Depth=1
	ldur	x8, [x29, #-88]
	cmp	x24, x8
	b.ne	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_16 Depth=1
	ldur	x8, [x29, #-80]
	cmp	x25, x8
	b.eq	LBB0_16
LBB0_26:
	mov	x0, x19
	mov	x1, x20
	bl	_rename
	tbz	x0, #63, LBB0_31
; %bb.27:
Lloh28:
	adrp	x8, _errno@GOTPAGE
Lloh29:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
Lloh31:
	adrp	x9, _EXDEV@GOTPAGE
Lloh32:
	ldr	x9, [x9, _EXDEV@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_29
; %bb.28:
	mov	x0, x19
	mov	x1, x20
	bl	_copy_file
	tbz	x0, #63, LBB0_31
LBB0_29:
	mov	w0, #-1
	b	LBB0_32
LBB0_30:
	mov	x0, x19
	bl	_unlink
LBB0_31:
	mov	w0, #0
LBB0_32:
	mov	sp, x23
	ldur	x8, [x29, #-72]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_34
; %bb.33:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_34:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.comm	_backup_type,8,3                ; @backup_type
	.comm	_none,8,3                       ; @none
	.comm	_origprae,8,3                   ; @origprae
	.comm	_simple_backup_suffix,8,3       ; @simple_backup_suffix
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"filename %s too long for buffer\n"

l_.str.1:                               ; @.str.1
	.asciz	"out of memory\n"

	.comm	_errno,8,3                      ; @errno
	.comm	_EXDEV,8,3                      ; @EXDEV
	.comm	_debug,4,2                      ; @debug
.subsections_via_symbols
