	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cp_file                        ## -- Begin function cp_file
	.p2align	4, 0x90
_cp_file:                               ## @cp_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	(%rdi), %r12
	movl	$1, -60(%rbp)
	movq	_MINFBSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movslq	16(%rdi), %r14
	movq	_BLKMULT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	-112(%rbp), %rsi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %edi
	callq	_fstat
	testq	%rax, %rax
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_syswarn
	jmp	LBB0_3
LBB0_2:
	movl	-112(%rbp), %eax
	testl	%eax, %eax
	cmovgl	%eax, %r15d
LBB0_3:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	imulq	%r14, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r15d, -76(%rbp)
	movq	_buf@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_blksz@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_read
	testl	%eax, %eax
	jle	LBB0_9
## %bb.4:
	movl	%eax, %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_write
	cmpl	%r14d, %eax
	jne	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %eax
	addq	%rax, %r13
	movl	(%r12), %esi
	movq	_blksz@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_read
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -96(%rbp)                 ## 8-byte Folded Reload
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %edx
	leaq	-76(%rbp), %rcx
	leaq	-60(%rbp), %r8
	movl	%r15d, %r9d
	callq	_file_write
	cmpl	%r14d, %eax
	je	LBB0_8
LBB0_10:
	testl	%eax, %eax
	jns	LBB0_11
## %bb.17:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %r8
	movq	8(%r14), %rcx
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_syswarn
	jmp	LBB0_18
LBB0_9:
	xorl	%r13d, %r13d
LBB0_11:
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	cmpq	24(%r14), %r13
	jne	LBB0_15
## %bb.12:
	leaq	-112(%rbp), %rsi
	movl	%ebx, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_16
## %bb.13:
	movq	32(%r14), %rax
	cmpq	-104(%rbp), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_19
## %bb.14:
	movq	(%r14), %rcx
	movq	8(%r14), %rdx
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_paxwarn
	jmp	LBB0_19
LBB0_15:
	movq	(%r14), %rcx
	movq	8(%r14), %rdx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_paxwarn
	jmp	LBB0_18
LBB0_16:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rcx
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_syswarn
LBB0_18:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -96(%rbp)                 ## 8-byte Folded Reload
	jle	LBB0_23
## %bb.20:
	movl	-60(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_23
## %bb.21:
	cmpq	$0, 24(%r14)
	jle	LBB0_23
## %bb.22:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_file_flush
LBB0_23:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MINFBSZ,4,2                    ## @MINFBSZ
	.comm	_BLKMULT,4,2                    ## @BLKMULT
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to obtain block size for file %s"

	.comm	_buf,4,2                        ## @buf
	.comm	_blksz,4,2                      ## @blksz
L_.str.1:                               ## @.str.1
	.asciz	"Failed write during copy of %s to %s"

L_.str.2:                               ## @.str.2
	.asciz	"File %s changed size during copy to %s"

L_.str.3:                               ## @.str.3
	.asciz	"Failed stat of %s"

L_.str.4:                               ## @.str.4
	.asciz	"File %s was modified during copy to %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cp_file                        ; -- Begin function cp_file
	.p2align	2
_cp_file:                               ; @cp_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x26, [x0]
	mov	w8, #1
	str	w8, [sp, #44]
Lloh0:
	adrp	x8, _MINFBSZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MINFBSZ@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldrsw	x20, [x0, #16]
Lloh3:
	adrp	x8, _BLKMULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BLKMULT@GOTPAGEOFF]
Lloh5:
	ldrsw	x24, [x8]
	ldr	x25, [x0, #24]
	add	x1, sp, #24
	mov	x0, x2
	bl	_fstat
	str	x26, [sp, #16]                  ; 8-byte Folded Spill
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #0
	mov	x3, x26
	bl	_syswarn
	b	LBB0_3
LBB0_2:
	ldr	w8, [sp, #24]
	cmp	w8, #0
	csel	w23, w8, w23, gt
LBB0_3:
	mul	x26, x24, x20
	str	w23, [sp, #40]
Lloh11:
	adrp	x27, _buf@GOTPAGE
Lloh12:
	ldr	x27, [x27, _buf@GOTPAGEOFF]
	ldr	w1, [x27]
Lloh13:
	adrp	x28, _blksz@GOTPAGE
Lloh14:
	ldr	x28, [x28, _blksz@GOTPAGEOFF]
	ldr	w2, [x28]
	mov	x0, x22
	bl	_read
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x24, x0
	mov	x20, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x27]
	cmp	x25, x26
	b.le	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x3, sp, #40
	add	x4, sp, #44
	mov	x0, x19
	mov	x2, x24
	mov	x5, x23
	ldr	x6, [sp, #16]                   ; 8-byte Folded Reload
	bl	_file_write
	cmp	w0, w24
	b.eq	LBB0_8
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x2, x24
	bl	_write
	cmp	w0, w24
	b.ne	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, w24, uxtw
	ldr	w1, [x27]
	ldr	w2, [x28]
	mov	x0, x22
	bl	_read
	mov	x24, x0
	cmp	w0, #1
	b.ge	LBB0_5
	b	LBB0_11
LBB0_9:
	mov	x20, #0
	b	LBB0_11
LBB0_10:
	tbnz	w0, #31, LBB0_19
LBB0_11:
	ldr	x8, [x21, #24]
	cmp	x20, x8
	b.ne	LBB0_15
; %bb.12:
	add	x1, sp, #24
	mov	x0, x22
	bl	_fstat
	tbnz	x0, #63, LBB0_18
; %bb.13:
	ldr	x8, [x21, #32]
	ldr	x9, [sp, #32]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.14:
	ldp	x3, x2, [x21]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_15:
	ldp	x3, x2, [x21]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_16:
	mov	w0, #1
	bl	_paxwarn
LBB0_17:
	cmp	x25, x26
	b.gt	LBB0_21
	b	LBB0_24
LBB0_18:
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	x3, [x21, #8]
Lloh22:
	adrp	x2, l_.str.3@PAGE
Lloh23:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_20
LBB0_19:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	ldp	x8, x3, [x21]
	str	x8, [sp]
Lloh27:
	adrp	x2, l_.str.1@PAGE
Lloh28:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_20:
	mov	w0, #1
	bl	_syswarn
	cmp	x25, x26
	b.le	LBB0_24
LBB0_21:
	ldr	w2, [sp, #44]
	cbz	w2, LBB0_24
; %bb.22:
	ldr	x8, [x21, #24]
	cmp	x8, #1
	b.lt	LBB0_24
; %bb.23:
	mov	x0, x19
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	bl	_file_flush
LBB0_24:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MINFBSZ,4,2                    ; @MINFBSZ
	.comm	_BLKMULT,4,2                    ; @BLKMULT
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to obtain block size for file %s"

	.comm	_buf,4,2                        ; @buf
	.comm	_blksz,4,2                      ; @blksz
l_.str.1:                               ; @.str.1
	.asciz	"Failed write during copy of %s to %s"

l_.str.2:                               ; @.str.2
	.asciz	"File %s changed size during copy to %s"

l_.str.3:                               ; @.str.3
	.asciz	"Failed stat of %s"

l_.str.4:                               ; @.str.4
	.asciz	"File %s was modified during copy to %s"

.subsections_via_symbols
