	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copyfile                       ## -- Begin function copyfile
	.p2align	4, 0x90
_copyfile:                              ## @copyfile
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-48(%rbp), %rsi
	callq	_stat
	movl	$-1, %r13d
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	$0, -48(%rbp)
	je	LBB0_2
## %bb.3:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movl	%eax, %r15d
	movq	%r14, %rdi
	movl	$493, %esi                      ## imm = 0x1ED
	callq	_creat
	movl	$-1, %r13d
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:
	movl	%eax, %r12d
	movq	-48(%rbp), %rsi
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movl	%r15d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_8
## %bb.6:
	movq	-48(%rbp), %rdx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_write
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax
	movq	%rbx, %rdi
	movq	%rax, %rbx
	movq	%rax, %rsi
	callq	_munmap
	cmpq	%rbx, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_8
## %bb.7:
	movl	%r12d, %edi
	callq	_close
	xorl	%r13d, %r13d
	jmp	LBB0_9
LBB0_2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_slow_copyfile
	movl	%eax, %r13d
	jmp	LBB0_10
LBB0_8:
	movl	%r12d, %edi
	callq	_close
	movq	%r14, %rdi
	callq	_unlink
LBB0_9:
	movl	%r15d, %edi
	callq	_close
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copyfile                       ; -- Begin function copyfile
	.p2align	2
_copyfile:                              ; @copyfile
	.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	x19, x1
	mov	x20, x0
	add	x1, sp, #8
	bl	_stat
	cbz	x0, LBB0_3
LBB0_1:
	mov	w19, #-1
LBB0_2:
	mov	x0, x19
	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
LBB0_3:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_open
	tbnz	w0, #31, LBB0_1
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #493
	bl	_creat
	tbnz	w0, #31, LBB0_11
; %bb.6:
	mov	x21, x0
	ldr	x1, [sp, #8]
Lloh3:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _MAP_PRIVATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAP_PRIVATE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x4, x20
	mov	w5, #0
	bl	_mmap
Lloh9:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_10
; %bb.7:
	mov	x22, x0
	ldr	x2, [sp, #8]
	mov	x0, x21
	mov	x1, x22
	bl	_write
	mov	x23, x0
	ldr	x24, [sp, #8]
	mov	x0, x22
	mov	x1, x24
	bl	_munmap
	cmp	x23, x24
	b.ne	LBB0_10
; %bb.8:
	mov	x0, x21
	bl	_close
	mov	w19, #0
	b	LBB0_12
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_slow_copyfile
	mov	x19, x0
	b	LBB0_2
LBB0_10:
	mov	x0, x21
	bl	_close
	mov	x0, x19
	bl	_unlink
LBB0_11:
	mov	w19, #-1
LBB0_12:
	mov	x0, x20
	bl	_close
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
.subsections_via_symbols
