	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_move_file                      ## -- Begin function move_file
	.p2align	4, 0x90
_move_file:                             ## @move_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_strEQ
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_pfatal
LBB0_3:
	movq	_buf@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_buf_size@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	%r15d, %edi
	callq	_read
	testq	%rax, %rax
	jle	LBB0_8
## %bb.4:
	movq	%rax, %rbx
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	%r15d, %edi
	callq	_read
	movq	%rax, %rbx
	testq	%rax, %rax
	jle	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movl	(%r12), %esi
	movq	%rbx, %rdx
	callq	_write
	cmpq	%rbx, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pfatal
	jmp	LBB0_7
LBB0_8:
	movl	%r15d, %edi
	callq	_close
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_9:
	movq	%r15, %rdi
	callq	_backup_file
	testq	%rax, %rax
	js	LBB0_10
## %bb.11:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_rename
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jns	LBB0_17
## %bb.12:
	movq	_errno@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	_EXDEV@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_15
## %bb.13:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_copy_file
	testq	%rax, %rax
	jns	LBB0_17
## %bb.14:
	movq	(%r12), %rdi
LBB0_15:
	callq	_strerror
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_16
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.3(%rip), %rdi
LBB0_16:
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_say
	movl	$-1, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"internal error, can't reopen %s"

	.comm	_buf,4,2                        ## @buf
	.comm	_buf_size,4,2                   ## @buf_size
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
L_.str.2:                               ## @.str.2
	.asciz	"write failed"

L_.str.3:                               ## @.str.3
	.asciz	"Can't backup %s, output is in %s: %s\n"

	.comm	_errno,8,3                      ## @errno
	.comm	_EXDEV,8,3                      ## @EXDEV
L_.str.4:                               ## @.str.4
	.asciz	"Can't create %s, output is in %s: %s\n"

	.comm	_debug,4,2                      ## @debug
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_move_file                      ; -- Begin function move_file
	.p2align	2
_move_file:                             ; @move_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strEQ
	cbz	x0, LBB0_9
; %bb.1:
Lloh2:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	mov	x20, x0
	tbz	w0, #31, LBB0_3
; %bb.2:
	str	x19, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pfatal
LBB0_3:
Lloh7:
	adrp	x22, _buf@GOTPAGE
Lloh8:
	ldr	x22, [x22, _buf@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh9:
	adrp	x23, _buf_size@GOTPAGE
Lloh10:
	ldr	x23, [x23, _buf_size@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_read
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x21, x0
Lloh11:
	adrp	x24, _STDOUT_FILENO@GOTPAGE
Lloh12:
	ldr	x24, [x24, _STDOUT_FILENO@GOTPAGEOFF]
Lloh13:
	adrp	x19, l_.str.2@PAGE
Lloh14:
	add	x19, x19, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_read
	mov	x21, x0
	cmp	x0, #0
	b.le	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	ldr	w1, [x22]
	mov	x2, x21
	bl	_write
	cmp	x0, x21
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_pfatal
	b	LBB0_5
LBB0_8:
	mov	x0, x20
	bl	_close
	mov	w0, #0
	b	LBB0_18
LBB0_9:
	mov	x0, x20
	bl	_backup_file
	tbnz	x0, #63, LBB0_12
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	bl	_rename
	tbnz	x0, #63, LBB0_13
LBB0_11:
	mov	w0, #0
	b	LBB0_18
LBB0_12:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_13:
Lloh20:
	adrp	x21, _errno@GOTPAGE
Lloh21:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh22:
	adrp	x8, _EXDEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EXDEV@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.14:
	mov	x0, x19
	mov	x1, x20
	bl	_copy_file
	tbz	x0, #63, LBB0_11
; %bb.15:
	ldr	x0, [x21]
LBB0_16:
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_17:
	mov	x1, x20
	bl	_say
	mov	w0, #-1
LBB0_18:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"internal error, can't reopen %s"

	.comm	_buf,4,2                        ; @buf
	.comm	_buf_size,4,2                   ; @buf_size
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
l_.str.2:                               ; @.str.2
	.asciz	"write failed"

l_.str.3:                               ; @.str.3
	.asciz	"Can't backup %s, output is in %s: %s\n"

	.comm	_errno,8,3                      ; @errno
	.comm	_EXDEV,8,3                      ; @EXDEV
l_.str.4:                               ; @.str.4
	.asciz	"Can't create %s, output is in %s: %s\n"

	.comm	_debug,4,2                      ; @debug
.subsections_via_symbols
