	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isc_file_safemovefile          ## -- Begin function isc_file_safemovefile
	.p2align	4, 0x90
_isc_file_safemovefile:                 ## @isc_file_safemovefile
	.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	%r12
	pushq	%rbx
	subq	$544, %rsp                      ## imm = 0x220
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	leaq	-568(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %ebx
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%ebx, %eax
	addq	$544, %rsp                      ## imm = 0x220
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	-568(%rbp), %rsi
	movq	%r14, %rdi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	leaq	-560(%rbp), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_strcpy
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcat
	movq	%r15, %rdi
	callq	_mkstemp
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	movl	%eax, %edi
	callq	__close
LBB0_5:
	leaq	-560(%rbp), %r15
	movq	%r15, %rdi
	callq	_DeleteFile
	movq	__S_IREAD@GOTPCREL(%rip), %rax
	movq	__S_IWRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	__chmod
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_MoveFile
LBB0_6:
	movq	__S_IREAD@GOTPCREL(%rip), %rax
	movq	__S_IWRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	__chmod
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_MoveFile
	movq	_TRUE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	xorl	%ebx, %ebx
	cmpq	%rcx, %r12
	jne	LBB0_12
## %bb.11:
	leaq	-560(%rbp), %rdi
	callq	_DeleteFile
	jmp	LBB0_12
LBB0_7:
	movl	$-1, %ebx
	cmpq	%rcx, %r12
	jne	LBB0_12
## %bb.8:
	leaq	-560(%rbp), %rdi
	movq	%r14, %rsi
	callq	_MoveFile
	testq	%rax, %rax
	jne	LBB0_12
## %bb.9:
	movq	_EACCES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_errno,4,2                      ## @errno
	.comm	_TRUE,8,3                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".XXXXX"

	.comm	__S_IREAD,4,2                   ## @_S_IREAD
	.comm	__S_IWRITE,4,2                  ## @_S_IWRITE
	.comm	_EACCES,4,2                     ## @EACCES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isc_file_safemovefile          ; -- Begin function isc_file_safemovefile
	.p2align	2
_isc_file_safemovefile:                 ; @isc_file_safemovefile
	.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
	sub	sp, sp, #528
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _FALSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x8]
	mov	x1, sp
	bl	_stat
	cbz	x0, LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _ENOENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _errno@GOTPAGE
Lloh9:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
LBB0_3:
	mov	w0, #-1
	b	LBB0_12
LBB0_4:
	mov	x1, sp
	mov	x0, x19
	bl	_stat
Lloh11:
	adrp	x22, _TRUE@GOTPAGE
Lloh12:
	ldr	x22, [x22, _TRUE@GOTPAGEOFF]
Lloh13:
	adrp	x23, __S_IREAD@GOTPAGE
Lloh14:
	ldr	x23, [x23, __S_IREAD@GOTPAGEOFF]
Lloh15:
	adrp	x24, __S_IWRITE@GOTPAGE
Lloh16:
	ldr	x24, [x24, __S_IWRITE@GOTPAGEOFF]
	cbnz	x0, LBB0_8
; %bb.5:
	ldr	x21, [x22]
	add	x0, sp, #8
	mov	x1, x19
	bl	_strcpy
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_strcat
	add	x0, sp, #8
	bl	_mkstemp
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.6:
	bl	__close
LBB0_7:
	add	x0, sp, #8
	bl	_DeleteFile
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w1, w9, w8
	mov	x0, x19
	bl	__chmod
	add	x1, sp, #8
	mov	x0, x19
	bl	_MoveFile
LBB0_8:
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w1, w9, w8
	mov	x0, x20
	bl	__chmod
	mov	x0, x20
	mov	x1, x19
	bl	_MoveFile
	ldr	x8, [x22]
	cmp	x21, x8
	cbz	x0, LBB0_14
; %bb.9:
	b.ne	LBB0_11
; %bb.10:
	add	x0, sp, #8
	bl	_DeleteFile
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldur	x8, [x29, #-72]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.13:
	add	sp, sp, #528
	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_14:
	b.ne	LBB0_3
; %bb.15:
	add	x0, sp, #8
	mov	x1, x19
	bl	_MoveFile
	cbnz	x0, LBB0_3
; %bb.16:
Lloh22:
	adrp	x8, _EACCES@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_2
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_errno,4,2                      ; @errno
	.comm	_TRUE,8,3                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".XXXXX"

	.comm	__S_IREAD,4,2                   ; @_S_IREAD
	.comm	__S_IWRITE,4,2                  ; @_S_IWRITE
	.comm	_EACCES,4,2                     ; @EACCES
.subsections_via_symbols
