	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bakcopy
_bakcopy:                               ## @bakcopy
	.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
	movl	$8200, %eax                     ## imm = 0x2008
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_in_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	-1(%rcx), %rax
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	decq	%rdx
	cmpb	$0, 1(%rax)
	leaq	1(%rax), %rax
	jne	LBB0_1
## %bb.2:
	cmpq	%rcx, %rax
	jbe	LBB0_3
## %bb.4:
	leaq	-1(%rax), %rsi
	addq	%rdx, %rax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, %rsi
	jbe	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	-1(%rsi), %rdi
	cmpb	$47, (%rsi)
	movq	%rdi, %rsi
	jne	LBB0_5
## %bb.8:
	incq	%rdi
	movl	$1, %edx
	movq	%rdi, %rax
	jmp	LBB0_9
LBB0_3:
	xorl	%edx, %edx
	jmp	LBB0_9
LBB0_6:
	xorl	%edx, %edx
	cmpb	$47, (%rax)
	sete	%dl
LBB0_9:
	addq	%rax, %rdx
	movq	_bakfile@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_simple_backup_suffix@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	movq	(%rbx), %rdi
	movl	$384, %esi                      ## imm = 0x180
	callq	_creat
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:
	movq	_bakfile@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_11:
	movq	_input@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_fileno
	leaq	-8240(%rbp), %rsi
	movl	%eax, %edi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_16
## %bb.12:
	leaq	-8240(%rbp), %r12
	leaq	L_.str.1(%rip), %r15
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r13), %rdi
	callq	_fileno
	movl	%eax, %edi
	movq	%r12, %rsi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_write
	cmpl	%ebx, %eax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_bakfile@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	$1, %edi
	movq	%r15, %rsi
	callq	_err
	jmp	LBB0_15
LBB0_16:
	testl	%ebx, %ebx
	movq	_in_name@GOTPCREL(%rip), %rbx
	jns	LBB0_18
## %bb.17:
	movq	(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_18:
	movl	%r14d, %edi
	callq	_close
	movq	(%r13), %rdi
	callq	_fclose
	movq	_bakfile@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_fopen
	movq	%rax, (%r13)
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:
	movq	_bakfile@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_20:
	movq	(%rbx), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_fopen
	movq	_output@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_21
## %bb.23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	addq	$8200, %rsp                     ## imm = 0x2008
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	_bakfile@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_unlink
	movq	(%rbx), %rdx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.22:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	addq	$8200, %rsp                     ## imm = 0x2008
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_err                            ## TAILCALL
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_in_name,8,3                    ## @in_name
	.comm	_bakfile,8,3                    ## @bakfile
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s"

	.comm	_simple_backup_suffix,4,2       ## @simple_backup_suffix
L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_input,8,3                      ## @input
L_.str.2:                               ## @.str.2
	.asciz	"r"

L_.str.3:                               ## @.str.3
	.asciz	"w"

	.comm	_output,8,3                     ## @output
	.no_dead_strip	_bakcopy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bakcopy
_bakcopy:                               ; @bakcopy
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -72
	.cfi_offset w28, -80
	mov	w9, #8208
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #2, lsl #12             ; =8192
	sub	sp, sp, #16
	mov	x10, #0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh5:
	adrp	x22, _in_name@GOTPAGE
Lloh6:
	ldr	x22, [x22, _in_name@GOTPAGEOFF]
	ldr	x9, [x22]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x9, x10]
	add	x10, x10, #1
	cbnz	w8, LBB0_1
; %bb.2:
	add	x11, x9, x10
	sub	x8, x11, #1
	cmp	x8, x9
	b.ls	LBB0_7
; %bb.3:
	sub	x11, x11, #2
	sub	x8, x8, x10
	add	x8, x8, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x11, x9
	b.ls	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w10, [x11], #-1
	cmp	w10, #47
	b.ne	LBB0_4
; %bb.6:
	add	x8, x11, #1
	mov	w9, #1
	b	LBB0_9
LBB0_7:
	mov	x9, #0
	b	LBB0_9
LBB0_8:
	ldrb	w9, [x8]
	cmp	w9, #47
	cset	w9, eq
LBB0_9:
	add	x2, x8, x9
Lloh7:
	adrp	x23, _bakfile@GOTPAGE
Lloh8:
	ldr	x23, [x23, _bakfile@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh9:
	adrp	x8, _simple_backup_suffix@GOTPAGE
Lloh10:
	ldr	x8, [x8, _simple_backup_suffix@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
	ldr	x0, [x23]
	mov	w1, #384
	bl	_creat
	mov	x19, x0
	tbz	w0, #31, LBB0_11
; %bb.10:
	ldr	x2, [x23]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_11:
Lloh16:
	adrp	x24, _input@GOTPAGE
Lloh17:
	ldr	x24, [x24, _input@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_fileno
	add	x1, sp, #8
	mov	w2, #8192
	bl	_read
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.12:
Lloh18:
	adrp	x20, l_.str.1@PAGE
Lloh19:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x0, [x24]
	bl	_fileno
	add	x1, sp, #8
	mov	w2, #8192
	bl	_read
	mov	x21, x0
	cmp	w0, #0
	b.le	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_write
	cmp	w0, w21
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x2, [x23]
	mov	w0, #1
	mov	x1, x20
	bl	_err
	b	LBB0_13
LBB0_16:
	tbz	w21, #31, LBB0_18
; %bb.17:
	ldr	x2, [x22]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_18:
	mov	x0, x19
	bl	_close
	ldr	x0, [x24]
	bl	_fclose
	ldr	x0, [x23]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fopen
	str	x0, [x24]
	cbnz	x0, LBB0_20
; %bb.19:
	ldr	x2, [x23]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_20:
	ldr	x0, [x22]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fopen
Lloh28:
	adrp	x8, _output@GOTPAGE
Lloh29:
	ldr	x8, [x8, _output@GOTPAGEOFF]
Lloh30:
	str	x0, [x8]
	cbz	x0, LBB0_23
; %bb.21:
	ldur	x8, [x29, #-72]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.22:
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #16
	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	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_23:
	ldr	x0, [x23]
	bl	_unlink
	ldr	x2, [x22]
	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_25
; %bb.24:
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #16
	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	x28, x27, [sp], #80             ; 16-byte Folded Reload
	b	_err
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_in_name,8,3                    ; @in_name
	.comm	_bakfile,8,3                    ; @bakfile
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s"

	.comm	_simple_backup_suffix,4,2       ; @simple_backup_suffix
l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_input,8,3                      ; @input
l_.str.2:                               ; @.str.2
	.asciz	"r"

l_.str.3:                               ; @.str.3
	.asciz	"w"

	.comm	_output,8,3                     ; @output
	.no_dead_strip	_bakcopy
.subsections_via_symbols
