	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_from_tempfile
_copy_from_tempfile:                    ## @copy_from_tempfile
	.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	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	testl	%r8d, %r8d
	je	LBB0_1
LBB0_5:
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$493, %edx                      ## imm = 0x1ED
	callq	_open
	movl	$-1, %r13d
	testl	%eax, %eax
	js	LBB0_10
## %bb.6:
	movl	%eax, %ebx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_elftc_copyfile
	testq	%rax, %rax
	js	LBB0_10
## %bb.7:
	movq	%r12, %rdi
	callq	_unlink
	testq	%rax, %rax
	js	LBB0_10
## %bb.8:
	movl	%r15d, %edi
	callq	_close
	jmp	LBB0_9
LBB0_1:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_rename
	testq	%rax, %rax
	js	LBB0_3
## %bb.2:
	movl	%r15d, %ebx
LBB0_9:
	movl	%ebx, (%r14)
	xorl	%r13d, %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EXDEV@GOTPCREL(%rip), %rcx
	movl	$-1, %r13d
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.4:
	movq	%rbx, %rdi
	callq	_unlink
	testq	%rax, %rax
	jns	LBB0_5
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EXDEV,8,3                      ## @EXDEV
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.no_dead_strip	_copy_from_tempfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_from_tempfile
_copy_from_tempfile:                    ; @copy_from_tempfile
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	cbz	w4, LBB0_5
LBB0_1:
Lloh0:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x22
	mov	w2, #493
	bl	_open
	tbnz	w0, #31, LBB0_10
; %bb.2:
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	bl	_elftc_copyfile
	tbnz	x0, #63, LBB0_10
; %bb.3:
	mov	x0, x21
	bl	_unlink
	tbnz	x0, #63, LBB0_10
; %bb.4:
	mov	x0, x20
	bl	_close
	b	LBB0_7
LBB0_5:
	mov	x0, x21
	mov	x1, x22
	bl	_rename
	tbnz	x0, #63, LBB0_8
; %bb.6:
	mov	x22, x20
LBB0_7:
	mov	w0, #0
	str	w22, [x19]
	b	LBB0_11
LBB0_8:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _EXDEV@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EXDEV@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x22
	bl	_unlink
	tbz	x0, #63, LBB0_1
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EXDEV,8,3                      ; @EXDEV
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.no_dead_strip	_copy_from_tempfile
.subsections_via_symbols
